Connectors declare whether chat uses the person's credentials or a shared one #2070
Notifications
Due Date
No due date set.
Blocks
Reference: sam/archie#2070
Reference in new issue
Block a user
Why: Every accepted connector today runs with org-level credentials sealed in the credential store and bound at acceptance, which is effectively a shared service account, and a chat turn invokes actions with that credential while the input — including any person or org identifier — is whatever the model wrote. A prompt-injected turn can therefore act as the service account (the confused deputy) or put another person's id into a query, and the downstream system sees the shared credential, not the person chatting.
Today: modules/connectors/module.go acceptAs stores a store.Accepted whose Credentials map binds credential slots to named credentials; launch resolves them via secrets in modules/connectors/credentials.go (plus splitSecretSettings for
_refsettings) and passes them as Spec.Secrets at Configure time. Neither store.Accepted nor the connector proto's DescribeResponse declares a credential binding mode: there are no user-delegated tokens, no per-person account linking, no sandbox profile. Connector.Invoke sends Invocation{Action, Input, IdempotencyKey} verbatim — the input is model-supplied, and Digest covers only the action name and canonical input. Declarations offers every lookup and action to chat, and Declaration carries only ReadOnly. modules/chat/tools.go call checks only allowed(ActionRun/ActionRead, KindConnector, name); the governance action vocabulary in modules/governance/access.go has no binding actions (install, link_own_account, bind_to_agent, use_binding, rotate, revoke), though KindBinding exists as a resource kind. Extensions are egress-confined (modules/connectors/internal/host opens an egress gate from Spec.Egress) but still receive their secrets.Source: the revised RFC exported at transcripts/2026-11-20-chat-authorization-rfc-3fa43269.md in sam/archie-product; citations below are RFC section numbers.
Required behaviour:
Out of scope: #2067 tool discovery and admission filtering; #2068 taint tracking; #2069 memory scopes; #2071 admin actions refused in chat; #2072 approval binding; #2073 image/CSP rendering; #2074 budgets and rate limits; #2075 audit, revocation and kill-switch; #2078 enforcement on every entry point; #2079 chat-triggered workflow execution contracts; #2080 disclosure authorization per audience and destination; plus anything else this issue does not cover.
Design notes: modules/connectors owns the mode (stored on store.Accepted, set through the accept API in module.go), credential resolution (secrets, splitSecretSettings — skip slot resolution entirely for sandbox mode), and the injection/refusal inside Connector.Invoke/Lookup, which is the connector proxy; reuse connectors.Canonical so the digest covers the post-injection input, and host.Spec.Egress for sandbox egress. modules/chat owns pausing the turn and the linking card. modules/governance owns the binding actions on KindBinding in the Actions vocabulary and their shipped policies. Pitfalls: never trust model-supplied identity fields (injection overwrites them); a resumed turn must still act as its owner via actingAs; deny by default when the mode is unset. Migration: existing accepted connectors all hold shared credentials today — they are not chat-eligible until re-accepted with a declared mode and, for shared mode, demonstrated equivalent enforcement.
Tests (security-seam table tests with fakes, no DB, per AGENTS.md):
Done when: the accept API stores a mode and rejects an empty one; in chat, a user-delegated connector without a linked account shows the linking card and runs nothing; a shared-mode connector runs only named reviewed operations with the injected context visible in the recorded decision calls; a sandbox connector starts with no secrets and deny-by-default egress; a connector with no mode is not offered. Manual check on a running binary: accept one connector per mode in the dashboard, drive each from a chat turn, and watch the turn's tool calls and recorded decisions.
Open questions for the maintainer:
Part of #2066.