Skip to content

Commit c9f3fd1

Browse files
adityathebemoshloop
authored andcommitted
docs: permissions for playbooks/connections/notification
1 parent 2643258 commit c9f3fd1

File tree

10 files changed

+46
-11
lines changed

10 files changed

+46
-11
lines changed

mission-control/docs/guide/notifications/index.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ This notification above triggers the playbook `mc/echo-config` whenever a config
117117

118118
#### Permissions
119119

120-
To enable a notification to execute a playbook, the notification must have `playbook:run` permission on the playbook.
120+
To enable a notification to execute a playbook, the notification must have necessary permissions. i.e.
121+
122+
- `playbook:run` permission on the playbook
123+
- `read` permission on the resource the playbook targets
121124

122125
The example shows two notifications: `check-alerts` and `homelab-config-health-alerts` which belong to a permission group "config-notifications".
123126
The group has `playbook:run` permission, which both notifications inherit.

mission-control/docs/guide/playbooks/index.mdx

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ The parameters to the playbooks are available in the [Context](reference/playboo
7777
![Playbook Action Logs](/img/playbook-action-logs.png)
7878
7979
80-
### Runners
81-
82-
## Approvals
80+
## Approval
8381
8482
Playbooks can require approval before execution by configuring an `approval` block:
8583

@@ -103,5 +101,34 @@ spec:
103101
| `approvers.[]people` | Login or id of a person| `People` | `false` |
104102
| `approvers.[]teams` | Name or id of a team | `Team` | `false` |
105103

104+
## Permissions
105+
106+
Playbook permissions control who can perform various actions on playbooks.
107+
108+
```yaml title="playbook-permissions.yaml" file=<rootDir>/modules/mission-control/fixtures/permissions/allow-person-playbook.yaml
109+
```
110+
111+
### Required Permissions
112+
113+
To run a playbook, a principal (user, team, or service account) needs:
114+
1. The `playbook:run` permission on the playbook
115+
2. A `read` permission on the resource the playbook targets
116+
117+
For example, to run a playbook that scales a Kubernetes deployment, the principal needs:
118+
- `playbook:run` permission on the scaling playbook
119+
- `read` permission on the target Kubernetes deployment resource
120+
121+
### Permission Types
122+
123+
| Permission | Description |
124+
|------------|-------------|
125+
| `playbook:run` | Run a playbook |
126+
| `playbook:approve` | Approve a playbook run |
127+
| `playbook:cancel` | Cancel a running playbook |
106128

129+
### Permission Inheritance
107130

131+
:::info
132+
When a playbook triggers another playbook, the permissions are evaluated using the playbook's identity, not the original user who initiated the first playbook.
133+
This means the triggering playbook must have permission to run the target playbook and to read the resources.
134+
:::

mission-control/docs/reference/connections/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,8 @@ spec:
9393
| properties | Property fields | map[string]string | |
9494
| insecure_tls | Allow insecure tls | bool | |
9595

96+
## Permission
97+
98+
To use a connection, a principal needs to have the `read` permission on the connection.
99+
100+
```yaml title="connection-permission.yaml" file=<rootDir>/modules/mission-control/fixtures/permissions/playbook-connection.yaml

modules/duty

Submodule duty updated 62 files

0 commit comments

Comments
 (0)