sops icon indicating copy to clipboard operation
sops copied to clipboard

SOPS_AGE_KEY doesn't accept space separated keys

Open airone-x1 opened this issue 1 year ago • 2 comments

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"

airone-x1 avatar Nov 28 '23 09:11 airone-x1

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

hiddeco avatar Nov 28 '23 11:11 hiddeco

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.

airone-x1 avatar Nov 28 '23 14:11 airone-x1