Understanding FlagFlow's authentication system and permission model
FlagFlow implements a role-based authentication system with granular permissions. The system is designed with security in mind while maintaining ease of use for feature flag management.
Key Principle: Flag values are readable without authentication, but all modifications require proper authentication and permissions.
FlagFlow allows unauthenticated access to flag values for reading purposes. This design enables applications to fetch feature flags without requiring authentication credentials, simplifying integration while maintaining security for administrative operations.
All administrative and modification operations require authentication and appropriate permissions:
Operation | Required Permission | Description |
---|---|---|
Flag Creation/Deletion | flag-create | Create new flags or delete existing ones |
Schema Modification | flag-schema | Modify flag schemas, types, and structure |
Value Updates | flag-value | Update flag values and states |
User Management | users | Add, modify, or remove users and manage sessions |
Data Migration | migration | Execute migrations and restore backups See Migration, Export & Backup, and Restore |
FlagFlow supports flexible authentication configurations based on environment variables:
The behavior of FlagFlow's authentication system depends on the combination of SESSION_USERS_ENABLED
and KEYCLOAK_HOST
settings:
SESSION_USERS_ENABLED | KEYCLOAK_HOST | Behavior | Login Display |
---|---|---|---|
false | not set | Auto-login No authentication required, direct access to admin interface | No login screen |
true | not set | Session-based only Built-in user management with username/password | Standard login form |
false | set | Keycloak only OAuth 2.0/OpenID Connect authentication | Keycloak redirect |
true | set | Dual authentication Users can choose between session-based or Keycloak authentication | Login with options to switch between methods |
Simple session-based authentication for small to medium deployments
Enterprise-grade authentication with external identity provider
Configure authentication through environment variables:
# Built-in User Management SESSION_USERS_ENABLED=true SESSION_DEFAULT_USERNAME=admin SESSION_DEFAULT_PASSWORD=secure-password SESSION_TIMEOUT_SEC=1800 # Keycloak Integration (Enterprise) KEYCLOAK_HOST=https://auth.yourcompany.com KEYCLOAK_REALM=flagflow KEYCLOAK_CLIENT=flagflow-frontend
See the Environment Variables documentation for complete configuration options.