Hi Charles,
I guess if you have secrets in environment variables, and you are
worried about them leaking via Unix process listing, then you do not
type "export foo=bar" on the command line and instead the secrets
ultimately reside in some shell rc file (eg .profile).
If that is true, then placing secrets in files is inside your threat
model. And then, you can bring secrets into Jsonnet via files in a
few ways.
You can import a single file with a hard-wired file name that you
treat as transient:
echo '"foo"' > secret.txt ; jsonnet -e 'local s = import "secret.txt";
s'; rm -f secret.txt
Instead of "echo" you might use eg the "pass" program or some other
CLI decryptor. That would be more secure than relying on env var
settings in .profile files.
Or, if you have many secrets, you might find it more convenient to
maintain a json/yaml file holding them all as an object, import that
file and then provide an object attribute key name of the particular
secret(s) needed by the Jsonnet code.
You can also combine the decryptor+hard-wired import and the
structured data of these two approaches via a named pipe. Well, I
didn't test, but I guess that should work.
-Brett.
> --
> You received this message because you are subscribed to the Google Groups "Jsonnet" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
jsonnet+u...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/jsonnet/1e452cdd-640a-4efb-8071-85044ba6a5e5n%40googlegroups.com.