Quick answer: OAuth client credentials can be appropriate for machine access; token permissions and lifetime depend on the issuer and configuration. User-delegated access commonly uses authorisation code with PKCE. Some agent clients can complete that flow with browser-assisted consent and a callback. Neither flow automatically provides Gazebo with control over later provider requests.
First identify the relationship
There may be more than one OAuth relationship in an agent integration:
- A user authorises a client to connect to a service such as Gazebo.
- An application obtains provider access on its own behalf or with a user's delegation.
- A runtime uses the resulting provider credential to make requests.
These are not interchangeable. Signing a client into Gazebo does not mean Gazebo executes its provider requests or determines the underlying provider token's scope.
Client credentials: access for a confidential client
The OAuth 2.0 client-credentials grant lets a confidential client authenticate to an authorisation server and obtain an access token. It is commonly used for machine-to-machine access where the provider supports that relationship.
The grant does not require a broad permission set or an indefinite token lifetime. The authorisation server determines the allowed scope and token properties. Repeated token requests also do not inherently mean every caller receives the same token string.
Under RFC 6749, a refresh token should not be included in a client-credentials token response. The client normally obtains another access token by authenticating again.
Sharing one client secret across independently managed agents can make attribution and offboarding harder. That is a deployment decision, not proof that the grant is unsuitable for all agents. Consider separate clients, workload authentication or another supported identity mechanism according to the issuer's capabilities.
Authorisation code with PKCE: user-delegated access
When an application needs access associated with a user, an authorisation-code flow may be appropriate. The user authorises the client, which exchanges the code for tokens. The provider determines scopes, consent requirements and whether refresh tokens are available.
PKCE binds the authorisation request to the later code exchange using a challenge and verifier. It does not inherently prevent a CLI or agent client from using OAuth.
RFC 8252 describes native applications using an external browser and redirect mechanisms, including loopback callbacks. A compatible CLI can open a browser for the user's consent and receive the callback without rendering its own login page.
A fully unattended runtime cannot assume a person is available for interactive consent. Plan supported provisioning, renewal and reauthorisation paths; do not bypass consent or embed a confidential client secret in a public client. Providers may support other flows, but availability is provider-specific.
Refresh tokens are a separate lifecycle
For delegated access, a refresh token may let the authorised client obtain another access token. Issuance, lifetime, rotation and revocation depend on the provider and its policies.
If rotating refresh tokens are used, coordinate renewal so concurrent processes do not overwrite each other's current token state. Store tokens appropriately and handle reauthorisation explicitly when renewal fails.
A central integration can manage that lifecycle if it actually implements the provider's flow. A generic credential broker does not automatically support every provider's refresh behaviour or mint a narrower token from an existing one.
What Gazebo connector OAuth authorises
In Gazebo's OAuth connection flow, the user explicitly approves the stored service key names the client may retrieve. The resulting connection authorises retrieval within those limits.
When the client calls get_credential, Gazebo checks release policy and returns the approved stored provider credential. The runtime and its host receive the actual value. The declared method is retrieval-policy context, not inspection or approval of a later HTTP request.
Gazebo does not automatically turn that stored key into a shorter-lived or narrower provider token, execute a provider call on the client's behalf, or approve individual downstream actions.
Revoking the Gazebo connection blocks future retrieval. A provider key already delivered remains governed by its provider permissions, expiry and invalidation.
For the actual connector setup, use the MCP documentation and SDK connection guide, rather than treating this conceptual article as a provider configuration recipe.
Choosing the flow: a decision checklist
| Question | What to check |
|---|---|
| Is the application acting on its own behalf? | Whether the issuer supports client credentials and suitable machine authentication |
| Is access delegated by a user? | The provider's supported authorisation flow, scopes and consent requirements |
| Can the client keep a secret? | Whether it is a confidential or public client; public native clients should not rely on embedded secrets |
| Is a person available for initial consent? | A supported browser/callback or other provider-supported authorisation path |
| How does access renew? | Token lifetime, refresh support, concurrency handling and reauthorisation failures |
| Which access is being revoked? | The connector grant, a retrieval token or the underlying provider credential |
| What proves later API activity? | Provider and runtime records, not credential-retrieval records alone |
For a single trusted workload, existing provider OAuth and secrets infrastructure may be enough. For several agents and services, Gazebo can provide a common retrieval connection, approval and history workflow. Those are useful integration properties, not replacements for OAuth's provider-enforced permissions.
For credential replacement decisions, see rotation versus revocation. For the broader delivery architecture, read secrets management for AI agents.