3 ms·
It depends on the secret and the degree to which the secret is exposed. SSH creds should get rotated constantly; a one-hour SSH login cred is a significant expo
by tptacek 9y ago
It depends on the secret and the degree to which the secret is exposed. SSH creds should get rotated constantly; a one-hour SSH login cred is a significant exposure. But an API secret that is kept in Parameter Store and not exposed to developers doesn't really benefit from rotation every 3 months in proportion to the amount of mechanism required to do that.
- JoachimSchipper 9y agoWhat are you assuming about exposure? If a SSH key lives on a well-secured workstation or bastion host (and you ideally don't agent-forward it to insecure hosts), rotating that key once per hour doesn't seem a top priority to me? E.g. a sudo password is (lower-impact, but) more likely to get exposed to compromised hosts? ("Well-secured workstation" is arguably an oxymoron, of course...)
- cassianoleal 9y agoWait, you keep private SSH keys on bastion hosts? It's much better practice to use the bastion as a proxy to the other hosts. This is easily achieved using the ProxyCommand option of OpenSSH. No agent forwarding, no secrets kept in random hosts.
- scrollaway 9y agoDo you know a good guide with standard practices for setting up and securing bastion hosts (preferably on aws)?
- toomuchtodo 9y agoIf you don’t require interactive sessions, consider using AWS SSM run command [1] instead. You install the agent on the instances, with commands sent from the client through the AWS control plane (with IAM and SSM documents for access control and CloudTrail logs of all commands issued). I’m currently deploying it in an enterprise for ~5k users, and it works surprisingly well for providing the ability to run arbitrary commands on instances without ssh access. [1] https://docs.aws.amazon.com/systems-manager/latest/userguide/walkthrough-cli.html https://docs.aws.amazon.com/systems-manager/latest/userguide...
- JoachimSchipper 9y agoNo, keeping SSH keys on bastion hosts was the silliest reasonable thing I could think of.
- deleted 9y ago[deleted]
- apawloski 9y agoHow are you managing your SSH keys to make <1HR rotation feasible?
- tptacek 9y agoWith an SSH CA.
- kasey_junk 9y agoIs there one of those you’d recommend?
- skywhopper 9y agoCheck out Hashicorp Vault (https://www.vaultproject.io/docs/secrets/ssh/signed-ssh-certificates.html https://www.vaultproject.io/docs/secrets/ssh/signed-ssh-cert...) for a general product (has lots of the features of AWS Secrets Manager as well), or Netflix BLESS (https://github.com/Netflix/bless https://github.com/Netflix/bless) for a very specific tool for just this.
- euroclydon 9y agoI found these: https://www.digitalocean.com/community/tutorials/how-to-create-an-ssh-ca-to-validate-hosts-and-clients-with-ubuntu https://www.digitalocean.com/community/tutorials/how-to-crea... https://medium.com/uber-security-privacy/introducing-the-uber-ssh-certificate-authority-4f840839c5cc https://medium.com/uber-security-privacy/introducing-the-ube...
- deleted 9y ago[deleted]
- jessaustin 9y ago...a one-hour SSH login cred is a significant exposure. Does this refer to an SSH password or e.g. a 4096-bit RSA key, or possibly something completely different? If this refers to an RSA key then I'm quite confused.