Password Security
General Bots delegates all password security to the Directory Service (currently Zitadel, can be migrated to Keycloak), an enterprise-grade identity management platform. No passwords are ever stored, hashed, or managed within General Bots itself.
Overview
Password security is handled entirely by Zitadel, which provides:
- Industry-standard password hashing (Argon2/bcrypt)
- Configurable password policies
- Password history and rotation
- Breach detection
- Self-service password recovery
No Internal Password Management
What General Bots Does NOT Do
- No password storage: No password or hash columns in database
- No hashing implementation: No Argon2/bcrypt code in BotServer
- No password validation: All validation done by Zitadel
- No password reset logic: Handled through Zitadel workflows
- No password policies: Configured in Zitadel admin console
What General Bots DOES Do
- Redirects to Zitadel for authentication
- Stores Zitadel user IDs
- Manages local session tokens
- Caches user profile information
- Validates sessions locally for performance
Zitadel Password Security
Hashing Algorithm
Zitadel uses industry-standard algorithms:
- Default: Argon2id (recommended)
- Alternative: bcrypt (for compatibility)
- Configurable: Parameters can be adjusted
- Automatic: Rehashing on algorithm updates
Password Policies
Configured in Zitadel admin console:
- Minimum length (default: 8 characters)
- Maximum length (configurable)
- Character requirements (uppercase, lowercase, numbers, symbols)
- Complexity rules
- Common password blacklist
- Password history (prevent reuse)
- Expiration policies
Password Storage in Zitadel
Zitadel stores:
- Hashed passwords (never plaintext)
- Salt per password
- Algorithm identifier
- Hash parameters
- Password history
- Last changed timestamp
Configuration
Setting Password Policies
Access Zitadel admin console:
- Navigate to Settings → Password Complexity
- Configure requirements:
- Min/max length
- Required character types
- Expiry settings
- Save changes (applies immediately)
Example Policy Configuration
In Zitadel UI or API:
{
"minLength": 12,
"maxLength": 128,
"hasUppercase": true,
"hasLowercase": true,
"hasNumber": true,
"hasSymbol": true,
"passwordHistory": 5,
"expiryDays": 90
}
Password Reset Flow
User-Initiated Reset
- User clicks “Forgot Password” on Zitadel login
- Email sent with reset link
- User clicks link (time-limited)
- New password entered in Zitadel UI
- Password validated against policy
- Hash updated in Zitadel database
- User can login with new password
Admin-Initiated Reset
- Admin accesses Zitadel console
- Navigates to user management
- Triggers password reset
- User receives reset email
- Same flow as user-initiated
Security Features
Breach Detection
Zitadel includes:
- Have I Been Pwned integration
- Checks passwords against breach databases
- Warns users of compromised passwords
- Forces reset if detected in breach
Multi-Factor Authentication
Additional security beyond passwords:
- TOTP (Google Authenticator, etc.)
- WebAuthn/FIDO2 keys
- SMS OTP (if configured)
- Email verification codes
Account Protection
- Account lockout after failed attempts
- CAPTCHA after threshold
- IP-based rate limiting
- Suspicious activity detection
- Passwordless options available
Integration Points
Bootstrap Process
During setup, General Bots:
- Installs Directory Service (Zitadel)
- Configures database connection
- Creates admin account with randomly generated password
- Password is displayed once during initial setup
Authentication Flow
- User enters credentials in Directory Service UI
- Directory Service validates password
- OIDC tokens issued
- General Bots receives tokens
- No password ever touches General Bots
Session Management
After Directory Service authentication:
- General Bots creates local session
- Session token generated (not password-related)
- User ID linked to Directory Service ID
- No password data stored
Default Credentials
Initial Admin Account
Created during bootstrap:
- Username:
admin - Password: Randomly generated
- Displayed once during initial setup
- Should be stored securely or changed immediately
Initial User Account
Created during bootstrap:
- Username:
user - Password: Randomly generated
- Displayed once during initial setup
- Must be changed on first login
Best Practices
For Administrators
- Secure Initial Passwords: Store or change randomly generated passwords immediately
- Configure Policies: Set appropriate password requirements
- Enable MFA: Require for admin accounts
- Monitor Logs: Review authentication attempts
- Update Regularly: Keep Zitadel updated
- Test Recovery: Verify password reset works through Directory Service
For Developers
- Never Touch Passwords: Let Zitadel handle everything
- Use OIDC Flow: Standard OAuth2/OpenID Connect
- Validate Tokens: Check with Zitadel when needed
- Cache Carefully: Don’t cache sensitive data
- Log Safely: Never log authentication details
For Users
- Use Strong Passwords: Follow policy requirements
- Enable MFA: Add extra security layer
- Unique Passwords: Don’t reuse across services
- Regular Updates: Change periodically if required
- Report Issues: Alert admins of problems
Compliance
Zitadel’s password handling helps meet:
- GDPR: Data protection requirements
- NIST 800-63B: Modern password guidelines
- OWASP: Security best practices
- PCI DSS: Payment card standards
- HIPAA: Healthcare requirements
- SOC 2: Security controls
Troubleshooting
Common Password Issues
-
Password Reset Not Working
- Check email configuration
- Verify SMTP settings in Zitadel
- Check spam folders
-
Policy Not Enforced
- Review Zitadel configuration
- Check policy is active
- Verify user’s organization settings
-
Account Locked
- Check lockout policy
- Admin can unlock via console
- Wait for timeout period
-
MFA Issues
- Verify time sync for TOTP
- Check backup codes
- Admin can reset MFA
Security Benefits
Delegated Security
- Professional Implementation: Security experts maintain Zitadel
- Regular Updates: Security patches applied by Zitadel team
- Compliance: Certifications maintained by Zitadel
- No Liability: Password breaches not BotServer’s responsibility
Reduced Attack Surface
- No password code to exploit
- No hashing vulnerabilities
- No timing attacks possible
- No password database to breach
Advanced Features
Available through Zitadel:
- Passwordless authentication
- Biometric support
- Hardware key support
- Risk-based authentication
- Adaptive security
Migration Guide
From Internal Passwords
If migrating from a system with internal passwords:
- Export Users: Username and email only (no passwords)
- Import to Zitadel: Create accounts
- Force Reset: All users must set new passwords
- Remove Old Code: Delete password-related code
- Update Docs: Reflect new authentication flow
Password Policy Migration
- Document existing policy
- Configure equivalent in Zitadel
- Test with sample accounts
- Communicate changes to users
- Provide support during transition
Summary
General Bots achieves enterprise-grade password security by not handling passwords at all. The Directory Service provides professional identity management with all the security features needed for production deployments. This separation of concerns allows General Bots to focus on bot functionality while delegating security to a specialized platform.