Live data from Hacker News

You don't want long-lived keys

argemma.com

1–10 of 65 posts

Re: You don't want long-lived keys

#4
post #2

The fixed position background made it look like I had dust on my phone screen

It didn't for me, and I got the starry space feel, but I noticed the repeating patterns.

Perhaps some movement is needed? I do recall some relatively similar cases saved, if interested:

  1. Moving forward in space (JavaScript/JS): https://codepen.io/the_artwork/pen/zYEdxyo
  2. Rotating in space (JS): https://codepen.io/the_artwork/pen/NWMRYJP
  3. Rotating in space (CSS+JS): https://codepen.io/the_artwork/pen/PoeNyyy

Re: You don't want long-lived keys

#5

You dont usually want keys at all. At least in the sense of copy this key from system A and paste it in this other place system B. Usually CI. You want some continual method of authentication and authorization.

Some magnificent systems have APP_KEY/APP_SECRET that is also used for cookie and database encryption. A frequent rotation of this is... inadequate... in systems with high traffic, to say the least, and hence I am sorry, but I do not believe it's the "usual" desire. As always, it depends on the context and transaction scope.

  Related:
  - 1. https://symfony.com/doc/current/reference/configuration/framework.html#configuration-framework-secret
  - 2. https://laravel.com/docs/13.x/encryption#gracefully-rotating-encryption-keys

Re: You don't want long-lived keys

#6
Okay but now how do you recommend I hook up my Sentry instance to create tickets in Jira, now that Jira has deprecated long-lived keys and I have to refresh my token every 6 weeks or whatever. It needs long-lived access. Whether that comes in the form of a OAuth refresh token or a key is not particularly interesting or important, IMO.

Re: You don't want long-lived keys

#7
> If you assume that someone is constantly trying to guess a key or password, the likelihood that they guess correctly grows over time.

If they can brute force the password or key, the rotation will, at best, force them to do it multiple times. You'll see more improvement from just adding another couple of characters to the length.

Re: You don't want long-lived keys

#8
Agreed! Been working on infra for an early-stage company recently and it's been awesome using OIDC and IRSA (or WIF if you're on google) for as many things as possible. Basically, there are no permanent keys for anything.

Slightly annoying to have to wrap some clis in scripts that generate the short-lived token, but it feels really magical to have services securely calling each other without any explicit keys or password to even store in our vault.

Lots of cool benefits --- for instance, we ran the compromised Trivy github action a few weeks ago, but our Github Actions had 0 keys for it to leak! Also really great that I don't have to worry about rotating shared credentials on short notice if an engineer on my team decides to leave the company.

Re: You don't want long-lived keys

#9
What about dynamic credentials. Why can't we deploy HSM(hardware security module), they are so much more affordable now. We then deploy fido2 keys, have our long lived keys in there and have HSM serve as dynamic credentials server.
Post reply on HN