-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proposal: crypto/webauthn: webauthn signature verification API #71095
Comments
Suggestions to make the interface different highly appreciated. This is just a first draft |
Thanks for this. Haven't had a chance to fully digest the API proposal yet, but one immediate note is that we aren't introducing new golang.org/x/crypto packages. If we were to add this, it would be in the standard library crypto/ tree. |
Note to self: it might be worth having a separate The only difference between the two is that This is also the difference between this way we can support both signature schemes. |
How useful is this on its own, vs as part of a more complete api like for github.com/go-webauthn/webauthn/webauthn? I do think it's a bit unnatural to hang Verify off the response, I would have expected it to either be a method of VerifyOptions or a standalone function. |
reason why I want to have the signature scheme is because it’s useful on its own. As it’s used for e.g. OpenSSH security key support (issue linked ) and for things like Apple AppAttest, and ACME device verification. whether the proposal should be more than just the signature scheme and should have the whole webauthn flow in scope is definitely something we can discuss
yeh I think I agree. The API is definitely up in the air. This is just what I am using internally in my own code as |
I tried to keep it at the minimum. We could remove the clientDataJson and origin checking parts though and make this a raw ctap/fido2 signature format. That might reduce it in scope enough? Though #69999 specifically asked for the webauthn signature format as opposed to fido2 even though openssh supports both. |
Proposal Details
Passkey Authentication is seeing wide-spread industry adoption for authenticating users on websites and is implemented through the https://w3c.github.io/webauthn specification.
It would be great if Golang would support this authentication mechanism out of the box.
As a first step towards this path, I would like to propose introducing WebAuthn signature verification to Golang. The verification algorithm should follow the steps outlined in https://w3c.github.io/webauthn/#sctn-verifying-assertion
WebAuthn registration is a lot more specific to people's usecases (e.g. need to think about attestation and whatnot) so I would leave it out of scope for the first draft.
Related proposals:
WebAuthn is also used for the
ecdsa-sk
keytype in SSH and somebody asked for support for that here: #69999 . In order to implement that we need this proposal.Initial design
Interface
Example implementation
golang/crypto@master...arianvp:crypto:webauthn
The text was updated successfully, but these errors were encountered: