Re:Driftwood: Know if private keys are sensitive
by nijave on Monday November 08, 2021 @04:58PM
(#29154793)
Why are there so many private keys in repos? It seems preferable to just generate them when needed instead of risk one being misused
[ Parent
| on HN ]
Re:Driftwood: Know if private keys are sensitive
by codetrotter on Monday November 08, 2021 @05:19PM
(#29155028)
Committing private keys is definitely the wrong thing to do. But if the system is talking to something, then generating new keys won’t help either. What you need is some kind of system to deploy or retrieve secrets. There are various different solutions that exist for this.
Re:Driftwood: Know if private keys are sensitive
by koolba on Monday November 08, 2021 @07:04PM
(#29156021)
And the system for deploying or retrieving secrets itself needs secrets to authenticate with the secrets manager.
Or you generate them on the fly at deployment so that they only exist ephemerally outside the deployment site.
Re:Driftwood: Know if private keys are sensitive
by riverdroid on Monday November 08, 2021 @05:25PM
(#29155087)
Most private keys in Git repositories seem to be test data. But why are those test private keys sometimes used for other things? Probably just people lazily copying from ~/.ssh/idrsa or copying to ~/.ssh/idrsa.
Re:Driftwood: Know if private keys are sensitive
by xvector on Monday November 08, 2021 @06:23PM
(#29155658)
Private keys for tests should be generated on demand, lest you induce CI failure due to key expiration some years down the line
Re:Driftwood: Know if private keys are sensitive
by dilyevsky on Monday November 08, 2021 @08:48PM
(#29156735)
Keys (at least rsa,ec,ssh ones) don’t expire - certs do. Also you’re not required to set expiration at all and probably should not in test for the very reason you mentioned. Unless you’re testing expiration validation of course in which case cert will be intentionally expired.