-
Notifications
You must be signed in to change notification settings - Fork 886
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fixes a bug with age encryption when specifying multiple age rec…
…ipients I encountered an issue when I tried so specify multiple age recipients in the .sops.yaml config file of my repository. I tried running `sops --age 'agePubKey1,agePubKey2' -e -i values.secret.yaml` which produced an appropriate file with two entries in the `/sops/age/-` part of the encrypted yaml file. However, I then continued to set multiple recipients in my .sops.yaml file to simplify handling: ```yaml creation_rules: - encrypted_regex: '^(data|stringData|spec)$' age: 'agePubKey1,agePubKey2' ``` However, this resulted in encryption only being done for the first specified agePubKey, not the second or third one. After digging a bit trough the code, I think this should fix it. I verified the fix locally on my machine and got it working. Also adding some unit tests and extending the repository examples so they can be decrypted using the age keys provided in `age/keys.txt` Signed-off-by: Cedric Kienzler <[email protected]>
- Loading branch information
Showing
4 changed files
with
38 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# created: 2020-07-18T03:16:47-07:00 | ||
# public key: age1yt3tfqlfrwdwx0z0ynwplcr6qxcxfaqycuprpmy89nr83ltx74tqdpszlw | ||
AGE-SECRET-KEY-1NJT5YCS2LWU4V4QAJQ6R4JNU7LXPDX602DZ9NUFANVU5GDTGUWCQ5T59M6 | ||
# created: 2021-12-12T01:39:30+01:00 | ||
# public key: age1tmaae3ld5vpevmsh5yacsauzx8jetg300mpvc4ugp5zr5l6ssq9sla97ep | ||
AGE-SECRET-KEY-1T0Z66WSXS6RMNCPSL7P2E8N4Q7SUD8VMG9ND27S08JL7Y2XAU9EQECHDS7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters