nightpool 3 hours ago

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.

  • tptacek 23 minutes ago

    You do what you can. Eliminating long-lived keys isn't always possible; you set up rotation instead.

nitwit005 2 hours ago

> 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.

  • cassianoleal 2 hours ago

    Fair enough, but that doesn't protect you in case of a leak. If you're going to solve for the leak anyway, is it worth it to solve for brute force in isolation? You can always add another couple of characters. At which point do you stop?

peterldowns 2 hours ago

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.

bzmrgonz 2 hours ago

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.

gleenn 2 hours ago

After the Vercel hosting compromise and having to rotate a ton of keys recently, we are definitely implementing automated rotation of short lived keys. That was super painful.

dnnddidiej 3 hours ago

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.

  • serious_angel 3 hours ago

    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
pfg_ 3 hours ago

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

  • serious_angel 3 hours ago

    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
sandeepkd 1 hour ago

I think the take on key lifetime is premature which taking into consideration

1. How key is used

2. Whats the threat vector

3. Cost of key rotation

4. Cost of key verification

At the end of the day its a trade off, the business use case, your expertise and the risk have to be evaluated together

cyberax 1 hour ago

On the contrary. We want long-lived keys. As long as they are not symmetric!

My private SSH key is rooted in hardware and can't even be extracted. This is awesome, I don't have to worry about it getting compromised.

The same should apply to all other keys, including the dreaded "bearer tokens".

  • Dragging-Syrup 45 minutes ago

    I’m sorry to be pedantic, that’s not exactly true. I agree in the sense that extracting hw based keys is next to impossible, but if your machine is compromised, there isn’t much stopping malware from using your hw based key (assuming 1. Left plugged in, 2. Unlocked with either ssh-agent or gpg-agent, and 3. You don’t have touch to auth turned on). Reduced risk? Absolutely. No risk? Absolutely not.

    • cyberax 34 minutes ago

      Sure. They can use my key while my machine is compromised, but even then I won't _need_ to rotate it after the compromise is cleared.

      It still would be a good idea just to make sure that it's easier to analyze logs, but it's not strictly needed.

    • hsbauauvhabzb 28 minutes ago

      And if you want to be even more pedantic, shell access with a touch based key just means the attacker has to wait for you to auth, which makes touch based systems largely a waste of effort on the defenders part.

    • bloppe 16 minutes ago

      Never apologize for pedantry here

  • kkl 12 minutes ago

    Part of the threat model for an Engineering team is that people come and go. They move teams which have different levels of access. They leave the organization, in most cases, on good terms. I want to set up infrastructure where I don't need to remember that your SSH pubkey is baked into production configuration after you leave the company.

    There are several options for setting up per-connection keys that are dispensed to users through the company SSO. That setup means you don't need to maintain separate infrastructure for (de-)provisioning SSH keys.