-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[WIP] WebAuthn implementation #9451
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9451 +/- ##
==========================================
- Coverage 41.52% 41.46% -0.07%
==========================================
Files 570 571 +1
Lines 74639 74705 +66
==========================================
- Hits 30995 30977 -18
- Misses 39806 39890 +84
Partials 3838 3838
Continue to review full report at Codecov.
|
I have a request for anyone looking at this -- if you have a fairly large user base with a large number of U2F registrations and would be willing to provide me a dump of the Feel free to encrypt it with my GPG public key if you are concerned about public exposure. |
The data model portion should be complete at this point. There is a failing sqlite migration test that I haven't been able to nail down yet. If anybody has any clues here, I would sure appreciate a hand. |
var WebAuthn *webauthn.WebAuthn | ||
|
||
//Init initializes the WebAuthn instance from the config. | ||
func Init() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% happy with this. I would prefer to use webauthn.New() in order to validate the settings, but this routers.GlobalInit() seems to be the best place to put this and there is no error handling there. Open to suggestions.
Quick status update here... while working to integrate duo-labs/webauthn, I ended up encountering a show-stopper bug. I have submitted an issue to have it addressed, but it may not be due to the possibility that making the change could affect others' implementations who are using the library. That issue along with some other concerns I have about the design of that library (the large number of dependencies and its attachment directly to http requests in particular) is leading me to explore alternatives. I will do that while I wait for resolution on the duo-labs/webauthn showstopper. |
Another quick status update. I ran into more issues trying to adapt the existing flows to duo-labs/webauthn which would have required backwards-incompatible changes to duo-labs/webauthn to accomplish within the macaron context. This led me to write a new WebAuthn implementation https://github.com/e3b0c442/warp that is standalone and implementation-agnostic (extensible, not tied to the Ultimately I believe this will be the cleaner way to go, but willing to discuss any concerns around this direction. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
This hasn't fallen off of my radar, it's just not my day job. As mentioned previously, anybody else can feel free to pick this up and run with it, e3b0c442/warp should be stable enough at this point. |
@e3b0c442 no problem just feed the stale bot some time ;) |
What would be really nice is Webauthn using Touch ID in ungoogled-chromium using challenge-response inside TLS which should be possible on the macOS Big Sur public beta available since 9/30/2020 https://webauthn.io/ has golang source code links. The site works, the golang code seems to need some help Basically: everyone uses MacBook Pro, nobody uses Safari, fingerprint bio-metrics is safe challenge response inside TLS is completely decentralized The @google implementation is a privacy nightmare |
2020 unfortunately was not kind to me time wise. I'm going to close this PR so that it doesn't deter anybody else that wants to from taking a crack. If I get to the point where I have something fully functional I'll open a new one. |
-> #17957 |
Fixes #6892.
This PR is tracking my progress on updating the legacy U2F security key implementation to use standard WebAuthn, as discussed in #6892. I'm opening this as a draft PR so that my (slow) progress can be tracked and discussed in real time. If you have any feedback at all as I progress on this, I welcome it! I will convert the PR to a standard PR once all of the pieces are in place.
This change will replace the https://github.com/tstranex/u2f module with
https://github.com/duo-labs/webauthnhttps://github.com/e3b0c442/warp on the backend with the necessary model adjustments and remove the Google u2fApi javascript library in favor of the WebAuthn standard API that is now universally available across current browsers. There will be no changes to the registration or login flows at this time -- that is to say, I'm only implementing the familiar 2nd-factor auth flow, and not the single-factor passwordless flow. I'm choosing to make this a clean break due to the fact that 1) All browsers that supported U2F now support WebAuthn and have for some time, and 2) while existing U2F credentials can be used for WebAuthn, credentials created with WebAuthn APIs cannot be utilized by U2F.Here is the list of subtasks as I see them now, in the general order I expect to complete them (to be updated as additional things inevitably pop up):
duo-labs/webauthne3b0c442/warpduo-labs/webauthne3b0c442/warpPlanned changes vs U2F implementation
ROOT_URL
, instead of being defined explicitly as options. My opinion is that these are irrelevant, as the RPID and origin must match, meaning that there is no way to register a credential for a domain different than the domain you are visiting.