Skip to main content

Workload Identity Attributes

Attributes are features of an identity which you can use with the WorkloadIdentity resource to create rules and template values.

These attributes come from a variety of sources, such as workload attestations performed by tbot or the attestation performed by the control plane when tbot joins.

Join attributes

Join attributes are sourced from the join process that the Bot underwent. These typically allow you to identify the machine that the tbot agent is running on.

join.meta

The join.meta attributes are not related to any specific join method, and instead typically provide information about the join token that was used to join.

FieldDescription
join.meta.join_token_nameThe name of the join token that was used to join. This field is omitted if the join token that was used to join was of the token method as in this case, the name of the join token is sensitive. Example: my-gitlab-join-token
join.meta.join_methodThe name of the join method that was used to join. Example: gitlab

join.azure

These attributes are present if the Bot joined using the Azure join method.

FieldDescription
join.azure.subscriptionThe subscription ID of the Azure account that the joining entity is a part of.
join.azure.resource_groupThe resource group of the Azure account that the joining entity is a part of.

join.bitbucket

These attributes are present if the Bot joined using the BitBucket join method.

They are mapped from the JWT issued by BitBucket, for which further documentation is available at https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/

FieldDescription
join.bitbucket.subThe sub claim of the Bitbucket JWT that was used to join.
join.bitbucket.step_uuidThe UUID of the pipeline step.
join.bitbucket.repository_uuidThe UUID of the repository the pipeline step is running within.
join.bitbucket.pipeline_uuidThe UUID of the pipeline the step is running within.
join.bitbucket.workspace_uuidThe UUID of the workspace the pipeline belongs to.
join.bitbucket.deployment_environment_uuidThe UUID of the deployment environment the pipeline is running against.
join.bitbucket.branch_nameThe name of the branch the pipeline is running against.

join.circleci

These attributes are present if the Bot joined using the CircleCI join method.

They are mapped from the JWT issued by CircleCI, for which further documentation is available at https://circleci.com/docs/openid-connect-tokens/

FieldDescription
join.circleci.subThe sub claim of the CircleCI JWT that was used to join.
join.circleci.context_idsThe UUIDs of the contexts used in the job.
join.circleci.project_idThe UUID of the project in which the job is running..

join.gcp

These attributes are present if the Bot joined using the Google Cloud Project (GCP) join method.

They are mapped from the JWT issued by GCP, for which further documentation is available at https://cloud.google.com/compute/docs/instances/verifying-instance-identity#payload

The attributes beneath join.gcp.gce are only present if the Bot is running on a Google Compute Engine (GCE) instance.

FieldDescription
join.gcp.service_accountThe service account email of the service account that the instance is running as.
join.gcp.gce.nameThe name of the GCE instance that the joining entity is running on.
join.gcp.gce.zoneThe zone of the GCE instance that the joining entity is running on.
join.gcp.gce.zone.idThe ID of the GCE instance that the joining entity is running on.
join.gcp.gce.zone.projectThe project ID of the GCP project that the instance is running within.

join.github

These attributes are present if the Bot joined using the GitHub join method.

They are mapped from the JWT issued by GitHub, for which further documentation is available at https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/about-security-hardening-with-openid-connect#understanding-the-oidc-token

FieldDescription
join.github.subThe sub claim of the GitHub JWT that was used to join.
join.github.actorThe username of the actor that initiated the workflow run.
join.github.environmentThe name of the environment that the workflow is running against, if any.
join.github.refThe ref that the workflow is running against..
join.github.ref_typeThe type of ref that the workflow is running against. For example, branch.
join.github.repositoryThe name of the repository that the workflow is running within.
join.github.repository_ownerThe name of the owner of the repository that the workflow is running within.
join.github.workflowThe name of the workflow that is running.
join.github.event_nameThe name of the event that triggered the workflow run..
join.github.shaThe SHA of the commit that triggered the workflow run.
join.github.run_idThe ID of this GitHub actions workflow run.

join.gitlab

These attributes are present if the Bot joined using the GitLab join method.

They are mapped from the JWT issued by GitLab, for which further documentation is available at https://docs.gitlab.com/ee/ci/secrets/id_token_authentication.html#token-payload

FieldDescription
join.gitlab.subThe sub claim of the GitLab JWT that was used to join. For example: project_path:mygroup/my-project:ref_type:branch:ref:main
join.gitlab.refThe ref that the pipeline is running against. For example: main
join.gitlab.ref_typeThe type of ref that the pipeline is running against. This is typically branch or tag.
join.gitlab.ref_protectedWhether or not the ref that the pipeline is running against is protected.
join.gitlab.namespace_pathThe path of the namespace of the project that the pipeline is running within.
join.gitlab.project_pathThe full qualified path of the project that the pipeline is running within. For example: mygroup/my-project
join.gitlab.user_loginThe name of the user that triggered the pipeline run.
join.gitlab.user_emailThe email of the user that triggered the pipeline run.
join.gitlab.pipeline_idThe ID of the pipeline.
join.gitlab.pipeline_sourceThe source of the pipeline. For example: push or web
join.gitlab.environmentThe environment the pipeline is running against, if any.
join.gitlab.environment_protectedWhether or not the pipeline is running against a protected environment.
join.gitlab.runner_idThe ID of the runner that this pipeline is running on.
join.gitlab.runner_environmentThe type of runner that is processing the pipeline. Either gitlab-hosted or self-hosted.
join.gitlab.shaThe SHA of the commit that triggered the pipeline run.
join.gitlab.ci_config_ref_uriThe ref URI of the CI config configuring the pipeline.
join.gitlab.ci_config_shaThe Git SHA of the CI config ref configuring the pipeline.

join.iam

These attributes are present if the Bot joined using the AWS IAM join method.

FieldDescription
join.iam.accountThe identifier of the account that the joining entity is a part of. For example: 123456789012.
join.iam.arnThe AWS ARN of the joining entity. For example: arn:aws:sts::123456789012:assumed-role/my-role-name/my-role-session-name.

join.kubernetes

These attributes are present if the Bot joined using the Kubernetes join method.

The attributes under join.kubernetes.pod are only present if the bot is running in a Kubernetes cluster with Projected Service Account Token support.

FieldDescription
join.kubernetes.subjectThe fully qualified identifier of the entity based on the Kubernetes token. For a service account, this takes the form of system:serviceaccount:<namespace>:<service-account-name>.
join.kubernetes.service_account.nameThe name of the service account that the joining entity is running as.
join.kubernetes.service_account.namespaceThe namespace of the service account that the joining entity is running as.
join.kubernetes.pod.nameThe name of the pod that the joining entity is running in.

join.spacelift

These attributes are present if the Bot joined using the Spacelift join method.

They are mapped from the JWT issued by Spacelift, for which further documentation is available at https://docs.spacelift.io/integrations/cloud-providers/oidc/#standard-claims

FieldDescription
join.spacelift.subThe sub claim of the Spacelift JWT that was used to join..
join.spacelift.space_idThe ID of the space in which the run is executing.
join.spacelift.caller_typeThe type of the caller that owns the run, either stack or module.
join.spacelift.caller_idThe ID of the caller that generated the run.
join.spacelift.run_typeThe type of the run, either PROPOSED, TRACKED, TASK, TESTING or DESTROY.
join.spacelift.run_idThe ID of the run.
join.spacelift.scopeThe configured scope of the token, either read or write.

join.terraform_cloud

These attributes are present if the Bot joined using the Terraform Cloud join method.

They are mapped from the JWT issued by Terraform Cloud, for which further documentation is available at https://developer.hashicorp.com/terraform/enterprise/workspaces/dynamic-provider-credentials/workload-identity-tokens

FieldDescription
join.terraform_cloud.subThe sub claim of the Terraform Cloud JWT that was used to join.
join.terraform_cloud.organization_nameThe name of the organization the project and workspace belong to.
join.terraform_cloud.project_nameThe name of the project the workspace belongs to.
join.terraform_cloud.workspace_nameThe name of the workspace that the plan/apply is running within.
join.terraform_cloud.full_workspaceThe fully qualified workspace path, including the organization and project name. For example: organization:<name>:project:<name>:workspace:<name>
join.terraform_cloud.run_idThe ID of the run that is being executed..
join.terraform_cloud.run_phaseThe phase of the run that is being executed, either plan or apply.

join.tpm

These attributes are present if the Bot joined using the TPM join method.

FieldDescription
join.tpm.ek_pub_hashThe SHA256 hash of the PKIX formatted EK public key, encoded in hex. This effectively identifies a specific TPM.
join.tpm.ek_cert_serialThe serial number of the EK certificate, if present.
join.tpm.ek_cert_verifiedWhether or not the EK certificate was verified against a certificate authority.

Workload attributes

Workload attributes are sourced from workload attestations performed by tbot when a workload requests an identity via the workload API. They may not be present depending on your configuration of tbot. See the Workload Attestation reference for more information.

workload.unix

Attributes sourced from the Unix workload attestor.

See the Workload API and Workload Attestation reference for more information.

AttributeDescription
workload.unix.attestedWhether the workload passed Unix attestation.
workload.unix.pidThe PID of the workload process.
workload.unix.gidThe primary user ID of the workload process.
workload.unix.uidThe primary group ID of the workload process.

workload.kubernetes

Attributes sourced from the Kubernetes workload attestor.

See the Workload API and Workload Attestation reference for more information.

AttributeDescription
workload.kubernetes.attestedWhether the workload passed Kubernetes attestation.
workload.kubernetes.namespaceThe namespace of the workload pod.
workload.kubernetes.pod_nameThe name of the workload pod.
workload.kubernetes.service_accountThe service account of the workload pod.
workload.kubernetes.pod_uidThe UID of the workload pod.
workload.kubernetes.labelsThe labels of the workload pod.

User attributes

User attributes are sourced from the Bot or User that is requesting the issuance of the workload identity credential.

AttributeDescription
user.nameThe name of the user.
user.is_botWhether the user is a bot.
user.bot_nameIf the user is a bot, the name of the bot.
user.bot_instance_idIf the user is a bot, the instance ID of the bot.
user.labelsLabels of the user.