CADS-Tunnel docs
Explanation

Declarative network policy

Found the same way as The Topology Editor — by auditing every route this control plane actually registers and checking it against what’s documented here. /me/networks/* (crates/common/src/policy.rs, #102) had zero coverage on this site. It’s a different idea from Topology’s graph editor: not “draw connections,” but “declare who’s allowed to connect to whom, by role and sensitivity level” — a small RBAC+MAC policy language, independently pure-tested (17/17 ct-common policy tests, re-run hermetically for this page) and exposed through three /me/* routes.

The policy language

A Network is {agents: [Agent], policy: Policy}. Each Agent is {id, group, label} — a group for role-based rules ("dev", "ops", whatever you choose) and a security label. A Policy is:

{
  "levels": {"order": ["public", "internal", "secret"]},
  "rules": [
    {"from": {"group": "dev"}, "to": {"group": "ops"}}
  ],
  "mac_flow_control": true
}

explain and desired_channels — real, pure, and tested

Two things a stored Network computes, both real functions with passing tests, not stubs:

The honest caveat: this doesn’t gate anything live, yet — despite what the source itself claims

`crates/common/src/policy.rs`'s own module doc comment states, in the present tense: "the controller compiles a declaration into channel grants from it, the edge broker enforces it at channel admission… and the MCP net.explain(a, b) tool renders its Decision." Checked directly rather than taking that at face value — grepped every source file in crates/edge for any reference to this module, this Policy type, or desired_channels: zero matches. Grepped every registered MCP tool (ct_common::mcp's register_* functions and what actually gets wired up in ct-agent) for an explain tool: also zero. Neither the edge-broker enforcement nor the net.explain MCP tool exist in the shipped system today. The doc comment describes the intended end state of #102, not current behavior — the same gap as the Topology Editor's overlay-mode and unreachable operator-binding route, and worth exactly the same caveat: the decision engine itself is real, correct, and tested — declaring a network and computing what it would allow works exactly as documented above — but nothing currently reads that computed plan to actually admit or refuse a real Agent-Fabric channel.

Should you use this today?

For reasoning about what a role/sensitivity-based access policy would permit — yes, PUT/GET /me/networks/:id and its /plan are fully live and correct. For actually restricting which of your agents can talk to which, the real, currently-enforced mechanism is channel admission itself — see Agent-Fabric channels and Set up an Agent-Fabric channel for what’s actually wired in: only agents holding a signed grant for a specific channel can join it, independent of this policy language.

Found an error, or something that didn't work as documented? Open an issue →