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

22 Коммитов

Автор SHA1 Сообщение Дата
Vaibhav Kaushik e4abd871c7
Add HashiCorp Vault support (#655)
* feat: initial adding of vualt transit backend to sops
initial work on integration
feat(vault): added cli coomands working for vualt"

fix(vault): fixed config with correct tests

fix(vault): added vault to keygroup and to keyservice server

fixed metadata load

* feat(docs): added docs in README.md and in command help

fix(doc): fix rst formatting"

fix(doc): fix rst formatting

* fix(vault): addressed typos and fixes from autrilla

feat(cli): moved vault to hc-vault naming

* fix(test): typo while rebasing

* fix typos and imporve error messages for vault kms

* rename package from vault to hcvault

* refactor vault keysource url validation

* add negative test cases  for vault keysource

* add hc vault transit config option via objects
additional to URIs

* remove vault_example.yml

* streamline key name to snake case

* rename `BackendPath` to `EnginePath` for hc vault

* correction in hc-vault-transit commands

Signed-off-by: vnzongzna <github@vaibhavk.in>

* resolving conflict

Signed-off-by: vnzongzna <github@vaibhavk.in>

* Apply suggestions from code review

Co-Authored-By: Adrian Utrilla <adrianutrilla@gmail.com>

* allowing only hc_vault_transit_uri as input

Co-Authored-By: gitirabassi
Co-Authored-By: ldue
Signed-off-by: vnzongzna <github@vaibhavk.in>

Co-authored-by: gitirabassi <giacomo@tirabassi.eu>
Co-authored-by: ldue <larsduennwald@gmail.com>
Co-authored-by: Vaibhav Kaushik <vaibhavkaushik@vaibhavka-ltm1.internal.salesforce.com>
Co-authored-by: Adrian Utrilla <adrianutrilla@gmail.com>
2020-05-04 21:27:51 +02:00
Spencer Judd 16343503c2 Fix newline encoding for dotenv store (#612)
When reading and writing dotenv files, we need to make sure to
encode/decode newline characters. SOPS does not currently do this, as
can be seen from the below:

```console
$ echo '{"foo": "foo\nbar\nbaz"}' > plaintext.json
$ sops -e --output ciphertext.json plaintext.json
$ sops -d --output-type dotenv ciphertext.json
foo=foo
bar
baz
```

This output, is invalid and cannot even be fed back into SOPS:

```console
$ sops -d --output-type dotenv --output plaintext.env ciphertext.json
$ sops -e plaintext.env
Error unmarshalling file: invalid dotenv input line: bar
```

This commit fixes the issue, such that the final `sops -d ...` command
above produces the correct output:

```console
$ sops -d --output-type dotenv ciphertext.json
foo=foo\nbar\nbaz
```
2020-01-24 18:03:34 +01:00
AJ Bahnken 8e21de8dbc
Upgrade sops to go 1.13 (#566) 2019-11-18 10:06:58 -08:00
Jason Priebe 45076418c7 added encrypted-regex option 2019-08-14 15:39:21 -04: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
mark kelly eb7b22a4a0
Merge branch 'master' into master 2019-01-14 10:44:55 +00:00
Mark Kelly 7605dd76b1 Added aws_profile
* Decrypt
* Command Line
* Master Key
* Encrypt
* .sops.yaml
2019-01-11 17:11:43 +00:00
Patrick Armstrong c70c52be58 Added support for ini files 2019-01-10 21:36:16 -08:00
Calle Pettersson 9fa4f0e90e Add support for Azure Key Vault 2018-06-17 22:50:30 +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 14a55401d3
Fix metadata not found returning the wrong error 2017-10-03 14:51:59 -07:00
Calin Don 15ea81dbd2
Add keyservice support 2017-09-18 12:48:37 +03:00
Adrian Utrilla 08a4c7e657
Add documentation to all main packages 2017-09-12 20:01:12 -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
Adrian Utrilla 7d194dda4a
Reorder store structs to match old order 2017-09-11 13:08:21 -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 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