Skip to main content
Platforms such as GitHub Actions and Cursor give each job or agent a short-lived, signed token that names its repository or project. This standard is called OpenID Connect (OIDC). Your jobs and agents can exchange this token to sign in as a service account, with no secret to store. The job can then clone and push repositories, open Trails, and read review results.

How It Works

Every platform follows the steps below, but differs in which pins it uses and how a job gets its token.

Bind the Platform

1

Create the service account

Create a service account and grant it access to the repositories your jobs need, in entire.com or with the CLI.
2

Find the platform's pins

entire service-account providers lists the platforms. entire service-account providers <name> lists a platform’s pins, which ones are required, and the format of each value.
3

Bind the platform to the service account

Each --pin name=value adds a condition that the token must match:
The command prints three values you’ll need later:If you bound the platform in entire.com, resource is the service account’s ID. audience and endpoint are its Auth URL followed by /api/authz/sts and /oauth/token.
A service account holds one binding per platform. entire service-account bindings acme/deploy lists its bindings with their eib_ IDs, and entire service-account unbind acme/deploy <binding-id> removes one. Tokens already issued keep working for up to 45 minutes after you remove a binding. To cut access sooner, revoke the service account’s grants.

Choose Pins

Any job whose token matches the pins can sign in as the service account. You should pin as narrowly as the job allows:
  • Pin the branch, environment, or workflow, along with the repository or organization.
  • Pin values that only the job you trust can get a token for.
  • Pins match by name. Remove a binding before you rename or delete a pinned repository or pipeline. Otherwise a new one with the old name could sign in.
  • Pins marked EXACT in entire service-account providers <name> take one value. The others also take a glob, such as deploy-*.

Exchange the Token

Exchange your platform’s token for a service account token that the entire CLI and git can use:
Most platform tokens expire within minutes, so make sure to exchange the token right after you get it. The service account token lasts around 45 minutes. If your job runs longer, get a new platform token and exchange it again before the next Entire command, or after a 401.

Use the Token

Install the CLI where the job runs. With ENTIRE_TOKEN set, the entire CLI and git-remote-entire use it in place of a login:
The clone’s origin remote points at Entire, so git fetch and git push in that clone run as the service account too. For the API, send the token as a bearer token. See Authentication for more details.

Platforms

Each Amp orb can request a token for the project it runs in. Bind the Amp project to a service account to let its orbs sign in.
1

Find the project ID

Find the project’s ID with amp projects list.
2

Bind the Amp project to the service account

The pins you can set:Any orb in the project can sign in, whoever started it. To limit it to one person’s orbs, add --pin user=....

Use It in an Orb

Amp tokens last 10 minutes. Get one inside the orb:
Then exchange and use the token.
Only a thread that runs in an orb and belongs to an Amp project can sign in. Run amp orb id-token inside the orb.
If sign-in fails, refer to Service Account Troubleshooting.

Continue With

Service Accounts

Learn what a service account can access and how it signs in.

Troubleshooting

Fix access, sign-in, and secret errors.