Skip to content

Instantly share code, notes, and snippets.

@seb54000
Forked from gschueler/basic-app.json
Created September 21, 2018 07:39
Show Gist options
  • Save seb54000/b6968b19915a9b1c2e42648faba4fa94 to your computer and use it in GitHub Desktop.
Save seb54000/b6968b19915a9b1c2e42648faba4fa94 to your computer and use it in GitHub Desktop.
Basic Rundeck aclpolicy, allows access to one project for one group
{
"description": "MyGroup allowed access to MyProject only",
"context": {
"application": "rundeck"
},
"for": {
"project": [
{
"match": {
"name": "MyProject"
},
"allow": [
"read"
]
}
]
},
"by": {
"group": "MyGroup"
}
}
{
"description": "MyGroup access rules to MyProject.",
"context": {
"project": "MyProject"
},
"for": {
"resource": [
{
"equals": {
"kind": "event"
},
"allow": [
"read"
]
}
],
"job": [
{
"allow": [
"read"
]
},
{
"match": {
"group": "^mygroup($|/.*)"
},
"allow": [
"read",
"run"
]
}
],
"adhoc": [
{
"deny": "run"
}
],
"node": [
{
"contains": {
"tags": "mytag"
},
"allow": [
"read",
"run"
]
},
{
"equals": {
"rundeck_server": "true"
},
"allow": [
"read",
"run"
]
}
]
},
"by": {
"group": "MyGroup"
}
}
# Application scope
description: MyGroup allowed access to MyProject only
context:
application: 'rundeck'
for:
project:
- match:
name: 'MyProject'
allow: [read]
by:
group: MyGroup
---
# Project scope
description: MyGroup access rules to MyProject.
context:
project: 'MyProject'
for:
resource:
- equals:
kind: event
allow: [read] # allow read of all activity (jobs run by all users)
job:
- allow: [read] # allow read of all jobs
- match:
group: '^mygroup($|/.*)'
allow: [read,run] # allow run access for jobs within the "mygroup" top level group
adhoc:
- deny: run # don't allow adhoc execution
node:
- contains:
tags: mytag
allow: [read, run] # allow run on nodes with the tag 'mytag'
- equals:
rundeck_server: 'true'
allow: [read, run] # allow run on rundeck server node
by:
group: MyGroup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment