Apollo GraphOS Platform
OverviewQuickstart
APIs and Tools
Schema Management
Explorer IDE
Graph Security
Metrics and Insights
Access Management
Graph Management
Production Readiness
Platform Limits

OAuth Overview

Use OAuth clients for machine-to-machine access to GraphOS


PLAN REQUIRED
This feature is available on the following GraphOS plans: Standard, Enterprise.

GraphOS supports the OAuth 2.1 client_credentials grant for machine-to-machine authentication. An OAuth client authenticates as itself, with no user present, and exchanges its client ID and secret for a short-lived access token.

Use OAuth clients for CI/CD pipelines and other automation that runs Rover against your graphs.

When you use OAuth clients, you can:

  • Issue short-lived access tokens that expire after 15 minutes

  • Grant access by specifying scopes and the graphs they apply to

  • Rotate the client secret with a grace period so running pipelines don't break during rotation

Supported scopes

Scopes define what the client can do on the graphs you grant it access to.

GraphOS currently supports the following scopes for OAuth clients, where each scope includes all permissions of the scopes preceding it:

ScopeGrants
rover:cli:readRead schemas and contracts, for example with rover supergraph fetch or rover graph fetch.
rover:cli:writeEverything in rover:cli:read, plus running schema checks, publishing schemas, creating new variants, and publishing READMEs.
rover:cli:manageEverything in rover:cli:write, plus managing variants and contract configuration, including deletion.

Always use the narrowest scope that covers your workflow. For example, a pipeline that runs checks and publishes subgraph schemas should use rover:cli:write instead of rover:cli:manage.

note
The rover:cli scope is a deprecated alias of rover:cli:manage. Use rover:cli:manage for new clients.

Access tokens

Access tokens expire after 15 minutes. The client_credentials grant doesn't issue refresh tokens, so automation requests a new token at the start of each job, or whenever the current one expires.

An access token always has the permissions of the scopes the client was created with, and only on the graphs you granted the client access to.

Requirements

OAuth clients have the following requirements:

note
Creating, rotating, or deleting a client on any other plan fails with the error Organization's plan does not support client_credentials OAuth client registration.

Setup instructions

To create an OAuth client, request access tokens, and manage the client over its lifetime, follow the OAuth client setup guide.

Best practices

  • Create one client per workflow.

  • Grant each client the narrowest scope and fewest graphs. A client that only runs checks on one graph shouldn't have rover:cli:manage on every graph.

  • Set a secret lifetime that matches your rotation policy. For example, if you rotate quarterly, set secretLifetimeDays to 90 or slightly more.

  • Store secrets in a secret manager. Never commit a client secret to source control or print it in CI logs.

  • Request a new access token at the start of each CI/CD job. Tokens expire after 15 minutes, so don't store or reuse them between jobs.