Skip to content

Support OAuth client_secret_basic and resource indicators for refresh providers #5663

Open

Description

@stevenlee-oai

Problem

OpenShell's oauth2_refresh_token provider currently sends client_id, refresh_token, and an optional client_secret in the token request body. It can include scope, but it cannot select client_secret_basic or send an OAuth resource indicator. Current minter

These are general OAuth capabilities, not MCP-specific extensions:

  • RFC 6749 §2.3.1 defines HTTP Basic client-password authentication; RFC 6749 §6 covers client authentication during refresh.
  • RFC 8414 §2 defines token_endpoint_auth_methods_supported; when omitted, the default is client_secret_basic.
  • RFC 8707 §2.2 defines the resource parameter on token requests, including use with a refresh token, to identify the intended protected resource. It is different from OAuth scope.

For example, an OCE MCP OAuth connection may already work with an authorization server requiring Basic client authentication and resource=https://example.com/mcp. If OpenShell takes ownership of refresh, the connection can stop working when the first access token expires. OCE already exercises this combination in its OAuth conformance test. MCP is one concrete consumer of these standard OAuth features.

Requested behavior

Allow an OAuth refresh provider to configure the OAuth client's registered token-endpoint authentication method (none, client_secret_post, or client_secret_basic) and an optional approved resource URI. On refresh, use that method and include the configured resource when required. For example:

POST /oauth/token
Authorization: Basic <encoded client credentials>
Content-Type: application/x-www-form-urlencoded

grant_type=refresh_token&refresh_token=...&resource=https%3A%2F%2Fexample.com%2Fmcp

Preserve existing public-client and client_secret_post behavior, avoid sending the client secret in the form when Basic is selected, and test refresh with Basic plus a resource indicator. Shared client-secret references can be handled alongside #5563.

Activity

  1. added
    state:acceptedA maintainer decided OpenShell should pursue this issue
    and removed
    state:triage-neededOpened without agent diagnostics and needs triage
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:acceptedA maintainer decided OpenShell should pursue this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions