Auth Backchannel FSM ADR
Status
Accepted
Context
Backchannel authentication is represented by a target finite state machine (FSM). The FSM is policy-owned: policy evaluation selects response markers, effect requests, and FSM event markers, while the runtime applies those markers to the request-local authentication state.
The target model keeps brute-force handling inside policy material through check facts, decision obligations, and response rendering. It does not maintain a separate bypass path for brute-force outcomes.
Decision
The authentication boundary uses the target FSM marker vocabulary as the stable contract:
auth.fsm.event.parse_okauth.fsm.event.parse_failauth.fsm.event.pre_auth_okauth.fsm.event.pre_auth_denyauth.fsm.event.pre_auth_tempfailauth.fsm.event.pre_auth_abortauth.fsm.event.auth_evaluatedauth.fsm.event.account_provider_evaluatedauth.fsm.event.auth_permitauth.fsm.event.auth_denyauth.fsm.event.auth_tempfailauth.fsm.event.auth_empty_userauth.fsm.event.auth_empty_passauth.fsm.event.basic_auth_okauth.fsm.event.basic_auth_failauth.fsm.event.abort
authn/standard_auth is the built-in default policy set. Configured policy sets live under
policy.namespaces.authn.policy_sets and use the same target markers, response markers, and decision effects as the
default set. Observe mode compares a configured policy set with authn/standard_auth; enforce mode applies the selected
policy result without emitting migration comparison reports.
State Matrix
States:
initinput_parsedpre_auth_checkedauth_checkedaccount_provider_checkedauth_ok(terminal)auth_fail(terminal)auth_tempfail(terminal)aborted(terminal)
Allowed transitions:
init + auth.fsm.event.parse_ok -> input_parsedinit + auth.fsm.event.parse_fail -> abortedinput_parsed + auth.fsm.event.pre_auth_ok -> pre_auth_checkedinput_parsed + auth.fsm.event.pre_auth_deny -> auth_failinput_parsed + auth.fsm.event.pre_auth_tempfail -> auth_tempfailinput_parsed + auth.fsm.event.pre_auth_abort -> abortedinput_parsed + auth.fsm.event.basic_auth_ok -> auth_okinput_parsed + auth.fsm.event.basic_auth_fail -> auth_failpre_auth_checked + auth.fsm.event.basic_auth_ok -> auth_okpre_auth_checked + auth.fsm.event.basic_auth_fail -> auth_failpre_auth_checked + auth.fsm.event.auth_evaluated -> auth_checkedpre_auth_checked + auth.fsm.event.account_provider_evaluated -> account_provider_checkedauth_checked + auth.fsm.event.auth_permit -> auth_okauth_checked + auth.fsm.event.auth_deny -> auth_failauth_checked + auth.fsm.event.auth_tempfail -> auth_tempfailauth_checked + auth.fsm.event.auth_empty_user -> auth_tempfailauth_checked + auth.fsm.event.auth_empty_pass -> auth_failaccount_provider_checked + auth.fsm.event.auth_permit -> auth_okaccount_provider_checked + auth.fsm.event.auth_deny -> auth_failaccount_provider_checked + auth.fsm.event.auth_tempfail -> auth_tempfail- Any non-terminal state plus
auth.fsm.event.abort -> aborted
Terminal-state rule:
- No outgoing transitions from
auth_ok,auth_fail,auth_tempfail, oraborted.
Consequences
- The FSM vocabulary is explicit, testable, and shared by default and configured policies.
- Observe-mode reports are limited to supported default-vs-configured comparisons.
- Enforce-mode request handling no longer emits temporary old-vs-new decision diagnostics.
- Runtime response rendering remains behavior-compatible while policy decisions become the stable authority boundary.