Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
AGENTS.md: nothing interacts with the mesh unauthenticated
Antonio Ojea13afdcbbf601
diff --git a/AGENTS.md b/AGENTS.mdindex 854e4fff..9cf4156f 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -13,6 +13,7 @@ You are an expert software engineering assistant helping to develop, maintain, a* **Two-Token Model & Complementary Gateway/PEP Integration:** Inside the mesh, credentials are Biscuits; at both borders, credentials are standard JWTs (`site/content/docs/contributing/security-architecture.md`). Inbound platform credentials (OIDC, K8s SA, SPIFFE JWT-SVID) exchange into delegated Biscuits (`POST /token/exchange`); outbound verified Biscuits mint short-lived ES256 JWTs at the control plane (`POST /sts/token`) that the egress node exchanges at cloud STS endpoints (`CloudTokenExchanger`). `agentmesh-node` integrates with existing gateways (`agentgateway`, Istio, Envoy) via Envoy `ext_authz` / `ext_proc` and RFC 8693 `/oauth/token`, while native SDKs (`sdk/js`, `sdk/python`) attenuate and seal Biscuits in memory.* **Policy on Names:** egress policy, secret injection and routing decisions are made on the destination *name*, never on an IP. Deny by default.* **Zero Trust:** Enforce a Zero Trust architecture. Assume no implicit trust between nodes, control planes, routers, or external actors. All data passing through the API must be authenticated, authorized, and validated.+* **Nothing interacts with the mesh unauthenticated:** a router or a member serves a mesh protocol (the DHT, gossip, the relay, the data plane) only to a peer that completed the mesh handshake on that connection and whose credential has not lapsed; a stream from any other peer is reset and counted. The only protocols open to a peer that has not authenticated yet are the ones the handshake itself needs: the transport security handshake, identify, and `/mesh/auth`. A libp2p library that registers its own stream handlers (kad-dht, gossipsub) is built on a host wrapper that installs this check in front of every handler, and its routing table admits only authenticated peers. A connection that has not authenticated within the deadline is closed. This holds for reads as much as for writes: a directory lookup or a gossip subscription is mesh data.* **Zero config, safe defaults:** the goal is zero trust with zero configuration. A component started with no flags must be secure; every default is the safe value (deny, verify, short-lived, loopback-only, bounded), and an operator opts into anything looser with an explicit flag whose help text names the risk. Before adding a flag, option or knob, ask whether a safe default removes the need for it.* **Auditable and traceable behavior:** when a member is admitted, refused, disconnected, shed, skipped or retried, the process says so in a log line at the right level or in a counter, and the states a component is in (attached routers, authenticated peers, listed peer routers, leased addresses) are gauges. A silent `continue`, a swallowed error or a condition that short-circuits a decision without a trace is a defect even when the behavior is correct. When a failure in a test or on a testnet cannot be explained from the logs and metrics the binaries already emit, the fix includes the missing instrumentation, so that the next occurrence can be read from the data instead of reproduced.* **Simple UX:** Maintain a very simple User Experience. Configuration, CLI usage, and error messages must be intuitive, minimal, and explicitly clear.