> ## Documentation Index
> Fetch the complete documentation index at: https://docs.controlplane.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Policy

> Fine-grained permission policies for all resource types. Covers policy bindings, principal targeting, permission sets, and built-in system policies.

## Overview

Refer to the [policy concepts](https://docs.controlplane.com/concepts/access-control.md) page.

## Creating a Policy

Refer to the [Create a Policy](https://docs.controlplane.com/guides/policy.md) guide for additional details.

## Resource Permissions

Each resource has a set of permissions that can be assigned to a policy.

Expand the dropdown below and click on a resource to view their assignable permissions.

> [accordion] Resources
>
> After clicking on a link, expand the `Examples` dropdown to view the list.
>
> * [Agent](https://docs.controlplane.com/cli-reference/commands/agent.md#agent-permissions)
> * [Audit Context](https://docs.controlplane.com/cli-reference/commands/auditctx.md#auditctx-permissions)
> * [Cloud Account](https://docs.controlplane.com/cli-reference/commands/cloudaccount.md#cloudaccount-permissions)
> * [Domain](https://docs.controlplane.com/cli-reference/commands/domain.md#domain-permissions)
> * [Group](https://docs.controlplane.com/cli-reference/commands/group.md#group-permissions)
> * [GVC (Global Virtual Cloud)](https://docs.controlplane.com/cli-reference/commands/gvc.md#gvc-permissions)
> * [Identity](https://docs.controlplane.com/cli-reference/commands/identity.md#identity-permissions)
> * [Image](https://docs.controlplane.com/cli-reference/commands/image.md#image-permissions)
> * [Location](https://docs.controlplane.com/cli-reference/commands/location.md#location-permissions)
> * [Org](https://docs.controlplane.com/cli-reference/commands/org.md#org-permissions)
> * [Policy](https://docs.controlplane.com/cli-reference/commands/policy.md#policy-permissions)
> * [Quota](https://docs.controlplane.com/cli-reference/commands/quota.md#quota-permissions)
> * [Secret](https://docs.controlplane.com/cli-reference/commands/secret.md#secret-permissions)
> * [Service Account](https://docs.controlplane.com/cli-reference/commands/serviceaccount.md#serviceaccount-permissions)
> * [User](https://docs.controlplane.com/cli-reference/commands/user.md#user-permissions)
> * [Volume Set](https://docs.controlplane.com/cli-reference/commands/volumeset.md#volumeset-permissions)
> * [Workload](https://docs.controlplane.com/cli-reference/commands/workload.md#workload-permissions)

## Permission Model

Granting one permission can grant others with it. A binding therefore usually names a single permission rather than a list.

* `manage` grants every permission defined for that resource kind.
* `edit` grants `view` on every kind that has both.

Beyond those two rules, some kinds grant more. Each row below is what the named permission hands over in addition to itself:

| Kind | Permission | Also grants |
| :- | :- | :- |
| [Secret](https://docs.controlplane.com/reference/secret.md) | `edit` | `view`, `reveal` |
| [Secret](https://docs.controlplane.com/reference/secret.md) | `reveal` | `view` |
| [Secret](https://docs.controlplane.com/reference/secret.md) | `use` | `view` |
| [Domain](https://docs.controlplane.com/reference/domain.md) | `edit` | `view`, `use` |
| [Domain](https://docs.controlplane.com/reference/domain.md) | `use` | `view` |
| [Cloud Account](https://docs.controlplane.com/reference/cloudaccount.md) | `edit` | `view`, `browse` |
| [Cloud Account](https://docs.controlplane.com/reference/cloudaccount.md) | `browse` | `view` |
| [Image](https://docs.controlplane.com/reference/image.md) | `create` | `pull` |
| [Image](https://docs.controlplane.com/reference/image.md) | `pull` | `view` |
| [Agent](https://docs.controlplane.com/reference/agent.md), [Identity](https://docs.controlplane.com/reference/identity.md), [Location](https://docs.controlplane.com/reference/location.md) | `use` | `view` |
| [Audit Context](https://docs.controlplane.com/reference/auditctx.md) | `readAudit`, `writeAudit` | `view` |
| [Managed Kubernetes](https://docs.controlplane.com/mk8s/overview.md) | `clusterAdmin` | `view` |
| [Org](https://docs.controlplane.com/reference/org.md) | `readLogs` | `view` |
| [Workload](https://docs.controlplane.com/reference/workload/general.md) | `exec` | `exec.runCronWorkload`, `exec.stopReplica` |
| [Volume Set](https://docs.controlplane.com/reference/volumeset.md) | `exec` | every `exec.*` permission except `exec.copyVolume` and `exec.shrinkVolume` |

> [!WARNING]
>
> **`edit` on a secret grants `reveal`,** which is the plaintext. Someone who can change a secret can also read it. Grant `use` when a principal only needs to attach the secret to a GVC or workload, and `view` when it only needs to see that the secret exists.

Implication is applied one level deep, from the permission named in the binding. It is not chained, so each kind's list above is complete as written.

## Built-in Policies

Each [org](https://docs.controlplane.com/reference/org.md) has the following built-in policies for each resource (agent, GVC, etc.):

| Policy Name | Description | Target | Permission | Group | Service Account |
| :- | :- | :- | :- | :- | :- |
| superusers-RESOURCE | Built-in policy granting full access to the superusers group | All Items | manage | [superusers](https://docs.controlplane.com/reference/group.md#built-in-groups) | [controlplane](https://docs.controlplane.com/reference/serviceaccount.md#built-in-service-accounts) |
| viewers-RESOURCE | Built-in policy granting read-only access to the viewers group | All Items | view | [viewers](https://docs.controlplane.com/reference/group.md#built-in-groups) | none |

## Permissions

The permissions below are used to define [policies](https://docs.controlplane.com/reference/policy.md) together with one or more of the four
[principal types](https://docs.controlplane.com/concepts/access-control.md):

| Permission | Description | Implies |
| :- | :- | :- |
| create | Create new policies | |
| delete | Delete existing policies | |
| edit | Modify existing policies | view |
| manage | Full access | create, delete, edit, manage, view |
| view | Read-only view | |

## Access Report

Displays the permissions granted to principals for the policy. See [Access Report](https://docs.controlplane.com/concepts/access-control.md#access-report) for what each entry shows, how to open it from the Console, CLI, or API, and how groups, query targets, and implied permissions appear in it.

## Event Log

Lists the events recorded for the policy. See the [Event Log reference](https://docs.controlplane.com/reference/events.md) for field details.

## CLI

To view the CLI documentation for policies, see the [Policy CLI reference](https://docs.controlplane.com/cli-reference/commands/policy.md).
