Kadeck allows initialization of roles and groups through YAML configuration files using environment variables:
- xeotek_kadeck_init_roles_file: Path to roles configuration file
- xeotek_kadeck_init_groups_file: Path to groups configuration file

Existing roles, groups and user-group assignments will be cleared before loading new configurations on each startup.
Prerequisites
This feature requires LDAP or OpenID Connect synchronization enabled. User-group assignments must be managed through these external authentication services, as manual group management within Kadeck is not supported for this feature.
File Structure
roles.yaml
- name: "Role Name"
description: "Role Description"
rights:
- action: "Permission Action"
resource: "Resource Pattern"
effect: "Allow"
groups.yaml
- - name: "Group Name"
- externalMapping: "Ext. Directory Service Group Name"
- description: "Group Description"
- roles:
- - "Role Name"
Configuration Example
1. Create role definitions:
- - name: "Finance Team Role"
- description: "Full topic-related access for all topics with the prefix finance on cluster 1"
- rights:
- - action: "TopicAccessAll"
- resource: "1:finance*"
- effect: "Allow"
2. Create group definitions with external mappings matching your LDAP/OpenID groups:
- - name: "Finance Team QA"
- externalMapping: "us-finance-department-quality"
- description: "The finance QA team"
- roles:
- - "Finance Team Role"
3. Set environment variables:
- export xeotek_kadeck_init_roles_file=/path/to/roles.yaml
- export xeotek_kadeck_init_groups_file=/path/to/groups.yaml
Important Notes
- Requires LDAP or OpenID Connect synchronization
- User-group assignments are managed through external authentication services
- Existing roles and groups will be cleared before loading new configurations (on each startup!)
- Role names referenced in groups.yaml must match names defined in roles.yaml
- Resource patterns support wildcards (*) for broader access control