FR: Read just specified keys
See original GitHub issueHi.
Thanks for great library.
We don’t allow our applications in production to enumerate secrets in account. Instead we give them one or several full paths to secrets that app will need and it can access only them.
I can provide a PR, but I’m not sure how to approach this. E.g. we can provide something like AllowedKeys
as a property in SecretsManagerConfigurationProviderOptions
and if it’s not empty just get only those keys instead of enumerating all of them.
Would you accept such a PR? Or, probably, you have better idea how to implement this feature?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Retrieve only specific keys from collection - firebase
Firebase's Web/JavaScript API always returns the full tree under the nodes that you request. The most common workaround for this is that people ......
Read more >Read a key sequence only from a specified keymap
Is there a way to prompt the user for a key sequence, like read-key-sequence , but only including keys from a specified keymap?...
Read more >No rows exist for the specified keys in Component Interface ...
No rows exist for the specified keys in Component Interface LOCATION ... If this is a custom AE, you cannot just use the...
Read more >There are no table entries found for specified key..????
Hi..... Experts.... I created one custom table with four fields... 1. MANDT. 2. E-ID (char10). 3. E-TYPE. 4. E-DESC. here first two are...
Read more >READE (Read Equal Key)
If the full key of the next record is equal to that of the current record, the next record in the file is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had a similar requirement. In terms of permissions, the extension requires kms:Decrypt, kms:Encrypto, secretsmanager:ListSecrets and secretsmanager:GetSecretValue.
If anyone is in a similar boat and can alter the IAM Policy attached to the role/user/group then something like the following works:
{ “Version”: “2012-10-17”, “Statement”: [ { “Sid”: “”, “Effect”: “Allow”, “Action”: [ “kms:Decrypt”, “kms:Encrypt”, “secretsmanager:ListSecrets” ], “Resource”: “*” }, { “Sid”: “”, “Effect”: “Allow”, “Action”: “secretsmanager:GetSecretValue”, “Resource”: “list urn for the secret you want to allow here” } ] }
You can’t specify individual Urns for ListSecrets, but can for GetSecretValue and so it’s possible to restrict access in this way. Then, depending on the environment, you can specify the urn’s to be allowed for that environment and then use the SecretFilter functionality so that GetSecretValue is only called on the whitelisted urn’s e.g:
This approach does mean that the application sees the urn of all secret keys with the LIstSecrets functionality, but is only able to retreive the secret keys that relate to the environment the user has access to.
I don’t have an ETA to be frank. I am between jobs right now so you can understand it’s hard for me to find the time for this.
As for every open source project, contributions from the user base are always welcome, even if just to create a PoC.