Your CI jobs can now record to Currents without a stored record key. The reporter gets an OIDC token from your CI provider, exchanges it with Currents, and records with a key that expires after 6 hours. There is no long-lived key to store and none to rotate.
A record key created in the dashboard has no automatic expiry. If it leaks through a log, a fork or a laptop, it works until someone notices and replaces it.
- Record with the OIDC token of GitHub Actions, GitLab.com, CircleCI, Buildkite or Bitbucket Pipelines
- Pass a token you request yourself through
CURRENTS_OIDC_TOKEN - Get a record key that expires after 6 hours
- Trust policies are managed by org admins under Organization → API and Record Keys
- Remove a policy and the keys it issued are revoked
- Works with
@currents/playwrightand thecurrentsCLI (Jest and node:test uploads)
How it works
Leave CURRENTS_RECORD_KEY unset. If the job has an OIDC token that includes currents:record-key in its audience, the reporter uses it. Currents refuses a token whose audience does not include it, such as the default token of CircleCI, Buildkite and Bitbucket Pipelines. Your job needs to provide the token:
- GitHub Actions: add
permissions: id-token: writeto the job. The reporter requests the token. - GitLab.com: add
id_tokensnamedCURRENTS_OIDC_TOKENwithcurrents:record-keyas the audience. - CircleCI and Buildkite: request a token with
currents:record-keyas the audience (circleci run oidc get --aud,buildkite-agent oidc request-token --audience) and put it inCURRENTS_OIDC_TOKEN. - Bitbucket Pipelines: add
currents:record-keyunderoidc: audiences:on the step and copyBITBUCKET_STEP_OIDC_TOKENtoCURRENTS_OIDC_TOKEN.
On Currents cloud, tokens from self-managed GitLab, CircleCI Server and Bitbucket Data Center are not accepted.
Set up a trust policy
An org admin adds a trust policy on Organization → API and Record Keys. A policy names the provider and the owner, and can limit trust to one repository, project or pipeline. Jobs that match the policy can record. Other jobs cannot.
A policy decides which jobs get a key. The key it issues can record to any project in the organization.
Policies match the provider's IDs, not names. If a repository is renamed, nothing changes. If it is deleted and re-created under the same name, the new repository has a new ID and does not inherit trust.
Removing a policy revokes the keys it issued. Org admins get an email when a policy is added or removed.
Reporters
OIDC recording works in @currents/playwright (version: TODO) and the currents CLI (version: TODO). The CLI covers Jest and node:test uploads.
Cypress through cypress-cloud does not support it yet. Keep using a record key there for now.
- Documentation: TODO