Earlier quoted context omitted.
Yeah, prefixing your keys with your service name like SRVCE_{KEY} is the way to go. Bonus: adding SRVCE_PRVT_{KEY} and SRVCE_PUB_{KEY}.
And while we're at it, I think saving two chars isn't going to do much to prevent global warming, and let's just use more readable SERVICE_{KEY} and SERVICE_PUB_{KEY} (as opposed to having scratch your head thinking "did I call it SRV, SVC, SRVC, SRVCE, ...?")
Toyota suffered a data breach by accidentally exposing a secret key on GitHub
191–200 of 272 posts
Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub
#192Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub
#193People don't think a lot about what they put on there it seems. Or maybe font foundaries haven't sued enough at this point.
Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub
#194Earlier quoted context omitted.
Hm - this would work better if keys were easy to scan with regular expressions. Next time I implement api keys I wonder if it’s worth going out of my way to make them easy to identify. Eg, by prefixing every key with a few well known characters. Like FMLA_xxxxx for a fastmail app key.
If you go make an API key in Fastmail (Settings -> Password & Security -> API tokens), you'll see that it's prefixed very similarly to that (e.g. `fmo1-`) for this very reason! (There are some other neat things about our API key format I'd be happy to tell you about sometime if you're interested.)
Yeah absolutely - I'd love to hear about it!
Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub
#195Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub
#196I worked for a couple corps in my life and the security theatre in here is ridiculous. At the same time things like this happen all the freaking time. And none of the company spyware can catch that. Funny how this never happened in small companies I worked for, although maybe that's just a function of number of people? Or maybe because small companies rely on fewer platforms and frameworks so fewer chances of such le…
Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub
#197Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub
#198Earlier quoted context omitted.
TIL: make private key for your service easy to match with regexps
The whole industry should adopt a convention to prefix production keys with a well known prefix, such as "prod_secret_". We should have our systems and precommit hooks then alert us when those enter places they shouldn't and help us automate rotation.
And what if your DEV is not actually well isolated from PROD/other infra? And what if some real data sneaked into DEV? Etc.
Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub
#199Earlier quoted context omitted.
Yeah, prefixing your keys with your service name like SRVCE_{KEY} is the way to go. Bonus: adding SRVCE_PRVT_{KEY} and SRVCE_PUB_{KEY}.
And while we're at it, I think saving two chars isn't going to do much to prevent global warming, and let's just use more readable SERVICE_{KEY} and SERVICE_PUB_{KEY} (as opposed to having scratch your head thinking "did I call it SRV, SVC, SRVC, SRVCE, ...?")
I also think that it should look just a bit cryptic to make a person unsure if they can meddle with the string.