Skip to content

feat(persona): GridTrustAuthPolicy — hard ACL gate on cross-grid command callers - #1653

Merged
joelteply merged 2 commits into
canaryfrom
feat/persona-cmd-acl-gate
Jun 20, 2026
Merged

joelteply merged 2 commits into
canaryfrom
feat/persona-cmd-acl-gate

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What

Slice 3 of the airc-native rebuild: a hard ACL gate on cross-grid (airc) command callers — enforcement, not prompt guidance.

Why

A persona is command-callable over airc: its inbound pump forwards any command-request envelope from a room peer to the shared CommandExecutor, threading CallerIdentity::airc(verified_sender) into the auth gate. But the executor shipped the AllowAllPolicy default — so an untrusted outsider agent in the room could address a privileged command (data/delete, grid/trust) to the persona and have it execute. That's the gap this closes.

How

  • GridTrustAuthPolicy (routing/grid_trust_policy.rs) implements the existing AuthPolicy seam (no new plumbing):
  • Installed on the production executor (ipc/mod.rs) via .with_policy, replacing AllowAllPolicy. Local/test executors unaffected (still AllowAll).
  • The cap is conservative because the airc-enrollment ↔ grid-NodeRegistry trust bridge is a separate slice; when it lands, the ceiling becomes the peer's resolved TrustLevel (a same-account Owner peer on another machine regains full access).

Validation

  • Compiles clean (lib + tests), clippy 0 errors.
  • 2 new gate tests + 17 command-executor + 241 routing tests still green (the global policy install regresses nothing — local callers pass).

Note

Independent of #1652 (branched off canary; no airc bump needed — is_command_authorized is continuum-internal). Mergeable in any order.

🤖 Generated with Claude Code

…and callers

Slice 3 of the airc-native rebuild. A persona is command-callable over airc:
its inbound pump forwards any command-request envelope from a room peer to the
shared CommandExecutor, threading CallerIdentity::airc(sender) into the gate.
But the executor shipped the AllowAllPolicy default — so an untrusted outsider
agent in the room could address a privileged command (data/delete, grid/trust)
to the persona and have it execute. This is the hard gate (chosen over soft
prompt guidance).

- GridTrustAuthPolicy (routing/grid_trust_policy.rs) implements the existing
  AuthPolicy seam: local/substrate callers pass; airc-sourced callers are gated
  by the grid ACL (is_command_authorized), capped at Provisional — they may
  request ai/generate (continuum#1649) and nothing above it; every Owner-gated
  command is denied regardless of sender.
- Installed on the production executor (ipc/mod.rs) via .with_policy, replacing
  AllowAllPolicy. Local/test executors are unaffected (still AllowAll).
- Cap is conservative because the airc-enrollment ↔ grid-NodeRegistry trust
  bridge is a separate slice; when it lands, the ceiling becomes the peer's
  resolved TrustLevel.

Tests: 2 (airc caller may generate but not privileged; local/substrate pass).
17 command-executor + 241 routing tests still green (no regression).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…1 + 3)

Adversarial security review of #1653 found the gate SOUND for its threat model;
two low-urgency items, both addressed here (no code-behavior change):

- Finding 1 (latent over-grant): the grid ACL matches by prefix, so the
  `ai/generate` Provisional rule is a NAMESPACE grant — future `ai/generate*`
  paths are also airc-callable. Added a guard test that PINS this so the grant
  stays a conscious decision (and trips if someone needs it tightened to
  exact-match), and asserts a sibling `ai/embedding` is still denied (the grant
  is scoped, not all of ai/*).
- Finding 3 (surface scope): documented in the module that this gates the
  COMMAND surface only; the airc event-subscribe surface still defaults to
  AllowAll (out of scope, follow-up).

3 gate tests green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@joelteply
joelteply merged commit 6948b97 into canary Jun 20, 2026
4 checks passed
@joelteply
joelteply deleted the feat/persona-cmd-acl-gate branch June 20, 2026 00:57
joelteply added a commit that referenced this pull request Nov 4, 2026
…rains (the conditions #5743 set) (#5761)

#5743 reverted 38a22ab because airc #1618 derived every row at open and the M5's
residents (1.7-12.8 GB stores) stalled 4-8+ min at boot. Its stated way
forward: airc derives per page, never at open, and every store has a
byte-budgeted, set-based drain. Both are now in airc canary:
- #1654 (76e8e2d, card 70055c76): open is schema only (0.016 s on a copy of
  Paige's 1.55 GB store, against 23.4 s); indexes are built after the drain; a
  read derives nothing and says whether its file was settled; a store this
  binary wrote is settled at open by one index seek.
- #1653 (86b153e, card e95d41a4): each kind declares its retention, and the
  drain runs in bounded windows on its own connection.

Only the nine airc revs and their lock entries move (plus airc-lib's fs2 line);
no other package re-resolves. `cargo check --locked` of continuum-airc-protocol,
airc-test-fixtures, continuum-process and continuum-rooms passes on the new pin.


Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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