Skip to content

Commit 9101e42

Browse files
authored
Doc new escaping rule for OIDC sub claim. (#57290)
1 parent 2048104 commit 9101e42

File tree

1 file changed

+13
-0
lines changed
  • content/actions/reference/security

1 file changed

+13
-0
lines changed

content/actions/reference/security/oidc.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,19 @@ You can create a subject that filters for specific tag. In this example, the wor
143143
* Syntax: `repo:ORG-NAME/REPO-NAME:ref:refs/tags/TAG-NAME`
144144
* Example: `repo:octo-org/octo-repo:ref:refs/tags/demo-tag`
145145

146+
{% ifversion fpt or ghec or ghes > 3.18 %}
147+
148+
### Filtering for metadata containing `:`
149+
150+
Any `:` within the metadata values will be replaced with `%3A` in the subject claim.
151+
152+
You can configure a subject that includes metadata containing colons. In this example, the workflow run must have originated from a job that has an environment named `Production:V1`, in a repository named `octo-repo` that is owned by the `octo-org` organization:
153+
154+
* Syntax: `repo:ORG-NAME/REPO-NAME:environment:ENVIRONMENT-NAME`
155+
* Example: `repo:octo-org/octo-repo:environment:Production%3AV1`
156+
157+
{% endif %}
158+
146159
## Configuring the subject in your cloud provider
147160

148161
To configure the subject in your cloud provider's trust relationship, you must add the subject string to its trust configuration. The following examples demonstrate how various cloud providers can accept the same `repo:octo-org/octo-repo:ref:refs/heads/demo-branch` subject in different ways:

0 commit comments

Comments
 (0)