Overview
UTMStack provides multiple authentication mechanisms built on Spring Security, including local authentication with JWT tokens, two-factor authentication (TOTP), and SAML-based single sign-on. All authentication methods encrypt credentials in the database and protect against brute force attacks using fail2ban integration.Authentication Methods
UTMStack supports the following authentication methods:- Local Authentication: Username/password with JWT tokens
- Two-Factor Authentication (2FA): TOTP-based authenticator apps
- SAML SSO: Enterprise single sign-on integration
- API Key Authentication: For programmatic access
Local Authentication
Local authentication uses Spring Security with JWT (JSON Web Token) for session management.Configuring Local Authentication
Configure Password Policy
Set password requirements:
- Minimum length (default: 12 characters)
- Complexity requirements
- Password expiration (default: 90 days)
- Password history (default: 5 previous passwords)
Set Session Parameters
Configure JWT session settings:
- Session timeout (default: 24 hours)
- Remember me duration (default: 7 days)
- Maximum concurrent sessions per user (default: 3)
Configure Lockout Policy
Set account lockout parameters:
- Failed login attempts threshold (default: 5)
- Lockout duration (default: 30 minutes)
- Permanent lockout after attempts (optional)
JWT Token Configuration
UTMStack uses JWT tokens for stateless authentication: Token Properties:- Signed using HS512 algorithm
- Contains user ID, username, and roles
- Includes expiration timestamp
- Refresh tokens for extended sessions
- Tokens are cryptographically signed
- Token blacklist on logout
- Automatic token refresh before expiration
- Token revocation on password change
Password Security
Password Hashing
UTMStack uses bcrypt for password hashing:- Industry-standard adaptive hashing
- Configurable work factor (default: 12)
- Salt generated per password
- Credentials encrypted in database
Password Requirements
Enforce strong password policies: Minimum Requirements:- At least 12 characters
- Mix of uppercase and lowercase letters
- At least one number
- At least one special character
- Dictionary word checking
- Username/email exclusion
- Common password blacklist
- Maximum password age
Password Reset Flow
Account Lockout Protection
UTMStack integrates with fail2ban to prevent brute force attacks:Lockout Configuration
Default Settings:- Lock after 5 failed login attempts
- Lockout duration: 30 minutes
- Automatic unlock after duration
- IP-based blocking in fail2ban
Manual Account Unlock
Administrators can manually unlock accounts:IP Blocking
Fail2ban automatically blocks IPs with repeated failed authentication:- Block duration: 1 hour (configurable)
- Persistent blocks after multiple violations
- Whitelist for trusted IP ranges
- Audit trail of all blocked IPs
Session Management
Active Session Monitoring
View and manage active user sessions:- Current session count per user
- Session start time and last activity
- IP address and user agent
- Geographic location (if available)
Session Termination
Administrators can terminate active sessions:- Navigate to Settings > Active Sessions
- Select the session to terminate
- Click Terminate Session
- User must re-authenticate to continue
- Terminate all sessions for a specific user
- Terminate all sessions system-wide
- Useful during security incidents
Session Security Settings
API Authentication
API Key Management
For programmatic access to UTMStack APIs:API Key Usage
Include the API key in request headers:- Use separate keys for different applications
- Implement key rotation every 90 days
- Revoke keys immediately if compromised
- Monitor API key usage in audit logs
Authentication Audit Trail
All authentication events are logged: Logged Events:- Successful logins
- Failed login attempts
- Password changes
- Password reset requests
- Account lockouts
- Session terminations
- API key usage
- 2FA enrollment and verification
Security Best Practices
Troubleshooting
Users Cannot Log In
- Check if account is locked (failed login attempts)
- Verify password has not expired
- Ensure user account is active
- Check fail2ban IP block status
- Review authentication logs for specific error messages
JWT Token Issues
- Token Expired: User needs to log in again
- Invalid Token: Clear browser cache and cookies
- Token Refresh Failing: Check system time synchronization
Session Timeout Too Aggressive
- Increase timeout value in Settings > Authentication
- Consider enabling “Remember Me” for trusted devices
- Review activity patterns to set appropriate timeout
Related Topics
- User Management - Create and manage user accounts
- Two-Factor Authentication - Enable TOTP-based 2FA
- SAML SSO Configuration - Configure enterprise single sign-on
- Roles and Permissions - Control access through RBAC