# Grant

> For the complete documentation index, see [llms.txt](https://docs-stg.ringleader.dev/llms.txt).


> The fields of a Grant, and the cloudconfig right that lets an admin delegate placing one workstation.


A Grant opens one object to specific subjects, and this page lists its fields. [Roles and grants](https://docs-stg.ringleader.dev/organizations-teams/accounts-access/roles-grants/) explains ownership and what a Grant is for, and [Roles and RoleBindings](https://docs-stg.ringleader.dev/reference/resources/roles/) lists the built-in roles and how a role reaches you. [Workstation and Secret sharing](https://docs-stg.ringleader.dev/organizations-teams/accounts-access/workstation-secret-sharing/) shows how to create one with `rl workstation share` and `rl secret share`.

## Grant spec

```yaml
apiVersion: core.ringleader.dev/v1
kind: Grant
metadata:
  name: my-box-to-alice
  namespace: dev
spec:
  target:
    kind: Workstation       # Workstation | Secret | WorkstationPool | CloudIdentity
    matchName: my-box       # exact name, or "*" for every object of the kind
  subjects:
    - user:alice@acme.com   # beneficiaries
  rights:
    - ssh                   # ssh or cloudconfig (Workstation) | access (Secret) | lease (WorkstationPool) | use (CloudIdentity)
```

| Field | Type | Description |
|-------|------|-------------|
| `target.kind` | `string` | **Required.** `Workstation`, `Secret`, `WorkstationPool` or `CloudIdentity`. |
| `target.matchName` | `string` | Exact object name, or `*` for every object of the kind. (Exactly one of `matchName`/`matchLabels`.) |
| `target.matchLabels` | `map` | Select potentially many targets by label. |
| `subjects` | `[]string` | Beneficiaries (`user:…`, `sa:…`, `workload:…`, `node:…`; `system:authenticated` is admin-only). |
| `rights` | `[]string` | `ssh` or `cloudconfig` for a Workstation, `access` for a Secret, `lease` for a WorkstationPool, `use` for a CloudIdentity. |
| `enabled` | `bool` | Master switch. Absent means enabled; `false` pauses the Grant, so it gives nobody anything until you turn it back on. [`rl share disable` and `rl share enable`](https://docs-stg.ringleader.dev/reference/cli/commands/shares-access/) flip it. |

Every Grant carries a scope that Ringleader sets from the rights you held when you created it. [Grant scope](https://docs-stg.ringleader.dev/organizations-teams/accounts-access/roles-grants/#grant-scope) says what the `owner` and `admin` scopes reach.

A `cloudconfig` Grant lets its beneficiary set any placement or network key on one cloud workstation.
[Placement delegation](https://docs-stg.ringleader.dev/cloud-accounts/cloud-identities/placement-delegation/) says how to write
one and what bounds it. A `use` Grant lets its beneficiary build workstations through a CloudIdentity that sets
`requireUse`, which [Restricted cloud identities](https://docs-stg.ringleader.dev/cloud-accounts/cloud-identities/restricted-identities/)
covers.

## Next steps
- [Roles and grants](https://docs-stg.ringleader.dev/organizations-teams/accounts-access/roles-grants/): ownership, the `access` verb and Grant scope.
- [Roles and RoleBindings](https://docs-stg.ringleader.dev/reference/resources/roles/): the built-in roles and the bindings that carry them.
- [Workstation and Secret sharing](https://docs-stg.ringleader.dev/organizations-teams/accounts-access/workstation-secret-sharing/): create, list and revoke Grants.
- [Shares and access](https://docs-stg.ringleader.dev/reference/cli/commands/shares-access/): `share`, `unshare`, `access`.
- [Pools and leases](https://docs-stg.ringleader.dev/workstations/lifecycle/pools-leases/#access-for-a-lease-holder): what the `lease` right lets a holder do.
- [Places that name a Secret](https://docs-stg.ringleader.dev/reference/resources/secret/#places-that-name-a-secret): the fields that consume a Secret, and who must be able to read it for each.
- [ServiceAccount and IdentityProvider](https://docs-stg.ringleader.dev/reference/resources/serviceaccount/): the non-human identities you bind these same roles to.
- [Policy and OrgPolicy](https://docs-stg.ringleader.dev/reference/resources/policy/): what a namespace or an organization permits a Workstation file to name.

