M1-audit: OidcVerify registration branch bypasses provisioning invariants #90
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#90
Loading…
Reference in a new issue
No description provided.
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?
OidcVerify.cs:132-186 hand-rolls registration: sets invitation.Status=Accepted (175) with no Pending guard (concurrent accepts → 500 on UserTenant PK), no Suspended check on the auto-link path (membership granted to suspended users), no admin TOTP gating (a TotpEnabled admin gets an MFA-free session) — while OidcCallback routes through UserProvisioningService and OidcVerify's own existing-login branch applies the admin/MFA logic.
Fix: replace 132-186 with ProvisionInviteeAsync + reuse the existing isAdmin/mfaRequired session logic. Tests: duplicate-accept, suspended, admin-TOTP.
Part of M1 closure audit #84.