Add FIDO/U2F support to Duo authentication#127
Conversation
|
Is it ready to be merged or still it’s a work in progress there? |
|
Hi @venth, right now it works great for me, but I feel like it could have some more real world testing from others. I've asked some colleagues to give it a go, waiting for their feedback. Also, there are some improvements I'd like to address like still having the default authentication (call or push) happen in parallel to U2F (that may be really useful if U2F key is e.g. forgotten at home). Another thing that may be changed could be making At last, please have a look a the code change and do not hesitate to report any comments or questions you may have. I'll be glad to address them. Thanks! PS: I'll be AFK for the next two weeks so I won't be able to work on that before the second half of August. |
…kies have an 'expires' date too far in the future and they are converted from timestamp to datetime
|
Alright, got feedback from co-workers: it works fine on Linux and Windows (native, not WSL as it does not have access USB devices). And I've been using it myself exclusively for two months. I'm resuming work on this to implement the first two items on the Todo list:
Update: the fido2 library already relies on threading so I'll go that way, no need to drop support for any python version. |
|
Support for prompting multiple U2F devices concurrently has been implemented with threading. With a single USB device: With two USB devices: |
|
Support for triggering default authentication (call or push) concurrently to U2F has been implemented. With no USB device and answering the default authentication method (push here): With a single USB device and answering the default authentication method (push here): With a single USB device and touching it, ignoring the default authentication method that also happens: With a two USB devices and touching one of them, ignoring the default authentication method that also happens: |
|
Remove WIP from PR title, ready for review. |
| level=logging.DEBUG if verbose else logging.ERROR, | ||
| ) | ||
|
|
||
| if verbose: |
There was a problem hiding this comment.
This could probably be moved to another flag as this makes it very verbose.
|
I can probably go one step further and make it an option to only trigger the default authentification to avoid needless pushes/calls on the phone when no U2F device is plugged. |
Would be awesome. I think that it could be tackled in a separate PR. |
|
released in version 1.18.0 |
|
Thanks @venth! |
This PR adds support for FIDO/U2F to Duo authentication.
If Duo reports U2F is supported for the user, it is used concurrently to the default authentication method.
It's a rough draft that works but needs cleanup, hence the WIP.I opened the PR now to get early feedback if possible.
Right now, if Duo reports U2F is supported for the user, only that authentication method is used.Example usage shown here: #127 (comment)
Tested in USB mode with:
It should support NFC mode too but that is not tested yet.
TODO: