Earlier quoted context omitted.
No. This checks public GitHub commits that contain secret credentials; in 2022, over 33% were specific to known APIs, such as AWS access keys or MongoDB credentials, while the remaining 67% were deemed "generic." According to the report, generic ones include secrets such as "a company email and a password that would end up hard-coded in a file." It's not scanning developer support tickets to see when devs hand over c…
Methodology is super important here though. I've used static analysis tools that identify every single bit of fake unit test data with a field called 'username', 'email' etc as leaked credentials.
How to mitigate risk from secrets leaks
41–50 of 60 posts
Re: How to mitigate risk from secrets leaks
#42Re: How to mitigate risk from secrets leaks
#43and that's why you use secret managers like infisical
We migrated a few month ago from doppler to infisical as the latter supports end-to-end encryption and happy so far!
We have similarly simple UX but are more robust on security. Browser-based end-to-end encryption as offered by Infisical is a bit of a fig leaf—it doesn’t protect against insider threats.
Re: How to mitigate risk from secrets leaks
#44Earlier quoted context omitted.
Short version is that with mTLS and short-lived certificates you don't have to worry about anyone stealing and re-using your JWT tokens and revoking tokens. LVH from Latacora explains it way better than I could in "A child's garden of inter-service authentication" [1] However, here is my view: If your token is not bound to the connection, someone can steal and reuse it, just like any other token. It is possible to us…
Interesting. You already don’t have to worry about revoking JWTs if they’re sufficiently short lived. This gives you the exact level of protection as a short-lived mTLS cert, because if that gets stolen the attacker can continue to establish connections until it expires, unless as you say you revoke the certificate. So clearly I am missing something.
With JWT (assuming it's not bound) you can steal JWT token and re-use it until it expires.
Re: How to mitigate risk from secrets leaks
#45Earlier quoted context omitted.
Depends. Is your name Wodger or Bwian? Do you have friends in Wome?
it’s a joke about the new testament.
Re: How to mitigate risk from secrets leaks
#46Re: How to mitigate risk from secrets leaks
#47Earlier quoted context omitted.
Interesting. You already don’t have to worry about revoking JWTs if they’re sufficiently short lived. This gives you the exact level of protection as a short-lived mTLS cert, because if that gets stolen the attacker can continue to establish connections until it expires, unless as you say you revoke the certificate. So clearly I am missing something.
They key difference is with mTLS approach you'd have to steal the private key of the client certificate if you want to impersonate the client. In most secure deployments of mTLS and short lived certs, private key never escapes the TPM, Secure enclave or Yubikey, so it's extremely hard to mount an attack and impersonate a service. With JWT (assuming it's not bound) you can steal JWT token and re-use it until it expire…
Re: How to mitigate risk from secrets leaks
#48Earlier quoted context omitted.
We use two factor leaks. Put an encryption key in the code and use it to decrypt the environment on use to recover the API key. You have to get both leaks to recover the key.
You have to combine that with some kind of assurances that the window that an key leak happens over is pretty finite, otherwise you can leak one key and not notice and you've lost your redundancy and you're no better off. And you may make incident response mistakes due to a false sense of security when you're made aware that the second key leak has happened. So, you really need to be doing everything else correctly f…
I think this is about as good as you can do, honestly, since even using something along the lines of short-lived certs, you still have secrets to protect, and you lose the ability to easily do immediate revocations.
Re: How to mitigate risk from secrets leaks
#49You can't leak API keys if there are no API keys to leak! The article recommends OIDC for apps, which is a step up, especially if you rotate the bearer token, however there is another option - use short-lived certs. Our project Machine ID is replacing API keys with short-lived certificates: https://goteleport.com/docs/machine-id/introduction/ Another great option is SPIFFEE https://spiffe.io/ The adoption is slower t…
Re: How to mitigate risk from secrets leaks
#50Earlier quoted context omitted.
Interesting. You already don’t have to worry about revoking JWTs if they’re sufficiently short lived. This gives you the exact level of protection as a short-lived mTLS cert, because if that gets stolen the attacker can continue to establish connections until it expires, unless as you say you revoke the certificate. So clearly I am missing something.
They key difference is with mTLS approach you'd have to steal the private key of the client certificate if you want to impersonate the client. In most secure deployments of mTLS and short lived certs, private key never escapes the TPM, Secure enclave or Yubikey, so it's extremely hard to mount an attack and impersonate a service. With JWT (assuming it's not bound) you can steal JWT token and re-use it until it expire…
If someone steals your secrets you're screwed. No matter what kind of secrets that are. That's clear.
But if you keep your secrets in a HSM (TPM, SmartCard, …) and only use them to derive session keys directly on the secure device there is absolutely no difference which concrete tech you're using (given that secure cryptography is in place).
mTLS is a great approach, no question. But I just don't see how it's more secure than any other public key crypto.