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

30 Commits

Author SHA1 Message Date
Enbiya Goral
72e903ee88 feat: Add HuaweiCloud KMS support
Signed-off-by: Enbiya Goral <100806254+enbiyagoral@users.noreply.github.com>
2025-12-12 09:41:42 +03:00
Felix Fontein
eda6ec1871 Adjust protoc command line for latest versions of plugins; fix protoc Go plugin versions and install plugins locally.
Signed-off-by: Felix Fontein <felix@fontein.de>
2024-12-02 19:16:12 +01:00
Morten Linderud
47a6c979ac keyservice: update protobuf to an recent release
Signed-off-by: Morten Linderud <morten@linderud.pw>
2024-12-02 19:16:12 +01:00
Hidde Beydals
faa0e29136 *: deal with various gRPC deprecations
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-23 13:42:49 +02:00
Hidde Beydals
eeaf9f76d5 *: address various simple staticcheck warnings
Deprecation of `io/ioutil`, removal of unused functions, possible nil
pointer dereference, and other tiny nits.

There are (many) more, but these would require their own (commit)
context.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-17 00:16:40 +02:00
Hidde Beydals
ca0e15eda3 *: solve go vet errors
```
stores/dotenv/store.go:74:12: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
stores/dotenv/store_test.go:29:10: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
keyservice/server.go:149:9: assignment copies lock value to key: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:206:20: call of ks.prompt copies lock value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:214:22: keyToString passes lock by value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:231:29: prompt passes lock by value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:232:27: call of keyToString copies lock value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:251:9: assignment copies lock value to key: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:308:20: call of ks.prompt copies lock value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
stores/yaml/store_test.go:27:11: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
stores/yaml/store_test.go:39:11: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
stores/yaml/store_test.go:107:5: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
stores/yaml/store_test.go:139:13: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
decrypt/example_test.go:34:1: ExampleDecryptFile refers to unknown identifier: DecryptFile
```

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-17 00:14:20 +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
Hidde Beydals
7138185fbb keyservice: accept KeyServiceServer in LocalClient
This allows for easier injection of your own (local) key service server
implementation, in situations where e.g. you do not want to rely on
environment variables or other runtime defaults.

It is not of impact to end-users, but improves the experience of
developers making use of SOPS as an SDK to e.g. provide decryption
services to users. As they will now in many cases end up copying this
bit of code to make this precise change.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-31 14:33:16 +02:00
Jimmy Cuadra
1dbea5d6be Fix whitespace errors. 2020-09-21 12:47:15 -07:00
Jimmy Cuadra
9ca46d0d96 Use idiomatic style for assignment and error handling.
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2020-09-21 12:47:15 -07:00
Jimmy Cuadra
e8d00046e1 Add support for age. 2020-09-21 12:47:13 -07: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
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
AJ Bahnken
8e21de8dbc Upgrade sops to go 1.13 (#566) 2019-11-18 10:06:58 -08:00
Adriano
87adc130eb code cleanup [1/5] - go fmt 2019-07-08 09:46:36 -07:00
jpsrn
f2e48b1a2c Fix KMS encryption context handling (#435)
* Fix KMS encryption context handling

The code copying encryption context value strings to a map
containing string pointers was incorrectly getting a pointer to a
string variable which is being re-used by the for loop, causing
all keys to point to the same value string.

* Extract helper method for KmsKey to KMS MasterKey conversion

* Add test for kmsKeyToMasterKey helper function
2019-03-21 10:08:37 -07:00
Mark Kelly
ac5ca1f05c AWS Profiles 2019-01-25 12:42:41 +00:00
Adrian Utrilla
9a56f8055e Revert "AWS Profile" 2019-01-24 16:50:41 +01:00
Mark Kelly
7605dd76b1 Added aws_profile
* Decrypt
* Command Line
* Master Key
* Encrypt
* .sops.yaml
2019-01-11 17:11:43 +00:00
Calle Pettersson
9fa4f0e90e Add support for Azure Key Vault 2018-06-17 22:50:30 +02:00
Adrian Utrilla
37b6fff84d Introduce key service flag optionally prompting users on encryption/decryption (#322) 2018-04-11 14:46:50 +02:00
Adrian Utrilla
99aff169be Fix use of unintialized maps 2017-10-20 15:26:37 +02: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
93570b20d7 Fix golint errors 2017-09-12 09:59:23 -07:00
Adrian Utrilla
cdbac51221 s/GPG/PGP 2017-09-12 09:00:12 -07:00
Adrian Utrilla
252e0dba17 Fix style problems 2017-08-29 17:57:29 -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
6e4dfdec09 First step towards remote keys 2017-08-17 11:31:54 -07:00