Authentication Security
User Authentication
Password Requirements
- Minimum 12 characters
- Mix of uppercase, lowercase, numbers
- Hashed with Argon2id
JWT Tokens
- Access tokens: 15 minutes
- Refresh tokens: 7 days
- Stored in HttpOnly cookies
Session Management
- Token revocation on logout
- Automatic refresh
- Concurrent session limit
Multi-Factor Authentication
TOTP (Time-Based One-Time Password)
- User initiates setup
- Server generates secret
- QR code displayed
- User scans with authenticator app
- Verify with test code
- Backup codes provided
WebAuthn
Hardware security keys and biometrics:
- YubiKey support
- Touch ID / Windows Hello
- Platform authenticators
Account Protection
Brute Force Prevention
- 5 failed attempts: 10 minute lockout
- 10 failed attempts: 1 hour lockout
- Lockouts are per-account and per-IP
Rate Limiting
- Login: 5 requests/minute
- API: 60 requests/minute
Best Practices
- Enable MFA for all admin accounts
- Use strong, unique passwords
- Rotate credentials regularly
- Monitor login attempts
- Review active sessions