Skip to content

feat(loom): declare OAuth clients in the deployment manifest - #405

Merged
rjpower merged 1 commit into
mainfrom
weaver/oauth-clients-iac
Oct 22, 2026
Merged

rjpower merged 1 commit into
mainfrom
weaver/oauth-clients-iac

Conversation

@rjpower

@rjpower rjpower commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

deployment.reconcile gains an oauth_clients list, so a deployment stack can declare the remote MCP connector's OAuth clients instead of an administrator registering them by hand with loom oauth-client add.

oauth_clients:
  - client_id: claude-ai
    name: claude.ai
    redirect_uris:
      - https://claude.ai/api/mcp/auth_callback
      - https://claude.com/api/mcp/auth_callback
  • Stable ids. A declared client keeps the id the operator chose (1–64 letters, digits, ., _, -), so people can enter it in claude.ai or claude mcp add --client-id before the first deploy. claude.ai cannot change a connector's OAuth settings after it is added, so the id must not change between deploys.
  • Public only. The manifest never carries secrets, so declared clients authenticate with PKCE alone. claude.ai accepts a blank secret under "Use your own OAuth client". Confidential clients are still registered by hand.
  • Ownership. Migration 0036 adds oauth_clients.managed_by_deployment. Reconciling updates a declared client's name and redirect URIs in place and keeps existing grants. A pruning reconcile removes declared clients the stack no longer lists and revokes their tokens. Declaring the id of a hand-registered client returns 409 before anything is applied, so a manifest cannot take over or downgrade a confidential client.
  • Views. OAuthClientView gains deployment_managed, and DeploymentView returns the declared clients.

The connector docs (README, docs/configuration.md, docs/ARCHITECTURE.md) now lead with the manifest declaration. A companion Marin change declares claude-ai in the marin-loom stack.

deployment.reconcile accepts oauth_clients: public clients under stable,
operator-chosen ids, so a stack can register the claude.ai connector
before anyone enters its id. Reconciling updates a declared client in
place and keeps people's grants; a pruning reconcile removes clients the
stack stopped declaring and revokes what they were issued. A declaration
never takes over a client an administrator registered by hand.
@loom-oa-dev loom-oa-dev Bot added the weaver label Oct 22, 2026
@rjpower
rjpower merged commit 8baebf6 into main Oct 22, 2026
9 checks passed
@rjpower
rjpower deleted the weaver/oauth-clients-iac branch October 22, 2026 20:27
rjpower added a commit to marin-community/marin that referenced this pull request Oct 22, 2026
The marin-loom stack now declares the remote MCP connector's OAuth
clients under `oauthClients`. Activation passes them to Loom's
`deployment.reconcile` as `oauth_clients`, so nobody has to run `loom
oauth-client add` by hand.

- `claude-ai` accepts claude.ai's callback on both `claude.ai` and
`claude.com`.
- `claude-code` accepts Claude Code's loopback callback on any port.

Both are public clients that prove themselves with PKCE, so the stack
carries no secret. In claude.ai the connector takes client ID
`claude-ai` with a blank secret. claude.ai cannot change a connector's
OAuth settings after it is added, so these ids must never be renamed.
Because the stack prunes, removing a client from it revokes every token
the client was issued. The README's connector section describes this
instead of manual registration.

Depends on marin-community/loom#405. Loom builds without that change
ignore `oauth_clients`, so this config deploys cleanly before it lands
but registers nothing until Loom has the support.

Co-authored-by: rjpower <rjpower@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant