-
Notifications
You must be signed in to change notification settings - Fork 42
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
[FIDO] Support extensions #161
Conversation
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.
SpotBugs found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
fido/src/main/java/com/yubico/yubikit/fido/client/BasicWebAuthnClient.java
Outdated
Show resolved
Hide resolved
fido/src/main/java/com/yubico/yubikit/fido/webauthn/PublicKeyCredential.java
Outdated
Show resolved
Hide resolved
fido/src/main/java/com/yubico/yubikit/fido/client/extensions/HmacSecretExtension.java
Outdated
Show resolved
Hide resolved
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.
Nicely done! Clean code and good test coverage. 👍
Adds support for defined FIDO extensions (see CTAP2.1 and Webauthn specifications). This PR also adds simple framework for adding new extensions, by extending the
Extension
class and implementing relevant methods.Extension processing happens during
BasicWebauthnClient.makeCredential
andBasicWebauthnClient.getAssertion
calls, based on the creation and request options.Results are exposed through
PublicKeyCredential.getClientExtensionResults()
.The following extensions are implemented:
A new BasicWebauthnClient constructor takes a list of Extension objects which it will process, by default the list contains defined extensions.
There are instrumented tests for each of the extensions (note that a supporting HW is needed for running the tests).