Skip to content

Commit

Permalink
docs: remove multi level claim reference (#32613)
Browse files Browse the repository at this point in the history
* docs: remove multi level claim reference

* fix ref
  • Loading branch information
stevenGravy authored Sep 27, 2023
1 parent cf3bf18 commit b654e1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs/pages/access-controls/guides/role-templates.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ email: "[email protected]"
# Alice is a member of groups admins and devs
groups: ["admins", "devs"]
# She can access prod and staging environments
access: {"env": ["prod", "staging"]}
env: ["prod", "staging"]
```

Let's create a role template called `sso-users` that expects external attribute
Expand Down Expand Up @@ -319,7 +319,7 @@ email: "[email protected]"
# Alice is a member of groups admins and devs
groups: ["admins", "devs"]
# She can access prod and staging environments
access: {"env": ["prod", "staging"]}
env: ["prod", "staging"]
```

Let's see how these variables are used with role template `interpolation`:
Expand All @@ -343,11 +343,11 @@ spec:
# Functions transform variables.
database_users: ['{{email.local(external.email)}}']
db_labels:
'env': '{{regexp.replace(external.access["env"], "^(staging)$", "$1")}}'
'env': '{{regexp.replace(external.env, "^(staging)$", "$1")}}'
# Labels can mix template and hard-coded values.
node_labels:
'env': '{{external.access["env"]}}'
'env': '{{external.env}}'
'region': 'us-west-2'
kubernetes_labels:
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/includes/role-spec.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ spec:
db_names: ['{{external.db_names}}']
db_roles: ['{{external.db_roles}}']
db_labels:
'env': '{{regexp.replace(external.access["env"], "^(staging)$", "$1")}}'
'env': '{{regexp.replace(external.env, "^(staging)$", "$1")}}'

# app_labels: a user with this role will be allowed to connect to
# applications with labels matching below.
Expand Down

0 comments on commit b654e1d

Please sign in to comment.