Open ckuethe opened 2 years ago
I guess the problem is that there is no official way to specify any other value type than string in dotenv files.
There is also no reason why sops should warn you on encryption, since such a file is totally valid - for everything but decryption to dotenv.
Any resolution on this?
Two suggestions:
I'd prefer the second, since I'm already having to do some checking and parsing on the values from the environment, eg. converting "2" (str) into 2 (int) or 2.0 (float)
For my use case, I'd be happy with a decrypted string/array of characters, and my program can do any necessary checks and parsing.
The decrypted object is a Go data structure. You need to specify how to serialize it, there's no canonical useful way to dump it.
Short version: I'm unable to use
sops exec-env
where a value in the JSON file is a list. I didn't see any indication in the documentation that this is a known limitation.SOPS version
Plaintext JSON
I created a
.sops.yaml
so that the file is encrypted using my preferred KMSSOPS doesn't complain or warn me while encrypting the file
exec-file works
exec-env does not work
sops_test_exec.py
andsops_test_env.py
are just trivial demo programs that load the decrypted secret values from the{}
file or from the environment.