How It Works
- You create a service account with an OIDC policy (or add one later via the dashboard)
- The policy specifies which CI provider and identity can use this service account
- At runtime, the CLI sends the CI job’s OIDC token (requested automatically in GitHub Actions; read from
RELIC_OIDC_TOKENelsewhere) - The server validates both the service token AND the OIDC token before returning secrets
Setup
GitHub Actions
1
Create a service account with OIDC
--branch to allow all branches. Store the service token in your repository’s secrets as RELIC_SERVICE_TOKEN.2
Add permissions to your workflow
Your GitHub Actions workflow needs
id-token: write permission:3
Run with secrets
GitLab CI
1
Create a service account with OIDC
2
Add id_tokens to your CI config
GitLab doesn’t expose an OIDC token by default (the old
CI_JOB_JWT_V2 variable was removed in GitLab 17.0). Declare one named RELIC_OIDC_TOKEN with id_tokens. The aud value must match the service account audience (defaults to relic via --oidc-audience).Other Providers
For CI providers that support OIDC but aren’t auto-detected, set theRELIC_OIDC_TOKEN environment variable manually:
Managing OIDC Policies
Add via CLI (at creation time)
Add or update via dashboard
OIDC policies can be configured from the web dashboard without re-creating the service account. Navigate to your project’s service accounts, click “Add OIDC” or “Edit OIDC”, select the provider, and enter your organization, repository, and branch.Remove OIDC policy
To remove an OIDC policy and fall back to token-only authentication, click “Remove” in the OIDC dialog on the dashboard.Audience
New OIDC policies require an audience. The CLI and dashboard default torelic, which matches the audience GitHub Actions tokens request automatically. Override with --oidc-audience when your IdP issues a different aud.
Legacy policies created without an audience still authenticate (the server logs a warning). A future release will hard-fail those policies — update them to set an audience before then.
Subject Patterns
Subject patterns control which CI identities can use the service account.Auto-Detection
Only GitHub Actions is detected automatically:RELIC_OIDC_TOKEN always takes precedence. On self-managed GitLab older than 17.0, the legacy CI_JOB_JWT_V2 variable is still used as a fallback.
In GitHub Actions the CLI requests tokens with audience
relic. If you set a different
--oidc-audience, request the token yourself and pass it as RELIC_OIDC_TOKEN.Security Model
- Service token alone: authenticates + decrypts (works without OIDC)
- Service token + OIDC: authenticates via both, decrypts with token. If OIDC is configured, both are required.
- OIDC token alone: not sufficient, since the token is for identity only, not decryption