feat(identity): ADR-012 — step-up trusts IdP-asserted authentication context (amr) #129
No reviewers
Labels
No labels
epic
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
phase-7
phase-8
phase-9
priority/P0
priority/P1
priority/P2
type/backend
type/client
type/docs
type/ops
type/security
type/spike
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/failsulit!129
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/adr012-amr-stepup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the ADR-012 code leg (the one passkey-era gap flagged in the specs update, PR #123): admin step-up now trusts the IdP's word about HOW a user authenticated.
Behavior: an admin whose id_token carries an IdP-asserted MFA factor (
amr: otp/otp_sms/mfa/pk/webauthn) gets a FULL session from both OIDC surfaces —mfa_required/totp_setup_requiredstay false. Under the passkey realm policy (NFR-02), the passkey ceremony at Zitadel IS the step-up; demanding Drive-side TOTP enrollment on top was wrong. Password-only amr, bareuserpresence andhwkpossession do NOT satisfy step-up; amr-less logins keep the legacy gates unchanged (TotpEnabled → mfa-pending, else setup-scoped). The walletAuthenticatepath (no id_token) is untouched.Implementation:
OidcClaimscarriesamr/auth_time;OidcTokenValidator.HasIdpMfaFactor+IdpMfaAmrValues(the factor set is one constant, realm-policy evolution touches one place)sub/amr/auth_timeare not renamed into long ClaimTypes namespaces); the existing sub/email fallbacks retained, all OIDC suites greenTests: 5 new (Adr012AmrStepUpTests): passkey-at-IdP → full session (was setup-scoped — RED), OTP-at-IdP for a TotpEnabled admin → full session (was mfa-pending — RED), password-only stays setup-scoped (control), no-amr stays mfa-pending (control), and the callback-path passkey redirect asserts both flags false. Suite 958/0/39 (Release+Debug), coverage 87.97%. Closes the ADR-012 code leg of task 2.2; realm config (platform-admins realm, email-fallback disabled) remains the staging bring-up step.