News for hackers. Stuff that matters.
Re:How to SSH Properly by exabrial on Wednesday April 01, 2020 @02:50PM (#22752235)
As an alternative to ssh certs, we lookup keys in an LDAP Cluster. Each approach has pros/cons. SSH certificates are decentralized and resilient against failure, but revocation of a breached certificate isn't instantaneous. Keys-in-LDAP offers less resiliency, but offers instant key revocation. It's also simpler and offers a familiar experience to most devs.

The most important thing is to look at your attack surface realistically and plan accordingly. Just blinding putting in an SSH cert authority of an unsecured-non-redundant ldap cluster is worse than no key management at all.

Re:How to SSH Properly by closeparen on Wednesday April 01, 2020 @03:27PM (#22752631)
1) Programmatically issue certificates with short lifetimes after authenticating against your IdP. This way if a user is deactivated in LDAP their access will expire on its own after a few hours.

2) Firewall off all but a few bastion hosts and ProxyCommand through those. Immediate revocation can be assured by updating the CRLs on those specific hosts.

Re:How to SSH Properly by webvictim on Wednesday April 01, 2020 @07:35PM (#22754682)
This is definitely the premise of what I was going for with the post. I'm a firm believer in the idea that short-lived certificates which expire by default are one of the best ways to provide access to infrastructure, and enforcing that access comes from a limited list of bastions gives you an easy choke point to withdraw access as desired when you need to.
Re:How to SSH Properly by sytringy05 on Wednesday April 01, 2020 @10:55PM (#22755844)
Isn't there a netflix ssh CA that does this?
Re:How to SSH Properly by V-eHGsd_ on Thursday April 02, 2020 @12:47AM (#22756283)
Re:How to SSH Properly by Spivak on Wednesday April 01, 2020 @04:06PM (#22753016)
Buy why go through the extra effort compared to just having your servers ask the IdP for the user's keys?
Re:How to SSH Properly by cbhl on Wednesday April 01, 2020 @04:53PM (#22753375)
If your IdP goes down, how will you SSH in to fix it?
Re:How to SSH Properly by webvictim on Wednesday April 01, 2020 @07:36PM (#22754686)
Having been on the rough end of this during a huge LDAP outage, I can confirm that LDAP is great until such time as it isn't.
Re:How to SSH Properly by sytringy05 on Wednesday April 01, 2020 @10:57PM (#22755854)
+1 this is no fun.
Re:How to SSH Properly by exabrial on Wednesday April 01, 2020 @05:07PM (#22753518)
Currently we use the root "physical" console. Generally we avoid IDP outages by keeping our LDAP servers clustered and geographically diversified. Because LDAP is 99.999% of the time reads, not writes, this makes clustering pretty simple.
Re:How to SSH Properly by x3haloed on Wednesday April 01, 2020 @07:25PM (#22754618)
What is your opinion on using a secret management system?

https://learn.hashicorp.com/vault/secrets-management/sm-ssh-...

Re:How to SSH Properly by vbezhenar on Wednesday April 01, 2020 @05:50PM (#22753872)
I think that you can use intermediate proxy server. So everyone logs into that proxy server and logs into other server using key from proxy server. Key is protected with passphrase and unlocked with ssh-agent by someone after reboot. If you need to revoke access, you can just revoke access in the proxy server.
Re:How to SSH Properly by jturpin on Wednesday April 01, 2020 @03:47PM (#22752842)
We do both and it seems to work well - normal users do LDAP, and machine users generate certificates out of Vault that are extremely short lived, 10-30 minutes for CI jobs.
Re:How to SSH Properly by inshadows on Wednesday April 01, 2020 @10:38PM (#22755766)
How is the communication between servers lookup up keys and LDAP protected? Does it run over TLS?
Re:How to SSH Properly by chupasaurus on Thursday April 02, 2020 @04:07PM (#22763143)
I think any modern LDAP client has TLS support, same goes for servers.
Re:How to SSH Properly by jldugger on Wednesday April 01, 2020 @04:17PM (#22753099)
How about asymmetric kerberos?