Skip to content

Commit 557ddd1

Browse files
author
Nils
committed
description
1 parent da0404d commit 557ddd1

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

README.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,37 @@ module "github-service-account" {
6161

6262
## OIDC Token Attribute Mapping
6363

64-
Attribute mapping:
65-
66-
| Attribute | Claim |
67-
|------------------------|------------------------|
68-
| `google.subject` | `assertion.sub` |
69-
| `attribute.sub` | `assertion.sub` |
70-
| `attribute.actor` | `assertion.actor` |
71-
| `attribute.repository` | `assertion.repository` |
64+
Default attribute mapping:
65+
66+
| Attribute | Claim | Description |
67+
|-----------------------------------|-----------------------------------|-------------|
68+
| `google.subject` | `assertion.sub` | Subject
69+
| `attribute.sub` | `assertion.sub` | Defines the subject claim that is to be validated by the cloud provider. This setting is essential for making sure that access tokens are only allocated in a predictable way.
70+
| `attribute.actor` | `assertion.actor` | The personal account that initiated the workflow run.
71+
| `attribute.repository` | `assertion.repository` | The repository from where the workflow is running
72+
| `attribute.actor_id` | `assertion.actor_id` | The ID of personal account that initiated the workflow run.
73+
| `attribute.base_ref` | `assertion.base_ref` | The target branch of the pull request in a workflow run.
74+
| `attribute.environment` | `assertion.environment` | The name of the environment used by the job.
75+
| `attribute.event_name` | `assertion.event_name` | The name of the event that triggered the workflow run.
76+
| `attribute.head_ref` | `assertion.head_ref` | The source branch of the pull request in a workflow run.
77+
| `attribute.job_workflow_ref` | `assertion.job_workflow_ref` | For jobs using a reusable workflow, the ref path to the reusable workflow. For more information, see "Using OpenID Connect with reusable workflows.
78+
| `attribute.job_workflow_sha` | `assertion.job_workflow_sha` | For jobs using a reusable workflow, the commit SHA for the reusable workflow file.
79+
| `attribute.ref` | `assertion.ref` | (Reference) The git ref that triggered the workflow run.
80+
| `attribute.ref_type` | `assertion.ref_type` | The type of ref, for example: "branch".
81+
| `attribute.repository_visibility` | `assertion.repository_visibility` | The visibility of the repository where the workflow is running. Accepts the following values: internal, private, or public.
82+
| `attribute.repository_id` | `assertion.repository_id` | The ID of the repository from where the workflow is running.
83+
| `attribute.repository_owner` | `assertion.repository_owner` | The name of the organization in which the repository is stored.
84+
| `attribute.repository_owner_id` | `assertion.repository_owner_id` | The ID of the organization in which the repository is stored.
85+
| `attribute.run_id` | `assertion.run_id` | The ID of the workflow run that triggered the workflow.
86+
| `attribute.run_number` | `assertion.run_number` | The number of times this workflow has been run.
87+
| `attribute.run_attempt` | `assertion.run_attempt` | The number of times this workflow run has been retried.
88+
| `attribute.runner_environment` | `assertion.runner_environment` | The type of runner used by the job. Accepts the following values: github-hosted or self-hosted.
89+
| `attribute.workflow` | `assertion.workflow` | The name of the workflow.
90+
| `attribute.workflow_ref` | `assertion.workflow_ref` | The ref path to the workflow. For example, octocat/hello-world/.github/workflows/my-workflow.yml@refs/heads/my_branch.
91+
| `attribute.workflow_sha` | `assertion.workflow_sha` | The commit SHA for the workflow file.|
7292

7393
<!-- BEGIN_TF_DOCS -->
74-
## Providers
94+
## Provi| s
7595

7696
| Name | Version |
7797
|------|---------|

variables.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ variable "attribute_mapping" {
119119
"attribute.ref" = "assertion.ref" # (Reference) The git ref that triggered the workflow run.
120120
"attribute.ref_type" = "assertion.ref_type" # The type of ref, for example: "branch".
121121
"attribute.repository_visibility" = "assertion.repository_visibility" # The visibility of the repository where the workflow is running. Accepts the following values: internal, private, or public.
122-
"attribute.repository" = "assertion.repository" # The repository from where the workflow is running.
123122
"attribute.repository_id" = "assertion.repository_id" # The ID of the repository from where the workflow is running.
124123
"attribute.repository_owner" = "assertion.repository_owner" # The name of the organization in which the repository is stored.
125124
"attribute.repository_owner_id" = "assertion.repository_owner_id" # The ID of the organization in which the repository is stored.

0 commit comments

Comments
 (0)