Overview
MFA in NeoSC:- Enabled by default for all users (local and SSO)
- Integrated with authentication policies
- Supports multiple MFA methods through Zitadel
- Configurable enforcement via security policies
- Tracked in audit logs
MFA Status
All users have MFA enabled by default in their profile:MFA Methods
NeoSC supports multiple MFA methods through Zitadel integration:WebAuthn / FIDO2
Hardware security keys and platform authenticators (recommended)
TOTP
Time-based One-Time Passwords via authenticator apps
SMS
SMS-based verification codes (Zitadel configuration)
Email-based verification codes (Zitadel configuration)
MFA Enforcement Policy
NeoSC includes a default security policy that enforces MFA: Policy ID:pol-mfa-required
backend/server.py:769
Configuring MFA
For Local Authentication Users
When using local authentication, MFA is handled at the application level:For SSO Users (Zitadel)
MFA is managed by Zitadel:Configure in Zitadel
Enable MFA policies in your Zitadel instance:
- Navigate to Organization Settings → Login Policy
- Enable Multi-Factor Authentication
- Configure allowed MFA methods (WebAuthn, TOTP, SMS, Email)
- Set MFA requirement: Optional, Required on First Login, or Always Required
User Setup
Users set up MFA when they first authenticate:
- User logs in with username/password
- Zitadel prompts for MFA setup
- User registers their MFA method (e.g., TOTP app, security key)
- MFA credential is saved in Zitadel
MFA in User Model
The user model includes themfa_enabled field:
Location: backend/server.py:41
Registration Flow
Location:backend/server.py:147
SSO Flow
Location:backend/server.py:228
Viewing MFA Policies
Administrators can view and manage MFA policies:Managing MFA Policies
Toggle MFA Policy
Administrators can enable/disable the MFA policy:backend/server.py:806
MFA in Session Security
MFA verification status is tracked in active sessions: Location:backend/server.py:78
backend/server.py:619
Audit Logging
All MFA-related events are logged to the audit trail:- User registration with MFA enabled
- SSO login with MFA verification
- MFA policy changes
- Failed MFA attempts (when implemented)
Best Practices
WebAuthn First
WebAuthn First
Encourage users to use WebAuthn/FIDO2 security keys or platform authenticators (Face ID, Touch ID, Windows Hello) as the primary MFA method.
TOTP Backup
TOTP Backup
Configure TOTP (authenticator apps like Google Authenticator, Authy) as a backup method in case hardware keys are unavailable.
Recovery Codes
Recovery Codes
Implement recovery codes in Zitadel to allow users to regain access if they lose their MFA device.
Admin Monitoring
Admin Monitoring
Regularly review audit logs for failed MFA attempts and unusual authentication patterns.
User Education
User Education
Provide clear documentation to users on how to set up and use MFA, including troubleshooting steps.
Zitadel MFA Configuration
For detailed MFA setup in Zitadel:Select MFA Methods
Choose allowed methods:
- ✅ WebAuthn (recommended)
- ✅ TOTP (recommended)
- ☐ SMS (optional)
- ☐ Email (optional)
Set Enforcement Level
Choose when users must set up MFA:
- Optional: Users can choose to enable MFA
- Required on First Login: Users must set up MFA after first login
- Always Required: MFA required for every login
Troubleshooting
User Cannot Enable MFA
User Cannot Enable MFA
Issue: User doesn’t see MFA setup optionSolutions:
- Verify MFA is enabled in Zitadel login policy
- Check that at least one MFA method is configured
- Ensure user has sufficient permissions
MFA Prompt Not Appearing
MFA Prompt Not Appearing
Issue: User logs in without MFA promptSolutions:
- Check if MFA policy enforcement is set to “Always Required”
- Verify the policy is enabled:
GET /api/policies/pol-mfa-required - Review Zitadel login policy settings
Lost MFA Device
Lost MFA Device
Issue: User cannot access account due to lost MFA deviceSolutions:
- Use recovery codes (if configured in Zitadel)
- Administrator can reset MFA in Zitadel user management
- Set up backup MFA methods during initial setup
WebAuthn Not Working
WebAuthn Not Working
Issue: Security key or platform authenticator not recognizedSolutions:
- Ensure browser supports WebAuthn (Chrome, Firefox, Safari, Edge)
- Verify HTTPS is used (WebAuthn requires secure context)
- Try a different browser or device
- Fall back to TOTP method
Security Considerations
Next Steps
Zitadel SSO
Configure Zitadel OIDC integration
Security Policies
Manage other security policies
Audit Logs
Monitor authentication events
User Management
Manage user accounts and permissions