Problem
Single-factor authentication (username/password) is vulnerable to:
- Phishing
- Credential reuse
- Password leaks
For an application handling sensitive data such as working time records, this presents a security risk.
Goal
Introduce optional multi-factor authentication (MFA) to significantly increase account security while keeping usability manageable.
MFA Scope
- MFA is optional but strongly recommended
- MFA can be enabled per user
- MFA applies to:
- Login
- Sensitive account actions (optional, future)
Supported MFA Method (Initial)
Time-based One-Time Passwords (TOTP)
- Compatible with common authenticator apps:
- Google Authenticator
- Microsoft Authenticator
- Authy
- RFC 6238 compliant
- No SMS-based MFA (security reasons)
Enrollment Flow
- User enables MFA in account settings
- System generates a secret
- QR code is displayed
- User confirms setup by entering a valid OTP
- MFA is marked as active
Login Flow with MFA
- User logs in with username/password
- If MFA is enabled:
- Access is granted only after successful verification
Security Requirements
- MFA secrets must be stored securely
- Secrets must never be logged or exposed
- Rate limiting on MFA attempts
- MFA verification must not bypass existing session validation
- MFA can be disabled only after successful authentication
Recovery & Fallback
- Provide recovery codes:
- Generated during MFA setup
- One-time use
- Recovery codes must be stored securely (hashed)
- Clear warning that losing recovery codes may lock the account
Acceptance Criteria
Out of Scope
- SMS-based MFA
- Hardware keys (FIDO2)
- Mandatory MFA enforcement
- MFA for API access
Notes
This issue establishes a secure and extensible MFA foundation.
Additional MFA methods can be added later if required.
Problem
Single-factor authentication (username/password) is vulnerable to:
For an application handling sensitive data such as working time records, this presents a security risk.
Goal
Introduce optional multi-factor authentication (MFA) to significantly increase account security while keeping usability manageable.
MFA Scope
Supported MFA Method (Initial)
Time-based One-Time Passwords (TOTP)
Enrollment Flow
Login Flow with MFA
Security Requirements
Recovery & Fallback
Acceptance Criteria
Out of Scope
Notes
This issue establishes a secure and extensible MFA foundation.
Additional MFA methods can be added later if required.