Repository navigation
Replies: 1 comment 2 replies
|
@alexlinu Thanks for creating the issue! This is a duplicate enhancement, as it should be achieved by using the WebAuthn hints: But it's only a hint, or a preferred approach, of what to suggest first, so users can still use the other approach. Even based on WebAuthn Level 3 spec, a hint MUST NOT be interpreted as a requirement. AFAIK, in WebAuthn, there's no way how to have the requirement - only by defining the AAGUIDs. So, the current suggested approach is to use the AAGUIDs directly for the YubiKeys + attestation statement other than 'none'. We could definitely improve the docs for the WebAuthn/Passkeys. Let me know if you'd need something more. Thanks! Leaving as a discussion, as it touches more stuff related to the WebAuthn and the settings. |

Uh oh!
There was an error while loading. Please reload this page.
Description
Keycloak version
Keycloak v26
Environment
Use case
We currently use username/password authentication and are adding WebAuthn as a second-factor MFA method.
For this MFA feature, our intended supported authenticator is an external hardware security key, with the YubiKey 5 Series as our primary supported hardware key. We are open to restricting this MFA enrollment flow so that only approved YubiKey 5 Series authenticators can be registered.
Separately, in a later phase of our roadmap, we plan to offer sign-in with passkey as an independent passwordless authentication feature. That is not the use case described in this issue.
Current authentication flow
Our browser authentication flow is:
WebAuthn Authenticatorexecution.We are using the standard WebAuthn Policy, not the WebAuthn Passwordless Policy, for this MFA flow.
Current WebAuthn Policy configuration
Relevant policy settings currently configured:
keycloak[redacted domain]ES256DirectCross platformYesRequiredScreenshots of our authentication flow, WebAuthn policy configuration, and the browser-native dialog are attached.
Actual behavior
When a user selects the hardware security key MFA method and proceeds through WebAuthn enrollment, the browser-native dialog displays both of the following options:
This behavior is confusing for our MFA use case because the user explicitly selected a hardware security key as their second-factor method. We do not want this flow to offer registration of a passkey on a phone or tablet.
Expected behavior
For this specific MFA flow, we would like the WebAuthn registration ceremony to permit only an approved external hardware security key, specifically the YubiKey 5 Series, and not offer phone/tablet passkey registration.
Questions
Could you please clarify the recommended standards-based Keycloak configuration for this use case?
For a username/password + WebAuthn hardware-key MFA flow, should
Require Discoverable Credentialbe set toNorather thanYes?Is the phone/tablet QR-code option expected browser behavior when Keycloak initiates WebAuthn registration with
Authenticator Attachment = Cross platform, even when the WebAuthn execution is being used strictly as a second factor?Is there a supported Keycloak configuration that allows this MFA enrollment experience to request an external hardware security key only, so that supported browsers do not display the phone/tablet passkey option?
Can the
Acceptable AAGUIDssetting be used to restrict new MFA credential registration to approved YubiKey 5 Series models? If so:If browser UI cannot be fully restricted using current Keycloak configuration, does Keycloak support, or plan to support, a standards-based authenticator preference such as WebAuthn
hints: ["security-key"]for this type of flow?Steps to reproduce
DirectCross platformYesRequiredWebAuthn Authenticatorto an authentication flow after username/password authentication.Additional context
We understand that the visible WebAuthn chooser is rendered by the browser and/or operating system rather than directly by Keycloak.
Our question is whether Keycloak currently provides a supported, standards-based way to accurately express the relying party's intended authenticator policy for two distinct use cases:
We would prefer to use standard Keycloak and WebAuthn capabilities rather than implement browser-specific workarounds or custom authentication behavior.
Value Proposition
We use WebAuthn as MFA after password login and want users to enroll an approved external security key, primarily YubiKey 5 Series. Currently, the browser dialog also offers phone/tablet passkey registration, which is confusing because this flow is specifically presented as hardware key MFA.
This enhancement would help Keycloak distinguish hardware security key MFA from separate passwordless/passkey login use cases.
Goals
Provide a standards-based configuration for a WebAuthn MFA flow to indicate that an external security key is intended, such as support for WebAuthn
hints: ["security-key"], where supported by the browser.Also document the recommended configuration for password + hardware security key MFA, including use of discoverable credentials and AAGUID restrictions for approved YubiKey 5 Series devices.
Non-Goals
This enhancement does not need to replace or fully control browser-native WebAuthn dialogs, guarantee identical behavior across browsers, or prevent passkeys from being used in separate passwordless login flows.
Discussion
No response
Notes
No response
All reactions