k8wiz
Flux CD
Hard
Security

You replaced the age public key in .sops.yaml during a key rotation. Which command makes existing encrypted files readable with the new key without changing their values?

Select your answer:

Show answer and explanation

Answer: sops updatekeys on each file

Explanation

sops updatekeys re-encrypts each file's data key for the recipients now listed in .sops.yaml and leaves the encrypted values as they are. sops rotate does something else: it generates a new data key and re-encrypts every value, which you add when a key may have leaked. Both need a private key that can decrypt the file today.

Read more about Flux CD