sops
sops copied to clipboard
SOPS_AGE_KEY doesn't accept space separated keys
SOPS_AGE_KEY environment variable accept mutiples keys but thoses keys must be separated by new line. As an environment variable it would be more convenient to accept also any "whitespace" separator.
It's OK with :
$ export SOPS_AGE_KEY=$(cat age1.key age2.key)
But it's not OK with
$ export SOPS_AGE_KEY="AGE-SECRET-KEY-xxxxxxxxx AGE-SECRET-KEY-yyyyyyyyy"
We use the official parser from age itself, and I do not think we would like to replace this for something custom:
https://github.com/FiloSottile/age/blob/main/parse.go#L23
Yes, but Age doesn't use environnent variables so their readers are thougth for input file.
SOPS_AGE_KEY
is Sops specific. It would be more user friendly to enable space separated keys and convert this value internally before calling Age parser.