GitLab CI/CD can issue OIDC tokens for each job via the id_tokens keyword. You exchange this token for a C1 access token using a curl command in your pipeline.
Prerequisites
- A service principal with a GitLab CI federation trust. See set up federation if you haven’t created one yet. Use the GitLab CI/CD preset.
- The trust’s client ID (for example
bright-eagle-55012@yourcompany.conductor.one/wfe)
Add id_tokens to your job to request a GitLab OIDC token, then exchange it for a C1 access token:
The id_tokens block tells GitLab to generate a signed JWT with your C1 tenant domain as the audience. The token is available as the C1_TOKEN environment variable within the job.
CEL expression examples
When creating the federation trust, the CEL expression controls which GitLab CI jobs can authenticate.
Restrict to a project
Restrict to a project on protected refs only
Restrict to a specific branch
Common GitLab OIDC claims
Security best practices for GitLab CI
Keep “Require protected ref” enabled (claims.ref_protected == "true") to ensure only jobs running on protected branches or tags can authenticate. For high-privilege access, also bind to a specific ref value. GitLab lets you set the audience per-job via id_tokens — your tenant domain is used as the expected audience.