Chat platform and identity admin actions are refused #2071

Open
opened 2026-11-20 08:41:09 +00:00 by sam · 0 comments
Owner

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:

  1. Obligations are computed from multiple effect flags — sensitive read, mutation, financial impact, destructive effect, external disclosure, privilege change, persistence, arbitrary execution — and the strongest applicable restrictions accumulate; an action that looks read-only but carries a privilege-change effect is not low-risk. (RFC 5.1)
  2. Actions with privilege-change or secret-access effects (granting roles, changing identities or policies, exporting a connector secret, changing control-plane settings) are prohibited in chat: the outcome is DENY for every principal including owner and admin, on every chat path — at proposal (judgement), at execution (Execute/ExecuteApproved on a held or approved action) — and they are not offered to the model as chat-callable. (RFC 5.1, RFC 5.2, RFC 6)
  3. A prohibition is never converted by a confirmation: approving a DENY is invalid and runs nothing — forbidden is not the same as permitted-but-awaiting-confirmation, and a confirmation click never turns the former into the latter. (RFC 6)
  4. INDETERMINATE fails closed: when a required policy, ACL or account lookup is unavailable, no protected operation runs, and the outcome is reported without disclosing whether a hidden object exists. (RFC 6, RFC 1)
  5. The same admin actions remain available outside chat (dashboard, workflow runs); only the chat entry point prohibits them, under the every-entry-point rule of #2078. (RFC 3)

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):

  • modules/judgement: Assess with workflow "chat" on a privilege-change or secret-export action returns Never with RefusedBy, for an owner principal too — guards "admins too are refused in chat".
  • modules/judgement: Execute/ExecuteApproved on a held chat action with a prohibited effect refuses even with a matching approval — guards "a confirmation never converts DENY".
  • modules/judgement: the same action under a non-chat workflow is not refused by this rule — guards the dashboard and run paths staying open.
  • modules/judgement: an unreadable hard-rules set refuses (fail closed) — guards INDETERMINATE handling.
  • modules/chat: tools omits prohibited declarations from the manifest and call on one returns the refusal to the model — guards "the model can't see or invoke it".

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:

  • Actions with no declared effect flags (unclassified): treated as prohibited in chat (deny by default) or as ordinary? RFC 5.1 fails unknown tool IDs at invocation, but that is #2067; the classification gap is decided here.
  • Does the refusal extend to MCP-server tools that wrap admin operations, or only to connector-declared actions?

Part of #2066.

**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**: 1. Obligations are computed from multiple effect flags — sensitive read, mutation, financial impact, destructive effect, external disclosure, privilege change, persistence, arbitrary execution — and the strongest applicable restrictions accumulate; an action that looks read-only but carries a privilege-change effect is not low-risk. (RFC 5.1) 2. Actions with privilege-change or secret-access effects (granting roles, changing identities or policies, exporting a connector secret, changing control-plane settings) are prohibited in chat: the outcome is DENY for every principal including owner and admin, on every chat path — at proposal (judgement), at execution (Execute/ExecuteApproved on a held or approved action) — and they are not offered to the model as chat-callable. (RFC 5.1, RFC 5.2, RFC 6) 3. A prohibition is never converted by a confirmation: approving a DENY is invalid and runs nothing — forbidden is not the same as permitted-but-awaiting-confirmation, and a confirmation click never turns the former into the latter. (RFC 6) 4. INDETERMINATE fails closed: when a required policy, ACL or account lookup is unavailable, no protected operation runs, and the outcome is reported without disclosing whether a hidden object exists. (RFC 6, RFC 1) 5. The same admin actions remain available outside chat (dashboard, workflow runs); only the chat entry point prohibits them, under the every-entry-point rule of #2078. (RFC 3) **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): - modules/judgement: Assess with workflow "chat" on a privilege-change or secret-export action returns Never with RefusedBy, for an owner principal too — guards "admins too are refused in chat". - modules/judgement: Execute/ExecuteApproved on a held chat action with a prohibited effect refuses even with a matching approval — guards "a confirmation never converts DENY". - modules/judgement: the same action under a non-chat workflow is not refused by this rule — guards the dashboard and run paths staying open. - modules/judgement: an unreadable hard-rules set refuses (fail closed) — guards INDETERMINATE handling. - modules/chat: tools omits prohibited declarations from the manifest and call on one returns the refusal to the model — guards "the model can't see or invoke it". **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**: - Actions with no declared effect flags (unclassified): treated as prohibited in chat (deny by default) or as ordinary? RFC 5.1 fails unknown tool IDs at invocation, but that is #2067; the classification gap is decided here. - Does the refusal extend to MCP-server tools that wrap admin operations, or only to connector-declared actions? Part of #2066.
sam added a new dependency 2026-11-20 08:53:03 +00:00
sam added the featurehigh labels 2026-11-20 10:04:31 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#2071