Skip to main content
Available on the Enterprise plan. Contact sales to learn more.
Ona issues OIDC tokens that environments, users, and service accounts can exchange for short-lived credentials from cloud providers and third-party services. This eliminates static secrets, API keys, and long-lived credentials. OIDC tokens work with both Ona Cloud and self-hosted runners.

Enable V3 tokens

V3 tokens are the current token format. They include flat, structured claims per principal type and a customizable sub claim. To enable V3 tokens for your organization:
  1. Open the OIDC Token Configuration page in your organization settings
  2. Select V3 as the token version
  3. Optionally configure extra sub claim fields
  4. Save
Switching from V2 to V3 changes the sub claim format. Update your cloud provider trust policies before switching. See V2 tokens for the old format.

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:
Each principal type has default sub claim keys:

Customizing the sub claim

You can add extra fields to the sub 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:
This lets you write trust policies that restrict access to environments created by a specific developer.

Setting up OIDC authentication

Setting up OIDC authentication involves three steps:
  1. Register Ona as an identity provider with your cloud provider or third-party service. Use https://app.gitpod.io as the issuer URL.
  2. Configure trust rules that define which token claims are required for access. Use the sub claim and other flat claims to implement fine-grained access control.
  3. 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 using ona idp token:
Decode the token to inspect claims:
Use ona idp login for provider-specific authentication:

OIDC discovery endpoint

Ona exposes a standard OIDC discovery endpoint at:
The JSON Web Key Set (JWKS) for verifying token signatures is at:
The discovery endpoint returns the full list of supported claims, including all V3 claims:

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.
V2 tokens use a different 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 V2 sub 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 the sub 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 sub value
For V2-specific cloud provider setup, see the V2 AWS guide. Read more: