-
Notifications
You must be signed in to change notification settings - Fork 902
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
sops sometimes fails to handle files with context #320
Comments
Hmm, weird. Specially weird that it appears to work for files created with 1.x.
Could you clarify what you mean by this? I'm not sure I understand. Some things that could help diagnose this:
|
@dlovitch any news on this? |
I'm running into this same issue using 3.0.3. I tried using 2.0.10 instead, and it seemed to work fine. With 3.0.3, on a file created using encryption context (AWS KMS), would give this error almost exactly 50% of the time (10 failures on 20 attempts):
I tried this same process on 2.0.10, and all 20 attempts were successful. |
I ran into the same issue and I was able catch sops sending incorrect encryption context key-value pairs by inspecting AWS Cloudtrail logs for KMS service. I created a pull request (#435 ) that fixes the issue. Please note that in order to trigger the bug, you need to have at least two encryption context key-value pairs with at least two unique values. The pull request I referenced contains more information. |
Fixed in 3.3.0 with #435 |
We've been seeing odd/intermittent issues with files that have context, so I generated some small test case files that have
working: ok
as the only thing in them.We used the same KMS key (and only that KMS key) for all tests and I used sops 1.16 for the 1.x tests.
My test should result in a
-
for a success andX
for a failure.sops 3.0.2 with a sops 3.0.2-encrypted file (with context)
sops 3.0.2 with a sops 3.0.2-encrypted file (no context)
sops 3.0.2 with a sops 1.16-encrypted file (with context)
sops 1.16 file with a sops 1.16-encrypted file (with context):
When running
sops -d with_context.yml
:Success:
Failure:
We log all error messages and when looking up that for the encryptionContext, somehow the
app
andenv
end up being the same value (the local sops yaml file shows two different values).It feels like something isn't iterating over all possible encryption context keys.
Let me know if there's anything I can do to help/research.
For reference:
with_context.yml
no_context.yml
with_context_v1.yml
The text was updated successfully, but these errors were encountered: