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

[FIDO] Support extensions #161

Merged
merged 49 commits into from
Dec 18, 2024
Merged

[FIDO] Support extensions #161

merged 49 commits into from
Dec 18, 2024

Conversation

AdamVe
Copy link
Member

@AdamVe AdamVe commented Nov 20, 2024

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 and BasicWebauthnClient.getAssertion calls, based on the creation and request options.

Results are exposed through PublicKeyCredential.getClientExtensionResults().

The following extensions are implemented:

  • hmac-secret
  • prf
  • credProps
  • credProtect
  • credBlob
  • largeBlob
  • minPinLength

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).

Copy link

@github-advanced-security github-advanced-security bot left a 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.

Copy link

@jensutbult jensutbult left a 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. 👍

@AdamVe AdamVe merged commit 196304e into main Dec 18, 2024
16 checks passed
@AdamVe AdamVe deleted the adamve/fido_extensions branch December 18, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants