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

Env secret store: add "prefix" metadata option (+ metadata.yaml) #2761

Merged
merged 4 commits into from Apr 11, 2023

Conversation

ItalyPaleAle
Copy link
Contributor

@ItalyPaleAle ItalyPaleAle commented Apr 9, 2023

Adds a new option to the Local Env secret store to limit operations to keys with a given prefix.

For example, if the component is initialized with the metadata prefix="MYAPP_", then:

  • Get with key FOO will look for MYAPP_FOO. The result will be still returned as FOO (i.e. the prefix name is removed from the returned values)
  • GetBulk will only return env vars with the prefix MYAPP_ (which is stripped from the returned value)

Also included:

  1. Added metadata.yaml for the component
  2. The denylist now denies every secret that starts with DAPR_ (after resolving the prefix), for future-proofing the component.

Tests have been included in the unit tests for the component

Docs issue: dapr/docs#3329

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
@berndverst berndverst added this pull request to the merge queue Apr 11, 2023
Merged via the queue into dapr:master with commit 3535c7e Apr 11, 2023
82 checks passed
@ItalyPaleAle ItalyPaleAle added this to the v1.11 milestone May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants