Chat platform and identity admin actions are refused #2071
Notifications
Due Date
No due date set.
Blocks
Reference: sam/archie#2071
Reference in new issue
Block a user
Why: Chat offers the model every connector action and gates each call only on a coarse role check, so the org owner — who passes every shipped Cedar policy — can ask chat to grant roles, change identities, export secrets or change control-plane settings. Those are platform and identity admin actions; an untrusted model must never be the thing that performs them, so chat refuses them for everyone and they stay available in the dashboard and in workflow runs.
Today: modules/chat/tools.go tools builds the turn's tool set from d.Toolbox.Declarations() (every connector lookup and action plus MCP tools) plus the builtins; call checks only allowed(ActionRun/ActionRead, KindConnector, name). modules/governance/roles.go orgOwnerPolicy permits every action to the owner, and the action vocabulary in modules/governance/access.go (manage_members, manage_identities, manage_policies, read_secret, …) has no chat-specific restriction. In modules/judgement, hard rules (policies.go Refuses, seeded by starter/hard_rules.cedar) run before any guard and already refuse when the policy set cannot be read, and chat turns pass Workflow "chat" (principal in tools.go), which policies.go entities/request expose as Workflow::"chat" — but no rule or code path forbids admin actions in chat, and an action class's earned level (classes.go, level.go) can let a high-impact action run unattended. connectors.Declaration and the proto Effect carry only ReadOnly, Reversibility and Summary — no privilege-change or secret-access flag.
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; #2070 connector credential modes; #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: The classification seam is connectors.Declaration and the proto Effect — they must carry the privilege-change and secret-access flags alongside ReadOnly. The refusal itself belongs in modules/judgement: Request.Workflow already carries "chat" for chat turns, so decide should refuse prohibited effects for that workflow in code, mirrored in Execute/ExecuteApproved; prefer a code-level check over editable Cedar text, because Policies.Put replaces the whole hard-rules set and a chat prohibition must not be removable that way. modules/chat owns not offering prohibited declarations in tools. runApproved in modules/chat/actions.go already re-assesses and invalidated discards on Never — keep that path covered so a resumed or approved held action is still refused. Deny by default when the classification is missing.
Tests (security-seam table tests with fakes, no DB, per AGENTS.md):
Done when: a chat turn asking for an admin action is refused with a policy error and never runs, even for the owner, while the dashboard still performs the same action; the refusal is recorded in the action class's history; a high-impact action in chat still produces an approval card first; a DENY cannot be approved from the card. Manual check on a running binary: signed in as the owner, ask chat to run an admin action — refused; open that action's class in the dashboard — the refusal is recorded; ask chat to export a connector secret — refused with no approve path.
Open questions for the maintainer:
Part of #2066.