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

112 Commits

Author SHA1 Message Date
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
Adrian Utrilla
05e3962be6 Cache data key 2017-08-23 11:19:24 -07:00
Adrian Utrilla
48ee4bff63 First step towards keygroups 2017-08-23 11:06:47 -07:00
Adrian Utrilla
2c2c1a8b8c Remove unused UpdateMasterKeysIfNeeded functions 2017-08-22 16:35:32 -07:00
Adrian Utrilla
44b26690c2 Merge remote-tracking branch 'origin/shamir' into remote-keys-shamir
Shamir tests do not pass due to KeyService not knowing about the fake
MasterKey used by the tests
2017-08-22 15:39:24 -07:00
Adrian Utrilla
2e21f57c31 Make UpdateMasterKeysIfNeeded use the key service 2017-08-17 16:14:42 -07:00
Adrian Utrilla
99f5a1d883 Make cmd/sops use KeyService 2017-08-17 11:32:04 -07:00
Adrian Utrilla
10dd9b5441 Use KeyService for all encrypt and decrypt operations 2017-08-17 11:32:04 -07:00
Adrian Utrilla
745a0631ba Move MasterKey to separate package to avoid import cycles 2017-08-17 11:32:04 -07:00