Authentication

Preview

Credential brokering, scope narrowing and rotation.

Credentials are held by a broker and injected at the transport layer. The model never sees a token, and tokens never appear in traces or artifacts.

Flow#

tool call ──▶ runtime ──▶ credential broker
                      │              │ mint short-lived token
                      │              ▼
                      └────────▶ HTTP client (token attached here)
                                     │
                                     ▼
                              external system

model context: never touches the token at any point

Supported methods#

MethodRotationNotes
OAuth 2.0 authorization codeAutomatic refreshPreferred; scopes narrowed at grant time
OAuth 2.0 client credentialsAutomaticService-to-service access
API keyManualStored encrypted; use only when OAuth is unavailable
Workload identity federationAutomaticNo long-lived secret at all
Signed requestn/aBroker signs per request

Scope narrowing#

The effective scope of a call is the intersection of the connector grant, the workspace policy, the API key scopes and the task capability request. A task cannot widen any of them.

ts
await pimsy.connectors.install({
  type: class="tok-str">"github",
  auth: class="tok-str">"oauth",
  scopes: [class="tok-str">"repo:read", class="tok-str">"issues:write"],   // narrow at install time
  resources: { repositories: [class="tok-str">"acme/checkout", class="tok-str">"acme/billing"] }
});

Last updated 2026-09-07