Understanding FlagFlow's granular permission model and role-based access control
FlagFlow uses a granular permission system that allows fine-tuned control over what users can do within the system. Each permission grants access to specific operations, enabling administrators to create roles that match their organization's security requirements.
Design Principle: Permissions are granular and specific, allowing you to grant only the minimum access required for each user role.
FlagFlow defines the following core permissions that control access to different system operations:
| Permission | Description | Grants Access To |
|---|---|---|
flag-create | Can create, rename/move, and delete flags |
|
flag-schema | Can manage flag schemas |
|
flag-value | Can manage flag values |
|
users | Can add, modify, or remove users and manage sessions |
|
migration | Can restore backups or execute migrations |
|
Certain operations in FlagFlow are publicly accessible without authentication to enable seamless integration with applications:
This design allows applications to integrate with FlagFlow without requiring authentication credentials while keeping all administrative operations secure.
Here are typical user roles and their recommended permission combinations:
Can modify flag values during development and testing
Typical use: Developers can enable/disable features and adjust flag values for testing purposes.
Can modify flag schemas and values
Typical use: Senior developers can modify flag structure and data types in addition to values.
Can create and manage feature flags
Typical use: Product managers can create new feature flags and control their rollout.
Full flag management capabilities
Typical use: Team leads have full control over feature flag lifecycle and management.
Complete system access including user management
Typical use: System administrators manage the entire FlagFlow instance including users and system operations.
When using FlagFlow's built-in user management, permissions are assigned through the web interface:
When using Keycloak, permissions are managed through client roles that map to FlagFlow permissions:
# Example: Creating roles in Keycloak client flag-create -> FlagFlow permission: flag-create flag-schema -> FlagFlow permission: flag-schema flag-value -> FlagFlow permission: flag-value users -> FlagFlow permission: users migration -> FlagFlow permission: migration
While FlagFlow permissions are generally independent, some operations may require multiple permissions or have logical dependencies:
| Operation | Required Permissions | Notes |
|---|---|---|
| Create a new flag | flag-create | Includes setting initial schema and values |
| Modify existing flag structure | flag-schema | May require flag-value to set new defaults |
| Update flag values only | flag-value | Most common day-to-day operation |
| Delete a flag | flag-create | Deletion is part of flag lifecycle management |
| Manage user permissions | users | High-privilege operation |
users and migration permissions to trusted administrators