Access controlยป
Spaces provide the organizational structure for Spacelift's role-based access control (RBAC) system. Permission management is handled through login policies or Identity Access Management depending on your authorization strategy. All roles are assigned to specific spaces, providing precise control over who can access what resources.
Roles and RBACยป
System rolesยป
Spacelift provides several built-in system roles that can be assigned on a space-by-space basis. In short:
- Space Reader: View-only access to resources within the space, can add comments to runs for collaboration.
- Space Writer: Space Reader permissions + ability to trigger runs and modify environment variables.
- Space Admin: Space Writer permissions + ability to create and modify stacks and attachable entities.
The RBAC system reference holds the full definitions of each role and its access level.
Custom rolesยป
Beyond predefined roles, you can create custom roles with precisely tailored permissions:
- Granular actions: Compose roles from specific actions like
Runs: Trigger runandStack: Update stack. - Business-aligned: Match roles to your organizational structure and job functions.
- Principle of Least Privilege: Grant exactly the permissions needed, nothing more.
Custom Role Example
Instead of giving someone full Space Admin access, create a custom "Infrastructure Developer" role with just:
Space: Read: View space contentsStack: Read: Understand configurationsRuns: Trigger run: Deploy changes
A "Root Space Admin" is a user given administrative permissions to the root space, which is the top-level space in Spacelift's hierarchy. This grants special permissions and allows them to manage the entire account, including modifying the space tree and accessing account-wide settings.
Role permissionsยป
| Action / Role | Root Space Admin | Space Admin | Space Writer | Space Reader |
|---|---|---|---|---|
| Set up SSO | โ | โ | โ | โ |
| Set up VCS | โ | โ | โ | โ |
| Manage Sessions | โ | โ | โ | โ |
| Manage Login Policies & Identity Access Management Controls | โ | โ | โ | โ |
| Manage Audit Trails | โ | โ | โ | โ |
| Invite/Revoke Users | โ | โ | โ | โ |
| Create/Modify/Delete Roles | โ | โ | โ | โ |
| Create/Modify/Delete API Keys, IdP Group Mappings | โ | โ | โ | โ |
| View Roles, Users, API Keys, IdP Group Mappings | โ | โ | โ | โ |
| Manage Role Bindings | โ | โ * | โ | โ |
| Manage Spaces | โ | โ ** | โ | โ |
| Manage Stack Config Settings | โ | โ | โ | โ |
| Manage Worker Pools, Contexts | โ | โ | โ | โ |
| Manage Stack Env Vars | โ | โ | โ | โ |
| Trigger runs | โ | โ | โ | โ |
| View Stacks | โ | โ | โ | โ |
| View Spaces | โ | โ | โ | โ |
| View Worker Pools, Contexts | โ | โ | โ | โ |
*Can only manage role bindings for assigned space(s)
**Can only manage assigned space(s)
Authorization methodsยป
Identity Access Managementยป
The Identity Access Management interface provides a way to assign roles to users, groups, and API keys:
- Click your name in the bottom-left of the screen, then Organization settings.
- In the Identity Management section, select Users, IdP group mapping, or API keys.
- Assign predefined or custom roles to specific spaces.
See assigning roles to users for detailed instructions.
Login policies (policy-as-code)ยป
Login policies can only be created in the root space. Therefore, only root and legacy space admins and stacks with root space admin roles can modify login policies.
Login policies enable programmatic role assignment using OPA/Rego:
Getting role slugs
To use custom roles in login policies, copy the role slug from Organization Settings โ Access Control Center โ Roles โ select role โ copy slug.
Use the roles rule to assign RBAC roles in login policies:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
If a user is logged in, their access levels will not change, so newly added spaces might not be visible. The user must log out and back in to see new spaces they're granted access to.
However, the space's creator immediately has access to it.
How access reaches a spaceยป
The space a role is bound to is rarely the only space that role affects. Access propagation carries a binding down to every descendant space; resource inheritance shares a parent's resources into a child and grants Read back up to the parent; and stacks get implicit read access to their own space and to inheriting parents.
Propagation is always on, while resource inheritance is a per-space toggle. For the full model and how each case shows up in the UI, see How access works.
Related topicsยป
- How access works: Propagation, resource inheritance, and implicit stack access.
- Authorization & RBAC: Complete guide to Spacelift's authorization system.
- RBAC System: Understanding roles, actions, and actors.
- Identity Access Management: GUI-based permission management.
- Login Policies: Policy-as-code authorization.