GitLab Well Architected
Cookbook navigation
Prompts / Implement Role-Based Access Control

Implement Role-Based Access Control

EnterpriseAccess-ControlDeveloperSecureAdvanced

Implement granular permissions with RBAC patterns, admin interfaces, and audit logging.

For GitLab Duo

prompt

Implement RBAC for [SYSTEM/FEATURE]:

Roles needed:
1. [ROLE 1: permissions]
2. [ROLE 2: permissions]
3. [ROLE 3: permissions]

Include:
1. Role definitions
2. Permission checks
3. Admin interface
4. Audit logging
5. Testing approach

Use the prompt

Describe which actions each role may perform and which resources it may access. Include denied cases in your review so the implementation doesn't only demonstrate the allowed paths.