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

Expose credential public key as a PublicKey object #299

Merged
merged 5 commits into from
Jul 3, 2023

Conversation

iaik-jheher
Copy link
Contributor

As discussed in #288; this allows consumers to handle the credential's public key without needing specific CBOR/COSE logic.

I considered @Getter(lazy=true)-based caching, but ended up deciding against it for three reasons:

  • Decoding will likely not be performed by many consumers
  • Decoding is a very fast operation
  • Decoding may throw

@emlun emlun self-assigned this Jun 22, 2023
@emlun
Copy link
Member

emlun commented Jun 27, 2023

Thanks, I finally have time to properly dig into these. I'll make some small modifications but this looks good to me!

Would you like to be credited in the release notes? If yes, would you prefer by real name or by GitHub username?

@iaik-jheher
Copy link
Contributor Author

Sure, I'd appreciate that if you think it appropriate. I'll have to check with my employer about details; I'll get back to you on that.

@iaik-jheher
Copy link
Contributor Author

We'd prefer attribution to take the form Jakob Heher (A-SIT) if possible. Thanks for offering!

@emlun emlun changed the base branch from main to release-2.6.0 June 28, 2023 08:32
@emlun emlun merged commit 7c8fd3b into Yubico:release-2.6.0 Jul 3, 2023
@iaik-jheher iaik-jheher deleted the feature/expose-public-key branch March 6, 2024 13:22
emlun added a commit that referenced this pull request Jan 30, 2025
`webauthn-server-core`:

New features:

- Added method `getParsedPublicKey(): java.security.PublicKey` to
  `RegistrationResult` and `RegisteredCredential`.
  - Thanks to Jakob Heher (A-SIT) for the contribution, see
    #299
- Added enum parsing functions:
  - `AuthenticatorAttachment.fromValue(String): Optional<AuthenticatorAttachment>`
  - `PublicKeyCredentialType.fromId(String): Optional<PublicKeyCredentialType>`
  - `ResidentKeyRequirement.fromValue(String): Optional<ResidentKeyRequirement>`
  - `TokenBindingStatus.fromValue(String): Optional<TokenBindingStatus>`
  - `UserVerificationRequirement.fromValue(String): Optional<UserVerificationRequirement>`
- Added public builder to `CredentialPropertiesOutput`.
- Added public factory function
  `LargeBlobRegistrationOutput.supported(boolean)`.
- Added public factory functions to `LargeBlobAuthenticationOutput`.
- Added `hints` property to `StartRegistrationOptions`, `StartAssertionOptions`,
  `PublicKeyCredentialCreationOptions` and `PublicKeyCredentialRequestOptions`,
  and class `PublicKeyCredentialHint` to support them, to support the `hints`
  parameter introduced in WebAuthn L3:
  https://www.w3.org/TR/2023/WD-webauthn-3-20230927/#dom-publickeycredentialcreationoptions-hints
- (Experimental) Added option `isSecurePaymentConfirmation(boolean)` to
  `FinishAssertionOptions`. When set, `RelyingParty.finishAssertion()` will
  adapt the validation logic for a Secure Payment Confirmation (SPC) response
  instead of an ordinary WebAuthn response. See the JavaDoc for details.
  - NOTE: Experimental features may receive breaking changes without a major
    version increase.

`webauthn-server-attestation`:

New features:

- `FidoMetadataDownloader` now parses the CRLDistributionPoints extension on the
  application level, so the `com.sun.security.enableCRLDP=true` system property
  setting is no longer necessary.
- Added helper function `CertificateUtil.parseFidoSernumExtension` for parsing
  serial number from enterprise attestation certificates.
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.

2 participants