From c5a9b7a2e14e8e5b1565e622a59ead3881537b7d Mon Sep 17 00:00:00 2001 From: Shensen1 <106178018+Shensen1@users.noreply.github.com> Date: Sun, 19 May 2024 11:09:24 +0200 Subject: [PATCH] sops: update page (#12719) * sops: update page --------- Co-authored-by: Magrid Co-authored-by: spageektti Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Co-authored-by: K.B.Dharun Krishna --- pages/common/sops.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pages/common/sops.md b/pages/common/sops.md index 88fe9c3183..b3d88b7d6c 100644 --- a/pages/common/sops.md +++ b/pages/common/sops.md @@ -1,28 +1,32 @@ # sops -> SOPS (Secrets OPerationS): manage secrets. +> SOPS (Secrets OPerationS): a simple and flexible tool for managing secrets. > More information: . - Encrypt a file: -`sops -e {{path/to/myfile.json}} > {{path/to/myfile.enc.json}}` +`sops -e {{path/to/file.json}} > {{path/to/file.enc.json}}` - Decrypt a file to `stdout`: -`sops -d {{path/to/myfile.enc.json}}` +`sops -d {{path/to/file.enc.json}}` -- Rotate data keys for a sops file: +- Update the declared keys in a `sops` file: -`sops -r {{path/to/myfile.enc.yaml}}` +`sops updatekeys {{path/to/file.enc.yaml}}` + +- Rotate data keys for a `sops` file: + +`sops -r {{path/to/file.enc.yaml}}` - Change the extension of the file once encrypted: -`sops -d --input-type json {{path/to/myfile.enc.json}}` +`sops -d --input-type json {{path/to/file.enc.json}}` - Extract keys by naming them, and array elements by numbering them: -`sops -d --extract '["an_array"][1]' {{path/to/myfile.enc.json}}` +`sops -d --extract '["an_array"][1]' {{path/to/file.enc.json}}` -- Show the difference between two sops files: +- Show the difference between two `sops` files: `diff <(sops -d {{path/to/secret1.enc.yaml}}) <(sops -d {{path/to/secret2.enc.yaml}})`