Граф коммитов

120 Коммитов

Автор SHA1 Сообщение Дата
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
Calin Don 0a0a803f77
Add google cloud KMS support 2017-09-11 21:52:30 +03:00
Adrian Utrilla aee7253db6
Remove unnecessary type conversion 2017-09-11 10:18:27 -07:00
Adrian Utrilla 8541e26f7a
Fix data key retrieval bug with 1 key group
This happened when there's multiple master keys inside a single key
group. SOPS would decrypt the data key with every single key in the
group, when only one is needed. This meant that multiple "parts" are
found, so because SOPS encountered != 1 part without using Shamir, it
errored out.
2017-09-11 10:14:41 -07:00
Adrian Utrilla 55c7174713
Use logrus features for better logging 2017-09-07 10:49:27 -07:00
Adrian Utrilla 17d5d6b65c
Move all loggers to logrus 2017-09-06 17:36:39 -07:00
Adrian Utrilla 3de6531eba
Fix data key retrieval bug with 1 key group
This happened when there's multiple master keys inside a single key
group. SOPS would decrypt the data key with every single key in the
group, when only one is needed. This meant that multiple "parts" are
found, so because SOPS encountered != 1 part without using Shamir, it
errored out.
2017-09-02 10:47:14 -07:00
Adrian Utrilla a7b2fbf8a7
Fix error messages
Fixed typo
Changed 'sops branch' to 'sops metadata'
2017-08-29 13:22:00 -07:00
Adrian Utrilla 4f4968f32e
Make GroupQuorum an int 2017-08-29 13:21:34 -07:00
Adrian Utrilla eb00619d0d
Make Metadata.ShamirQuorum an uint
The quorum should never be negative.
2017-08-29 12:59:50 -07:00
Adrian Utrilla a9582158d2
Revert UnmarshalMetadata returning pointer 2017-08-29 12:16:00 -07:00
Adrian Utrilla b6b976d337
Only error if no keyservice can update the masterkey 2017-08-24 17:39:19 -07:00
Adrian Utrilla b5224ae2d6
Reimplement --add/rm-pgp/kms 2017-08-24 15:47:53 -07:00
Adrian Utrilla 9e0da47372
Clean up encrypt and decrypt commands 2017-08-24 12:04:28 -07:00
Adrian Utrilla ebda335bf3
Package stability comment 2017-08-23 17:15:34 -07:00
Adrian Utrilla 13b70024d0
Refactor metadata marshalling
**IMPORTANT** This breaks compatibility of the file format in 1.x for
json files, due to the version being encoded as a number in json files.
The fix for this is easy, however. One can either use a previous version
of sops in the range [2.0.0, 2.0.9] to edit the file, or one can manually edit
the encrypted file and change the version from a number to a string

Previously we basically hand-converted the metadata struct into a map
which we then passed to the stores. Now, we convert the metadata struct
to a "serialization" struct, which the stores serialize
2017-08-23 17:10:39 -07:00