6.3.1.11. Passkey

Starting with version 3.11 privacyIDEA supports the passkey token. A passkey is a FIDO authentication credential based on FIDO standards, that allows a user to sign in to apps and websites with the same process that they use to unlock their device (biometrics, PIN, or pattern). Passkeys are FIDO cryptographic credentials that are tied to a user’s account on a website or application. Passkeys are phishing resistant and secure by design. They inherently help reduce attacks from cybercriminals such as phishing, credential stuffing, and other remote attacks.

This is a variation of the WebAuthn token, which is also a FIDO2 token supported by privacyIDEA. Therefore, it inherits the configuration of the WebAuthn token, which is described here: WebAuthn Token Config. The WebAuthn policies webauthn_timeout, webauthn_authenticator_attachment and webauthn_allowed_transports do not apply to passkeys; the registration timeout of a passkey is fixed at 12 seconds. The Passkey token always requests to be created as a resident credential, i.e. the option resident_key is always set to required, in contrast to the WebAuthn token, which does not request a resident key.

To enroll a passkey, the policies webauthn_relying_party_id and webauthn_relying_party_name have to be set. Moreover, passkeys always require a user assignment for enrollment.

Passkeys are eligible for offline use as specified here Offline as well as enroll_via_multichallenge. However, these features also have to be implemented in the client application.

Using passkeys in different browsers and environments can yield different user experiences. With the default value preferred of webauthn_user_verification_requirement, the browser and the authenticator decide whether the enrollment asks for user verification, for example a PIN. To make user verification mandatory for the enrollment, set this policy to required. privacyIDEA then requests user verification and completes the enrollment only if the authenticator reports that it verified the user. The policy webauthn_user_verification_requirement in the scope authentication applies to passkey authentication. A login to the WebUI with a passkey always requires user verification, and so does a login to the WebUI without a username with a WebAuthn token.

Note

A login without a username identifies the user by the passkey alone, while every request afterwards looks the user up by the login name and realm of the session. In a realm where the same login name exists in several resolvers, only the user that the realm’s resolver order finds first can log in this way; a passkey of another user with that login name is refused, and the authentication log records LOGIN_NAME_NOT_UNIQUE. The same applies to a login name that ends in @ and the name of a defined realm while splitAtSign is switched on.

Note

If user verification is not required on authentication and a user has multiple discoverable credentials for the same relying party on one authenticator (typically an external FIDO2 security key with several passkeys enrolled to the same site), the browser’s account picker may display generic placeholder labels for the credentials (for example “Passkey 1”, “Passkey 2” or “Unknown”) instead of the actual user names. This is a CTAP2 behavior: the authenticator only releases the user.name and user.displayName fields of a discoverable credential after user verification has been performed. Without UV, the browser has only the opaque user.id handle to work with and falls back to a non-identifying label. The exact string shown depends on the browser and operating system. Platform authenticators (Touch ID, Windows Hello, Face ID, synced platform passkeys) intrinsically perform user verification on every assertion and are not affected. Set webauthn_user_verification_requirement to required if you want the names to appear in the picker for external security keys as well.

On the token detail page, the passkey can be tested and, if successful, will show the username that is returned by privacyIDEA to use for login.

6.3.1.11.1. User Label

The name of the passkey that the authenticator shows in the credential selection during login (and during registration) can be configured with the policy passkey_user_label. This is useful to tell passkeys apart, for example when the same login name exists in several realms. The resolved value is also used as the display name. If the policy is not set, the login name of the user is used. The policy value supports tags such as {user} (login name), {realm}, {resolver} and {serial}, as well as any attribute the user’s resolver provides (e.g. {givenname}, {surname}, {email}). A value like {user}@{realm} results in a name such as alice@example. See the policy for details on the available tags and the 64 byte length limit.

6.3.1.11.2. Attestation

Attestation during passkey registration is controlled by its own policy, passkey_attestation_conveyance_preference. The WebAuthn attestation policies webauthn_authenticator_attestation_form and webauthn_authenticator_attestation_level do not apply to passkey enrollment.

The default and recommended value is none. Passkeys are intended as a user-friendly, privacy-preserving credential, and requesting attestation works against both goals:

  • With none, the authenticator data returned to privacyIDEA contains a zeroed AAGUID and no attestation statement, so the specific make and model of the authenticator is not disclosed.

  • With indirect, direct or enterprise, the authenticator returns its real AAGUID and an attestation statement. If the statement contains an x5c certificate chain, the leaf certificate (which typically identifies the make and model of the authenticator) is stored in the token info as attestation_certificate. If the token has no description yet, its description is set to the certificate’s Common Name.

  • Requesting attestation also causes additional friction during enrollment: most browsers will show an extra consent dialog informing the user that information identifying their authenticator will be sent to the site, which can be confusing for end users and is not aligned with how passkeys are typically presented.

If the authenticator sends an attestation statement, the WebAuthn library checks it: the signature of the statement, and for the apple, android-key and android-safetynet formats the certificate chain up to the vendor root certificates built into the library. A registration that fails these checks is rejected. Beyond that, privacyIDEA only archives the leaf certificate: there is no configurable trust validation (the trust anchor directory of the WebAuthn token is not used), no AAGUID allow-listing and no filtering of passkey tokens based on attestation data. If attestation-based filtering or trust validation is required, use the WebAuthn token instead.

6.3.1.11.3. Device type

Every passkey reports one of two device types:

  • single_device: the private key cannot be backed up and does not leave the authenticator, for example a FIDO2 security key or a platform authenticator that does not sync.

  • multi_device: the private key can be backed up, typically because a passkey manager syncs it to the user’s other devices through a cloud account.

The device type is derived from the backup eligibility flag in the authenticator data. This flag is fixed when the credential is created and does not change afterwards. privacyIDEA stores the device type in the token info as device_type. The token info backed_up records whether the credential had actually been backed up at the time of enrollment. That state can change at any time and is not updated later, so it is for information only.

The policy passkey_allowed_authenticator_device_types restricts passkeys to one of the device types. It exists in the enrollment scope and in the authentication scope, and the two are independent of each other.

Warning

The device type is reported by the authenticator in its authenticator data. At authentication, the authenticator data is signed with the passkey’s own key, so the client between the authenticator and privacyIDEA cannot change the reported device type; the signature only shows that the authenticator holding the key reported it, not that it is true. At enrollment, privacyIDEA accepts registrations without an attestation statement - with the default passkey_attestation_conveyance_preference none, and also when direct was requested but the client sends no statement. The authenticator data of such a registration is not signed, so the client that relays the registration can change the reported device type, and the enrollment check only sees what the client reports.

Use the authentication policy to enforce the device type: it keeps out passkeys whose authenticator reports multi_device, such as passkeys synced by the passkey manager of the operating system. The enrollment policy only filters registrations whose client passes the authenticator’s value through unchanged. Neither keeps out an authenticator that reports single_device although it can export or sync the key, for example a software authenticator or a faulty implementation. If you need assurance that the key cannot leave the hardware, use the WebAuthn token and set webauthn_authenticator_attestation_level to trusted.

6.3.1.11.4. Avoiding double registration

During passkey enrollment, privacyIDEA always sends the credential ids of the user’s existing passkey and WebAuthn tokens in the WebAuthn excludeCredentials list. The authenticator will then refuse to create a new credential if it already holds one of these, preventing a user from accidentally registering the same authenticator twice. Unlike the webauthn_avoid_double_registration policy for WebAuthn tokens, this behavior is always on for passkeys and is not configurable.

Tokens that have been revoked are excluded from this list, so the same authenticator can be re-enrolled for the user after revocation. Tokens that are merely disabled are still included, since disabling is reversible and the underlying credential is still bound to the user. Tokens whose enrollment never finished (rollout state clientwait) are also excluded.

6.3.1.11.5. PRF extension

During passkey enrollment, privacyIDEA requests the WebAuthn extension prf (pseudo-random function). With this extension, a client application can derive a secret from the passkey at login, for example a key to encrypt local data. For an authenticator that uses CTAP2, for example a FIDO2 security key, the browser requests the CTAP2 extension hmac-secret. To turn off the request, set the enrollment policy passkey_disable_prf.

The extension has an effect only if the browser and the authenticator support it. Otherwise, they ignore it and the enrollment continues without it. The secret stays with the client. privacyIDEA does not receive it and does not use it.

The WebUI passes the extension request to the browser. Other client applications that enroll passkeys, for example with enroll_via_multichallenge, must pass the extensions of the registration options to the browser or the authenticator.

A CTAP2 authenticator must create the secret of a credential only if the registration requests it. If a passkey was enrolled without this request, the client possibly cannot use the PRF of that passkey. Enroll the passkey again to make sure that it has the secret.

A CTAP2 authenticator reports in the extension output hmac-secret whether it created the secret. privacyIDEA saves this value in the token info as hmac_secret. True means that the passkey has the secret, and False means that the authenticator did not create it. If the token info has no hmac_secret, the authenticator did not report the extension output. This is the case for passkeys that were enrolled without the request, and for authenticators that implement the PRF without CTAP2. For these authenticators, the browser can report the PRF state in prf_enabled.

The token info entry prf_requested shows whether the registration requested the extension. False means that the policy passkey_disable_prf turned off the request. See Registration details in the token info.

6.3.1.11.6. Registration details in the token info

After a successful registration, privacyIDEA saves details about the credential and the authenticator in the token info. privacyIDEA uses only some of these values for authentication. The other values are for information.

The authenticator reports these values in the authenticator data and the attestation:

  • public_key, credential_id_hash and sign_count: privacyIDEA uses them to verify an authentication.

  • device_type and backed_up: see Device type.

  • aaguid and attestation_certificate: see the section about attestation above.

  • attestation_format: the format of the attestation, for example none, packed, apple or tpm.

  • user_verified: True if the authenticator verified the user during the registration.

  • extension_outputs: all extension outputs of the authenticator as JSON. Binary values are base64url encoded. An authenticator usually reports an extension output only if the registration requests the extension. If the JSON has more than 1024 characters, privacyIDEA does not save it.

  • hmac_secret: the extension output hmac-secret, see the PRF extension above.

privacyIDEA saves this value from the enrollment request:

  • prf_requested: True if the registration options requested the PRF extension. The token info has no such entry for a registration that started before the update to this version.

The client reports these values:

  • origin: the origin of the page that did the registration. privacyIDEA makes sure that it is the origin of the request.

  • authenticator_attachment: platform for an authenticator that is part of the device, or cross-platform for an authenticator like a security key or a phone.

  • transports: the transports of the authenticator as a comma-separated list, for example nfc,usb or hybrid,internal. privacyIDEA saves only the transports that the WebAuthn library knows.

  • prf_enabled: True if the browser reports that the PRF extension is enabled for the credential.

The WebUI sends the parameters transports and prf in the second enrollment request. transports is a list of strings, and prf is an object with the boolean enabled. Other client applications can send the same parameters. Without these parameters, the token info has no transports and no prf_enabled.

With the default passkey_attestation_conveyance_preference none, nothing in the registration is signed. The client that relays the registration can change all of these values, so they are for information only. The values show the state at the registration. A new registration of the token replaces them, and removes the values that the new registration does not report. The token info endpoints cannot change these entries.

6.3.1.11.7. Relationship to the WebAuthn token

Platform credentials (Touch ID, Windows Hello, synced platform passkeys) that were enrolled as WebAuthn tokens before the passkey token type existed (before 3.11) are usable through the usernameless passkey flow once they have been used for one regular authentication with a user name, which records their credential ID. See Using existing WebAuthn tokens as passkeys for how clients pass WebAuthn and passkey challenges to the authenticator.

A non-exhaustive list of devices that are known to work can be found here FIDO2 & WebAuthn Devices.