- ⚠ BREAKING: Remove U2F support (#105)
- Fix RP ID validation to require dot boundary (#92)
A new crate! This crate houses the swappable cryptographic backends for different libraries should you wish/need to use a different set of libraries than the default RustCrypto libraries. As always PRs are accepted to add new backends should you wish to not use plenty of newtypes to get around the orphan rules.
- New
RngBackendtrait which replaces the pre-existingpasskey-types::rand::random_vecfunction. Use this new method aspasskey-crypto::rng::Rng::random_vec.
- ⚠ BREAKING: Remove
hid::Command::Msgvariant as that is U2F only and U2F support is now being removed. (#105)
- ⚠ BREAKING: Remove U2F support (#105)
- ⚠ BREAKING: Migrate
U2FErrorvariant intoCtap2Error, renameCtap2CodetoStatusCode, and finaly remove the oldStatusCode. (#105) - ⚠ BREAKING: The
passkey-types::randmodule no longer exists and is instead replaced bypasskey-crypto::rng.
- Migrate project to Rust 2024 edition
- Ignore the deprecated
rkoption in requests (#67) - ⚠ BREAKING: Add
user_handleas an optional parameter inCredentialStore::find_credentialsto allow filtering onuser_handle. (#67) - Stop returning an error when we find credentials in the
exclude_credentialslist. This allows for updating/replacing credentials should the user so wish. (#67) - Fix hmac-secret logic around the second salt (#67)
- ⚠ BREAKING: Fix Ctap2Api trait to correctly call the concrete method to prevent recursion (#67)
- ⚠ BREAKING: The
UserValidationMethodtrait has been updated to useUiHintto give the implementation more information about the request, which can be used to decide whether additional validations are needed. To reflect this, theUserValidationMethodtrait now also returns which validations were performed. (#76) - ⚠ BREAKING: Change the
CredentialStoreandUserValidationMethodassociated type constraint to a newPasskeyAccessortrait instead of theTryInto<Passkey>, making it possible to use a custom passkey representation type that goes throughout the entire flow without losing any additional information through a conversion. (#87) - ⚠ BREAKING: The
Ctap2Api::get_infomethod now returns a boxed response due to the size of the response. (#88)
- ⚠ BREAKING: Add support for RelatedOrigins to the RpIdVerifier through a generic fetcher (#67)
- Make output types Hashable in Swift code gen (#67)
- Support stringified booleans in webauthn requests (#67)
- Be more tolerant to failed deserialization of optional vectors (#67)
- ⚠ BREAKING: Add
usernameanduser_display_nameto thePasskeytype and its mock builder. (#87) - Update CTAP2 types to ignore unknown values during deserialization, just like their WebAuthn equivalents. (#88)
- ⚠ BREAKING: Update
ctap2::get_info::Responseto have all the fields from ctap 2.2 (#88)
- Added: support for controlling generated credential's ID length to Authenticator (#49)
- ⚠ BREAKING: Removal of
Authenticator::set_display_nameandAuthenticator::display_namemethods (#51)
- ⚠ BREAKING: Update android asset link verification (#51)
- Change
asset_link_urlparameter inUnverifiedAssetLink::newto be required rather than optional. - Remove internal string in
ValidationError::InvalidAssetLinkUrlvariant.
- Change
- Remove special casing of responses for specific RPs (#51)
- Added
RpIdValidator::is_valid_rp_idto verify that an rp_id is valid to be used as such (#51)
- ⚠ BREAKING: Removal of
CredentialPropertiesOutput::authenticator_display_name(#51)
- Added: support for signature counters
- ⚠ BREAKING: Add
update_credentialfunction toCredentialStore(#23). - Add
make_credentials_with_signature_countertoAuthenticator.
- ⚠ BREAKING: Add
- ⚠ BREAKING: Merge functions in
UserValidationMethod(#24)- Removed:
UserValidationMethod::check_user_presence - Removed:
UserValidationMethod::check_user_verification - Added:
UserValidationMethod::check_user. This function now performs both user presence and user verification checks. The function now also returns which validations were performed, even if they were not requested.
- Removed:
- Added: Support for discoverable credentials
- ⚠ BREAKING: Added:
CredentialStore::get_infowhich returnsStoreInfocontainingDiscoverabilitySupport. - ⚠ BREAKING: Changed:
CredentialStore::save_credentialnow also takesOptions. - Changed:
Authenticator::make_credentialsnow returns an error if a discoverable credential was requested but not supported by the store.
- ⚠ BREAKING: Added:
- Changed: The
Clientno longer hardcodes the UV value sent to theAuthenticator(#22). - Changed: The
Clientno longer hardcodes the RK value sent to theAuthenticator(#27). - The client now supports additional user-defined properties in the client data, while also clarifying how the client
handles client data and its hash.
- ⚠ BREAKING: Changed:
registerandauthenticatetakeClientData<E>instead ofOption<Vec<u8>>. - ⚠ BREAKING: Changed: Custom client data hashes are now specified using
DefaultClientDataWithCustomHash(Vec<u8>)instead ofSome(Vec<u8>). - Added: Additional fields can be added to the client data using
DefaultClientDataWithExtra(ExtraData).
- ⚠ BREAKING: Changed:
- Added: The
Clientnow has the ability to adjust the response for quirky relying parties when a fully featured response would break their server side validation. (#31) - ⚠ BREAKING: Added the
Originenum which is now the origin parameter for the following methods (#32):Client::registertakes animpl Into<Origin>instead of a&UrlClient::authenticatetakes animpl Into<Origin>instead of a&UrlRpIdValidator::assert_domaintakes an&Origininstead of a&Url
- ⚠ BREAKING: The collected client data will now have the android app signature as the origin when a request comes from an app directly. (#32)
CollectedClientDatais now generic and supports additional strongly typed fields. (#28)- Changed:
CollectedClientDatahas changed toCollectedClientData<E = ()>
- Changed:
- The
Clientnow returnsCredProps::rkdepending on the authenticator's capabilities. (#29) - ⚠ BREAKING: Rename webauthn extension outputs to be consistent with inputs. (#33)
- ⚠ BREAKING: Create new extension inputs for the CTAP authenticator inputs. (#33)
- ⚠ BREAKING: Add unsigned extension outputs for the CTAP authenticator outputs. (#34)
- ⚠ BREAKING: Add ability for
Passkeyto store associated extension data. (#36) - ⚠ BREAKING: Change version and extension information in
ctap2::get_infofrom strings to enums. (#39) - ⚠ BREAKING: Add missing CTAP2.1 fields to
make_credential::Responseandget_assertion::Response. (#39) - Make the
PublicKeyCredentialoutputs equatable in swift. (#39)
Most of these changes are adding fields to structs which are breaking changes due to the current lack of builder methods for these types. Due to this, additions of fields to structs or variants to enums won't be marked as breaking in this release's notes. Other types of breaking changes will be explicitly called out.
- ⚠ BREAKING: Update
bitflagsfrom v1 to v2. This meansctap2::Flagsno longer implementPartialOrd,OrdandHashas those traits aren't applicable. - Added a
transportsfield toctap2::get_info::Response - Changes in
webauthn::PublicKeyCredential:- ⚠ BREAKING:
authenticator_attachmentis now optional - ⚠ BREAKING:
client_extension_results's type has been renamed fromAuthenticationExtensionsClientOutputstoAuthenticatorExtensionsClientOutputs
- ⚠ BREAKING:
- Changes for
webauthn::PublicKeyCredentialRequestOptions:timeoutnow supports deserializing from a stringified numberuser_verificationwill now ignore unknown values instead of returning an error on deserialization- Add
hintsfield (#9) - Add
attestationandattestation_formatsfields
- Changes for
webauthn::AuthenticatorAssertionResponse- Add
attestation_objectfield
- Add
- Changes for
webauthn::PublicKeyCredentialCreationOptions:timeoutnow supports deserializing from a stringified number- Add
hintsfield (#9) - Add
attestation_formatsfield
- Fix
webauthn::CollectedClientDataJSON serialization to correctly follow the spec. (#6)- Add
unknown_keysfield - Always serializes
cross_originwith a boolean even if it is set toNone - ⚠ BREAKING: Remove from
#[typeshare]generation as#[serde(flatten)]onunknown_keysis not supported.
- Add
- Add
webauthn::ClientDataType::PaymentGetvariant. - Make all enums with unit variants
Clone,Copy,PartialEqandEq - Add support for the
CredPropsextension withauthenticatorDisplayName
- Add
Authenticator::transports(Vec<AuthenticatorTransport>)builder method for customizing the transports during credential creation. The default isinternalandhybrid. - Add
Authenticator:{set_display_name, display_name}methods for setting a display name for theCredPropsextension'sauthenticatorDisplayName. - Update
p256to version0.13 - Update
signatureto version2
- Add
WebauthnError::is_vendor_error()for verifying if the internal CTAP error was in the range ofpasskey_types::ctap2::VendorError - Break out Rp Id verification from the
Clientinto its ownRpIdVerifierwhich it now uses internally. This allows the use ofRpIdVerifier::assert_domainpublicly now instead of it being a private method to client without the need for everything else the client needs. Client::registernow handlesCredPropsextension requests.- Update
idnato version0.5
- Update the public suffix list