📋 What Is This Control?
Secure Digital Identities is the proactive control that says: implement identity, authentication, and session management deliberately and correctly, and match the strength of those mechanisms to the risk of the thing they protect. It covers authentication factors, credential storage, MFA, session lifecycle, token handling, and recovery. Authentication is the gate in front of everything else - if identity can be forged, guessed, replayed, or stolen, every downstream control is operating on a lie.
🎯 What It Prevents
- Account takeover (ATO): attackers operating as legitimate users
- Credential stuffing: reused breach passwords replayed at scale against login endpoints
- Session hijacking & fixation: a stolen or non-rotated session token grants full access without the password
- Privilege escalation: a session not regenerated on privilege change inherits high-value rights
- Token forgery: broken JWT verification (
alg:none, unchecked signature) mints arbitrary identities - SIM-swap / SMS OTP interception of weak second factors
- User enumeration: distinct responses reveal which accounts exist
- Federation abuse: misconfigured OAuth2/OIDC (open redirects, missing
state) turns SSO into a bypass
🧭 How It Works
pick the level from the action's sensitivity
↓
2. Passwords: length-first policy, breach-screen,
store with Argon2id/bcrypt/scrypt (per-user salt)
↓
3. Enforce MFA server-side; prefer passkeys/WebAuthn
↓
4. Sessions: CSPRNG IDs, regenerate on login &
privilege change, HttpOnly+Secure+SameSite, timeouts
↓
5. Verify tokens fully; step up for sensitive actions
❌ Without This Control
✅ Applying the Control
✓ Implementation Checklist
- Each action mapped to a NIST AAL; sensitive actions require step-up
- Password policy is length-first, breach-screened, no forced rotation
- Passwords stored with Argon2id/bcrypt/scrypt (per-user salt)
- MFA enforced server-side; phishing-resistant factors preferred
- Session IDs are CSPRNG; regenerated on login and privilege change
- Cookies set HttpOnly; Secure; SameSite; idle + absolute timeouts
- Logout invalidates the session server-side
- JWTs verify signature, algorithm allow-list, exp, and aud; short-lived + rotated
- OAuth2/OIDC uses Auth Code + PKCE, validated state, exact redirect URIs
- Rate limiting / lockout on auth endpoints; anomaly alerting in place
- Reset tokens are single-use, hashed, time-limited; responses non-enumerable
🔍 Tools & Techniques
Standards & Factors:
Libraries & Storage:
How to Verify:
- Confirm the session ID changes on login (check before/after)
- Test that logout invalidates the session server-side, not just the cookie
- Submit a JWT with
alg:none- it must be rejected - Compare login/reset responses for valid vs invalid accounts (must match)
- Verify cookies carry HttpOnly, Secure, and SameSite
- Confirm rate limiting fires on repeated failed logins
🌍 Why It Matters
These are documented incident classes - recurring patterns rather than any single fabricated breach or CVE.
- Credential stuffing at scale: attackers replay username/password pairs leaked from unrelated breaches, betting on reuse. MFA breaks "password alone is enough," breach-corpus screening rejects known-compromised passwords, and rate limiting makes high-volume replay expensive and visible.
- SIM-swap & SMS OTP interception: an attacker ports a victim's number or relays codes via a phishing site. Origin-bound passkeys/WebAuthn remove the shared secret an attacker can relay.
- Session fixation & non-rotated sessions: the app keeps the same session ID before and after login. Regenerating on login and truly invalidating on logout makes a captured pre-auth ID worthless.
- JWT
alg:none/ signature confusion: a service accepts a token claiming no signature or verifies RS256 as HS256. Pinning an algorithm allow-list and checking signature,exp, andaudmakes forged tokens fail.
📌 Quick Tips
- DO NOT store passwords with MD5/SHA-1 or without a salt
- DO NOT accept
alg:noneor skip token verification - DO NOT reveal whether an account exists
- DO favor length and breach screening over complexity rules
- DO prefer phishing-resistant MFA (passkeys > TOTP > SMS)
- DO regenerate sessions and invalidate server-side on logout
- DO step up (re-auth) for sensitive actions