Zuul
Jobs authenticate as the OIDC secret they were given.
Jobs authenticate as the OIDC secret they were given.
Identity proof
The token has to come from https://zuul.acme.com, and its sub claim has to match the workload you named. We compare that claim byte for byte, with no wildcards.
Every token also has to name your workspace as its audience. Ask for this audience and no other. A token requested for two audiences fails every exchange.
Console fields
| Field | Example | Advanced | What it pins |
|---|---|---|---|
| Zuul URL | https://zuul.acme.com | no | The web root, without any /t/<tenant>. Must be reachable from the internet. |
| Tenant | acme | no | |
| Project | github.com/acme/deploy | no | Canonical name, hostname first. Zuul 14.2 and earlier name the project the job runs for; later releases name the project that defines the secret. |
| Secret name | penv-oidc | yes |
A field marked advanced carries a default and stays behind the disclosure until you open it.
The console also asks which project and environment this identity reaches and which role it gets, with the credential lifetime behind Advanced.
Trust
Built from the example answers above:
| What | Value |
|---|---|
| Issuer | https://zuul.acme.com |
| Claim compared | sub |
| Subject | secret:acme/github.com/acme/deploy/penv-oidc |
| Identity name | zuul-acme-github-com-acme-deploy |
We name the identity for you, so the form never asks for one.
Console snippet
# The secret's name must match the form's Secret name, penv-oidc unless you changed it.
- secret:
name: penv-oidc
oidc:
claims:
# Ask for this audience and no other. A token requested for two audiences fails every exchange.
aud: "YOUR_WORKSPACE_ID"
- job:
name: deploy
secrets:
- name: penv_token
secret: penv-oidc
# in the job's playbook:
- hosts: all
tasks:
- shell: |
C=$(curl -sS "https://penv.cloud/api/v1/auth/oidc" \
-H 'content-type: application/json' \
-d "{\"token\":\"$T\"}" | jq -r .credential)
PENV_TOKEN="$C" penv pull
environment:
T: "{{ penv_token }}"The snippet finishes with penv pull, which writes a file. We recommend penv run for a process; penv pull is for a host that needs a file on disk. Connect your CI has the wrapped step.
Related
- Machine identity
- Connect a Platform in the console
- Zuul documentation: the subject is the value most often set wrong