Available on the Enterprise plan. Contact sales to learn more.
Enable V3 tokens
V3 tokens are the current token format. They include flat, structured claims per principal type and a customizablesub claim.
To enable V3 tokens for your organization:
- Open the OIDC Token Configuration page in your organization settings
- Select V3 as the token version
- Optionally configure extra sub claim fields
- Save
Token structure
V3 tokens contain flat claims specific to the requesting principal. Every token includes the standard JWT claims (iss, sub, aud, exp, iat) plus principal-specific claims.
Environment tokens
Issued when code running inside an environment requests a token.User tokens
Issued when a user requests a token directly (e.g., via the CLI outside an environment).Service account tokens
Issued when a service account requests a token.Account tokens
Issued for account-level operations (not scoped to an organization).Runner tokens
Issued for runner-level operations.Subject claim (sub)
The V3 sub claim uses a key:value pair format separated by colons:
Customizing the sub claim
You can add extra fields to thesub claim to create more specific trust policies. Configure extra sub fields on the OIDC Token Configuration page.
Available extra sub fields:
For example, adding
creator_email produces a sub like:
Setting up OIDC authentication
Setting up OIDC authentication involves three steps:-
Register Ona as an identity provider with your cloud provider or third-party service. Use
https://app.gitpod.ioas the issuer URL. -
Configure trust rules that define which token claims are required for access. Use the
subclaim and other flat claims to implement fine-grained access control. - Exchange the token from within an Ona environment using the CLI. The cloud provider validates the token against Ona’s JWKS endpoint and issues short-lived credentials.
Provider-specific guides
CLI usage
Retrieve a token usingona idp token:
ona idp login for provider-specific authentication:
OIDC discovery endpoint
Ona exposes a standard OIDC discovery endpoint at:V2 tokens
V2 is the previous token format. New integrations should use V3 tokens. V2 tokens remain fully supported and will continue to work. They do not receive new claims or features.
sub claim format and include fewer claims. If your organization currently uses V2 tokens, existing integrations will continue to function without changes.
V2 subject claim format
The V2sub claim uses a path-based format:
- Users:
org:<orgID>/user:<userID> - Runners:
org:<orgID>/rnr:<runnerID> - Environments without a project:
org:<orgID>/env:<environmentID> - Environments from a project:
org:<orgID>/prj:<projectID>/env:<environmentID>
V2 token example
V2 access control
You can match on thesub claim prefix to control access:
- All environments in an org: match
org:<orgID>/* - Environments from a project: match
org:<orgID>/prj:<projectID>/* - A specific environment: match the full
subvalue