You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've upgraded our sops binary from v3.8.1 to v3.9.0. Without changing any encrypted file, our pipeline jobs started failing due to this new error. I've put together a few steps to replicate the issue. Let me know if you need any more info!
$ docker build -t sops .
$ docker run -it --entrypoint=/bin/bash sops
$ sops381 --verbose --decrypt dev.env
[AWSKMS] time="2024-07-02T17:21:36Z" level=info msg="Decryption succeeded" arn="arn:aws:kms:REDACTED"
[SOPS] time="2024-07-02T17:21:36Z" level=info msg="Data key recovered successfully"
[SOPS] time="2024-07-02T17:21:36Z" level=debug msg="Decrypting tree"
$ sops390 ---verbose --decrypt dev.env
[AWSKMS] time="2024-07-02T17:21:36Z" level=info msg="Decryption failed" arn="arn:aws:kms:REDACTED"
[AWSKMS] time="2024-07-02T17:21:36Z" level=info msg="Decryption failed" arn="arn:aws:kms:REDACTED"
Failed to get the data key required to decrypt the SOPS file.
Group 0: FAILED
arn:aws:kms:REDACTED: FAILED
- | could not load AWS config: failed to get shared config
| profile, dev
arn:aws:kms:REDACTED: FAILED
- | could not load AWS config: failed to get shared config
| profile, dev
Recovery failed because no master key was able to decrypt the file. In
order for SOPS to recover the file, at least one key has to be successful,
but none were.
The text was updated successfully, but these errors were encountered:
// keytype + toMap make a unique combination per key typevalueMap:=v.ToMap()
delete(valueMap, "created_at")
delete(valueMap, "enc")
key:=fmt.Sprintf("%T/%v", v, valueMap)
and report if this fixes your problem?
It could be that the "make keys unique" is causing your issue.
(I know this is not the clean solution we would wish for in the long term, I just want to know if this is the problem)
Since the encrypted file contains two keys, and the 3.9.0 error message also mentions two keys, I don't think this is related to making keys unique since both keys seem to be tried.
My guess is that this is related to some updated dependency. I don't use any KMS (and have access to none) so I have no way to test this myself...
I've upgraded our sops binary from v3.8.1 to v3.9.0. Without changing any encrypted file, our pipeline jobs started failing due to this new error. I've put together a few steps to replicate the issue. Let me know if you need any more info!
The text was updated successfully, but these errors were encountered: