OIDC: Implement max_age validation on /authorize endpoint #8
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Missing OIDC Feature:
max_ageValidationStatus
auth_timeclaim is now implemented and included in ID tokens, but the server-sidemax_agevalidation on the/authorizeendpoint is missing.What's Implemented
auth_timeis stored in session when user authenticates (session[:auth_time])auth_timeis included in ID token claims (as Unix timestamp)auth_timeon their endWhat's Missing
Per OIDC Core §2, when the client sends
max_ageparameter to/authorize:Expected behavior:
auth_time≤max_ageseconds ago → Proceed silently (SSO)auth_time>max_ageseconds ago → Force re-authentication (show login screen)Current behavior:
max_ageparameter is not validatedmax_ageImplementation Notes
The authorize flow currently has two states:
Adding
max_agesupport requires a third state:3. User logged in but session is too old → force re-auth
Related Code
/oauth/authorizeendpoint inapp/controllers/oidc_controller.rb:48app/controllers/concerns/authentication.rb:53app/services/oidc_jwt_service.rb:6Spec Reference
max_ageparameterauth_timeclaim