Skip to content

Commit f6b47db

Browse files
authored
Merge pull request #1737 from rundeck/ACL-Revamp
ACL Revamp and Fixes
2 parents 3913bf3 + 366717a commit f6b47db

File tree

11 files changed

+1247
-32
lines changed

11 files changed

+1247
-32
lines changed

docs/administration/security/authorization.md

Lines changed: 398 additions & 13 deletions
Large diffs are not rendered by default.

docs/learning/howto/acls/group-apikey.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,24 @@ title: "Group/API Key Create User API Key"
33
order: 600
44
---
55

6-
# Group/API Key Create User API Ke
6+
# Group/API Key Create User API Key
77

88
## Use Case Description
99
Users who don't have admin access may not have the ability to create API tokens. To create tokens for yourself, add this snippet to your ACL policies for and appropriate group.
1010
Assign members of a specific Rundeck Group access to create API keys associated with their username.
1111

12+
## What This User CAN Do
13+
- Generate API tokens for themselves (User Tokens)
14+
- Create tokens with their own username and authorization roles
15+
16+
## What This User CANNOT Do
17+
- Generate Service Tokens with different usernames
18+
- Generate tokens with elevated permissions beyond their own roles
19+
- View or manage other users' API tokens
20+
- Access admin-level API token management
21+
22+
**Note**: This policy should be combined with appropriate project and resource access policies. This alone only grants the ability to create tokens, not access to any projects or resources.
23+
1224
## Code Description
1325
Find and replace these values with your own.
1426
- Group: `grp-api-access`

docs/learning/howto/acls/group-jobgroup.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,24 @@ order: 400
99

1010
Assign a specific Rundeck Group access to only run jobs in a specific Job Group (folder), in a specified project. It will allow running jobs against all nodes in the project.
1111

12+
## What This User CAN Do
13+
- View jobs in the specified job group (folder)
14+
- Run jobs in the specified job group
15+
- View execution history for jobs in the group
16+
- View all nodes in the project
17+
- Run jobs on all nodes
18+
- Read project-specific key storage entries
19+
20+
## What This User CANNOT Do
21+
- View or run jobs outside the specified job group
22+
- Create, modify, or delete any jobs
23+
- Run ad-hoc commands
24+
- Create, update, or delete nodes
25+
- Configure project settings
26+
- Manage project ACLs
27+
- Create or modify key storage entries
28+
- Manage webhooks
29+
1230
## Code Description
1331
Find and replace these values with your own.
1432
- Project Unique ID: `prj-sandbox`
@@ -26,10 +44,13 @@ context:
2644
for:
2745
resource:
2846
- allow: [run,read]
47+
- equals:
48+
kind: event
49+
allow: [read]
2950
job:
3051
- equals:
3152
group: jgrp-sandbox
32-
allow: [run,read]
53+
allow: [run,read,view,view_history]
3354
node:
3455
- allow: [read,run]
3556
by:
@@ -48,12 +69,15 @@ for:
4869
by:
4970
group: grp-sandbox-exec
5071
---
51-
description: Allow [read] for key storage access at the project level. If accessing keys outside the project context, you'll need a comparable system-level rule.
72+
description: Allow [read] for key storage access at the project level.
5273
context:
53-
project: prj-sandbox
74+
application: rundeck
5475
for:
5576
storage:
56-
- allow: [read]
77+
- allow:
78+
- read
79+
match:
80+
path: keys/project/prj-sandbox(/.*)?
5781
by:
5882
group: grp-sandbox-exec
5983
```

docs/learning/howto/acls/group-jobname.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,24 @@ order: 500
99

1010
Assign a specific Rundeck Group access to run a single, named Job in a specified project. It will allow running that job against all nodes in the project.
1111

12+
## What This User CAN Do
13+
- View the specified job
14+
- Run the specified job
15+
- View execution history for the specified job
16+
- View all nodes in the project
17+
- Run the job on all nodes
18+
- Read project-specific key storage entries
19+
20+
## What This User CANNOT Do
21+
- View or run any other jobs in the project
22+
- Create, modify, or delete any jobs
23+
- Run ad-hoc commands
24+
- Create, update, or delete nodes
25+
- Configure project settings
26+
- Manage project ACLs
27+
- Create or modify key storage entries
28+
- Manage webhooks
29+
1230
## Code Description
1331
Find and replace these values with your own.
1432
- Project Unique ID: `prj-sandbox`
@@ -26,10 +44,13 @@ context:
2644
for:
2745
resource:
2846
- allow: [run,read]
47+
- equals:
48+
kind: event
49+
allow: [read]
2950
job:
3051
- equals:
3152
name: jname-sandbox
32-
allow: [run,read]
53+
allow: [run,read,view,view_history]
3354
node:
3455
- allow: [read,run]
3556
by:
@@ -48,12 +69,15 @@ for:
4869
by:
4970
group: grp-sandbox-exec
5071
---
51-
description: Allow [read] for key storage access at the project level. If accessing keys outside the project context, you'll need a comparable system-level rule.
72+
description: Allow [read] for key storage access at the project level.
5273
context:
53-
project: prj-sandbox
74+
application: rundeck
5475
for:
5576
storage:
56-
- allow: [read]
77+
- allow:
78+
- read
79+
match:
80+
path: keys/project/prj-sandbox(/.*)?
5781
by:
5882
group: grp-sandbox-exec
5983
```

docs/learning/howto/acls/group-manage-runner.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ order: 400
99

1010
Assign a specific Rundeck Group access to manage and create Runners. Valid for Runbook Automation commercial products only.
1111

12+
## What This User CAN Do
13+
- View Runner configuration and status
14+
- Create new Runner entries
15+
- Ping Runners to check their status
16+
- Full management of all Runner resources
17+
18+
## What This User CANNOT Do
19+
- Update existing Runner entries (not included in current policy)
20+
- Delete Runner entries (not included in current policy)
21+
- Regenerate Runner credentials (not included in current policy)
22+
- Access project-level resources (requires separate project access policies)
23+
24+
**Note**: To grant full Runner management capabilities including update, delete, and credential regeneration, add those actions to the `allow` list in the policy.
25+
1226
## Code Description
1327
Find and replace these values with your own.
1428
- Group: `grp-runner-manage`
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
---
2+
title: "Group/Multiple Projects Execute Access"
3+
order: 350
4+
---
5+
6+
# Group/Multiple Projects Execute Access
7+
8+
## Use Case Description
9+
10+
Assign a specific Rundeck Group access to run jobs across multiple projects with the same permissions. This is useful for teams that work across several projects or for applications that span multiple environments.
11+
12+
## What This User CAN Do
13+
- View all specified projects in their project list
14+
- View and run all jobs in each specified project
15+
- View execution history across all projects
16+
- View nodes in all specified projects
17+
- Run jobs on nodes in all specified projects
18+
- Read project-specific key storage entries for each project
19+
20+
## What This User CANNOT Do
21+
- Create, modify, or delete jobs in any project
22+
- Run ad-hoc commands
23+
- Create, update, or delete nodes
24+
- Configure any project settings
25+
- Manage project ACLs
26+
- Create or modify key storage entries
27+
- Access projects not explicitly listed
28+
- Manage webhooks
29+
30+
## Code Description
31+
Find and replace these values with your own.
32+
- Project Unique IDs: `prj-dev`, `prj-test`, `prj-prod`
33+
- Group: `grp-multiproject-exec`
34+
35+
You can modify the regex pattern to match your project naming convention. Examples:
36+
- Three specific projects: `(prj-dev|prj-test|prj-prod)`
37+
- All projects starting with "app-": `app-.*`
38+
- All development projects: `.*-dev`
39+
40+
Steps to implement are covered in the [overview page](index.md).
41+
42+
## ACL Code
43+
44+
``` yaml
45+
description: Application - Read access to multiple projects
46+
context:
47+
application: 'rundeck'
48+
for:
49+
project:
50+
- match:
51+
name: '(prj-dev|prj-test|prj-prod)'
52+
allow: [read]
53+
storage:
54+
- allow: [read]
55+
match:
56+
path: keys/project/(prj-dev|prj-test|prj-prod)(/.*)?
57+
by:
58+
group: grp-multiproject-exec
59+
---
60+
description: Project - Execute access to jobs in multiple projects
61+
context:
62+
project: '(prj-dev|prj-test|prj-prod)'
63+
for:
64+
job:
65+
- allow: [read, view, view_history, run]
66+
node:
67+
- allow: [read, run]
68+
resource:
69+
- equals:
70+
kind: event
71+
allow: [read]
72+
- equals:
73+
kind: node
74+
allow: [read]
75+
by:
76+
group: grp-multiproject-exec
77+
```
78+
79+
## Advanced: Different Permissions Per Project
80+
81+
If you need different permissions for different projects (e.g., read-only in production but full access in development), create separate policies for each project instead of using a single regex pattern.
82+
83+
**Example:**
84+
```yaml
85+
# Full access to development
86+
description: Application - Dev project access
87+
context:
88+
application: 'rundeck'
89+
for:
90+
project:
91+
- equals:
92+
name: prj-dev
93+
allow: [read]
94+
by:
95+
group: grp-dev-team
96+
---
97+
description: Project - Full job management in dev
98+
context:
99+
project: prj-dev
100+
for:
101+
resource:
102+
- equals:
103+
kind: job
104+
allow: [create, delete]
105+
job:
106+
- allow: [read, view, update, run, kill]
107+
node:
108+
- allow: [read, run]
109+
by:
110+
group: grp-dev-team
111+
---
112+
# Read-only access to production
113+
description: Application - Prod project read access
114+
context:
115+
application: 'rundeck'
116+
for:
117+
project:
118+
- equals:
119+
name: prj-prod
120+
allow: [read]
121+
by:
122+
group: grp-dev-team
123+
---
124+
description: Project - Read-only in production
125+
context:
126+
project: prj-prod
127+
for:
128+
job:
129+
- allow: [read, view, view_history]
130+
node:
131+
- allow: [read]
132+
resource:
133+
- equals:
134+
kind: event
135+
allow: [read]
136+
by:
137+
group: grp-dev-team
138+
```
139+

0 commit comments

Comments
 (0)