@@ -207,6 +207,30 @@ in the Keycloak login page, then we can follow these steps:
2072074 ) Go the client, f.ex. ArgoCD in the Keycloak's ` <customer_name> ` realm
2082085 ) __ 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