News for hackers. Stuff that matters.
Re:OpenSSH's Support for U2F/Fido Security by tialaramex on Tuesday November 05, 2019 @10:35AM (#21453259)
This doc doesn't explain what the enrollment process will look like, there are opportunities here to make this better or worse. Enrollment is crucial to the user experience for WebAuthn/ U2F.

There's also a weird intermediary introduced that I think users may struggle to get their heads around. The FIDO cookie (this doc calls it a "handle" and the WebAuthn spec calls it the "Credential ID") is needed before a client can authenticate, and naturally you'd want to store this on a server, but in SSH the client chooses the authentication method to try not the server, so this cookie has to be stored on the client machine.

Say you enroll on your laptop. The laptop knows a cookie, the FIDO can take that cookie and prove it knows the private key, and that's enough to sign into the server. But without the FIDO key the laptop can't do anything, and without the laptop the FIDO key doesn't know which cookie is needed.

In effect it's two of the same factor. Something you have: The laptop and Something Else that you also have: The FIDO token.

Re:OpenSSH's Support for U2F/Fido Security by moftz on Tuesday November 05, 2019 @10:55AM (#21453462)
Solution: keep the token on a keyring, don't leave it in your laptop all the time. The point of 2FA is to prevent someone else from logging into the same account via a stolen laptop or stolen username/password.
Re:OpenSSH's Support for U2F/Fido Security by sigmar on Tuesday November 05, 2019 @12:59PM (#21454817)
>so this cookie has to be stored on the client machine.

Not following how you arrived at this. In the U2F, the server holds on to a copy of the key handle. Then during authentication, sends the key handle and challenge (referred to as "message" in this openssh doc) to the client.

Re:OpenSSH's Support for U2F/Fido Security by tialaramex on Tuesday November 05, 2019 @01:26PM (#21455146)
That is exactly how it works for WebAuthn, yes. The server sends over this cookie and then the client uses it.

But SSH is defined with the _Client_ picking how to authenticate first, so they can't do this.

There isn't a step in the SSH Authentication protocol where the server can say "Oh, here's the FIDO cookie you need". The SSH design says that (for public keys) the client starts by proposing "Hi, I can prove I know the private key that goes with this public key K1" and then the server either says "OK prove it" or "No, what else?". You can see this corresponds to the authorized_keys file on the server.

So instead you'll see the document calls this value "key_handle" and you'll see it is in the "private key" stored on the client, not with the "public key" stored on servers.