←back to thread

1208 points jamesberthoty | 2 comments | | HN request time: 0s | source
Show context
madeofpalk ◴[] No.45260948[source]
My main takeaway from all of these is to stop using tokens, and rely on mechanisms like OIDC to reduce the blast radius of a compromise.

How many tokens do you have lying around in your home directory in plain text, able to be read by anything on your computer running as your user?

replies(1): >>45261000 #
diggan ◴[] No.45261000[source]
> How many tokens do you have lying around in your home directory in plain text, able to be read by anything on your computer running as your user?

Zero? How many developers have plain-text tokens lying around on disk? Avoiding that been hammered into me from every developer more senior than me since I got involved with professional software development.

replies(5): >>45261018 #>>45261050 #>>45261136 #>>45261146 #>>45261317 #
mewpmewp2 ◴[] No.45261018[source]
How do you manage secrets for your projects?
replies(2): >>45261045 #>>45261228 #
mr_toad ◴[] No.45261228[source]
One option is pass, which is a shell script that uses GPG to manage passwords for command line tools. You can put the password store into a git repository if you need to sync it across machines.
replies(1): >>45261503 #
chrisweekly ◴[] No.45261503[source]
Wait, what? "put the password store into a git repository"?!
replies(1): >>45262528 #
1. dflock ◴[] No.45262528[source]
The store in the case of pass, is a plain text file, whose contents are encrypted strings. If you trust the encryption, you can put it anywhere you like. Keep the keys secret and safe, though!
replies(1): >>45267380 #
2. 9dev ◴[] No.45267380[source]
Until you have to fire one of your disgruntled employees, who has a copy of all your secrets that you now need to rotate.

A repository that an attacker only needs to get access to once, after which they can perform offline attacks against at their leisure.

A repository that contains the history of changed values, possibly making the latter easier, if you used the same encryption secret for rotated values.

This is an awful idea. Use a proper secret management tool you need to authenticate to using OIDC or Passkeys, and load secrets at runtime within the process. Everything else is dangerous.