-
Notifications
You must be signed in to change notification settings - Fork 18
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
How to pull secrets that are part of a json structure? #6
Comments
@joannbrereton I'm not sure if what you're talking about is possible, but one workaround is to simply store If you click on the Plaintext tab and erase everything but the secretvalue, Summon will fetch it in the format you want. I understand that this may not be desirable, but you are keying on the secret name already. |
Yeah. It seems that AWS secrets can be |
@jepperson2 OK, I'll see what I can do about that. It's part of a particular solution so I'm not sure I'll be able to move it to plain text but I'll check around to see if that would break anything else. |
@joannbrereton Alternatively, you could wrap whatever consumes that secret in some parsing logic, or even run it through jq if you have a lot of key value pairs/nests. |
Here's a proposal: Variable IDs can take the form You can have the following in your secrets.yml
Run:
Get:
PRs welcome :) |
That's pretty much what I was looking for, @doodlesbykumbi . :-) Not sure if I'll have time to PR, but I can play around when I do. |
@joannbrereton try out the branch for the PR and see if it works for you :) |
@joannbrereton @jepperson2 This issue should be resolved with the new v0.3.0 release. Give this new version a try and let us know if it works for you. :) CC: @synax Closing as resolved. |
@sgnn7 This is excellent! Thank you for addressing this issue. While the alphanumeric and As a result, keys that include '#' or '$' fail to be fetched properly. For example, a secrets.yml like this one fails:
Because MY_SECRET1 has a '$' in it, it is being parsed as though a corresponding The command In the above example, MY_SECRET2 is populated with the entire JSON struct of the secret while MY_SECRET3 and MYSECRET4 are blank. These are edge cases, but I'm noting them here in case users of this release run into issues with keys with these characters. One resolution to the problems with '#' could be to use |
@jepperson2 Thank you for reporting the above. I've recorded the 2 issues. Please have a look. I'd love feedback particularly as to whether I've characterised it well :)
|
@doodlesbykumbi Thank you for your prompt response and action! They both seem well characterized. The |
So I've moved along with this and now I've run into a second problem.
I've entered a secret with key and value into AWS Secrets Manager
e.g.
Entered key "my/secret/name" as "my/secret/key" and "my/secret/value" as shown
So, I've entered the following into my secrets.yml:
If I use
What I get returned is:
which is unfortunately, not very useful if I want to pass it to, for instance, my
docker-compose up
command which actually expectsMY_SECRET=mysecretvalue
.Is there some notation that let's me pull the value associated with "mysecretkey" inside of the AWS secret named my/secret/name?
The text was updated successfully, but these errors were encountered: