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

76 Commits

Author SHA1 Message Date
Andy Freeland
bd63010d67 Check type casts and add tests 2017-03-22 10:26:22 -07:00
Andy Freeland
89e75471cc Fix KMS encryption context for backwards compatibility with SOPS 1.x
In SOPS 1.x, KMS encryption context was stored as a JSON object, but
SOPS 2.0 stored it as a comma-separated list of key/value pairs:

```
$ jq '.sops.kms | .[].context' encrypted-python
{
  "a": "b",
  "c": "d"
}
> jq '.sops.kms | .[].context' encrypted-go
"a:b,c:d"
```

The two outputs are incompatible with each other and caused a stack
trace when reading files encrypted with SOPS 1.x.

This patch restores read and output compatibility with SOPS 1.x.

Fixes #190.
2017-03-22 09:59:51 -07:00
Aaron Meihm
e48303b4f1 update createSession to use standard token provider 2017-03-06 14:16:21 -06:00
Adrian Utrilla
454d21d87f Update mocks 2017-02-22 12:26:02 +01:00
Alvaro Gutierrez Perez
1007ed145b Modify TestKeyToMap to test the sorting of context keys 2016-11-06 02:47:52 +01:00
Alvaro Gutierrez Perez
9868a093a9 Sort outContext array alphabetically before joining it in a string 2016-11-06 02:47:00 +01:00
Julien Vehent [:ulfr]
520eab6b9a Fix bug when KMS ARN are in multiple regions (#149)
* Don't reuse KMS service between master keys

* Improve error handling in cmd

* Fix KMS service initialization issue with mocking
2016-11-01 14:15:20 +01:00
Adrian Utrilla
c6fece7318 Added tests 2016-10-31 17:28:59 +01:00
Adrian Utrilla
3fa7cc43f1 Add KMS encryption context support
Fixes #93
2016-10-31 16:56:14 +01:00
Jeremiah Orem
76f4ae8db0 return lists of pointers to avoid repackaging 2016-10-28 10:04:18 -07:00
Julien Vehent [:ulfr]
d9b69e7dfa Merge pull request #133 from mozilla/imports
Added go.mozilla.org imports
2016-10-27 13:42:38 -04:00
Adrian Utrilla
271753eabd Recreated mocks for newest AWS SDK, fixed yaml import 2016-10-27 19:13:01 +02:00
Adrian Utrilla
71d4a3cfd2 Added go.mozilla.org imports
Fixes #122
2016-10-27 18:09:19 +02:00
Adrian Utrilla
4e4abff176 Mocked KMS Encrypt and Decrypt methods 2016-08-25 13:06:51 -07:00
Adrian Utrilla
49a3ef3e3c Added Makefile 2016-08-24 12:37:18 -07:00
Adrian Utrilla
c9d63a838e Fixed golint issues 2016-08-24 10:29:28 -07:00
Adrian Utrilla
9ffe1c4908 Renamed GPGMasterKey and KMSMasterKey to MasterKey 2016-08-23 13:28:56 -07:00
Adrian Utrilla
e4c57636d2 Use UTC instead of local timezone 2016-08-23 12:57:13 -07:00
Adrian Utrilla
762c5cd559 Use time.RFC3339 instead of custom format 2016-08-23 12:54:13 -07:00
Adrian Utrilla
e885735260 aes decryptor now takes []byte keys 2016-08-23 12:49:18 -07:00
Adrian Utrilla
c522a7e93f Added ability to add and remove keys from files 2016-08-22 17:47:37 -07:00
Adrian Utrilla
0679be3598 Implemented unencrypted suffix
Move keysource tests to their respective packages
2016-08-22 14:22:04 -07:00
Adrian Utrilla
15b9c0ea5e Compare time durations directly without converting to numbers 2016-08-19 15:38:33 -07:00
Adrian Utrilla
0fbba59163 Added YAML encryption 2016-08-18 15:49:27 -07:00
Adrian Utrilla
3997384272 Set key creation date to current date 2016-08-17 15:24:22 -07:00
Adrian Utrilla
791cd693c2 Refactored PGP and KMS into their own packages 2016-08-11 11:44:00 -07:00