Closed rvoitenko closed 3 years ago
This is not a bug.
You have parse-json
set to true. In this case, if your AWS secret value is a valid JSON string, it will be parsed and all keys inside the JSON will be become individual secrets with their name in the format {Original AWS Secret Key}.{JSON Key}
(it is standard practice to use a period .
while flattening JSON objects). Due to this, the new secret name becomes TEST.KEY
which is then transformed into TEST_KEY
to make it compliant .
If you set parse-json
to false, the secret name will remain TEST
. Note that the secret value will be the raw AWS secret value (JSON string "{\n \"KEY\": \"VALUE\"\n}"
) in this case.
Thank you for explanation. But that's mean that with "parse-json=true" you always get this warning. Maybe change logic and make exception, when JSON flattening happen do analyze separately left part and right part of {Original AWS Secret Key}.{JSON Key} ?
That makes sense. I'll look into it. Thank you for the suggestion! For now, you can safely ignore the warning.
I think using {Original AWS Secret Key}_{JSON Key}
instead of {Original AWS Secret Key}.{JSON Key}
will suppress the warning.
Feel free to submit a PR if you want to make the change yourself :)
Ok, thanks for suggestion. I can ignore warnings, but it's annoying, because when I have secret with 5 key/values inside I get 5 warnings :) even I need only one key. I will try to submit PR after my local testing.
Hi, I'm still getting this error even with the latest commit. I think this issue should be re-opened.
As you can see from the screenshot, I'm using the latest commit.
Hello,
I always get warnings about secrets names not POSIX compliant. To verify it I've created secret "TEST" with key "KEY" and value "VALUE", so it's json looks like:
and the step looks like this:
In debug mode I see the following:
Which means that 'TEST.KEY' is analyzed as secret name, but it not secret name. It's concatenated secret name + '.' + secret key. Is this is a bug?