1
0
mirror of https://github.com/getsops/sops.git synced 2026-02-05 12:45:21 +01:00

135 Commits

Author SHA1 Message Date
Felix Fontein
6bb6621897 Make SingleValueStore extend Store instead of the other way around.
Signed-off-by: Felix Fontein <felix@fontein.de>
2025-09-27 20:17:14 +02:00
Felix Fontein
ffc1e265bb Ignore encryption selection options for binary store (and warn when they are used).
Signed-off-by: Felix Fontein <felix@fontein.de>
2025-09-27 20:17:14 +02:00
Felix Fontein
b09f60e9db Fix caching of Metadata.DataKey.
At the end of the function, the key was stored in m.DataKey. Since m was a copy
of the called object, this did not cache anything.

Signed-off-by: Felix Fontein <felix@fontein.de>
2025-03-25 20:30:22 +01:00
Felix Fontein
d887433f75 Encrypt and decrypt time.Time objects.
Signed-off-by: Felix Fontein <felix@fontein.de>
2025-02-16 14:24:28 +01:00
Felix Fontein
4c7dda8b3f Add --idempotent flag to set subcommand that will not write the file if no change happened.
Signed-off-by: Felix Fontein <felix@fontein.de>
2025-02-15 20:26:27 +01:00
Felix Fontein
8c60d48513 Do not encrypt if a key group is empty, or there are no key groups.
Signed-off-by: Felix Fontein <felix@fontein.de>
2024-09-25 22:25:37 +03:00
Felix Fontein
f6ece99630 Add check to avoid that UnencryptedCommentRegex matches encrypted comments.
Signed-off-by: Felix Fontein <felix@fontein.de>
2024-06-27 09:21:08 +02:00
Mitar
f63e844206 Support using comments to select parts to encrypt
Signed-off-by: Mitar <mitar.git@tnode.com>
2024-06-27 09:21:08 +02:00
rjeczkow
3d731f1a49 Update sops.go comment
Keys (not values) in cleartext.

Signed-off-by: rjeczkow <85222192+rjeczkow@users.noreply.github.com>
2024-06-26 17:16:16 +02:00
Sebastien Duthil
3ab8a4fe95 unset: add --idempotent flag
Signed-off-by: Sebastien Duthil <duthils@duthils.net>
2024-06-26 10:44:04 +02:00
Sebastien Duthil
1c2714dc1a add command unset
Signed-off-by: Sebastien Duthil <duthils@duthils.net>
2024-06-26 10:44:04 +02:00
Sebastien Duthil
7a217ee1e3 sops: fix typo in interface name
Signed-off-by: Sebastien Duthil <duthils@duthils.net>
2024-03-31 17:54:06 +01:00
Felix Fontein
1bda828b69 Make check whether file contains invalid keys for encryption dependent on output store.
Signed-off-by: Felix Fontein <felix@fontein.de>
2023-12-29 22:22:01 +01:00
Boris Kreitchman
c822b55290 Sort masterkeys according to decryption-order
Co-authored-by: Gabriel Martinez <19713226+GMartinez-Sisti@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Bastien Wermeille <bastien.wermeille@gmail.com>
Co-authored-by: Hidde Beydals <hiddeco@users.noreply.github.com>
Signed-off-by: Boris Kreitchman <bkreitch@gmail.com>
2023-12-18 08:38:43 +01:00
Mitar
051ce028c9 Support computing MAC only over values which end up encrypted
Signed-off-by: Mitar <mitar.git@tnode.com>
2023-11-07 11:59:08 +01:00
Hidde Beydals
92aa55f06a *: strings.Title deprecation
Replace with simple manual construction of upper boolean
representation, as the (construction of the) `golang.org/x/text/cases`
replacement is way too complex for this use case.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-23 23:30:35 +02:00
Vincent Behar
425032737c fix: set feature when adding a new root hierarchy
fixes #407

with this fix, when adding a new root hierarchy, the existing root entries won't be dropped anymore

Signed-off-by: Vincent Behar <v.behar@free.fr>
2023-08-15 22:56:03 +02:00
Hidde Beydals
f2a1d4c782 Rename Go module to github.com/getsops/sops/v3
This commit renames the Go module from `go.mozilla.org/sops/v3` to
`github.com/getsops/sops/v3` without a major version bump, to align
with new stewardship.

For more information around this change, refer to
https://github.com/getsops/sops/issues/1246.

For a one-liner to change the `go.mod` and any import paths in your
Go project making use of this module, run:

```
find /path/to/repo -type f \( -name "*.go" -o -name "go.mod" \) -exec sed -i 's|go.mozilla.org/sops/v3|github.com/getsops/sops/v3|g' {} \;
find /path/to/repo -type f \( -name "*.go" -o -name "go.mod" \) -exec sed -i '' 's|go.mozilla.org/sops/v3|github.com/getsops/sops/v3|g' {} \;
```

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-07-31 22:51:36 +02:00
Mikhail Katychev
0f2ebcf7ff added wrap verb to outputs (#817) 2021-02-17 22:21:20 +01:00
Rene Hernandez
8aca3cb790 Add support for --unencrypted-regex (#715)
* Add support for --unencrypted-regex

* Fix grammar mistake

* Add gofmt'd files
2020-09-02 19:15:50 +02:00
AJ Bahnken
8e21de8dbc Upgrade sops to go 1.13 (#566) 2019-11-18 10:06:58 -08:00
Antoine Rondelet
eed77eb4fb Fixed typo related to MACs (#524) 2019-09-11 15:15:55 -07:00
Jason Priebe
45076418c7 added encrypted-regex option 2019-08-14 15:39:21 -04:00
AJ Bahnken
6910225545 Adds support for sops publish-ing to Vault (#494)
* Add vault/api to vendor/

* Adds support for sops publish-ing to Vault

* Adds support for publishing secrets (unencrypted) to Vault
* Adds a new EmitAsMap for TreeBanches
* Adds documentation about sops publish-ing to Vault
* Initial integration/functional test for publishing to vault
2019-07-16 14:33:59 -07:00
Adriano
4d4891588d address comments 2019-07-11 10:47:43 -07:00
Adriano
4b99fa18b3 go lint 2019-07-11 10:30:32 -07:00
Adrian Utrilla
bbf17b3d84 Consolidate example trees 2019-01-23 10:54:27 +01:00
James Robson
dfa150bf75 Add multidoc encrypt/decrypt for YAML sources 2018-11-21 09:00:49 -07:00
AJ Bahnken
038001b3a3 Auditing support
* Implement auditing support

* Document auditing

* Address review comments

* Change log level for errors reading audit config

* Disable auditors during tests

* Make changes to docs suggested by @jvehent

* Code review fixes to init() in audit.go

* Implement encrypt audit event

* Include filepath in Tree created from sops/encrypt/encrypt

* Fix changes in audit.go to stay with current style

* Implement RotateEvent within rotate command

* github.com/lib/pq vendor dependencies

* Always get current user in PostgresAuditor.Handle()

* Initial CR fixes + gofmt

* gofmt

* fixed placement of audit event in rotate()

* Moved to a single table for audit events.

* Revert "Moved to a single table for audit events."

This reverts commit 7e7817e8a1.

* Remove audit tables delete protection rules

* Move to a single audit_event table with action column

* Remove unnecessary tree declaration
2018-04-22 21:21:58 +02:00
Adrian Utrilla
1ffc93dfb6 Refactor Store interface to reflect operations SOPS performs (#335)
* Refactor Store interface to reflect operations SOPS performs

Previously the Store interface tried to mimic the Marshaler and Unmarshaler
interfaces. This was a mistake, as it meant Stores had no idea whether the files they
were loading were encrypted or not.

Partially fixes #334

* Add regression test for loading plain JSON file with binary store
2018-04-20 10:13:46 +02:00
Dov Reshef
ed934575ee Address review comments 2018-04-08 17:53:54 +03:00
Dov Reshef
efd8521436 added the --encrypted-suffix option 2018-04-08 12:43:43 +03:00
Adrian Utrilla
9d6a8d0e21 Default to Warn log level unless verbose flag is passed 2018-03-07 17:18:45 +01:00
Adrian Utrilla
08eeea198a Add a few extra tests 2018-02-20 23:32:19 +01:00
Adrian Utrilla
f95a19cbec Rewrite set functionality to make it work with nested structures
Fixes #297
2018-02-20 17:15:02 +01:00
Adrian Utrilla
ca5429bb7e Improve error message for retrieving data key 2017-10-06 13:49:22 -07:00
Adrian Utrilla
bd846afea9 Add new logging to GCP KMS 2017-09-25 10:05:40 -07:00
Adrian Utrilla
f638d40692 Merge remote-tracking branch 'origin/master' into logging 2017-09-25 09:51:54 -07:00
jcepedavillamayor
64efc7ac5c Merge branch 'master' of https://github.com/mozilla/sops into yaml-nil 2017-09-20 08:29:55 +02:00
Adrian Utrilla
c7c94e9dc8 Merge branch 'master' into gcloud-kms 2017-09-18 09:27:06 -07:00
Adrian Utrilla
20046c1b48 Merge branch 'master' into logging 2017-09-16 17:59:00 -07:00
jcepedavillamayor
6e6d31c337 Fixed bug when encrypting nil values 2017-09-16 21:54:52 +02:00
Adrian Utrilla
7911bb1542 Merge branch 'master' into yaml-list-comments 2017-09-15 19:29:06 -07:00
Adrian Utrilla
bcf8adebea Merge branch 'master' into gcloud-kms 2017-09-15 14:34:02 -07:00
Adrian Utrilla
e6f46513dd Merge branch 'master' into encrypt-comments 2017-09-15 10:28:26 -07:00
Adrian Utrilla
3811698f54 Encapsulate stash inside cipher 2017-09-12 22:10:53 -07:00
Adrian Utrilla
63708c6485 Refer to Shamir threshold as threshold instead of quorum 2017-09-12 10:58:53 -07:00
Adrian Utrilla
93570b20d7 Fix golint errors 2017-09-12 09:59:23 -07:00
Calin Don
f7d72449b2 Rename Cloud KMS to GCP KMS 2017-09-12 15:37:30 +03:00
Adrian Utrilla
7d6597b60c Change path to additionalData in Cipher Encrypt and Decrypt
functions

While the path inside the tree is commonly used as additional data for
AES ciphers, this is not always the case, so the generic name is better.
2017-09-11 16:59:36 -07:00