Skip to content
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

Implement FIDO2 login and registration #11166

Merged
merged 10 commits into from
Mar 18, 2022
Merged

Conversation

codingllama
Copy link
Contributor

Implements CLI login and registration using go-libfido2. Covers both MFA and passwordless use cases.

The FIDO2 implementation is akin to the existing U2F Login / Registration logic, including a similar "device detection" loop. A few notable differences are:

  • A filtered "device search" step that ends as soon a suitable device is found
  • A more explicit "device selection" step, which makes it easier to implement PIN flows

The MFA UX for end-users should remain mostly unaltered.

There are no separate methods for MFA and passwordless, as much of the logic would be the same. Instead, the methods react to the assertion/credential parameters accordingly.

At this moment this code is isolated from other callers, as well as from our build processes via the libfido2 tag. This is to avoid impact to other developers, as go-libfido2 has a few requirements before it can be downloaded or executed.

#9160

@github-actions github-actions bot requested review from rosstimothy and Tener March 15, 2022 21:38
@codingllama
Copy link
Contributor Author

Note to reviewers: a reasonable chunk of the PR are test tables, the production code added is not that big. I've written it so it may be reviewed commit-by-commit, which should make it easier to absorb, but let me know if you'd rather have me split registration to a separate PR.

I also have a test program that runs the code against real authenticators, which I didn't include here, but give me a shout if you'd like to try it out.

lib/auth/webauthncli/fido2.go Show resolved Hide resolved
lib/auth/webauthncli/fido2.go Outdated Show resolved Hide resolved
lib/auth/webauthncli/fido2.go Outdated Show resolved Hide resolved
lib/auth/webauthncli/fido2.go Outdated Show resolved Hide resolved
lib/auth/webauthncli/fido2.go Show resolved Hide resolved
@codingllama codingllama force-pushed the codingllama/pwdless-fido2 branch from 754a272 to 9469f1d Compare March 16, 2022 18:20
@codingllama
Copy link
Contributor Author

PTAL?

@codingllama
Copy link
Contributor Author

Friendly ping @zmb3 @rosstimothy @Tener ?

Copy link
Contributor

@rosstimothy rosstimothy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @codingllama I was half way through looking at this earlier when GitHub started having issues

lib/auth/webauthncli/fido2_test.go Show resolved Hide resolved
lib/auth/webauthncli/fido2_test.go Show resolved Hide resolved
lib/auth/webauthncli/fido2_test.go Show resolved Hide resolved
lib/auth/webauthncli/fido2.go Show resolved Hide resolved
lib/auth/webauthncli/fido2.go Show resolved Hide resolved
lib/auth/webauthncli/fido2.go Show resolved Hide resolved
lib/auth/webauthncli/fido2.go Outdated Show resolved Hide resolved
@codingllama codingllama force-pushed the codingllama/pwdless-fido2 branch from 9469f1d to 67a0ff4 Compare March 17, 2022 20:53
@codingllama
Copy link
Contributor Author

Thanks for the review, @rosstimothy. PTAL?

@codingllama
Copy link
Contributor Author

Thanks for the approval, folks.

@codingllama codingllama force-pushed the codingllama/pwdless-fido2 branch from 67a0ff4 to 47fc78e Compare March 18, 2022 14:49
@codingllama codingllama enabled auto-merge (squash) March 18, 2022 14:51
@codingllama codingllama merged commit 84127a5 into master Mar 18, 2022
@codingllama codingllama deleted the codingllama/pwdless-fido2 branch March 18, 2022 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants