-
Notifications
You must be signed in to change notification settings - Fork 139
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
[BUG] V2.7.0 breaks JSON secrets #469
Comments
@jakubdrabik Thanks for reporting your issue. Could you please provide more information on how the JSON is stored in Vault? Specifically, what is the output of the following commands (with sensitive data redacted):
|
@fairclothjm of course vault kv get -mount=<MOUNT_PATH>
vault kv get -mount=<MOUNT_PATH> -format=json
|
Thanks @jakubdrabik! Are you doing any processing on the data before it is passed to the google-github-actions/auth action? Or are you simply doing |
We have the same issue. We are doing:
|
Same issue, broke my JSON secrets. Using 2.6 for now. |
Same issue, we are retrieving all the secrets at once by doing:
We downgraded the version to the 2.6.0 for now. |
We will work on fixing this. The issues looks to be with secrets stored in Vault as multi-line JSON strings. There are a few options to work around this at the moment: Pin your vault-action to v2.6.0
Or, if you want to keep using v2.7.0 (or v2), store your JSON string as a single line in Vault (this is the way google-github-actions/auth recommends storing secrets)
|
Released Vault GitHub Action v2.7.1 which fixes this regression |
I have a secret stored like this: {
"certdata": [
"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"
],
} This is working with v2.6.0 and v2.7.1, but is failing in v2.7.2. |
@mweber15 Hi, thanks for reporting. Can you please provide more details:
|
I'm not sure what the store command looked like. I do know it was stored as multi-line data, and I'm reasonably certain changing it to be stored as a single line would avoid the problem. My usage looks similar to this:
This works with 2.6.0 and 2.7.1, but fails with 2.7.0 or 2.7.2 with this output:
Sorry if this isn't enough to be actionable. I'm a bit limited in what I can provide right now. |
@mweber15 Thanks, what is the output of the following commands (with sensitive data redacted):
|
|
thanks @mweber15! I am beginning to think that vault-action may need a JSON format option to better handle JSON secrets. Vault already has this, and in fact does not support your use-case without the JSON data stored in Vault (as a map):
Without
With
So, maybe vault-action needs something similar? Because I think that the current behavior as of v.2.7.2 is correct since it most closely matches Vault's behavior. I will discuss this with my team this week. |
Closed by #478. We reverted to the behavior vault-action has had since v2.1.2. Updating to vault-action v2.7.3 will resolve this issue. |
Describe the bug
After the latest update (v2.7.0) our pipelines started failing due to unexpected tokens in JSON. Downgrading to v2.6.0 solved the issue.
To Reproduce
As an example, in the Vault, in the key-value engine, there's Google Service Account JSON content. It's been working fine, but now when it's passed to
google-github-actions/auth
action, it fails with:Additional context
Related to this: #466
cc @fairclothjm
The text was updated successfully, but these errors were encountered: