Top
Best
New

Posted by mfrw 10/23/2024

Fearless SSH: Short-lived certificates bring Zero Trust to infrastructure(blog.cloudflare.com)
151 points | 160 commentspage 2
WesolyKubeczek 11/4/2024|
I can’t wait for a bug to happen when you authenticate correctly but unexpectedly slide into someone else’s network.
nonameiguess 10/24/2024||
Basic summary seems to be:

* This has nothing to do with zero-trust. If you already require pubkey auth to every connection made to a server regardless of origin, that's already meeting the definition of zero trust.

* What this actually gives you is a solution to the problem of centrally revoking long-lived keys by not having any and instead using certificate auth. Now the CA is the only long-lived key.

* This is a reasonable thing large orgs should probably do. There is no reason the CA should be an external third-party like Cloudflare, however.

* This also integrates with existing SSO providers so human users can be granted short-lived session certs based on whatever you use to authenticate them to the SSO provider. Also reasonable, also no reason this should be offered as a service from Cloudflare as opposed to something you can self-host like Kerberos.

* This also provides ssh command logging by proxying the session and capturing all commands as they get relayed. Arguably not a bad idea in principle, but a log collector like rsyslogd sending to an aggregator accomplishes the same thing in practice, and again, I would think you'd want to self-host a proxy if you choose to go that route, not rent it from Cloudflare.

All in all, good things a lot of orgs should do, but they should probably actually do. I get the "well, it's hard" angle, but you're usually looking at large, well-funded orgs when you're talking things like SOC and FedRamp compliance. If you want to be a bank or whatever, yeah, that's hard. It's supposed to be. As I understand it, at least part of the spirit of SOC and FedRamp and the like is your organization has processes, plans, procedures, and personnel in place with the expertise and care to take security seriously, not "we have no idea what any of this means, why it matters, and don't have the time, but we pay a subscription fee to Cloudflare and they say they take care of it."

andriosr 10/24/2024||
hoopdev here. Zero trust for SSH is just table stakes these days. Real challenge is getting devs to actually adopt better practices without the tooling getting in their way.

Found in practice that certs > keys but you need to think beyond just SSH. Most teams have a mix of SSH, K8s, DBs etc. Using separate tools for each just creates more headache.

Haven't tried Boundary but Teleport/hoop/Tailscale all handle the mixed protocol issue decently. Main difference is hoop focuses more on protocol-level DLP and automated reviews vs pure network access. Horses for courses though, they're all valid approaches.

Key is picking something devs will actually use vs work around. Nothing worse than a "secure" solution that drives people to create workarounds.

curben 10/24/2024||
Cloudflare has been offering SSH CA-based authentication for more than 2 years [1], I wrote a guide back in feb '23 [2]. The announcement is more about offering new features, such as more granular user control.

[1]:https://web.archive.org/web/20210418143636/https://developer...

[2]: https://mdleom.com/blog/2023/02/13/ssh-certificate-cloudflar...

singhrac 10/24/2024||
I get that HN does not like Cloudflare and does not like the term “Zero Trust”, but geez these comments are repetitive. Can anyone compare to Tailscale SSH? Are they basically offering an (even more) enterprise version of Tailscale’s product line?
cyberax 10/23/2024||
Hah. I did pretty much all the same stuff in my previous company.

One thing that we did a bit better: we used AWS SSM to provision our SSH-CA certificates onto the running AWS EC2 instances during the first connection.

It would be even better if AWS allowed to use SSH CA certs as keys, but alas...

pugz 10/24/2024|
FYI I love your work with Gimlet, etc.

I too would love "native" support for SSH CAs in EC2. What I ended up doing is adding a line to every EC2 userdata script that would rewrite the /home/ec2-user/.ssh/authorized_keys file to treat the provided EC2 keypair as a CA instead of a regular pubkey.

dmuth 10/24/2024||
Using CAs and signed certificates in SSH is definitely the way.

If anyone wants to play around with that, without the risk of locking themselves out of a server, I built a little "playground" awhile back whihc is a series of Docker containers that can SSH to each other. Give it a try at https://github.com/dmuth/ssh-principal-and-ca-playground

(I haven't touched the project in awhile, so if there are any issues, please open an Issue and I'll gladly look at it!)

arianvanp 10/24/2024||
Zero trust. But they don't solve the more interesting problem: host key authentication.

Would be nice if they can replace TOFU access with SSH CA as well. Ideally based on device posture of the server (e.g. TPM2 attestation)

mdaniel 10/24/2024||
While not applicable for all situations <https://en.wikipedia.org/wiki/SSHFP_record> and its <https://man.openbsd.org/ssh_config.5#VerifyHostKeyDNS> friend may interest you
udev4096 10/24/2024||
I was not aware of using random[0] ASCII art as a way to check if the host key has changed

[0] - https://man.openbsd.org/ssh.1#random

anilakar 10/24/2024||
As far as I know you can CA sign host keys the same way you can sign users' public keys.

As always, the main issue is that certificate chaining is not possible in SSH PK"I", so you need to have absolute trust in the machine that does the signing.

amar0c 10/24/2024||
Is there anything similar ("central point of SSH access/keys management" ) that is not Cloudflare ? I know about Tailscale and it's SSH but recently it introduced so much latency (even tho they say it's P2P between A and B) that is unusable.

Ideally something self hosted but not hard requirement

udev4096 10/24/2024|
Like a ssh key management cli?
nanis 10/24/2024|
> the SSH certificates issued by the Cloudflare CA include a field called ValidPrinciples

Having implemented similar systems before, I was interested to read this post. Then I see this. Now I have to find out if that really is the field, if this was ChatGPT spellcheck, or something else entirely.

blueflow 10/24/2024|
For the others: The correct naming is "principals".
jgrahamc 10/24/2024||
Sigh. I'll get that fixed and figure out how that happened.
nanis 10/27/2024||
This was corrected to:

> ... SSH certificates issued by the Cloudflare CA include a field called valid_principals

which indicates it wasn't just the spelling of `principals`.

jgrahamc 10/28/2024||
It depends... ssh-keygen -L displays the fields as Principals (which are set using the -n parameter) and internally a lot of the OpenSSH code talks about AuthorizedPrincipals...
More comments...