Roles & Permissions¶
Comprehensive guide to managing roles and permissions in Champa Intelligence.
Overview¶
The Role-Based Access Control (RBAC) system provides granular control over feature access. Administrators can create custom roles with specific permission sets tailored to organizational needs.
Required Permission: manage_roles
Navigation: Admin → Roles & Permissions
Understanding RBAC¶
Concepts¶
Role: A named collection of permissions representing a job function (e.g., "Process Analyst", "Operations Manager")
Permission: A specific right to access a feature or perform an action (e.g., portfolio_data, manage_users)
User Assignment: Each user is assigned to exactly one role, which determines their access rights
System Roles¶
Four pre-configured roles that cannot be deleted or renamed:
Administrator¶
Description: Complete system access with all privileges
Permissions: - full_access - Unrestricted access to all features
Use Cases: - Platform administrators - System configuration - User and role management - Security administration
Process Analyst¶
Description: Strategic and analytical access for business process experts
Permissions: - portfolio_data - Portfolio Dashboard - extended_dashboard_data - Process Intelligence Dashboard - ai_analysis_data - AI-Powered Analysis - journey_analysis_data - Journey Monitoring - bpmn_analysis_data - BPMN Analytics Viewer - dmn_analysis_data - DMN Analytics
Use Cases: - Business process analysts - Process improvement teams - Management reporting - Strategic planning
Process Operator¶
Description: Technical and operational access for day-to-day process management
Permissions: - health_monitor_data - Health Monitoring - diff_tool_data - BPMN Diff Tool - model_validation_data - Model Validator (Linter)
Use Cases: - Operations teams - Technical support - DevOps engineers - Process maintenance
Viewer¶
Description: Read-only access for monitoring and validation
Permissions: - health_monitor_data - Health Monitoring - model_validation_data - Model Validator (Linter)
Use Cases: - Stakeholders - Audit teams - Read-only monitoring - Compliance verification
Custom Roles¶
Creating a Custom Role¶
- Navigate to Admin → Roles & Permissions
- Click "Create New Role"
- Fill in the form:
| Field | Required | Description |
|---|---|---|
| Name | Yes | Internal role identifier (lowercase, underscores) |
| Display Name | Yes | Human-readable name shown in UI |
| Description | No | Role purpose and intended users |
| Permissions | Yes | Select at least one permission |
- Click "Create Role"
Example:
Name: operations_manager
Display Name: Operations Manager
Description: Manages operations with analytical oversight
Permissions:
✓ portfolio_data
✓ extended_dashboard_data
✓ health_monitor_data
✓ journey_analysis_data
Editing a Custom Role¶
- Find role in the list
- Click "Edit" button
- Modify display name, description, or permissions
- Click "Save Changes"
Note: Role name (internal identifier) cannot be changed after creation.
Deleting a Custom Role¶
Prerequisites: - No users assigned to the role - Role is not a system role
Steps:
- Find role in the list
- Verify user count is 0
- Click "Delete" button
- Confirm deletion
⚠️ Warning: Deletion is permanent and cannot be undone.
Permission Reference¶
Administrative Permissions¶
| Permission | Description | Typical Roles |
|---|---|---|
full_access | Unrestricted system access | Administrator |
manage_users | Create, edit, delete users | Administrator |
manage_roles | Manage roles and permissions | Administrator |
Feature Permissions¶
| Permission | Feature | Description |
|---|---|---|
portfolio_data | Portfolio Dashboard | Executive-level KPIs and trends |
extended_dashboard_data | Process Intelligence | Detailed process analytics |
ai_analysis_data | AI Analysis | AI-powered insights |
health_monitor_data | Health Monitoring | Cluster health and metrics |
journey_analysis_data | Journey Monitoring | End-to-end journey tracking |
diff_tool_data | BPMN Diff Tool | Version comparison |
model_validation_data | Model Validator | BPMN/DMN quality checks |
bpmn_analysis_data | BPMN Analytics | Process model analytics |
dmn_analysis_data | DMN Analytics | Decision table analytics |
api_access | API Access | Programmatic access (required for API users) |
Role Assignment¶
Assigning Roles to Users¶
Roles are assigned during user creation or via user editing:
- Navigate to Admin → User Management
- Create or edit a user
- Select role from dropdown
- Save changes
Role changes take effect: - Immediately for web interface users (on next request) - Immediately for API users (JWT validation on each call)
Permission Management¶
Permission Inheritance¶
full_access Permission: - Grants access to ALL features automatically - Bypasses individual permission checks - Only assigned to Administrator role by default
Combining Permissions: - Users can have multiple permissions via their role - Permissions are additive (no negative permissions) - Most restrictive permission wins (if conflicts exist)
Permission Scoping¶
Some permissions affect API vs. UI access differently:
api_access Permission: - Required for all API users - Checked in addition to feature permissions - API calls without this permission return 403 Forbidden
Example:
{
"role": "api_analyst",
"permissions": [
"api_access", // Required for API calls
"portfolio_data", // Allows access to portfolio endpoints
"health_monitor_data" // Allows access to health endpoints
]
}
Best Practices¶
1. Principle of Least Privilege¶
Grant only the minimum permissions needed:
Good:
Bad:
2. Role Naming Conventions¶
Use clear, descriptive names:
Good: - operations_manager - process_improvement_lead - read_only_auditor
Bad: - role1 - temp_user - john_role
3. Regular Access Reviews¶
Schedule periodic reviews:
- Monthly: Review custom role assignments
- Quarterly: Audit permission assignments
- Annually: Reassess role definitions
4. Separation of Duties¶
Avoid combining conflicting permissions:
Conflicting Permissions: - User management + operational access - Read-only roles + write permissions
Example of Proper Separation:
Role: Security Auditor
Permissions:
✓ portfolio_data (read-only analytics)
✗ manage_users (should not modify what they audit)
5. Document Custom Roles¶
Maintain documentation for custom roles:
## Custom Role: Operations Manager
**Purpose:** Oversee daily operations with analytical capabilities
**Target Users:**
- Operations team leads
- Shift supervisors
**Permissions:**
- portfolio_data
- extended_dashboard_data
- health_monitor_data
- journey_analysis_data
**Review Date:** 2025-Q1
**Owner:** IT Security Team
Troubleshooting¶
User Can't Access Feature¶
Checklist:
- Verify user's role has required permission
- Check if role is system role (may have restrictions)
- Review audit log for permission denials
- Confirm user session is valid
Debugging:
from db.auth import user_has_permission
# Check if user has specific permission
has_access = user_has_permission(user_id, 'portfolio_data')
print(f"User {user_id} has portfolio_data: {has_access}")
Permission Changes Not Taking Effect¶
Possible Causes:
- Session cache: User's session still has old permissions
-
Solution: User must log out and log back in
-
API token: JWT contains old permission set
-
Solution: Regenerate API token
-
Redis cache: Cached session data outdated
- Solution: Clear cache or wait for TTL expiration
Force Permission Refresh:
# Clear all sessions for a user (admin action)
curl -X POST http://localhost:8088/auth/api/users/{user_id}/revoke-sessions \
-H "Authorization: Bearer $ADMIN_TOKEN"
Role Deletion Fails¶
Error: "Cannot delete role. N user(s) are assigned to this role"
Solution:
-
Identify users with this role:
-
Reassign users to different role
- Retry deletion
Next Steps¶
- User Management - Create users and assign roles
- Session Management - Monitor user activity
- Audit Logging - Track permission changes
- API Reference - API authentication
Support¶
For role and permission questions:
- Email: info@champa-bpmn.com
- Documentation: https://champa-bpmn.com/docs