top | item 41769385

(no title)

Jakob | 1 year ago

As middle ground for small scripts I like implementations like the one from 1Password: The environment variables contain the path to the secret:

export DB_PASSWORD="op://app-prod/db/password"

Calling the script with `op run scriptname` replaces the secret path with the actual secret after authentication during runtime.

This way you can commit the file but people still can use their own passwords locally without saving them in plaintext.

discuss

order

mbrumlow|1 year ago

You can also do some nice things with https://github.com/getsops/sops, I store encrypted password and secrets on git with sops, but I also use nix so I have near perfect integration with my services.

chasil|1 year ago

Another exposure path is /proc. Everybody forgets about this.

  $ export DB_PASSWORD=foo
  $ sh
  sh-5.1$ cat /proc/self/environ
  SHELL=/bin/mksh DB_PASSWORD=foo