fix(identity/sharing): B-6 auth-consistency batch (#37) — OTP atomicity, share expiry, TOTP replay+lockout, OIDC exact-match, recovery uniformity #79
No reviewers
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!79
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/b6-auth-consistency"
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?
Closes #37 (baseline-review auth-consistency batch; items 6/7 — Logins unique index, Redis HMAC replay — already landed previously)
IOtpStore.ConsumeAttemptAsync(InMemory lock-gated; Redis delete-first, true INCR/Lua → M2)ExpiresAtbesideRevokedAt(in-memory, SQLite-compat)TotpSecurityGuard: consumed codes dead 90s; 5 consecutive failures → 15 min lock (even valid codes rejected, uniform 401) +auth.totp.*audit eventsfailsulit://auth/callback.evil.compassed → 400Also: TotpVerify's failed-login audit row used
Guid.EmptyActorId (the #74 FK-poison class) — now the real user id.Verification
TDD: RED ×7 deterministic (OtpAtomicity proven with a barrier store — all 10 racers read the same pre-consume entry).
EmailAuthFlowTests.TotpRecovery_UnknownEmail_Returns404updated to the new anti-enumeration contract (uniform 200) — behavior change, test updated not deleted.Suite 869 / 0 failed / 39 skipped (Release + Debug) · coverage gate 84.92% ≥ 80
Documented residual
Redis OTP consume is best-effort (IDistributedCache has no CAS) — true atomic INCR/Lua lands with the M2 Redis-hardening work, pairing with RedisSessionStore.