Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
docs: the node selects routers by /info labels, not at the handshake
Tomas Tormo334324bd1774
diff --git a/api/agentmesh.pb.go b/api/agentmesh.pb.goindex 7f86a0b1..90897485 100644--- a/api/agentmesh.pb.go+++ b/api/agentmesh.pb.go@@ -1997,8 +1997,8 @@ type RouterInfo struct {// The router's labels, the same labels as a node's: declared at// enrollment (agentmesh-router --label), signed by the control plane only// if the router's role allows them (PolicyRole.allowed_labels), and- // carried as label() facts in the router's credential, where a member- // verifies them at the handshake. A member selects routers by them+ // carried as label() facts in the router's credential. A member selects+ // routers by the labels listed here, before it connects// (--router-selector, every pair must match) or prefers routers by them// (--router-prefer). They place a router; they grant it nothing.Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`diff --git a/api/agentmesh.proto b/api/agentmesh.protoindex ac0e8d05..67d97032 100644--- a/api/agentmesh.proto+++ b/api/agentmesh.proto@@ -297,8 +297,8 @@ message RouterInfo {// The router's labels, the same labels as a node's: declared at// enrollment (agentmesh-router --label), signed by the control plane only// if the router's role allows them (PolicyRole.allowed_labels), and- // carried as label() facts in the router's credential, where a member- // verifies them at the handshake. A member selects routers by them+ // carried as label() facts in the router's credential. A member selects+ // routers by the labels listed here, before it connects// (--router-selector, every pair must match) or prefers routers by them// (--router-prefer). They place a router; they grant it nothing.map<string, string> labels = 3;diff --git a/sdk/js/src/gen/agentmesh_pb.ts b/sdk/js/src/gen/agentmesh_pb.tsindex 0b34214a..cec41542 100644--- a/sdk/js/src/gen/agentmesh_pb.ts+++ b/sdk/js/src/gen/agentmesh_pb.ts@@ -892,8 +892,8 @@ export type RouterInfo = Message<"agentmesh.v1.RouterInfo"> & {* The router's labels, the same labels as a node's: declared at* enrollment (agentmesh-router --label), signed by the control plane only* if the router's role allows them (PolicyRole.allowed_labels), and- * carried as label() facts in the router's credential, where a member- * verifies them at the handshake. A member selects routers by them+ * carried as label() facts in the router's credential. A member selects+ * routers by the labels listed here, before it connects* (--router-selector, every pair must match) or prefers routers by them* (--router-prefer). They place a router; they grant it nothing.*diff --git a/site/content/docs/concepts/authorization.md b/site/content/docs/concepts/authorization.mdindex 0042faf8..5eb7971a 100644--- a/site/content/docs/concepts/authorization.md+++ b/site/content/docs/concepts/authorization.md@@ -278,11 +278,12 @@ Labels are used in four places:- **A node choosing routers** sets `--router-selector key=value` to attachonly to routers that attest every pair, and `--router-prefer key=value`to attach to routers that attest more of those pairs before routers that- attest fewer. The control plane lists each router's labels on `/info`, so- the node chooses before it connects, and the node verifies them in the- router's credential at the handshake, so a router that does not attest- the selector is dropped. This places a node on routers; it grants the- routers nothing, and a call still reaches any peer on any router.+ attest fewer. The control plane lists on `/info` the labels it attested+ in each router's credential, and the node chooses from that list before+ it connects. The handshake checks that the router's credential is valid+ and holds the router role, but it does not check the labels again. This+ places a node on routers; it grants the routers nothing, and a call still+ reaches any peer on any router.The header, the operator floor and the router selector follow the samematching rule: a map of `key=value` pairs, one value per key, and the peer