Repository navigation
Auth: a pending session with no factor ends no sessions under require_mfa (BACKLOG #1149) - #3258
wshallwshall wants to merge 5 commits into
Conversation
…_mfa Under [security].require_mfa a session on an account with no enrolled factor is MFA-pending. It is now confined like any other pending session: it reaches enrolment and sign-out, and is refused elsewhere, the session-terminate routes included, with a refusal naming enrolment. - AuthService: session_terminate, save_ends_own_sessions and revoke_all_sessions are refused to every pending session, the account's factors aside, so no re-proof (password or IdP) mints them. The enrolment actions keep the first-enrolment carve-out. - JSON: the MFA refusal keeps 403 + X-MFA-Required and its leading text; for a pending session with no factor the detail names enrolment. - Console: the reauth-only action gate sends such a session to /ui/account?m=enroll_first instead of /ui/reauth. - Docs: SECURITY.md and CONFIGURATION.md; changelog fragment. - Seam: the console gate body moved the seam digest; re-derived with --write and the console accepted seam set by hand. - Tests: two old tests that pinned the no-factor terminate inverted. Every other path keeps main's result: a session that owes no factor (require_mfa off, or out of scope) and one with a factor are unchanged. Not built: #3941 item 2 (the route-set / revoke-set race). BACKLOG #1149 (ASVS 7.5.2) Proposed PR title: Auth: a pending session with no factor ends no sessions under require_mfa (BACKLOG #1149) Proposed banner: PARTIAL -- engine closes ground 2 (no-factor pending session refused session-ending grants and terminates, refusal names enrolment). Left: #3941 item 2 decision; 7.5.2 re-score (vault record work).
- The JSON refusal's wording read keeps the 403 on a store fault (verify wording), as _step_up_refusal's does; a test pins it. - The enrol-first detail says each enrolment step has its own step-up. - _PENDING_REFUSED_ACTIONS is built from _PENDING_SESSION_ENDING_ACTIONS. - Stale comments beside the terminate gates, on both planes, and the SECURITY.md gate-table and decision-table cells now state the rule. - CONFIGURATION.md links to SECURITY.md rather than restating it. BACKLOG #1149
- Three console tests that used a no-factor pending session to reach /ui/reauth for another purpose run with require_mfa off. - The console asks the factor read again only on a session-ending action. - SECURITY.md: the IdP step-up grant refusal states the new rule. - Comment fixes: the refused-actions set, the wording helper's return. - Console CHANGELOG entry; the seam digest re-derived again. BACKLOG #1149 Proposed PR title: Auth: a pending session with no factor ends no sessions under require_mfa (BACKLOG #1149)
- The wording read also catches the sealed-read set and TransitSealUnavailableError, so a seal or Transit fault keeps the 403. - /ui/reauth sends a pending session with no factor to enrol for a session-ending action instead of a password form that mints nothing. - SECURITY.md: the password-only routes paragraph, the incident-response revoke note and the session-termination paragraph state the new rule, "at least" where the list is open, and that a local password holder can enrol first: the refusal adds a step, not a bar. - ADR 0077 and ADR 0207: dated amendment notes, accepted text kept. - Changelog: the terminate routes used to send X-Step-Up-Required to this session and now send X-MFA-Required. BACKLOG #1149 Proposed PR title: Auth: a pending session with no factor ends no sessions under require_mfa (BACKLOG #1149)
…refusal The pending-session reach names the mfa_gate=False routes too; the Kerberos revoke note splits the factor and no-factor cases; the ADR 0077 note states the wording per case; the wording-read docstring names the faults it catches. BACKLOG #1149
|
Lander hold on head 7e91397. The QA rounds cover the code, and the head is text only. The change only tightens. Finding 1, Held on finding 3, a false control claim.
|
BACKLOG #1149, ground 2. From Manager runbook-batch-manager-fa3030 (account 9).
Merge danger
require_mfa:api/security.pyand the auth core;/ui/reauthand its terminate actions;require_mfa, a pending session with no factor (MFA-pending) gets no session-ending grant./ui/reauthsends it to/ui/account?m=enroll_first. This holds on the password and IdP legs, and runs before the rate limiter.require_mfais MFA-pending, the stricter of the two options.Evidence
db3d07dec86and pass at head:tests/test_mfa_access_gate.py::test_a_store_fault_on_the_wording_read_keeps_the_mfa_refusal[transit]and[cipher];packaging/messagefoundry-webconsole/tests/test_webui_bulk.py::test_revoke_reauth_sends_a_no_factor_pending_session_to_enrol.[store]case andtest_revoke_reauth_stays_password_only_when_no_factor_is_owedpass on both.QA
code-reviewskill at xhigh, across several rounds. The last isround-641e2405ondb3d07dec86..768ba1f7e71, after an earlier round,round-80ac4419, whose findings 1 to 5 are fixed.xhigh effort → 10 inline angles → dedup (no verify) → sweep → ≤15 findings.review_tag.pyexited 0.7e91397ce27changes text and docstrings only, and no review round has covered it.Banner
#1149 PARTIAL. The engine closes ground 2: under
require_mfa, a pending session with no factor is given no session-ending grant. The terminate routes refuse it with wording that names enrolment, and the console and/ui/reauthsend it to enrol.Left:
Open findings (one R2 row)
TransitSealUnverifiableErroron the MFA wording read still turns the 403 into a 500. The catch covers the sealed-read set andTransitSealUnavailableErroronly._step_up_refusal's wording read catches store faults only, so a Transit or cipher fault there gives a 500./ui/reauthand IdP-leg redirects have no test.