# MFA and one-time codes

**Test family:** `MFA`

- **MFA-001** Correct code succeeds once; wrong, empty, short, long, expired, previous, and replayed codes fail.
- **MFA-002** Leading-zero codes remain strings; paste/autofill and multi-box keyboard behavior work.
- **MFA-003** Rate limits and resend do not invalidate the newest code ambiguously or permit flooding.
- **MFA-004** Code binds to user, session, action, and channel; another account/session cannot use it.
- **MFA-005** Clock skew window is deliberate for TOTP; adjacent window and outside-window boundaries are tested.
- **MFA-006** Backup codes are one-time, stored safely, downloadable/printable once as promised, and regenerating revokes old codes.
- **MFA-007** Device trust duration, revocation, browser profile separation, and sensitive-action step-up behave as promised.
- **MFA-008** Recovery does not become an easier bypass than MFA.

## Comprehensive per-item coverage

- **MFA-009** Exercise new, active, unverified, invited, suspended, locked, disabled, deleted, merged, and partially provisioned identities.
- **MFA-010** Use identifiers containing ASCII emoticons, emoji/ZWJ sequences, kaomoji, accents, mixed scripts, RTL, confusables, invisible characters, and boundary lengths.
- **MFA-011** Compare absent, unknown, malformed, valid, expired, revoked, replayed, and wrong-tenant credentials or identifiers without account enumeration.
- **MFA-012** Use UI, API, SSO, SCIM, invitation, import, admin, recovery, and migration paths; converge on one identity and policy model.
- **MFA-013** Test exact duplicates, case variants, normalization equivalents, alias collisions, recycled identifiers, and concurrent creation atomically.
- **MFA-014** Change username, email, phone, external subject, team, role, owner, and tenant; preserve links, history, authorization, and audit.
- **MFA-015** Change role or account state between rendering, authentication, challenge, and commit; reauthorize the final operation.
- **MFA-016** Attempt cross-user and cross-tenant lookup, suggestion, recovery, invite, export, cache, and error paths; reveal no hidden existence or data.
- **MFA-017** Brute-force, credential-stuff, enumerate, resend, and lock accounts within a safe test envelope; balance abuse resistance and denial-of-service risk.
- **MFA-018** Race login, logout, password reset, MFA reset, email change, suspension, deletion, and session refresh; define which security state wins.
- **MFA-019** Retry after timeout and replay old links, codes, tokens, signed requests, and callbacks; enforce expiry, audience, nonce, and one-time use.
- **MFA-020** Verify current and remembered sessions, trusted devices, refresh tokens, API tokens, and linked providers after each security-sensitive change.
- **MFA-021** Force identity provider outage, delayed email/SMS, expired admin session, partial provisioning, and rollback failure; provide a recoverable state.
- **MFA-022** Use keyboard, password managers, autofill, screen readers, zoom/reflow, translated errors, RTL, and mobile keyboards without weakening security.
- **MFA-023** Inspect URL, referrer, DOM, storage, clipboard, logs, traces, analytics, support tools, notifications, exports, and screenshots for credential or PII leakage.
- **MFA-024** Notify the right channels of sensitive changes without including secrets or actionable one-time credentials.
- **MFA-025** Record actor, authority, target, old/new security state, request/trace ID, time, source, and outcome in tamper-resistant audit.
- **MFA-026** Measure authentication, directory lookup, authorization, provisioning, and revocation latency at normal and supported load.
- **MFA-027** Delete, anonymize, retain, restore, export, and merge identities according to legal and product policy without orphaning ownership.
- **MFA-028** Test stale clients, clock skew, region failover, cache lag, and key rotation; fail closed for authorization while preserving recovery.

[Back to Authentication, people, and access index](../../auth-people-access.md)
