News for hackers. Stuff that matters.
Re:Uber investigating breach of its computer systems by fjfbsufhdvfy on Friday September 16, 2022 @07:38AM (#32864751)
I'm curious what's the alternative if the script must have those credentials to do its job.
Re:Uber investigating breach of its computer systems by numbsafari on Friday September 16, 2022 @09:07AM (#32865582)
As another commenter pointed out: you authorize the executor of the script, not the script itself.

Consider how an AWS instance runs code that is able to ... talk back to the rest of the AWS system.

For code that is not being directly run by a tethered meatball, use some form of workload identity [1].

When you are talking to another system that that can't understand your workload identity (legacy apis, etc.), keep those credentials in a tool like Vault[2], Secret Manager[3], etc. That system can/should handle credential rotation wherever possible, but it also ensures that the workload running the script is authorized to access the credentials in question. This is far superior to passing via env vars, but even that is better than hard-coding in the script itself. Oh, and using a memory-backed mount that contains those vars is better than env vars because there's less risk of leaking those when you fork.

Key points:

- externalize all secrets

- prefer workload identity

- prefer a workload identity aware secret store / manager

- fall back to fs mounted secrets and then env vars

[1] https://spiffe.io

[2] https://www.vaultproject.io

[3] https://docs.aws.amazon.com/secretsmanager/latest/userguide/...

edit: formatting now that I'm on a desktop

Re:Uber investigating breach of its computer systems by ThePadawan on Friday September 16, 2022 @08:09AM (#32865021)
As sibling points out: Don't authorize the script, authorize whoever is executing the script.
Re:Uber investigating breach of its computer systems by bad416f1f5a2 on Friday September 16, 2022 @07:59AM (#32864908)
Environment variables are an easy first pass at ensuring a script at rest isn’t dangerous.
Re:Uber investigating breach of its computer systems by lapser on Friday September 16, 2022 @08:55AM (#32865459)
Besides what the sibling comments said, it's very unlikely to that any script needs keys to the kingdom. Credentials should be created with limited access, just enough for the script to do its thing.
Re:Uber investigating breach of its computer systems by badrabbit on Friday September 16, 2022 @10:08AM (#32866219)
Not for PAMs like tychotic their service accounts are domain admins
Re:Uber investigating breach of its computer systems by arbitrage on Friday September 16, 2022 @08:04AM (#32864960)
encryption based authentication (keys or certs) that can be revoked.

welcome to 1996.

Re:Uber investigating breach of its computer systems by badrabbit on Friday September 16, 2022 @10:07AM (#32866204)
Stuff like...tychotic helps prevent that :P