Skip to content
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions docs/pages/access-controls/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ Label | `v3`, `v4` and `v5` Default | `v6` Default
------------------ | -------------- | ---------------
`kubernetes_resources` | `[{"kind":"pod", "name":"*", "namespace":"*"}]` | `[]`

## RBAC for hosts
## RBAC for resources

A Teleport role can also define which hosts (nodes) a user can have access to.
This works by [labeling nodes](../management/admin/labels.mdx) and listing
A Teleport role defines which resources (applications, servers, databases,...) a user can have access to.
Comment thread
stevenGravy marked this conversation as resolved.
Outdated
This works by [labeling resources](../management/admin/labels.mdx) and listing
allow/deny labels in a role definition.

Consider the following use case:
Expand Down Expand Up @@ -186,16 +186,25 @@ spec:
'workload': ['database', 'backup']
```

Multiple label entries are treated as logical "AND" operations.
Comment thread
stevenGravy marked this conversation as resolved.
Outdated
As an example this entry would match to databases that have `env: prod` label and
`region` label `us-west-1` or `eu-central-1`.
Comment thread
stevenGravy marked this conversation as resolved.
Outdated
```yaml
db_labels:
'env': 'prod'
'region': ['us-west-1', 'eu-central-1']
```

<Admonition
type="tip"
title="Dynamic RBAC"
>
Node labels can be dynamic, i.e. determined at runtime by an output of an executable. In this case, you can implement "permissions follow workload"
Resource labels can be dynamic, i.e. determined at runtime by an output of an executable. In this case, you can implement "permissions follow workload"
policies (eg., any server where PostgreSQL is running becomes *automatically*
accessible only by the members of the "DBA" group and nobody else).
</Admonition>

### Extended Node labels syntax
### Extended labels syntax

Below are a few examples for more complex filtering using various regexes.

Expand Down