Skip to content

Commit c8ea368

Browse files
committed
(doc): Update Keycloak readme for 2FA support with TOTP/Yubikey
1 parent a013012 commit c8ea368

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

argocd-helm-charts/keycloakx/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,30 @@ in the Keycloak login page, then we can follow these steps:
207207
4) Go the client, f.ex. ArgoCD in the Keycloak's `<customer_name>` realm
208208
5) __Clients -> Client details -> Advanced -> Authentication flow overrides -> Select the duplicate flow created in Step 2.
209209

210+
## Enable 2FA on Keycloak with OTP or WebAuthn Authenticator (YubiKey)
211+
212+
By default, we only have username/password based authentication enabled in Keycloak. To enable 2FA:
213+
214+
1) Go to `<customer_name>` realm, and click on __Authentication__.
215+
2) Navigate to __Authentication -> Flows -> Browser__.
216+
3) Set __Browser - Conditional 2FA__ to __Required__.
217+
4) Set __OTP Form__ to __Alternative__.
218+
5) Set __WebAuthn Authenticatior to __Alternative__.
219+
6) Go back to __Authentication -> Policies -> WebAuthn Policy__.
220+
7) Configure __Require discoverable credential__ to __No__ if you have users on YubiKey version 4.
221+
8) Go back to __Authentication -> Required actions__.
222+
9) Set __Set as default action__ button in __WebAuthn Register__ to __On__.
223+
224+
NOTE: You might get a `Not Allowed` error while registering an old Yubikey (earlier than version 5).
225+
> The NotAllowedError during passkey registration typically means your YubiKey 4 lacks the hardware
226+
capability to create a FIDO2 Discoverable Credential (Passkey), or the browser’s internal picker is
227+
rejecting the key. YubiKey 4 is primarily a FIDO U2F/FIDO2 standard device, while "Passkeys"
228+
strictly require FIDO2 Resident Keys.
229+
230+
This is due to Missing Resident Key Support: Passkeys demand "discoverable credentials" (resident keys)
231+
so the authenticator can store your account username directly on the device. YubiKey 4 does not support
232+
this FIDO2 feature (it was introduced in the YubiKey 5 series).
233+
210234
## Add normal users to the Keycloak setup
211235

212236
* Have the user access <https://keycloak.example.com/auth/realms/<customer_name>/account/>

0 commit comments

Comments
 (0)