Repository navigation
Description
Area / route
A batch of confirmed low-severity auth/2FA/SSO defects, each independently fixable. Grouped because they are all low-priority polish/correctness items in the same auth surface; each is itemized with its own evidence and fix so they remain individually actionable.
Sites
- [04] /2fa-enroll wall has no "enrollment-required" guard and traps non-blocked users (asymmetric with forced-change-password)
- Evidence: services/platform/app/routes/2fa-enroll.tsx:39-48 (beforeLoad only validates session); compare services/platform/app/routes/forced-change-password.$id.tsx:70-85 which reads getPasswordExpiryStatus and navigates away when !expired
- [05] Persistent dashboard 2FA grace / low-backup-code banners use assertive role="alert" (should be polite)
- Evidence: services/platform/app/features/auth/components/two-factor-grace-banner.tsx:43 (role="alert"); services/platform/app/features/auth/components/two-factor-low-backup-codes-banner.tsx:46 (role="alert")
- [06] Dead path guard in password-expiry gate — endsWith('forced-change-password') never matches the /forced-change-password/$id route
- Evidence: services/platform/app/features/auth/hooks/use-password-expiry-gate.ts:6 (FORCED_CHANGE_PATH='forced-change-password'), :26 (location.pathname.endsWith(FORCED_CHANGE_PATH)); route is '/forced-change-password/$id' per services/platform/app/routes/forced-change-password.$id.tsx:28
- [12] "Auto-assign roles from the IdP" toggle has no effect — no UI to define role-mapping rules, so every user always falls back to the default role
- Evidence: enterprise-sso-form.tsx:333
roleMappingRules: config?.provisioning.roleMappingRules ?? [](no editor anywhere in the 954-line form); use-enterprise-sso.ts:26 useSetProvisioning exported; grep shows no caller of useSetProvisioning outside the hook file.
- Evidence: enterprise-sso-form.tsx:333
- [13] SCIM Group PATCH combining a member 'add' with a value-less 'remove members' silently drops the adds (replaceMembers=[] wins the whole branch)
- Evidence: mappers.ts:320-323
else if (verb === 'remove') { if (ids.length) ... else patch.replaceMembers = []; }; internal_mutations.ts:534-535if (args.replaceMembers !== undefined) { await setTeamMembers(ctx, args.teamId, args.replaceMembers); }(the addMembers branch is theelse).
- Evidence: mappers.ts:320-323
- [19] Disabling 2FA on the Account page is allowed with no warning even when the org enforces 2FA
- Evidence: services/platform/app/features/settings/account/components/two-factor-section.tsx:155-201 (EnrolledState/disable never references enforced); :57 NotEnrolledState({ enforced }) uses it; convex/two_factor/queries.ts:152 returns enforced
Notes
None is a security boundary crossing. Fixes (per item): [04] add a parity enrollment-required guard to /2fa-enroll (or an escape control); [05] add aria-live="polite" to the two banner Rows; [06] match the real path shape (includes/route-id) in the password-expiry gate; [12] add a role-mapping-rules editor (or hide the inert toggle); [13] make SCIM clear-all compose with adds; [19] warn/disable 2FA-disable when the org enforces it. [05] is distinct from the live-region work in #1980 and the a11y items in #1998. [13] is a non-standard IdP payload (low blast radius).
Filed by an automated manual-review pass (live browser QA + a 25-agent code-grounded audit, each finding adversarially verified). Deduped against open issues (incl. #1972–#1999, settings/forms epic #1941–#1966, audit cluster #1842–#1846) and recently-closed issues.
Activity
fix(platform): finish 2FA enrollment guards and SSO role mapping
fix(platform): scope the 2fa-enroll guard to already-enrolled users
fix(platform): scope SCIM provisioning to the token's tenant
fix(platform): polish enterprise SSO + 2FA settings UX and a11y
fix(platform): finish 2FA enrollment guards and SSO role mapping
fix(platform): scope the 2fa-enroll guard to already-enrolled users
test(platform): close out the auth/2FA/SSO gaps of #2085 with regress…
fix(platform): apply SCIM group PATCH operations in request order
fix(platform): apply SCIM group PATCH operations in request order