Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vault backend, parse json secrets #172

Open
none0nfg opened this issue Sep 18, 2023 · 2 comments
Open

vault backend, parse json secrets #172

none0nfg opened this issue Sep 18, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@none0nfg
Copy link

none0nfg commented Sep 18, 2023

Is it possible to parse JSON secrets from vault, and use JSON as an object in values files?

Now vals can parse json, but only 1 key (can't parse whole json secret), also parsed json pastes as a string.

Examples
That is vault's secret data

"data": {
    "data": {
      "key1": {
        "myData": [
          "qwerty"
        ]
      },
      "key2": {
        "myData": [
          "uiop"
        ]
      }

Here is values.yaml

global:
  tag: ref+vault://engine/dir/secretName/key1

It will work. And the tag value would be like map[myData:[qwerty]] of the type String.

But it would be great to have an opportunity to process that data in templates.

Or maybe there is a way to parse a string to an object ?

@mumoshu
Copy link
Collaborator

mumoshu commented Dec 1, 2023

@none0nfg Hey! I build vals because I wanted a way to inject secrets into a yaml file without templating. So, I won't add support for templating.

However, a way to parse a string to an object would be a good addition to vals!
Maybe it could be a per-ref-url option, something like &as=object or more generic &fn=parse_json.

@mumoshu mumoshu added the enhancement New feature or request label Dec 1, 2023
@aslafy-z
Copy link
Contributor

Duplicate #115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants