Skip to content

Agent Mesh

policy: allowed_publish grants what a member may publish, deny by default

Antonio Ojea99076bc4f510
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
index 9dbc00ae..f22b8b36 100644
--- a/.github/workflows/deploy.yaml
+++ b/.github/workflows/deploy.yaml
@@ -469,10 +469,10 @@ jobs:
-H "Authorization: Bearer ${ADMIN_TOKEN}" \
-d '{
"roles": [
- {"name": "agentmesh-canary", "allowed_services": ["*"], "allowed_targets": ["*"]},
+ {"name": "agentmesh-canary", "allowed_services": ["*"], "allowed_publish": ["*"], "allowed_targets": ["*"]},
{"name": "mesh:role:router", "allowed_services": ["*"], "allowed_targets": ["*"]},
{"name": "mesh:role:node"},
- {"name": "public-mesh", "allowed_services": ["*"], "allowed_targets": ["*"]}
+ {"name": "public-mesh", "allowed_services": ["*"], "allowed_publish": ["*"], "allowed_targets": ["*"]}
],
"bindings": [
{"role": "agentmesh-canary", "members": ["user:system:serviceaccount:agentmesh-canary-'"${ENV_NAME}"':agentmesh-node-sa"]},
diff --git a/api/agentmesh.pb.go b/api/agentmesh.pb.go
index 04c52851..f75184d7 100644
--- a/api/agentmesh.pb.go
+++ b/api/agentmesh.pb.go
@@ -2275,9 +2275,17 @@ type PolicyRole struct {
// declaration into something the control plane is willing to sign.
AllowedLabels []string `protobuf:"bytes,5,rep,name=allowed_labels,json=allowedLabels,proto3" json:"allowed_labels,omitempty"`
// HTTP narrowing of allowed_services entries; see HTTPGrant.
- Http []*HTTPGrant `protobuf:"bytes,6,rep,name=http,proto3" json:"http,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
+ Http []*HTTPGrant `protobuf:"bytes,6,rep,name=http,proto3" json:"http,omitempty"`
+ // Services a member with this role may serve, in the syntax of
+ // allowed_services ("mcp://calc", "inference://*", "*"). A role serves
+ // nothing it is not granted here: a router keeps a member's record only
+ // for a service its credential grants, and a caller sends a request to
+ // a provider it found by name only when the provider's credential does.
+ // An egress destination needs no entry: served_by grants it to the
+ // nodes it selects.
+ AllowedPublish []string `protobuf:"bytes,7,rep,name=allowed_publish,json=allowedPublish,proto3" json:"allowed_publish,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *PolicyRole) Reset() {
@@ -2352,6 +2360,13 @@ func (x *PolicyRole) GetHttp() []*HTTPGrant {
return nil
}
+func (x *PolicyRole) GetAllowedPublish() []string {
+ if x != nil {
+ return x.AllowedPublish
+ }
+ return nil
+}
+
// HTTPGrant narrows one allowed_services entry to HTTP methods and paths.
// The control plane compiles it into granted_method and granted_path_* facts
// in the holder's credential and withholds the plain service grant for that
@@ -6127,7 +6142,7 @@ const file_api_agentmesh_proto_rawDesc = "" +
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
"\x05error\x18\x02 \x01(\tR\x05error\x12;\n" +
"\vexpire_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\n" +
- "expireTime\"\xef\x01\n" +
+ "expireTime\"\x98\x02\n" +
"\n" +
"PolicyRole\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12'\n" +
@@ -6135,7 +6150,8 @@ const file_api_agentmesh_proto_rawDesc = "" +
"\x10allowed_services\x18\x03 \x03(\tR\x0fallowedServices\x12%\n" +
"\x0ecustom_datalog\x18\x04 \x03(\tR\rcustomDatalog\x12%\n" +
"\x0eallowed_labels\x18\x05 \x03(\tR\rallowedLabels\x12+\n" +
- "\x04http\x18\x06 \x03(\v2\x17.agentmesh.v1.HTTPGrantR\x04http\"U\n" +
+ "\x04http\x18\x06 \x03(\v2\x17.agentmesh.v1.HTTPGrantR\x04http\x12'\n" +
+ "\x0fallowed_publish\x18\a \x03(\tR\x0eallowedPublish\"U\n" +
"\tHTTPGrant\x12\x18\n" +
"\aservice\x18\x01 \x01(\tR\aservice\x12\x18\n" +
"\amethods\x18\x02 \x03(\tR\amethods\x12\x14\n" +
diff --git a/api/agentmesh.proto b/api/agentmesh.proto
index 192a1fbb..7396648f 100644
--- a/api/agentmesh.proto
+++ b/api/agentmesh.proto
@@ -351,6 +351,14 @@ message PolicyRole {
repeated string allowed_labels = 5;
// HTTP narrowing of allowed_services entries; see HTTPGrant.
repeated HTTPGrant http = 6;
+ // Services a member with this role may serve, in the syntax of
+ // allowed_services ("mcp://calc", "inference://*", "*"). A role serves
+ // nothing it is not granted here: a router keeps a member's record only
+ // for a service its credential grants, and a caller sends a request to
+ // a provider it found by name only when the provider's credential does.
+ // An egress destination needs no entry: served_by grants it to the
+ // nodes it selects.
+ repeated string allowed_publish = 7;
}
// HTTPGrant narrows one allowed_services entry to HTTP methods and paths.
diff --git a/api/datalog.go b/api/datalog.go
index 3af85e44..a9dc15d4 100644
--- a/api/datalog.go
+++ b/api/datalog.go
@@ -165,6 +165,23 @@ const (
// Example Datalog: allow if service("mcp", "calculator"), granted_service_set("mcp", $set), $set.contains("calculator")
FactGrantedServiceSet = "granted_service_set"
+ // The granted_publish_* facts are the granted_service_* facts for the
+ // other direction: what a member may serve, as a role's allowed_publish
+ // grants it. A router verifies them before it keeps a member's record and
+ // a caller before it sends a request to a provider it found by name, with
+ // PublishPolicies over a publish($type, $name) fact. They carry the same
+ // terms as their granted_service_* counterpart.
+ FactGrantedPublishAllTypes = "granted_publish_all_types"
+ FactGrantedPublishAll = "granted_publish_all"
+ FactGrantedPublishSuffix = "granted_publish_suffix"
+ FactGrantedPublishPrefix = "granted_publish_prefix"
+ FactGrantedPublishExact = "granted_publish_exact"
+ FactGrantedPublishSet = "granted_publish_set"
+
+ // FactPublish is the service a verifier asks about: publish("mcp", "calc").
+ // Added by the verifier, never carried in a token.
+ FactPublish = "publish"
+
// FactGrantedTargetAllTypes allows target access to all network targets (unrestricted).
// Contains: biscuit.Bool(true) (marker fact)
FactGrantedTargetAllTypes = "granted_target_all_types"
@@ -419,6 +436,13 @@ var (
// AllowIfTruePolicy is the static policy "allow if true" used during token verification.
AllowIfTruePolicy biscuit.Policy
+ // PublishPolicies decide whether a member may serve a service: over its
+ // own credential and a publish($type, $name) fact, one allows when a
+ // granted_publish_* fact covers the service, and no policy matching is a
+ // refusal. The router runs them before it keeps a member's record, a
+ // caller before it sends a request to a provider it found by name.
+ PublishPolicies []biscuit.Policy
+
// BaselineSources is the Datalog text every variable above is parsed from.
// The SDKs embed this text (see hack/gen-sdk-datalog) so that a provider
// written in another language evaluates the same authorizer as agentmesh-node.
@@ -430,6 +454,8 @@ var (
type DatalogSources struct {
// Policies are the service allow policies (BaselinePolicies).
Policies []string `json:"policies"`
+ // PublishPolicies decide whether a member may serve a service (PublishPolicies).
+ PublishPolicies []string `json:"publish_policies"`
// Rules derive allow_network_target from target grants (BaselineRules).
Rules []string `json:"rules"`
// HTTPRules derive service grants from narrowed grants (BaselineHTTPRules).
@@ -482,6 +508,24 @@ func init() {
BaselinePolicies = append(BaselinePolicies, p)
}
+ // Publish policies: the service policies with publish() for service()
+ // and granted_publish_* for granted_service_*.
+ BaselineSources.PublishPolicies = []string{
+ fmt.Sprintf(`allow if %s($type, $name), %s($type, $name)`, FactPublish, FactGrantedPublishExact),
+ fmt.Sprintf(`allow if %s($type, $name), %s($type, $set), $set.contains($name)`, FactPublish, FactGrantedPublishSet),
+ fmt.Sprintf(`allow if %s($type, $name), %s($type, $prefix), $name.starts_with($prefix)`, FactPublish, FactGrantedPublishPrefix),
+ fmt.Sprintf(`allow if %s($type, $name), %s($type, $suffix), $name.ends_with($suffix)`, FactPublish, FactGrantedPublishSuffix),
+ fmt.Sprintf(`allow if %s($type, $name), %s($type)`, FactPublish, FactGrantedPublishAll),
+ fmt.Sprintf(`allow if %s($type, $name), %s(true)`, FactPublish, FactGrantedPublishAllTypes),
+ }
+ for i, pStr := range BaselineSources.PublishPolicies {
+ p, err := parser.FromStringPolicy(pStr)
+ if err != nil {
+ panic(fmt.Sprintf("failed to parse publish policy %d: %v", i, err))
+ }
+ PublishPolicies = append(PublishPolicies, p)
+ }
+
// 2. Target Evaluation Rules
// These rules satisfy the check if allow_network_target($fact, $val) injected by the control plane.
BaselineSources.Rules = []string{
@@ -761,6 +805,34 @@ func isExactTarget(targetStr string) (tFact, tVal string, exact bool) {
return tFact, tVal, BuildTargetDatalogFact(targetStr).Name == FactGrantedTargetExact
}
+// publishFactNames maps each granted_service_* fact to its granted_publish_*
+// counterpart.
+var publishFactNames = map[string]string{
+ FactGrantedServiceAllTypes: FactGrantedPublishAllTypes,
+ FactGrantedServiceAll: FactGrantedPublishAll,
+ FactGrantedServiceSuffix: FactGrantedPublishSuffix,
+ FactGrantedServicePrefix: FactGrantedPublishPrefix,
+ FactGrantedServiceExact: FactGrantedPublishExact,
+ FactGrantedServiceSet: FactGrantedPublishSet,
+}
+
+// BuildPublishDatalogFacts translates a role's allowed_publish patterns into
+// granted_publish_* facts, the same way and with the same terms as
+// BuildServiceDatalogFacts does for allowed_services.
+func BuildPublishDatalogFacts(services []string) []biscuit.Fact {
+ facts := BuildServiceDatalogFacts(services)
+ for i := range facts {
+ facts[i].Name = publishFactNames[facts[i].Name]
+ }
+ return facts
+}
+
+// PublishFact is the fact a verifier adds to ask whether a credential grants
+// serving a service: publish("<type>", "<name>").
+func PublishFact(svcType, svcName string) biscuit.Fact {
+ return biscuit.Fact{Predicate: biscuit.Predicate{Name: FactPublish, IDs: []biscuit.Term{biscuit.String(svcType), biscuit.String(svcName)}}}
+}
+
// BuildServiceDatalogFacts translates a list of service patterns into a minimal set of Datalog facts.
// Exact-match entries are grouped by service type into a single granted_service_set fact each, so
// token/world fact counts stay flat regardless of how many exact services a role grants. Wildcard,
diff --git a/api/egress.go b/api/egress.go
index 578cbfaa..95ecbfd7 100644
--- a/api/egress.go
+++ b/api/egress.go
@@ -21,6 +21,7 @@ import (
"strings"
"github.com/eclipse-biscuit/biscuit-go/v2"
+ "google.golang.org/protobuf/proto"
)
// credentialNameSyntax bounds a credential name to one safe file name: the
@@ -228,6 +229,43 @@ func EgressServedBy(d *EgressDestination, roles []string, labels map[string]stri
return false
}
+// WithEgressPublish returns policyRoles with the egress destinations a node
+// with these roles and labels serves added to what it may publish: served_by
+// is who may serve a destination, and the record the node announces for it
+// needs the grant like any other. The role entries are copied, never
+// changed in place; a role the policy does not define gets an entry that
+// grants publishing alone.
+func WithEgressPublish(policyRoles []*PolicyRole, egress []*EgressDestination, roles []string, labels map[string]string) []*PolicyRole {
+ var served []string
+ for _, d := range egress {
+ if d == nil || ValidateEgressName(d.GetName()) != nil {
+ continue
+ }
+ if EgressServedBy(d, roles, labels) {
+ served = append(served, ServiceTypeStringEgress+"://"+d.GetName())
+ }
+ }
+ if len(served) == 0 || len(roles) == 0 {
+ return policyRoles
+ }
+ out := make([]*PolicyRole, 0, len(policyRoles)+1)
+ found := false
+ for _, pr := range policyRoles {
+ if pr != nil && pr.GetName() == roles[0] {
+ cp := proto.Clone(pr).(*PolicyRole)
+ cp.AllowedPublish = append(cp.AllowedPublish, served...)
+ out = append(out, cp)
+ found = true
+ continue
+ }
+ out = append(out, pr)
+ }
+ if !found {
+ out = append(out, &PolicyRole{Name: roles[0], AllowedPublish: served})
+ }
+ return out
+}
+
// BuildEgressServingRules grants each destination to the nodes that serve it:
// granted_service_exact("egress", name) <- role(r) or <- label(k, v) for every
// served_by entry. The serving node evaluates its own credential when a local
diff --git a/api/egress_test.go b/api/egress_test.go
index c10cd053..de1a98b7 100644
--- a/api/egress_test.go
+++ b/api/egress_test.go
@@ -151,3 +151,36 @@ func TestBuildEgressServingRules(t *testing.T) {
t.Fatalf("rendered rules do not parse back: %v", err)
}
}
+
+// served_by is who serves a destination, so the nodes it selects get the
+// publish grant for egress://<name> with their roles, and nobody else.
+func TestWithEgressPublish(t *testing.T) {
+ policyRoles := []*PolicyRole{{Name: "node", AllowedPublish: []string{"mcp://calc"}}, {Name: "other"}}
+ egress := []*EgressDestination{
+ {Name: "api.github.com", ServedBy: []string{"node"}},
+ {Name: "mam.internal.example.com", ServedBy: []string{"site=eu"}},
+ {Name: "nobody.example", ServedBy: []string{"pep"}},
+ }
+ got := WithEgressPublish(policyRoles, egress, []string{"node"}, map[string]string{"site": "eu"})
+ var node *PolicyRole
+ for _, r := range got {
+ if r.GetName() == "node" {
+ node = r
+ }
+ }
+ want := []string{"mcp://calc", "egress://api.github.com", "egress://mam.internal.example.com"}
+ if node == nil || !slices.Equal(node.AllowedPublish, want) {
+ t.Fatalf("node role publishes %v, want %v", node.GetAllowedPublish(), want)
+ }
+ if slices.Equal(policyRoles[0].AllowedPublish, want) {
+ t.Fatal("the policy's own role entry was changed in place")
+ }
+ if len(WithEgressPublish(policyRoles, egress, []string{"other"}, nil)) != len(policyRoles) || len(WithEgressPublish(policyRoles, egress, []string{"other"}, nil)[1].AllowedPublish) != 0 {
+ t.Fatal("a role no destination selects got a grant")
+ }
+ // A role the policy does not define gets an entry with the grant alone.
+ got = WithEgressPublish(nil, egress, []string{"mesh:role:node"}, map[string]string{"site": "eu"})
+ if len(got) != 1 || got[0].GetName() != "mesh:role:node" || !slices.Equal(got[0].AllowedPublish, []string{"egress://mam.internal.example.com"}) {
+ t.Fatalf("undefined role: got %v", got)
+ }
+}
diff --git a/charts/agentmesh/templates/bootstrap-job.yaml b/charts/agentmesh/templates/bootstrap-job.yaml
index b722b4cc..fd422455 100644
--- a/charts/agentmesh/templates/bootstrap-job.yaml
+++ b/charts/agentmesh/templates/bootstrap-job.yaml
@@ -118,9 +118,9 @@ spec:
-d '{
"roles": [
{"name": "mesh-admin", "allowed_services": ["*"], "allowed_targets": ["*"]},
- {"name": "mesh:role:agentmesh-box", "allowed_services": ["*"], "allowed_targets": ["*"]},
+ {"name": "mesh:role:agentmesh-box", "allowed_services": ["*"], "allowed_publish": ["*"], "allowed_targets": ["*"]},
{"name": "mesh:role:router", "allowed_services": ["*"], "allowed_targets": ["*"]},
- {"name": "mesh:role:node", "allowed_services": {{ toJson .Values.bootstrap.nodeServices }}, "allowed_targets": ["*"], "allowed_labels": {{ toJson .Values.bootstrap.nodeLabels }}}
+ {"name": "mesh:role:node", "allowed_services": {{ toJson .Values.bootstrap.nodeServices }}, "allowed_publish": {{ toJson .Values.bootstrap.nodePublish }}, "allowed_targets": ["*"], "allowed_labels": {{ toJson .Values.bootstrap.nodeLabels }}}
],
"bindings": {{ toJson $bindings }}
}' \
diff --git a/charts/agentmesh/tests/bootstrap-job_test.yaml b/charts/agentmesh/tests/bootstrap-job_test.yaml
index 4c8e064c..251d0e51 100644
--- a/charts/agentmesh/tests/bootstrap-job_test.yaml
+++ b/charts/agentmesh/tests/bootstrap-job_test.yaml
@@ -63,7 +63,7 @@ tests:
asserts:
- matchRegex:
path: spec.template.spec.containers[0].args[0]
- pattern: '"name": "mesh:role:node", "allowed_services": \[\]'
+ pattern: '"name": "mesh:role:node", "allowed_services": \[\], "allowed_publish": \[\]'
- it: no identity may enroll as a node by default (fail closed)
documentSelector:
@@ -93,10 +93,11 @@ tests:
set:
bootstrap:
nodeServices: ["mcp://calculator", "system://mesh.catalog"]
+ nodePublish: ["mcp://calculator"]
asserts:
- matchRegex:
path: spec.template.spec.containers[0].args[0]
- pattern: '"name": "mesh:role:node", "allowed_services": \["mcp://calculator","system://mesh.catalog"\]'
+ pattern: '"name": "mesh:role:node", "allowed_services": \["mcp://calculator","system://mesh.catalog"\], "allowed_publish": \["mcp://calculator"\]'
- it: node role grants only the configured label patterns
documentSelector:
diff --git a/charts/agentmesh/values.yaml b/charts/agentmesh/values.yaml
index 86acf8ac..7e158efc 100644
--- a/charts/agentmesh/values.yaml
+++ b/charts/agentmesh/values.yaml
@@ -213,6 +213,12 @@ bootstrap:
# until a policy grants it (fail closed); never use ["*"] outside an
# intentionally public mesh.
nodeServices: []
+ # Services mesh:role:node may serve, as "type://name" entries (e.g.
+ # "mcp://calculator"): what a node may announce to the directory and what
+ # callers accept it as a provider of. Empty means nodes can publish nothing
+ # until a policy grants it (fail closed); the same caution as nodeServices
+ # applies to ["*"].
+ nodePublish: []
# Label patterns ("key=value" or "key=*") mesh:role:node may attest with the
# labels in its agentmesh-node.yaml. Empty means nodes cannot enroll with any label
# (fail closed).
diff --git a/development/examples/multi-tier-guardrails/policy.json b/development/examples/multi-tier-guardrails/policy.json
index 6c618acd..d8c2b056 100644
--- a/development/examples/multi-tier-guardrails/policy.json
+++ b/development/examples/multi-tier-guardrails/policy.json
@@ -9,6 +9,7 @@
"mcp://orders-db",
"egress://api.github.com"
],
+ "allowed_publish": ["a2a://support.acme", "inference://office-llm", "mcp://orders-db"],
"allowed_targets": ["*"],
"allowed_labels": [
"env=staging",
diff --git a/development/examples/sandboxed-agent/policy.json b/development/examples/sandboxed-agent/policy.json
index a501732c..7c31b3aa 100644
--- a/development/examples/sandboxed-agent/policy.json
+++ b/development/examples/sandboxed-agent/policy.json
@@ -3,6 +3,7 @@
{
"name": "mesh:role:node",
"allowed_services": ["system://mesh.catalog"],
+ "allowed_publish": ["inference://office-llm", "mcp://tools"],
"allowed_targets": ["*"],
"allowed_labels": ["site=office"]
},
diff --git a/development/kind/run.sh b/development/kind/run.sh
index 0b11a6ad..8225f359 100755
--- a/development/kind/run.sh
+++ b/development/kind/run.sh
@@ -93,9 +93,10 @@ gateway_ip() {
# deploy_chart [extra --set flags]: later flags win, so phase 2 overrides phase 1.
# TLS verification is skipped because one issuer is the kind cluster's own API server,
# served with a self-signed cert.
-# bootstrap.nodeServices is fail closed by default; this is a local dev mesh whose
-# nodes host whatever example service is being tested, so grant them everything
-# explicitly here rather than weakening the chart default.
+# bootstrap.nodeServices and bootstrap.nodePublish are fail closed by default;
+# this is a local dev mesh whose nodes host whatever example service is being
+# tested, so grant them everything explicitly here rather than weakening the
+# chart default.
deploy_chart() {
"${HELM}" --kube-context "${KCTX}" upgrade --install agentmesh "${PROJECT_ROOT}/charts/agentmesh" --timeout 10m \
--namespace "${NAMESPACE}" \
@@ -104,6 +105,7 @@ deploy_chart() {
--set controlPlane.allowedAudiences="${ALLOWED_AUDIENCES//,/\\,}" \
--set controlPlane.insecureSkipTlsVerify=true \
--set 'bootstrap.nodeServices={*}' \
+ --set 'bootstrap.nodePublish={*}' \
--set 'bootstrap.nodeLabels={*}' \
--set 'bootstrap.nodeMembers={mesh:system:authenticated}' \
--set gateway.enabled=true \
diff --git a/hack/gen-sdk-datalog/main.go b/hack/gen-sdk-datalog/main.go
index b44ac193..972cf8c7 100644
--- a/hack/gen-sdk-datalog/main.go
+++ b/hack/gen-sdk-datalog/main.go
@@ -58,6 +58,8 @@ type artifact struct {
FactTime string `json:"fact_time"`
FactRole string `json:"fact_role"`
FactTargetFact string `json:"fact_target_fact"`
+ FactPublish string `json:"fact_publish"`
+ CatalogTarget string `json:"catalog_target"`
FactTARBlock string `json:"fact_tar_block"`
TARBlockSourcePattern string `json:"tar_block_source_pattern"`
HTTPMethodSyntax string `json:"http_method_syntax"`
@@ -714,6 +716,8 @@ func main() {
FactTime: api.FactTime,
FactRole: api.FactRole,
FactTargetFact: api.FactTargetFact,
+ FactPublish: api.FactPublish,
+ CatalogTarget: api.CatalogTarget,
FactTARBlock: api.FactTARBlock,
TARBlockSourcePattern: api.TARBlockSourcePattern,
HTTPMethodSyntax: api.HTTPMethodSyntaxPattern(),
diff --git a/internal/controlplane/server.go b/internal/controlplane/server.go
index ce2ac2d5..f90697c8 100644
--- a/internal/controlplane/server.go
+++ b/internal/controlplane/server.go
@@ -862,7 +862,7 @@ func (s *Server) HandleRegister(w http.ResponseWriter, r *http.Request) {
if sessionExpiresAt.Before(biscuitExpiry) {
biscuitExpiry = sessionExpiresAt
}
- biscuitData, _, err := identity.MintBiscuitToken(privKey, claims, token, pID, biscuitExpiry, finalRoles, policyRoles, req.Labels)
+ biscuitData, _, err := identity.MintBiscuitToken(privKey, claims, token, pID, biscuitExpiry, finalRoles, s.mintRoles(r.Context(), policyRoles, finalRoles, req.Labels), req.Labels)
if err != nil {
logger.Errorw("Biscuit minting failed", "peer_id", canonical, "error", err)
http.Error(w, "Failed to mint biscuit: "+err.Error(), http.StatusForbidden)
@@ -1226,7 +1226,7 @@ func (s *Server) HandleRefresh(w http.ResponseWriter, r *http.Request) {
finalRoles = append(finalRoles, customAccessRoles...)
nodeRecord.Labels = labelsStillAllowed(canonical, allowedLabelPatterns(finalRoles, policyRoles), nodeRecord.Labels)
- bBytes, _, err := identity.MintBiscuitToken(privKey, claims, nil, pID, biscuitExpiry, finalRoles, policyRoles, nodeRecord.Labels)
+ bBytes, _, err := identity.MintBiscuitToken(privKey, claims, nil, pID, biscuitExpiry, finalRoles, s.mintRoles(r.Context(), policyRoles, finalRoles, nodeRecord.Labels), nodeRecord.Labels)
if err != nil {
logger.Errorf("Failed to mint refreshed token for node %s: %v", nodeRecord.PeerID, err)
http.Error(w, "Internal server error", http.StatusInternalServerError)
@@ -1237,7 +1237,7 @@ func (s *Server) HandleRefresh(w http.ResponseWriter, r *http.Request) {
// Bootstrap node
finalRoles, _ := nodeRoles(nodeRecord, bindings)
nodeRecord.Labels = labelsStillAllowed(canonical, allowedLabelPatterns(finalRoles, policyRoles), nodeRecord.Labels)
- bBytes, err := identity.MintBootstrapBiscuitToken(privKey, pID, nodeRecord.Role, biscuitExpiry, policyRoles, nodeRecord.Labels)
+ bBytes, err := identity.MintBootstrapBiscuitToken(privKey, pID, nodeRecord.Role, biscuitExpiry, s.mintRoles(r.Context(), policyRoles, []string{nodeRecord.Role}, nodeRecord.Labels), nodeRecord.Labels)
if err != nil {
logger.Errorf("Failed to mint refreshed token for node %s: %v", nodeRecord.PeerID, err)
http.Error(w, "Internal server error", http.StatusInternalServerError)
@@ -1763,6 +1763,19 @@ func (s *Server) HandleEgress(w http.ResponseWriter, r *http.Request) {
_, _ = w.Write(respData)
}
+// mintRoles is policyRoles as a credential for a member with these roles
+// and labels is minted from: with the egress destinations served_by grants
+// it added to what it may publish. A failure to read the destinations
+// mints without them; the next refresh tries again.
+func (s *Server) mintRoles(ctx context.Context, policyRoles []*api.PolicyRole, roles []string, labels map[string]string) []*api.PolicyRole {
+ egress, err := s.store.GetEgressDestinations(ctx)
+ if err != nil {
+ logger.Warnf("Minting without egress publish grants: destinations not read: %v", err)
+ return policyRoles
+ }
+ return api.WithEgressPublish(policyRoles, egress, roles, labels)
+}
+
// nodeRoles is the role set a refresh would mint for the node: the enrolled
// role plus the custom roles its identity resolves to, from the bindings.
func nodeRoles(nodeRecord *storage.EnrolledNode, bindings []*api.PolicyBinding) ([]string, error) {
@@ -2128,7 +2141,7 @@ func (s *Server) HandleEnroll(w http.ResponseWriter, r *http.Request) {
http.Error(w, "Internal server error", http.StatusInternalServerError)
return
}
- biscuitBytes, err := identity.MintBootstrapBiscuitToken(privKey, pID, tokenRecord.Role, time.Now().Add(s.config.BiscuitTTL), policyRoles, req.Labels)
+ biscuitBytes, err := identity.MintBootstrapBiscuitToken(privKey, pID, tokenRecord.Role, time.Now().Add(s.config.BiscuitTTL), s.mintRoles(ctx, policyRoles, []string{tokenRecord.Role}, req.Labels), req.Labels)
if err != nil {
logger.Errorf("Failed to mint bootstrap biscuit: %v", err)
http.Error(w, "Internal server error", http.StatusInternalServerError)
@@ -2740,7 +2753,7 @@ func (s *Server) HandleAdminEnrollmentAction(w http.ResponseWriter, r *http.Requ
return
}
- biscuitBytes, err := identity.MintBootstrapBiscuitToken(privKey, pID, tokenRecord.Role, time.Now().Add(s.config.BiscuitTTL), policyRoles, enrollReq.Labels)
+ biscuitBytes, err := identity.MintBootstrapBiscuitToken(privKey, pID, tokenRecord.Role, time.Now().Add(s.config.BiscuitTTL), s.mintRoles(ctx, policyRoles, []string{tokenRecord.Role}, enrollReq.Labels), enrollReq.Labels)
if err != nil {
logger.Errorf("Failed to mint bootstrap biscuit: %v", err)
http.Error(w, "Internal server error", http.StatusInternalServerError)
@@ -3019,7 +3032,7 @@ func (s *Server) remintApprovedBootstrapBiscuit(ctx context.Context, existingReq
biscuitExpiry := time.Now().Add(s.config.BiscuitTTL)
allowedLabels := filterAllowedLabels(allowedLabelPatterns(s.nodeRoles(ctx, nodeRecord), policyRoles), nodeRecord.Labels)
- biscuitBytes, err := identity.MintBootstrapBiscuitToken(privKey, pID, nodeRecord.Role, biscuitExpiry, policyRoles, allowedLabels)
+ biscuitBytes, err := identity.MintBootstrapBiscuitToken(privKey, pID, nodeRecord.Role, biscuitExpiry, s.mintRoles(ctx, policyRoles, []string{nodeRecord.Role}, allowedLabels), allowedLabels)
if err != nil {
return nil, nil, fmt.Errorf("failed to mint refreshed bootstrap biscuit: %w", err)
}
@@ -3557,6 +3570,11 @@ func validatePolicyConfig(req *api.PolicyConfig) error {
return fmt.Errorf("in role %s: %w", r.Name, err)
}
}
+ for _, svc := range r.AllowedPublish {
+ if err := api.ValidateServiceFormat(svc); err != nil {
+ return fmt.Errorf("invalid allowed_publish %q in role %s: %w", svc, r.Name, err)
+ }
+ }
if err := api.ValidateHTTPGrants(r.Http, r.AllowedServices); err != nil {
return fmt.Errorf("in role %s: %w", r.Name, err)
}
@@ -3577,6 +3595,7 @@ func validatePolicyConfig(req *api.PolicyConfig) error {
// sum each role's contribution rather than relying on assumptions about
// which roles are mutually exclusive for a given identity.
factBudget += len(api.BuildServiceDatalogFacts(r.AllowedServices))
+ factBudget += len(api.BuildPublishDatalogFacts(r.AllowedPublish))
factBudget += len(api.BuildTargetDatalogFacts(r.AllowedTargets))
factBudget += len(r.CustomDatalog)
for _, g := range r.Http {
diff --git a/internal/identity/biscuit.go b/internal/identity/biscuit.go
index 6d206ae7..9a5de97d 100644
--- a/internal/identity/biscuit.go
+++ b/internal/identity/biscuit.go
@@ -436,6 +436,9 @@ func mintBiscuitWithBindingAndRand(rng io.Reader, signingKey ed25519.PrivateKey,
// Narrowed grants (PolicyRole.http) are minted per entry: they are keyed
// by the entry they narrow, so there is nothing to merge across roles.
var allHTTP []*api.HTTPGrant
+ // What the holder may serve. A delegated subject serves nothing: it is a
+ // caller the actor node speaks for, not a member that publishes.
+ var allPublish []string
for _, role := range roles {
if err := addFact(biscuit.Fact{Predicate: biscuit.Predicate{
Name: api.FactRole,
@@ -463,6 +466,9 @@ func mintBiscuitWithBindingAndRand(rng io.Reader, signingKey ed25519.PrivateKey,
allServices = append(allServices, plainServices...)
allHTTP = append(allHTTP, narrowed...)
allTargets = append(allTargets, pr.AllowedTargets...)
+ if !delegated {
+ allPublish = append(allPublish, pr.AllowedPublish...)
+ }
for _, customEntry := range pr.CustomDatalog {
trimmed := strings.TrimRight(strings.TrimSpace(customEntry), ";")
@@ -504,6 +510,11 @@ func mintBiscuitWithBindingAndRand(rng io.Reader, signingKey ed25519.PrivateKey,
errs = append(errs, fmt.Errorf("failed to add target fact: %w", err))
}
}
+ for _, fact := range api.BuildPublishDatalogFacts(allPublish) {
+ if err := addFact(fact); err != nil {
+ errs = append(errs, fmt.Errorf("failed to add publish fact: %w", err))
+ }
+ }
// No policy means no grants. A mesh with no roles defined used to mint
// every non-router an unrestricted token; a fresh control plane, or one
@@ -805,6 +816,25 @@ func RequireRole(b *biscuit.Biscuit, key ed25519.PublicKey, expectedRole string,
return nil
}
+// RequirePublish reports whether the credential grants serving the service
+// svcType://svcName: api.PublishPolicies over the token's granted_publish_*
+// facts and a publish() fact. b must have passed verification and key must
+// be the key that verified it; what is decided here is the grant alone.
+func RequirePublish(b *biscuit.Biscuit, key ed25519.PublicKey, svcType, svcName string, timeout time.Duration) error {
+ authorizer, err := b.Authorizer(key, AuthorizerOptions(timeout)...)
+ if err != nil {
+ return fmt.Errorf("failed to create authorizer: %w", err)
+ }
+ authorizer.AddFact(api.PublishFact(svcType, svcName))
+ for _, p := range api.PublishPolicies {
+ authorizer.AddPolicy(p)
+ }
+ if err := authorizer.Authorize(); err != nil {
+ return fmt.Errorf("credential does not grant serving %s://%s", svcType, svcName)
+ }
+ return nil
+}
+
// VerifiedBiscuitClaims holds the authority facts, effective expiration,
// revocation IDs, and TaskAuthorizationRule chain extracted from a verified
// Biscuit token.
diff --git a/internal/identity/biscuit_test.go b/internal/identity/biscuit_test.go
index 38f3fe4e..5285eff4 100644
--- a/internal/identity/biscuit_test.go
+++ b/internal/identity/biscuit_test.go
@@ -764,3 +764,61 @@ func TestVerifyBiscuitAndGetExpiry(t *testing.T) {
t.Error("token bound to another peer admitted")
}
}
+
+// A role's allowed_publish is minted as granted_publish_* facts, which
+// RequirePublish decides with api.PublishPolicies: the same patterns as
+// allowed_services, and the same matching. A delegated subject gets none:
+// it is a caller the actor speaks for, not a member that serves.
+func TestMintBiscuitToken_PublishFacts(t *testing.T) {
+ pub, priv, err := ed25519.GenerateKey(rand.Reader)
+ if err != nil {
+ t.Fatal(err)
+ }
+ p := peer.ID("publisher")
+ roles := []*api.PolicyRole{{Name: "publisher", AllowedPublish: []string{"mcp://calc", "mcp://weather", "inference://*", "a2a://*.agents", "mcp://tools.*"}}}
+ data, err := MintBootstrapBiscuitToken(priv, p, "publisher", time.Now().Add(time.Hour), roles, nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ b, err := biscuit.Unmarshal(data)
+ if err != nil {
+ t.Fatal(err)
+ }
+ for _, tc := range []struct {
+ svcType, svcName string
+ granted bool
+ }{
+ {"mcp", "calc", true},
+ {"mcp", "weather", true},
+ {"mcp", "clock", false},
+ {"inference", "anything", true},
+ {"a2a", "helper.agents", true},
+ {"a2a", "helper", false},
+ {"mcp", "tools.v2", true},
+ {"mcp", "tools", false},
+ {"egress", "api.github.com", false},
+ } {
+ err := RequirePublish(b, pub, tc.svcType, tc.svcName, testTimeout)
+ if (err == nil) != tc.granted {
+ t.Errorf("RequirePublish(%s://%s) = %v, want granted %v", tc.svcType, tc.svcName, err, tc.granted)
+ }
+ }
+
+ none, err := MintBootstrapBiscuitToken(priv, p, "publisher", time.Now().Add(time.Hour), nil, nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ nb, _ := biscuit.Unmarshal(none)
+ if err := RequirePublish(nb, pub, "mcp", "calc", testTimeout); err == nil {
+ t.Error("a credential minted under no policy role grants publishing nothing")
+ }
+
+ delegated, err := MintDelegatedBiscuitToken(priv, jwt.MapClaims{"sub": "user"}, p, time.Now().Add(time.Hour), []string{"publisher"}, roles, nil, false)
+ if err != nil {
+ t.Fatal(err)
+ }
+ db, _ := biscuit.Unmarshal(delegated)
+ if err := RequirePublish(db, pub, "mcp", "calc", testTimeout); err == nil {
+ t.Error("a delegated credential grants publishing nothing")
+ }
+}
diff --git a/internal/node/a2a_service.go b/internal/node/a2a_service.go
index 6f1a9617..14c1101a 100644
--- a/internal/node/a2a_service.go
+++ b/internal/node/a2a_service.go
@@ -115,7 +115,7 @@ func a2aEgressGate(node *AgentMeshNode, w http.ResponseWriter, r *http.Request,
http.Error(w, "Invalid peer ID", http.StatusBadRequest)
return r, false
}
- if err := node.VerifyPeerLabels(r.Context(), pid, required); err != nil {
+ if err := node.VerifyProvider(r.Context(), pid, required, route.serviceType+"://"+route.serviceName); err != nil {
logger.Warnf("[A2A] label gate refused egress to %s: %v", route.peerID, err)
text, status := labelGateStatus(err, "Required labels not attested by provider")
http.Error(w, text, status)
diff --git a/internal/node/egress_tunnel.go b/internal/node/egress_tunnel.go
index 1d5ced50..551c1d13 100644
--- a/internal/node/egress_tunnel.go
+++ b/internal/node/egress_tunnel.go
@@ -429,7 +429,7 @@ func handleConnectTunnel(node *AgentMeshNode, w http.ResponseWriter, r *http.Req
if decErr != nil {
continue
}
- if err := node.VerifyPeerLabels(r.Context(), targetPeer, requiredLabels); err != nil {
+ if err := node.VerifyProvider(r.Context(), targetPeer, requiredLabels, api.ServiceTypeStringEgress+"://"+host); err != nil {
logger.Warnf("[Egress] CONNECT label gate refused egress to %s: %v", targetPeer, err)
denied = denied || !errors.Is(err, ErrProviderUnreachable)
continue
diff --git a/internal/node/labels_gate.go b/internal/node/labels_gate.go
index 293e9bf2..80ecee36 100644
--- a/internal/node/labels_gate.go
+++ b/internal/node/labels_gate.go
@@ -99,6 +99,11 @@ const (
// is the mesh's state and a caller may retry it; the second is a verdict.
var ErrProviderUnreachable = errors.New("provider unreachable")
+// ErrProviderNotGranted marks a provider whose credential does not grant
+// serving the service the call names: it is enrolled and reachable, and
+// not who the policy says serves that name.
+var ErrProviderNotGranted = errors.New("provider not granted the service")
+
// How reaching a provider for its credential went; the label values of
// providerReachTotal. The caller sees one 502 for all of the failures, so
// the counter tells them apart: the relay refusing the circuit, the dial
@@ -198,19 +203,29 @@ func (n *AgentMeshNode) egressFloor() map[string]string {
return n.nodeConfig.EgressRequireLabels
}
-// VerifyPeerLabels ensures the peer holds control-plane-attested labels
+// VerifyPeerLabels is VerifyProvider for a peer reached for no named
+// service: its catalog, or a call that names the peer alone.
+func (n *AgentMeshNode) VerifyPeerLabels(ctx context.Context, peerID peer.ID, required map[string]string) error {
+ return n.VerifyProvider(ctx, peerID, required, "")
+}
+
+// VerifyProvider ensures the peer is a provider this node may send a request
+// to: it holds a control-plane-attested credential bound to it, with labels
// satisfying every pair of the caller's requirement and every pair of the
-// operator's egress floor. Positive verdicts are cached.
+// operator's egress floor, and, when the call names a service
+// ("<type>://<name>"), one that grants serving it: a member that announced a
+// name it may not serve is refused here whatever the directory says.
+// Positive verdicts are cached.
//
// The gate runs whenever either exists. A caller that requires nothing is
// still held to the floor — the whole point of a floor is that the party being
// constrained does not get to opt out of it by saying nothing.
-func (n *AgentMeshNode) VerifyPeerLabels(ctx context.Context, peerID peer.ID, required map[string]string) error {
+func (n *AgentMeshNode) VerifyProvider(ctx context.Context, peerID peer.ID, required map[string]string, service string) error {
floor := n.egressFloor()
// No early return for an empty requirement: with nothing to attest this
// still verifies that the peer holds a control-plane-signed biscuit bound
// to it, which is what makes a discovered peer a provider at all.
- key := labelGateKey(peerID, required, floor)
+ key := labelGateKey(peerID, required, floor) + "=svc=" + service
if until, ok := n.peerLabelGate.Get(key); ok && time.Now().Before(until) {
return nil
}
@@ -221,7 +236,7 @@ func (n *AgentMeshNode) VerifyPeerLabels(ctx context.Context, peerID peer.ID, re
return fmt.Errorf("provider %s labels unverifiable: %w: %w", peerID, ErrProviderUnreachable, err)
}
providerReachTotal.WithLabelValues(reachOK).Inc()
- if err := n.checkPeerLabels(providerBiscuit, peerID, required); err != nil {
+ if err := n.checkProvider(providerBiscuit, peerID, required, service); err != nil {
return err
}
@@ -229,10 +244,16 @@ func (n *AgentMeshNode) VerifyPeerLabels(ctx context.Context, peerID peer.ID, re
return nil
}
-// checkPeerLabels verifies the provider's biscuit (control-plane signature,
-// expiry, binding to peerID) and evaluates the caller's requirement and the
-// operator's egress floor against its attested facts.
+// checkPeerLabels is checkProvider for no named service.
func (n *AgentMeshNode) checkPeerLabels(providerBiscuit []byte, peerID peer.ID, required map[string]string) error {
+ return n.checkProvider(providerBiscuit, peerID, required, "")
+}
+
+// checkProvider verifies the provider's biscuit (control-plane signature,
+// expiry, binding to peerID) and evaluates the caller's requirement, the
+// operator's egress floor and, for a named service, the publish grant
+// against its attested facts.
+func (n *AgentMeshNode) checkProvider(providerBiscuit []byte, peerID peer.ID, required map[string]string, service string) error {
floor := n.egressFloor()
if len(providerBiscuit) == 0 {
return fmt.Errorf("provider %s returned no identity biscuit; not an enrolled peer (required labels %v, egress floor %v)", peerID, required, floor)
@@ -286,6 +307,16 @@ func (n *AgentMeshNode) checkPeerLabels(providerBiscuit []byte, peerID peer.ID,
}
return fmt.Errorf("provider %s does not attest every label of %v: %w", peerID, required, err)
}
+ if service != "" && service != "system://"+api.CatalogTarget {
+ // The catalog is every node's own and names no published service.
+ svcType, svcName := api.ParseServiceTarget(service)
+ if svcType == "" || svcName == "" {
+ return fmt.Errorf("service %q must be <type>://<name>", service)
+ }
+ if err := identity.RequirePublish(b, key, svcType, svcName, n.BiscuitTimeout); err != nil {
+ return fmt.Errorf("%w: %w", ErrProviderNotGranted, err)
+ }
+ }
return nil
}
diff --git a/internal/node/labels_gate_test.go b/internal/node/labels_gate_test.go
index 5ef50921..e3694619 100644
--- a/internal/node/labels_gate_test.go
+++ b/internal/node/labels_gate_test.go
@@ -122,6 +122,44 @@ func TestCheckPeerLabels(t *testing.T) {
t.Errorf("a node's biscuit with no requirement must pass: %v", err)
}
})
+
+ // A call that names a service is sent only to a provider whose credential
+ // grants serving it, whatever the directory said; a call that names none
+ // (the peer's catalog) needs no grant.
+ t.Run("the provider must be granted the service the call names", func(t *testing.T) {
+ mintPublish := func(publish ...string) []byte {
+ role := &api.PolicyRole{Name: api.RoleNode, AllowedPublish: publish}
+ b, err := identity.MintBootstrapBiscuitToken(cpPriv, providerPeer, api.RoleNode, expiry, []*api.PolicyRole{role}, nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ return b
+ }
+ for name, tc := range map[string]struct {
+ publish []string
+ service string
+ wantErr bool
+ }{
+ "granted by name": {publish: []string{"mcp://calc"}, service: "mcp://calc"},
+ "granted by type": {publish: []string{"mcp://*"}, service: "mcp://calc"},
+ "granted everything": {publish: []string{"*"}, service: "inference://llm"},
+ "another service": {publish: []string{"mcp://calc"}, service: "mcp://weather", wantErr: true},
+ "another type": {publish: []string{"mcp://*"}, service: "inference://calc", wantErr: true},
+ "no grant at all": {publish: nil, service: "mcp://calc", wantErr: true},
+ "no grant, no service named": {publish: nil, service: ""},
+ "a service that is not one": {publish: []string{"*"}, service: "calc", wantErr: true},
+ } {
+ t.Run(name, func(t *testing.T) {
+ err := node.checkProvider(mintPublish(tc.publish...), providerPeer, nil, tc.service)
+ if (err != nil) != tc.wantErr {
+ t.Fatalf("checkProvider(%v, %q) = %v, wantErr %v", tc.publish, tc.service, err, tc.wantErr)
+ }
+ if tc.wantErr && tc.service != "calc" && !errors.Is(err, ErrProviderNotGranted) {
+ t.Fatalf("err = %v, want ErrProviderNotGranted so the caller is told the provider is enrolled and not granted", err)
+ }
+ })
+ }
+ })
}
// The egress floor is the operator's, and a caller cannot waive it by asking
diff --git a/internal/node/mcp.go b/internal/node/mcp.go
index 21435a6a..c6c455ab 100644
--- a/internal/node/mcp.go
+++ b/internal/node/mcp.go
@@ -340,11 +340,13 @@ func (n *AgentMeshNode) ConnectMCPSession(ctx context.Context, targetPeer peer.I
return nil, nil, fmt.Errorf("%w by %s: %s", ErrAuthRejected, targetPeer, resp.Error)
}
- // The provider's biscuit is verified unconditionally: signature, expiry and
- // binding to targetPeer. Discovery (DHT, gossip) names whoever announced
- // the service; only this says the peer is enrolled. Caller-required labels
- // and the operator's egress floor are additional checks on the same token.
- if err := n.checkPeerLabels(resp.Biscuit, targetPeer, requiredLabels); err != nil {
+ // The provider's biscuit is verified unconditionally: signature, expiry,
+ // binding to targetPeer and, for a named service, the grant to serve it.
+ // The directory names whoever announced the service; only this says the
+ // peer is enrolled and may serve it. Caller-required labels and the
+ // operator's egress floor are additional checks on the same token. An
+ // empty target is the peer's own catalog, which names no service.
+ if err := n.checkProvider(resp.Biscuit, targetPeer, requiredLabels, targetService); err != nil {
cleanup()
return nil, nil, err
}
diff --git a/internal/node/mcp_handlers_test.go b/internal/node/mcp_handlers_test.go
index ad03b44e..dfedc2f6 100644
--- a/internal/node/mcp_handlers_test.go
+++ b/internal/node/mcp_handlers_test.go
@@ -34,9 +34,13 @@ import (
"github.com/modelcontextprotocol/go-sdk/mcp"
)
+// publishEverything is the node role as a test mesh's policy grants it:
+// serving every service, so a node's record and its calls pass the gates.
+var publishEverything = []*api.PolicyRole{{Name: api.RoleNode, AllowedPublish: []string{"*"}}}
+
// buildAndSaveBiscuit builds a biscuit signed with rootPriv that identifies
-// node as caller, grants allow_mcp_server("*"), carries the node role as a
-// real enrollment does, and saves it to node's store.
+// node as caller, grants every service to call and to serve, carries the
+// node role as a real enrollment does, and saves it to node's store.
func buildAndSaveBiscuit(node *AgentMeshNode, rootPriv ed25519.PrivateKey) error {
callerID := node.Host.ID().String()
builder := biscuit.NewBuilder(rootPriv)
@@ -62,6 +66,9 @@ func buildAndSaveBiscuit(node *AgentMeshNode, rootPriv ed25519.PrivateKey) error
if err := builder.AddAuthorityFact(api.MarkerFact(api.FactGrantedServiceAllTypes)); err != nil {
return err
}
+ if err := builder.AddAuthorityFact(api.MarkerFact(api.FactGrantedPublishAllTypes)); err != nil {
+ return err
+ }
if err := builder.AddAuthorityFact(biscuit.Fact{Predicate: biscuit.Predicate{
Name: api.FactExpiration,
IDs: []biscuit.Term{biscuit.Date(time.Now().Add(time.Hour))},
@@ -556,7 +563,7 @@ func TestCallMCPTool_LabelEnforcement(t *testing.T) {
// nodeB's own identity is control-plane-attested with region=eu-de; nodeA
// must trust the same root to verify it.
- nodeBIdentity, err := identity.MintBootstrapBiscuitToken(rootPriv, nodeB.Host.ID(), api.RoleNode, time.Now().Add(time.Hour), nil, map[string]string{"region": "eu-de"})
+ nodeBIdentity, err := identity.MintBootstrapBiscuitToken(rootPriv, nodeB.Host.ID(), api.RoleNode, time.Now().Add(time.Hour), publishEverything, map[string]string{"region": "eu-de"})
if err != nil {
t.Fatalf("mint nodeB identity: %v", err)
}
@@ -618,7 +625,7 @@ func TestCallMCPTool_EgressFloorEnforcement(t *testing.T) {
nodeB.keysMu.Unlock()
// nodeB attests region=eu-de and nothing else.
- nodeBIdentity, err := identity.MintBootstrapBiscuitToken(rootPriv, nodeB.Host.ID(), api.RoleNode, time.Now().Add(time.Hour), nil, map[string]string{"region": "eu-de"})
+ nodeBIdentity, err := identity.MintBootstrapBiscuitToken(rootPriv, nodeB.Host.ID(), api.RoleNode, time.Now().Add(time.Hour), publishEverything, map[string]string{"region": "eu-de"})
if err != nil {
t.Fatalf("mint nodeB identity: %v", err)
}
diff --git a/internal/node/openai_facade.go b/internal/node/openai_facade.go
index 5c50f456..52c8da7e 100644
--- a/internal/node/openai_facade.go
+++ b/internal/node/openai_facade.go
@@ -90,7 +90,7 @@ type openAIFacade struct {
// when a requirement exists): verifies the provider's
// control-plane-attested labels before any request data is sent
// (see labels_gate.go).
- verifyPeerLabels func(ctx context.Context, peerID string, required map[string]string) error
+ verifyPeerLabels func(ctx context.Context, peerID, service string, required map[string]string) error
authorizeLocal func(ctx context.Context, serviceName, method, path string) error
ttl time.Duration
@@ -128,12 +128,12 @@ func newOpenAIFacade(node *AgentMeshNode, egress http.Handler) *openAIFacade {
},
localLabels: node.labels,
egressFloor: node.egressFloor,
- verifyPeerLabels: func(ctx context.Context, peerID string, required map[string]string) error {
+ verifyPeerLabels: func(ctx context.Context, peerID, service string, required map[string]string) error {
pid, err := peer.Decode(peerID)
if err != nil {
return fmt.Errorf("invalid peer ID %q: %w", peerID, err)
}
- return node.VerifyPeerLabels(ctx, pid, required)
+ return node.VerifyProvider(ctx, pid, required, api.ServiceTypeStringInference+"://"+service)
},
authorizeLocal: func(ctx context.Context, serviceName, method, path string) error {
callerBiscuit := CallerBiscuitFromContext(ctx)
@@ -410,7 +410,7 @@ func (f *openAIFacade) handleCompletions(w http.ResponseWriter, r *http.Request)
}
// No backoff on failure: the verdict is requirement-scoped,
// the provider stays eligible for unconstrained requests.
- if err := f.verifyPeerLabels(r.Context(), p.peerID, requiredLabels); err != nil {
+ if err := f.verifyPeerLabels(r.Context(), p.peerID, p.service, requiredLabels); err != nil {
// With no caller requirement what failed is the floor or the
// peer's own identity; attribute it so the operator can tell
// their floor apart from a caller's requirement.
diff --git a/internal/node/openai_facade_test.go b/internal/node/openai_facade_test.go
index 5d925ffc..a0fcb560 100644
--- a/internal/node/openai_facade_test.go
+++ b/internal/node/openai_facade_test.go
@@ -64,7 +64,7 @@ func newTestFacade() *openAIFacade {
remoteModels: func(_ context.Context, _, _ string) ([]string, error) {
return nil, nil
},
- verifyPeerLabels: func(context.Context, string, map[string]string) error { return nil },
+ verifyPeerLabels: func(context.Context, string, string, map[string]string) error { return nil },
authorizeLocal: func(context.Context, string, string, string) error { return nil },
}
}
@@ -704,7 +704,7 @@ func TestFacade_Completions_LabelRequirement(t *testing.T) {
}
}
var attested [][2]string
- f.verifyPeerLabels = func(_ context.Context, peerID string, required map[string]string) error {
+ f.verifyPeerLabels = func(_ context.Context, peerID, _ string, required map[string]string) error {
attested = append(attested, [2]string{peerID, required["region"]})
return nil
}
@@ -762,7 +762,7 @@ func TestFacade_Completions_LabelAttestation(t *testing.T) {
t.Run("unattested provider is skipped, attested one serves", func(t *testing.T) {
f := newLabelFacade()
- f.verifyPeerLabels = func(_ context.Context, peerID string, _ map[string]string) error {
+ f.verifyPeerLabels = func(_ context.Context, peerID, _ string, _ map[string]string) error {
if peerID == "peerEU1" {
return fmt.Errorf("no attested label")
}
@@ -806,7 +806,7 @@ func TestFacade_Completions_LabelAttestation(t *testing.T) {
// provider fails verification, so nothing may be forwarded.
f := newLabelFacade()
verified := 0
- f.verifyPeerLabels = func(_ context.Context, _ string, required map[string]string) error {
+ f.verifyPeerLabels = func(_ context.Context, _, _ string, required map[string]string) error {
verified++
if len(required) != 0 {
t.Errorf("required = %v, want none", required)
@@ -984,7 +984,7 @@ func TestFacade_Completions_FloorGatesSilentCaller(t *testing.T) {
f := newFloorFacade()
var gateRequired map[string]string
gateCalled := false
- f.verifyPeerLabels = func(_ context.Context, _ string, required map[string]string) error {
+ f.verifyPeerLabels = func(_ context.Context, _, _ string, required map[string]string) error {
gateCalled = true
gateRequired = required
return fmt.Errorf("floor not attested")
@@ -1011,7 +1011,7 @@ func TestFacade_Completions_FloorGatesSilentCaller(t *testing.T) {
t.Run("an attested floor forwards", func(t *testing.T) {
f := newFloorFacade()
- f.verifyPeerLabels = func(context.Context, string, map[string]string) error { return nil }
+ f.verifyPeerLabels = func(context.Context, string, string, map[string]string) error { return nil }
forwarded := false
f.forward = http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
forwarded = true
diff --git a/internal/node/proxy_test.go b/internal/node/proxy_test.go
index 802f25c2..161f6c11 100644
--- a/internal/node/proxy_test.go
+++ b/internal/node/proxy_test.go
@@ -828,7 +828,7 @@ func TestEgressProxyEnforcesFloor(t *testing.T) {
nodeA.keysMu.Unlock()
// nodeA attests jurisdiction=eu and nothing else.
- nodeAIdentity, err := identity.MintBootstrapBiscuitToken(rootPriv, nodeA.Host.ID(), api.RoleNode, time.Now().Add(time.Hour), nil, map[string]string{"jurisdiction": "eu"})
+ nodeAIdentity, err := identity.MintBootstrapBiscuitToken(rootPriv, nodeA.Host.ID(), api.RoleNode, time.Now().Add(time.Hour), publishEverything, map[string]string{"jurisdiction": "eu"})
if err != nil {
t.Fatalf("mint nodeA identity: %v", err)
}
diff --git a/internal/node/sidecar.go b/internal/node/sidecar.go
index 5ba57f41..79f3fd7b 100644
--- a/internal/node/sidecar.go
+++ b/internal/node/sidecar.go
@@ -22,6 +22,7 @@ import (
"crypto/x509"
"encoding/base64"
"encoding/json"
+ "errors"
"fmt"
"net"
"net/http"
@@ -810,10 +811,16 @@ func createEgressProxy(node *AgentMeshNode) http.Handler {
r.URL.Path = strings.Join(parts, "/")
}
}
- if err := node.VerifyPeerLabels(r.Context(), pid, requiredLabels); err != nil {
+ service := ""
+ if route.serviceName != "" {
+ service = route.serviceType + "://" + route.serviceName
+ }
+ if err := node.VerifyProvider(r.Context(), pid, requiredLabels, service); err != nil {
logger.Warnf("[Egress] refused egress to %s: %v", pid, err)
denied := "Forbidden: destination is not an enrolled peer"
- if len(requiredLabels) > 0 {
+ if errors.Is(err, ErrProviderNotGranted) {
+ denied = "Forbidden: provider is not granted " + service
+ } else if len(requiredLabels) > 0 {
denied = "Required labels not attested by provider"
} else if len(node.egressFloor()) > 0 {
denied = "Forbidden: provider does not attest the egress floor"
diff --git a/internal/router/directory.go b/internal/router/directory.go
index 0417655e..e6866bf4 100644
--- a/internal/router/directory.go
+++ b/internal/router/directory.go
@@ -31,6 +31,7 @@ import (
"google.golang.org/protobuf/proto"
"github.com/google/agentmesh/api"
+ "github.com/google/agentmesh/internal/identity"
)
const (
@@ -60,13 +61,14 @@ const (
directoryResultOK = "ok"
directoryResultEmpty = "empty"
directoryResultInvalid = "invalid"
+ directoryResultDenied = "denied"
directoryResultError = "error"
)
var directoryRequestsTotal = promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "agentmesh_router_directory_requests_total",
- Help: "Directory requests served to members and routers, by operation and result; place is a record or withdrawal another router put here, lookup a find another router ran here",
+ Help: "Directory requests served to members and routers, by operation and result; denied is a record for a service the member's credential does not grant; place is a record or withdrawal another router put here, lookup a find another router ran here",
},
[]string{"op", "result"},
)
@@ -98,7 +100,7 @@ var directoryLookupsTotal = promauto.NewCounterVec(
func init() {
for _, op := range []string{directoryOpProvide, directoryOpWithdraw, directoryOpFindProviders, directoryOpFindPeer, directoryOpPlace, directoryOpLookup} {
- for _, result := range []string{directoryResultOK, directoryResultEmpty, directoryResultInvalid, directoryResultError} {
+ for _, result := range []string{directoryResultOK, directoryResultEmpty, directoryResultInvalid, directoryResultDenied, directoryResultError} {
directoryRequestsTotal.WithLabelValues(op, result)
}
}
@@ -203,12 +205,17 @@ var errInvalidDirectoryRequest = errors.New("request is not provide, withdraw, f
// directoryRefused answers a request the router did not run, and says why
// at the level the cause deserves: a malformed request is the peer's
-// doing, a failed lookup is the mesh's.
+// doing, a record its credential does not grant is a policy decision, a
+// failed lookup is the mesh's.
func (r *Router) directoryRefused(op string, remote peer.ID, err error) *api.DirectoryResponse {
var invalid *directoryInvalidError
+ var denied *directoryDeniedError
if errors.As(err, &invalid) {
directoryRequestsTotal.WithLabelValues(op, directoryResultInvalid).Inc()
logger.Warnf("[Directory] Refusing %s from %s: %v", op, remote, err)
+ } else if errors.As(err, &denied) {
+ directoryRequestsTotal.WithLabelValues(op, directoryResultDenied).Inc()
+ logger.Warnw("[Directory] Record denied", "op", op, "peer_id", remote.String(), "service", denied.service, "reason", denied.err.Error())
} else {
directoryRequestsTotal.WithLabelValues(op, directoryResultError).Inc()
logger.Warnf("[Directory] %s from %s failed: %v", op, remote, err)
@@ -226,6 +233,39 @@ func invalidDirectoryRequest(format string, args ...any) error {
return &directoryInvalidError{err: fmt.Errorf(format, args...)}
}
+// directoryDeniedError is a record for a service the member's credential
+// does not grant serving.
+type directoryDeniedError struct {
+ service string
+ err error
+}
+
+func (e *directoryDeniedError) Error() string { return e.err.Error() }
+func (e *directoryDeniedError) Unwrap() error { return e.err }
+
+// requirePublish checks the admitted member's credential grants serving
+// the service a record names. A record under the member's own peer key
+// names no service and needs no grant: a member may always say where it
+// is reached.
+func (r *Router) requirePublish(provider peer.ID, svcType api.ServiceType, svcName string) error {
+ if svcName == "" {
+ return nil
+ }
+ typeStr, err := api.ServiceTypeToString(svcType)
+ if err != nil {
+ return invalidDirectoryRequest("%w", err)
+ }
+ v, ok := r.credentials.Load(provider)
+ if !ok {
+ return &directoryDeniedError{service: typeStr + "://" + svcName, err: errors.New("no credential held for the member")}
+ }
+ cred := v.(memberCredential)
+ if err := identity.RequirePublish(cred.biscuit, cred.key, typeStr, svcName, r.config.BiscuitTimeout); err != nil {
+ return &directoryDeniedError{service: typeStr + "://" + svcName, err: err}
+ }
+ return nil
+}
+
// recordProvider is whose record a provide or withdraw is about: the
// sender's own, or the member a peer router names, which only a router may.
func (r *Router) recordProvider(remote peer.ID, named string) (provider peer.ID, placed bool, err error) {
@@ -259,11 +299,16 @@ func (r *Router) directoryProvide(ctx context.Context, remote peer.ID, q *api.Di
return nil, invalidDirectoryRequest("%w", err)
}
if !placed {
- // The member's own router checks what the record is about; a placed
- // copy was checked by the router that holds the member.
- if _, _, err := api.ServiceOfRecord(provider, q.GetKey(), q.GetService()); err != nil {
+ // The member's own router checks what the record is about and that
+ // the member may serve it; a placed copy was checked by the router
+ // that holds the member.
+ svcType, svcName, err := api.ServiceOfRecord(provider, q.GetKey(), q.GetService())
+ if err != nil {
return nil, invalidDirectoryRequest("%w", err)
}
+ if err := r.requirePublish(provider, svcType, svcName); err != nil {
+ return nil, err
+ }
}
if r.records == nil {
return nil, errDirectoryNotUp
diff --git a/internal/router/directory_test.go b/internal/router/directory_test.go
index 7c32c0fc..aefc1433 100644
--- a/internal/router/directory_test.go
+++ b/internal/router/directory_test.go
@@ -16,10 +16,13 @@ package router
import (
"context"
+ "crypto/ed25519"
"slices"
"testing"
"time"
+ "github.com/eclipse-biscuit/biscuit-go/v2"
+ "github.com/golang-jwt/jwt/v5"
dht "github.com/libp2p/go-libp2p-kad-dht"
kb "github.com/libp2p/go-libp2p-kbucket"
"github.com/libp2p/go-libp2p/core/host"
@@ -29,6 +32,7 @@ import (
"google.golang.org/protobuf/proto"
"github.com/google/agentmesh/api"
+ "github.com/google/agentmesh/internal/identity"
)
// newDirectoryRouter is a router with its DHT and the directory handler
@@ -68,11 +72,27 @@ func federate(t *testing.T, a, b *Router) {
}
}
-// attach connects a member host to a router and marks it authenticated there.
-func attach(t *testing.T, r *Router) host.Host {
+// attach connects a member host to a router and marks it authenticated
+// there, holding a credential that grants publishing the given services
+// (allowed_publish syntax), as the handshake would have recorded.
+func attach(t *testing.T, r *Router, publish ...string) host.Host {
t.Helper()
m := newClient(t, r)
r.authenticatedPeers.Store(m.ID(), time.Now().Add(time.Hour))
+ pub, priv, err := ed25519.GenerateKey(nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ role := &api.PolicyRole{Name: "member", AllowedPublish: publish}
+ tok, _, err := identity.MintBiscuitToken(priv, jwt.MapClaims{"sub": "member"}, nil, m.ID(), time.Now().Add(time.Hour), []string{"member"}, []*api.PolicyRole{role}, nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ b, err := biscuit.Unmarshal(tok)
+ if err != nil {
+ t.Fatal(err)
+ }
+ r.credentials.Store(m.ID(), memberCredential{biscuit: b, key: pub})
return m
}
@@ -141,7 +161,7 @@ func TestDirectoryRecordsAreFoundFromAnyRouter(t *testing.T) {
// One copy besides the member's own router, on the closest of the others.
a.directory.Replication = 1
- member := attach(t, a)
+ member := attach(t, a, "mcp://calculator")
key, err := api.ServiceKey(api.ServiceType_SERVICE_TYPE_MCP, "calculator")
if err != nil {
t.Fatal(err)
@@ -228,7 +248,7 @@ func TestDirectoryRecordsAreFoundFromAnyRouter(t *testing.T) {
// as invalid, and nothing is stored.
func TestDirectoryRefusesWhatAMemberMayNotAnnounce(t *testing.T) {
a := newDirectoryRouter(t)
- member := attach(t, a)
+ member := attach(t, a, "mcp://*")
stranger := newClient(t, a)
key, _ := api.ServiceKey(api.ServiceType_SERVICE_TYPE_MCP, "calculator")
@@ -275,7 +295,7 @@ func TestDirectoryRefusesWhatAMemberMayNotAnnounce(t *testing.T) {
func TestDirectoryPlacementNamesTheProvider(t *testing.T) {
a, b := newDirectoryRouter(t), newDirectoryRouter(t)
federate(t, a, b)
- member := attach(t, a)
+ member := attach(t, a, "inference://llm")
key, _ := api.ServiceKey(api.ServiceType_SERVICE_TYPE_INFERENCE, "")
memberAddr := member.Addrs()[0].String() + "/p2p/" + member.ID().String()
if resp := ask(t, member, a.Host.ID(), provide(key, "inference://llm", memberAddr)); resp.GetError() != "" {
@@ -302,7 +322,7 @@ func withdraw(key []byte) *api.DirectoryRequest {
func TestDirectoryWithdrawAndReplace(t *testing.T) {
a, b := newDirectoryRouter(t), newDirectoryRouter(t)
federate(t, a, b)
- member := attach(t, a)
+ member := attach(t, a, "mcp://calculator")
key, _ := api.ServiceKey(api.ServiceType_SERVICE_TYPE_MCP, "calculator")
oldAddr := "/ip4/10.0.0.1/tcp/4001/p2p/" + member.ID().String()
newAddr := "/ip4/10.0.0.2/tcp/4001/p2p/" + member.ID().String()
@@ -380,3 +400,70 @@ func TestRecordStoreExpiry(t *testing.T) {
t.Fatalf("sweep interval for a 6s TTL = %s, want 2s", got)
}
}
+
+// A member serves only what its credential grants: a record for a service
+// its role does not allow publishing is refused and counted as denied, and
+// nothing is stored; its own record under its peer key needs no grant. The
+// grant is checked as a service grant is: by name, by type, or for all.
+func TestDirectoryDeniesWhatTheCredentialDoesNotGrant(t *testing.T) {
+ a := newDirectoryRouter(t)
+ calc, _ := api.ServiceKey(api.ServiceType_SERVICE_TYPE_MCP, "calculator")
+ mcpAll, _ := api.ServiceKey(api.ServiceType_SERVICE_TYPE_MCP, "")
+ weather, _ := api.ServiceKey(api.ServiceType_SERVICE_TYPE_MCP, "weather")
+ llm, _ := api.ServiceKey(api.ServiceType_SERVICE_TYPE_INFERENCE, "llm")
+ calcV2, _ := api.ServiceKey(api.ServiceType_SERVICE_TYPE_MCP, "calc.v2")
+
+ for name, tc := range map[string]struct {
+ publish []string
+ req *api.DirectoryRequest
+ denied bool
+ }{
+ "no grant, a service": {publish: nil, req: provide(calc, "mcp://calculator"), denied: true},
+ "no grant, its own peer key": {publish: nil, req: nil},
+ "exact grant, that service": {publish: []string{"mcp://calculator"}, req: provide(calc, "mcp://calculator")},
+ "exact grant, by type too": {publish: []string{"mcp://calculator"}, req: provide(mcpAll, "mcp://calculator")},
+ "exact grant, another service": {publish: []string{"mcp://calculator"}, req: provide(weather, "mcp://weather"), denied: true},
+ "type grant, any of the type": {publish: []string{"mcp://*"}, req: provide(weather, "mcp://weather")},
+ "type grant, another type": {publish: []string{"mcp://*"}, req: provide(llm, "inference://llm"), denied: true},
+ "prefix grant": {publish: []string{"mcp://calc.*"}, req: provide(calc, "mcp://calculator"), denied: true},
+ "prefix grant matching": {publish: []string{"mcp://calc.*"}, req: provide(calcV2, "mcp://calc.v2")},
+ "everything": {publish: []string{"*"}, req: provide(llm, "inference://llm")},
+ "a set of exact grants": {publish: []string{"mcp://weather", "mcp://calculator"}, req: provide(calc, "mcp://calculator")},
+ "a set of exact grants, another": {publish: []string{"mcp://weather", "mcp://clock"}, req: provide(calc, "mcp://calculator"), denied: true},
+ } {
+ t.Run(name, func(t *testing.T) {
+ member := attach(t, a, tc.publish...)
+ req := tc.req
+ if req == nil {
+ req = provide(api.PeerKey(member.ID()), "")
+ }
+ before := directoryCount(t, directoryOpProvide, directoryResultDenied)
+ resp := ask(t, member, a.Host.ID(), req)
+ if tc.denied {
+ if resp.GetError() == "" {
+ t.Fatal("stored; want a refusal")
+ }
+ if got := directoryCount(t, directoryOpProvide, directoryResultDenied); got != before+1 {
+ t.Fatalf("denied counted = %v, want %v", got, before+1)
+ }
+ if provs := held(a, req.GetProvide().GetKey()); slices.ContainsFunc(provs, func(p peer.AddrInfo) bool { return p.ID == member.ID() }) {
+ t.Fatalf("a denied record was stored: %v", provs)
+ }
+ return
+ }
+ if resp.GetError() != "" {
+ t.Fatalf("refused: %s", resp.GetError())
+ }
+ if provs := held(a, req.GetProvide().GetKey()); !slices.ContainsFunc(provs, func(p peer.AddrInfo) bool { return p.ID == member.ID() }) {
+ t.Fatalf("the record was not stored: %v", provs)
+ }
+ })
+ }
+
+ // A member whose credential the router no longer holds is refused too.
+ member := attach(t, a, "mcp://calculator")
+ a.credentials.Delete(member.ID())
+ if resp := ask(t, member, a.Host.ID(), provide(calc, "mcp://calculator")); resp.GetError() == "" {
+ t.Fatal("stored with no credential held; want a refusal")
+ }
+}
diff --git a/internal/router/router.go b/internal/router/router.go
index 4d610081..f1a957b5 100644
--- a/internal/router/router.go
+++ b/internal/router/router.go
@@ -32,6 +32,7 @@ import (
"sync/atomic"
"time"
+ "github.com/eclipse-biscuit/biscuit-go/v2"
"github.com/google/agentmesh/api"
cpclient "github.com/google/agentmesh/internal/controlplane/client"
"github.com/google/agentmesh/internal/identity"
@@ -243,11 +244,18 @@ func (r *Router) admitPeer(p peer.ID, expiry time.Time) {
}
}
+// memberCredential is a verified credential and the key that verified it.
+type memberCredential struct {
+ biscuit *biscuit.Biscuit
+ key ed25519.PublicKey
+}
+
// forgetPeer is the reverse of admitPeer, and drops the circuit addresses
// recordReservation put in the peerstore: the relay drops the reservation
// with the connection.
func (r *Router) forgetPeer(p peer.ID) {
r.authenticatedPeers.Delete(p)
+ r.credentials.Delete(p)
if r.Host != nil {
r.Host.ConnManager().UntagPeer(p, memberTag)
r.Host.Peerstore().UpdateAddrs(p, r.reservationTTL(), 0)
@@ -331,7 +339,10 @@ type Router struct {
PubSub *pubsub.PubSub
EventTopic *pubsub.Topic
authenticatedPeers sync.Map
- bannedPeers sync.Map
+ // credentials is the credential each admitted member presented, as
+ // memberCredential, for what the directory checks against it.
+ credentials sync.Map
+ bannedPeers sync.Map
// directory is how the mesh keeps its directory, read from /info at
// start (syncDirectory); records is the records this router holds.
directory api.DirectorySettings
@@ -1619,6 +1630,7 @@ func (r *Router) HandleAuthHandshake(s network.Stream) {
}
r.admitPeer(remotePeer, expiry)
+ r.credentials.Store(remotePeer, memberCredential{biscuit: b, key: verifyingKey})
authHandshakesTotal.WithLabelValues(handshakeOK).Inc()
logger.Infof("[AuthN] Successfully authenticated peer %s", remotePeer)
// A router that proves the router role is a peer router from here on,
diff --git a/internal/standalone/standalone.go b/internal/standalone/standalone.go
index a66d3f31..82277fca 100644
--- a/internal/standalone/standalone.go
+++ b/internal/standalone/standalone.go
@@ -536,7 +536,7 @@ func defaultDevPolicyRoles() []*api.PolicyRole {
return []*api.PolicyRole{
{Name: "mesh-admin", AllowedServices: []string{"*"}, AllowedTargets: []string{"*"}},
{Name: api.RoleRouter, AllowedServices: []string{"*"}, AllowedTargets: []string{"*"}},
- {Name: api.RoleNode, AllowedServices: []string{"*"}, AllowedTargets: []string{"*"}, AllowedLabels: []string{"*"}},
+ {Name: api.RoleNode, AllowedServices: []string{"*"}, AllowedPublish: []string{"*"}, AllowedTargets: []string{"*"}, AllowedLabels: []string{"*"}},
}
}
diff --git a/internal/storage/mesh_policy_test.go b/internal/storage/mesh_policy_test.go
index 1b416947..0e17aacc 100644
--- a/internal/storage/mesh_policy_test.go
+++ b/internal/storage/mesh_policy_test.go
@@ -46,6 +46,7 @@ func TestMeshPolicyRoundTripsEveryRoleField(t *testing.T) {
AllowedServices: []string{"mcp://tool"},
CustomDatalog: []string{`region("emea")`},
AllowedLabels: []string{"region=*"},
+ AllowedPublish: []string{"mcp://tool", "inference://*"},
Http: []*api.HTTPGrant{{Service: "mcp://tool", Methods: []string{"GET"}, Paths: []string{"/v1/*"}}},
}
diff --git a/internal/storage/sql_store.go b/internal/storage/sql_store.go
index da6e3c43..71676d81 100644
--- a/internal/storage/sql_store.go
+++ b/internal/storage/sql_store.go
@@ -1237,6 +1237,11 @@ func (s *SQLStore) saveMeshPolicyTx(ctx context.Context, tx *sql.Tx, roles []*ap
return err
}
}
+ for _, svc := range r.AllowedPublish {
+ if _, err := tx.ExecContext(ctx, s.rebind("INSERT INTO role_permissions (role_name, resource_type, resource_value) VALUES (?, 'publish', ?)"), r.Name, svc); err != nil {
+ return err
+ }
+ }
// One row per narrowed entry, as protojson: the shape is the proto's
// and a new HTTPGrant field needs no schema change here.
for _, g := range r.Http {
@@ -1312,6 +1317,8 @@ func (s *SQLStore) GetMeshPolicy(ctx context.Context) ([]*api.PolicyRole, []*api
r.CustomDatalog = append(r.CustomDatalog, resValue)
case "label":
r.AllowedLabels = append(r.AllowedLabels, resValue)
+ case "publish":
+ r.AllowedPublish = append(r.AllowedPublish, resValue)
case "http":
g := &api.HTTPGrant{}
if err := protojson.Unmarshal([]byte(resValue), g); err != nil {
diff --git a/mobile/mobile_e2e.sh b/mobile/mobile_e2e.sh
index c05f1932..bebc6feb 100755
--- a/mobile/mobile_e2e.sh
+++ b/mobile/mobile_e2e.sh
@@ -127,7 +127,7 @@ curl -s -X POST \
"roles": [
{"name": "admin", "allowed_services": ["*"], "allowed_targets": ["*"]},
{"name": "mesh:role:router", "allowed_services": ["*"], "allowed_targets": ["*"]},
- {"name": "mesh:role:node", "allowed_services": ["*"], "allowed_targets": ["*"]}
+ {"name": "mesh:role:node", "allowed_services": ["*"], "allowed_publish": ["*"], "allowed_targets": ["*"]}
],
"bindings": [
{"role": "admin", "members": ["mesh:system:authenticated"]},
diff --git a/sdk/js/src/biscuit.ts b/sdk/js/src/biscuit.ts
index 104dce92..793a0a94 100644
--- a/sdk/js/src/biscuit.ts
+++ b/sdk/js/src/biscuit.ts
@@ -83,6 +83,8 @@ export interface VerifiedBiscuit {
labels: Record<string, string>;
/** Verified TaskAuthorizationRule chain from blocks 1..N (empty for unattenuated tokens). */
taskRules: TaskAuthorizationRule[];
+ /** The token as received, for what is decided over its facts after verification (requirePublish). */
+ token: Uint8Array;
}
function describe(err: unknown): string {
@@ -219,6 +221,7 @@ export async function verifyPeerBiscuit(
roles: strings(query("r($r) <- role($r)")),
labels,
taskRules,
+ token: biscuitBytes,
};
}
@@ -271,3 +274,32 @@ export function requireRole(verified: VerifiedBiscuit, role: string): void {
}
}
+/**
+ * Requires that an already verified provider credential grants serving
+ * targetService ("<type>://<name>"), as identity.RequirePublish: the
+ * directory names whoever announced the service, only the credential says
+ * who may serve it. The provider's own catalog names no service and needs
+ * no grant; so does an empty target.
+ */
+export async function requirePublish(verified: VerifiedBiscuit, targetService: string): Promise<void> {
+ if (targetService === "" || targetService === `system://${BASELINE_DATALOG.catalog_target}`) {
+ return;
+ }
+ const m = /^([a-z0-9]+):\/\/(.+)$/.exec(targetService);
+ if (m === null) {
+ throw new BiscuitVerificationError(`service ${JSON.stringify(targetService)} must be <type>://<name>`);
+ }
+ const wasm = await loadBiscuit();
+ const token = wasm.Biscuit.fromBytes(verified.token, wasm.PublicKey.fromBytes(verified.verifyingKey, wasm.SignatureAlgorithm.Ed25519));
+ const builder = new wasm.AuthorizerBuilder();
+ builder.addFact(wasm.Fact.fromString(`${BASELINE_DATALOG.fact_publish}(${JSON.stringify(m[1])}, ${JSON.stringify(m[2])})`));
+ for (const policy of BASELINE_DATALOG.publish_policies) {
+ builder.addPolicy(wasm.Policy.fromString(policy));
+ }
+ try {
+ withinLimits(() => builder.buildAuthenticated(token).authorizeWithLimits(AUTHORIZER_LIMITS));
+ } catch {
+ throw new BiscuitVerificationError(`peer ${verified.peerId} is not granted serving ${targetService}`);
+ }
+}
+
diff --git a/sdk/js/src/credential.ts b/sdk/js/src/credential.ts
index f0e435a4..d435e566 100644
--- a/sdk/js/src/credential.ts
+++ b/sdk/js/src/credential.ts
@@ -21,6 +21,7 @@ import {
AuthResponseSchema,
MemberCredentialSchema,
TaskAuthorizationRuleSchema,
+ type AuthFrame,
type AuthResponse,
type OIDCSession,
} from "./gen/agentmesh_pb.ts";
@@ -120,6 +121,11 @@ export function encodeAuthFrame(biscuit: Uint8Array, targetService = ""): Uint8A
}
/** The peer's answer to an AuthResponse, carrying its own biscuit on success. */
+/** Reads back an AuthFrame this member built (encodeAuthFrame). */
+export function decodeAuthFrame(bytes: Uint8Array): AuthFrame {
+ return fromBinary(AuthFrameSchema, bytes);
+}
+
export function decodeAuthResponse(bytes: Uint8Array): AuthResponse {
return fromBinary(AuthResponseSchema, bytes);
}
diff --git a/sdk/js/src/gen/agentmesh_pb.ts b/sdk/js/src/gen/agentmesh_pb.ts
index f5624249..24eddf51 100644
--- a/sdk/js/src/gen/agentmesh_pb.ts
+++ b/sdk/js/src/gen/agentmesh_pb.ts
@@ -26,7 +26,7 @@ import type { Message } from "@bufbuild/protobuf";
* Describes the file agentmesh.proto.
*/
export const file_agentmesh: GenFile = /*@__PURE__*/
- fileDesc("Cg9hZ2VudG1lc2gucHJvdG8SDGFnZW50bWVzaC52MSI0CglBdXRoRnJhbWUSDwoHYmlzY3VpdBgBIAEoDBIWCg50YXJnZXRfc2VydmljZRgCIAEoCSI/CgxBdXRoUmVzcG9uc2USDwoHc3VjY2VzcxgBIAEoCBINCgVlcnJvchgCIAEoCRIPCgdiaXNjdWl0GAMgASgMIrEBCgxSb3V0ZXJHb0F3YXkSMQoGcmVhc29uGAEgASgOMiEuYWdlbnRtZXNoLnYxLlJvdXRlckdvQXdheS5SZWFzb24SLgoLcmV0cnlfYWZ0ZXIYAiABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24iPgoGUmVhc29uEhYKElJFQVNPTl9VTlNQRUNJRklFRBAAEgwKCERSQUlOSU5HEAESDgoKT1ZFUkxPQURFRBACItwBCglNZXNoRXZlbnQSKgoEdHlwZRgBIAEoDjIcLmFnZW50bWVzaC52MS5NZXNoRXZlbnQuVHlwZRIPCgdwZWVyX2lkGAIgASgJEi4KCmV2ZW50X3RpbWUYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhYKDm5ld19wdWJsaWNfa2V5GAQgASgMEhEKCXNpZ25hdHVyZRgFIAEoDCI3CgRUeXBlEgoKBkJBTk5FRBAAEhAKDEtFWV9ST1RBVElPThABEhEKDVBPTElDWV9VUERBVEUQAiL5AQoNRW5yb2xsUmVxdWVzdBILCgNqd3QYASABKAkSDwoHcGVlcl9pZBgCIAEoCRISCgpwdWJsaWNfa2V5GAMgASgMEhYKDnJlcXVlc3RlZF9yb2xlGAQgASgJEjcKBmxhYmVscxgFIAMoCzInLmFnZW50bWVzaC52MS5FbnJvbGxSZXF1ZXN0LkxhYmVsc0VudHJ5EhkKEWNoYW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9wZWVyX2lkcxgCIAMoCSqUAQoQRW5yb2xsbWVudFN0YXR1cxIhCh1FTlJPTExNRU5UX1NUQVRVU19VTlNQRUNJRklFRBAAEh0KGUVOUk9MTE1FTlRfU1RBVFVTX1BFTkRJTkcQARIeChpFTlJPTExNRU5UX1NUQVRVU19BUFBST1ZFRBACEh4KGkVOUk9MTE1FTlRfU1RBVFVTX1JFSkVDVEVEEAMqjAEKC1NlcnZpY2VUeXBlEhwKGFNFUlZJQ0VfVFlQRV9VTlNQRUNJRklFRBAAEhQKEFNFUlZJQ0VfVFlQRV9NQ1AQARIaChZTRVJWSUNFX1RZUEVfSU5GRVJFTkNFEAISFAoQU0VSVklDRV9UWVBFX0EyQRADEhcKE1NFUlZJQ0VfVFlQRV9FR1JFU1MQBCo3CgpFZ3Jlc3NNb2RlEhQKEEVHUkVTU19NT0RFX0hUVFAQABITCg9FR1JFU1NfTU9ERV9UQ1AQASpcChJSZXNwb25zZUluc3BlY3Rpb24SIAocUkVTUE9OU0VfSU5TUEVDVElPTl9CVUZGRVJFRBAAEiQKIFJFU1BPTlNFX0lOU1BFQ1RJT05fUkVRVUVTVF9PTkxZEAFCIVofZ2l0aHViLmNvbS9nb29nbGUvYWdlbnRtZXNoL2FwaWIGcHJvdG8z", [file_google_protobuf_duration, file_google_protobuf_timestamp]);
/**
* @generated from message agentmesh.v1.AuthFrame
@@ -1066,6 +1066,19 @@ export type PolicyRole = Message<"agentmesh.v1.PolicyRole"> & {
* @generated from field: repeated agentmesh.v1.HTTPGrant http = 6;
*/
http: HTTPGrant[];
+
+ /**
+ * Services a member with this role may serve, in the syntax of
+ * allowed_services ("mcp://calc", "inference://*", "*"). A role serves
+ * nothing it is not granted here: a router keeps a member's record only
+ * for a service its credential grants, and a caller sends a request to
+ * a provider it found by name only when the provider's credential does.
+ * An egress destination needs no entry: served_by grants it to the
+ * nodes it selects.
+ *
+ * @generated from field: repeated string allowed_publish = 7;
+ */
+ allowedPublish: string[];
};
/**
diff --git a/sdk/js/src/gen/datalog.ts b/sdk/js/src/gen/datalog.ts
index 133a64fe..f9fbb0c9 100644
--- a/sdk/js/src/gen/datalog.ts
+++ b/sdk/js/src/gen/datalog.ts
@@ -11,6 +11,14 @@ export const BASELINE_DATALOG = {
"allow if service($type, $name), granted_service_all($type)",
"allow if service($type, $name), granted_service_all_types(true)"
],
+ "publish_policies": [
+ "allow if publish($type, $name), granted_publish_exact($type, $name)",
+ "allow if publish($type, $name), granted_publish_set($type, $set), $set.contains($name)",
+ "allow if publish($type, $name), granted_publish_prefix($type, $prefix), $name.starts_with($prefix)",
+ "allow if publish($type, $name), granted_publish_suffix($type, $suffix), $name.ends_with($suffix)",
+ "allow if publish($type, $name), granted_publish_all($type)",
+ "allow if publish($type, $name), granted_publish_all_types(true)"
+ ],
"rules": [
"allow_network_target($fact, $val) <- target_fact($fact, $val), granted_target_exact($fact, $val)",
"allow_network_target($fact, $val) <- target_fact($fact, $val), granted_target_set($fact, $set), $set.contains($val)",
@@ -52,6 +60,8 @@ export const BASELINE_DATALOG = {
"fact_time": "time",
"fact_role": "role",
"fact_target_fact": "target_fact",
+ "fact_publish": "publish",
+ "catalog_target": "mesh.catalog",
"fact_tar_block": "tar_block",
"tar_block_source_pattern": "^tar_block\\(\"([A-Za-z0-9_-]+)\"\\);?\\s*$",
"http_method_syntax": "^[A-Z][A-Z0-9-]{0,31}$",
diff --git a/sdk/js/src/mcp.test.ts b/sdk/js/src/mcp.test.ts
index 4dd9afc7..1bc821b7 100644
--- a/sdk/js/src/mcp.test.ts
+++ b/sdk/js/src/mcp.test.ts
@@ -49,7 +49,10 @@ let caller: Libp2p;
let callerBiscuit: Uint8Array;
const servedTargets: string[] = [];
-function mint(peerId: string, role: string, labels: Record<string, string> = {}): Uint8Array {
+// mint is a credential as the control plane issues one to a member whose
+// role grants publishing the given services (allowed_publish syntax, as
+// granted_publish_* facts); a provider's needs the grant for what it serves.
+function mint(peerId: string, role: string, labels: Record<string, string> = {}, publish: string[] = ["mcp://calc"]): Uint8Array {
const b = wasm.Biscuit.builder();
b.addFact(wasm.Fact.fromString(`node(${JSON.stringify(peerId)})`));
b.addFact(wasm.Fact.fromString("expiration(2035-01-01T00:00:00Z)"));
@@ -57,6 +60,16 @@ function mint(peerId: string, role: string, labels: Record<string, string> = {})
for (const [k, v] of Object.entries(labels)) {
b.addFact(wasm.Fact.fromString(`label(${JSON.stringify(k)}, ${JSON.stringify(v)})`));
}
+ for (const svc of publish) {
+ const m = /^([a-z0-9]+):\/\/(.+)$/.exec(svc);
+ if (m === null) {
+ b.addFact(wasm.Fact.fromString("granted_publish_all_types(true)"));
+ } else if (m[2] === "*") {
+ b.addFact(wasm.Fact.fromString(`granted_publish_all(${JSON.stringify(m[1])})`));
+ } else {
+ b.addFact(wasm.Fact.fromString(`granted_publish_exact(${JSON.stringify(m[1])}, ${JSON.stringify(m[2])})`));
+ }
+ }
return b.build(cpKeyPair.getPrivateKey()).toBytes();
}
@@ -164,12 +177,12 @@ test("required labels are checked on the provider's credential", async () => {
const ok = await openMCPSession(conn, frame("mcp://calc"), [cpKey], { requiredLabels: { region: "eu" } });
await ok.close();
await assert.rejects(openMCPSession(conn, frame("mcp://calc"), [cpKey], { requiredLabels: { region: "us" } }), LabelsNotSatisfiedError);
- assert.throws(() => requireLabels({ peerId: "p", expiration: new Date(), verifyingKey: cpKey, roles: [], labels: {}, taskRules: [] }, { team: "x" }), /team=x/);
+ assert.throws(() => requireLabels({ peerId: "p", expiration: new Date(), verifyingKey: cpKey, roles: [], labels: {}, taskRules: [], token: new Uint8Array() }, { team: "x" }), /team=x/);
});
test("a requirement of several labels is met only by every one of them, as agentmesh-node's checkPeerLabels", () => {
// The cases of internal/node/labels_gate_test.go, run through the SDK's predicate.
- const attesting = (labels: Record<string, string>) => ({ peerId: "p", expiration: new Date(), verifyingKey: cpKey, roles: [], labels, taskRules: [] });
+ const attesting = (labels: Record<string, string>) => ({ peerId: "p", expiration: new Date(), verifyingKey: cpKey, roles: [], labels, taskRules: [], token: new Uint8Array() });
// exact match
requireLabels(attesting({ region: "us-east-1" }), { region: "us-east-1" });
// every pair of two attested
@@ -190,7 +203,7 @@ test("a requirement of several labels is met only by every one of them, as agent
});
test("the egress floor is met only by every one of its pairs, as agentmesh-node's api.LabelCheck", () => {
- const attesting = (labels: Record<string, string>) => ({ peerId: "p", expiration: new Date(), verifyingKey: cpKey, roles: [], labels, taskRules: [] });
+ const attesting = (labels: Record<string, string>) => ({ peerId: "p", expiration: new Date(), verifyingKey: cpKey, roles: [], labels, taskRules: [], token: new Uint8Array() });
requireEgressLabels(attesting({ region: "eu", team: "platform" }), { region: "eu" });
requireEgressLabels(attesting({ region: "eu", team: "platform" }), { region: "eu", team: "platform" });
// one pair short is a refusal that names the whole floor
@@ -243,3 +256,29 @@ test("only a node is a provider, as agentmesh-node's checkPeerLabels requires",
providerBiscuit = nodeBiscuit;
}
});
+
+test("only a node granted the service is its provider, as agentmesh-node's checkProvider requires", async () => {
+ // The directory names whoever announced calc; the provider's credential
+ // says who may serve it. A grant by type or for everything serves too;
+ // the provider's own catalog needs none.
+ const nodeBiscuit = providerBiscuit;
+ try {
+ for (const [publish, ok] of [
+ [["mcp://weather"], false],
+ [[], false],
+ [["mcp://*"], true],
+ [["*"], true],
+ ] as Array<[string[], boolean]>) {
+ providerBiscuit = mint(provider.peerId.toString(), ROLE_NODE, { region: "eu" }, publish);
+ const conn = await caller.dial(provider.getMultiaddrs()[0] as Parameters<typeof caller.dial>[0]);
+ if (ok) {
+ await (await openMCPSession(conn, frame("mcp://calc"), [cpKey])).close();
+ } else {
+ await assert.rejects(openMCPSession(conn, frame("mcp://calc"), [cpKey]), /is not granted serving mcp:\/\/calc/);
+ await (await openMCPSession(conn, frame(""), [cpKey])).close();
+ }
+ }
+ } finally {
+ providerBiscuit = nodeBiscuit;
+ }
+});
diff --git a/sdk/js/src/mcp.ts b/sdk/js/src/mcp.ts
index 57e8fcf0..6f597d0c 100644
--- a/sdk/js/src/mcp.ts
+++ b/sdk/js/src/mcp.ts
@@ -22,9 +22,9 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import type { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
import { JSONRPCMessageSchema, type JSONRPCMessage } from "@modelcontextprotocol/sdk/types.js";
import { AUTH_HANDSHAKE_TIMEOUT_MS, AuthRejectedError, MAX_AUTH_FRAME_BYTES, MCP_PROTOCOL } from "./auth.ts";
-import { BiscuitVerificationError, requireRole, verifyPeerBiscuit, type VerifiedBiscuit } from "./biscuit.ts";
+import { BiscuitVerificationError, requirePublish, requireRole, verifyPeerBiscuit, type VerifiedBiscuit } from "./biscuit.ts";
import { ROLE_NODE } from "./controlplane.ts";
-import { decodeAuthResponse } from "./credential.ts";
+import { decodeAuthFrame, decodeAuthResponse } from "./credential.ts";
/** go-msgio's default message cap, which agentmesh-node's StreamTransport uses. */
export const MAX_MCP_MESSAGE_BYTES = 8 * 1024 * 1024;
@@ -173,6 +173,8 @@ export async function openMCPSession(
provider = await verifyPeerBiscuit(resp.biscuit, conn.remotePeer.toString(), trustedKeys);
// Only nodes host services; a router's or an admin's credential is a member, not a provider.
requireRole(provider, ROLE_NODE);
+ // And only a node the policy lets serve the named service is one.
+ await requirePublish(provider, decodeAuthFrame(frame).targetService);
requireLabels(provider, options.requiredLabels);
requireEgressLabels(provider, egressRequireLabels);
} catch (err) {
diff --git a/sdk/js/src/session.test.ts b/sdk/js/src/session.test.ts
index 9bea398d..db5442ed 100644
--- a/sdk/js/src/session.test.ts
+++ b/sdk/js/src/session.test.ts
@@ -70,6 +70,10 @@ function mint(peerId: string, role: string, expiration = "2035-01-01T00:00:00Z",
b.addFact(wasm.Fact.fromString(`client_peer_id(${JSON.stringify(peerId)})`));
b.addFact(wasm.Fact.fromString(`expiration(${expiration})`));
b.addFact(wasm.Fact.fromString(`role(${JSON.stringify(role)})`));
+ if (role === ROLE_NODE) {
+ // The node role of these meshes serves everything.
+ b.addFact(wasm.Fact.fromString("granted_publish_all_types(true)"));
+ }
for (const [k, v] of Object.entries(labels)) {
b.addFact(wasm.Fact.fromString(`label(${JSON.stringify(k)}, ${JSON.stringify(v)})`));
}
diff --git a/sdk/js/src/session.ts b/sdk/js/src/session.ts
index 598efbef..17179095 100644
--- a/sdk/js/src/session.ts
+++ b/sdk/js/src/session.ts
@@ -28,7 +28,7 @@ import {
goAwayReasonName,
goAwayStreamHandler,
} from "./auth.ts";
-import { ROLE_ROUTER, attenuateBiscuit, requireRole, sealBiscuit, type VerifiedBiscuit } from "./biscuit.ts";
+import { ROLE_ROUTER, attenuateBiscuit, requirePublish, requireRole, sealBiscuit, type VerifiedBiscuit } from "./biscuit.ts";
import { ROLE_NODE } from "./controlplane.ts";
import { encodeAuthFrame } from "./credential.ts";
import { canonicalPeerId } from "./identity.ts";
@@ -1111,26 +1111,28 @@ export class MeshSession {
* way agentmesh-node's egress proxy does for /mesh/<peer>/<type>/<name>/<path>.
*/
async request(peer: Peer, targetService: string, path: string, options: HTTPRequestOptions = {}): Promise<HTTPResponse> {
- const conn = await this.#egressConnection(peer, options.signal);
+ const conn = await this.#egressConnection(peer, targetService, options.signal);
return httpRequestOverStream(conn, this.biscuit, targetService, path, options);
}
/**
* The connection an HTTP call goes out on, its peer verified as an enrolled
- * node holding the floor before anything is sent (agentmesh-node's VerifyPeerLabels).
+ * node holding the floor and granted the service before anything is sent
+ * (agentmesh-node's VerifyProvider).
*/
- async #egressConnection(peer: Peer, signal?: AbortSignal): Promise<Connection> {
+ async #egressConnection(peer: Peer, targetService: string, signal?: AbortSignal): Promise<Connection> {
const conn = await this.connect(peer, signal);
- const peerId = conn.remotePeer.toString();
- const until = this.#egressVerdicts.get(peerId);
+ const verdict = `${conn.remotePeer.toString()}|${targetService}`;
+ const until = this.#egressVerdicts.get(verdict);
if (until !== undefined && until.getTime() > Date.now()) {
return conn;
}
const provider = await authenticateWithPeer(conn, this.mesh.authFrame(), this.mesh.credential.controlPlaneKeys);
// Only nodes host services; a router's or an admin's credential is a member, not a provider.
requireRole(provider, ROLE_NODE);
+ await requirePublish(provider, targetService);
requireEgressLabels(provider, this.#egressRequireLabels);
- this.#egressVerdicts.set(peerId, new Date(Date.now() + EGRESS_VERDICT_TTL_MS));
+ this.#egressVerdicts.set(verdict, new Date(Date.now() + EGRESS_VERDICT_TTL_MS));
return conn;
}
@@ -1143,8 +1145,9 @@ export class MeshSession {
fetch(): typeof fetch {
return async (input, init) => {
const request = new Request(input, init);
- const { peerId } = splitMeshURL(new URL(request.url));
- const conn = await this.#egressConnection(peerId, request.signal);
+ const { peerId, target } = splitMeshURL(new URL(request.url));
+ const [svcType = "", svcName = ""] = target.slice(1).split("/");
+ const conn = await this.#egressConnection(peerId, `${svcType}://${svcName}`, request.signal);
const streamOptions: { signal?: AbortSignal } = {};
if (init?.signal !== undefined && init.signal !== null) {
streamOptions.signal = init.signal;
diff --git a/sdk/python/src/agent_mesh/_gen/datalog.json b/sdk/python/src/agent_mesh/_gen/datalog.json
index 48cb3929..7060bdae 100644
--- a/sdk/python/src/agent_mesh/_gen/datalog.json
+++ b/sdk/python/src/agent_mesh/_gen/datalog.json
@@ -8,6 +8,14 @@
"allow if service($type, $name), granted_service_all($type)",
"allow if service($type, $name), granted_service_all_types(true)"
],
+ "publish_policies": [
+ "allow if publish($type, $name), granted_publish_exact($type, $name)",
+ "allow if publish($type, $name), granted_publish_set($type, $set), $set.contains($name)",
+ "allow if publish($type, $name), granted_publish_prefix($type, $prefix), $name.starts_with($prefix)",
+ "allow if publish($type, $name), granted_publish_suffix($type, $suffix), $name.ends_with($suffix)",
+ "allow if publish($type, $name), granted_publish_all($type)",
+ "allow if publish($type, $name), granted_publish_all_types(true)"
+ ],
"rules": [
"allow_network_target($fact, $val) <- target_fact($fact, $val), granted_target_exact($fact, $val)",
"allow_network_target($fact, $val) <- target_fact($fact, $val), granted_target_set($fact, $set), $set.contains($val)",
@@ -49,6 +57,8 @@
"fact_time": "time",
"fact_role": "role",
"fact_target_fact": "target_fact",
+ "fact_publish": "publish",
+ "catalog_target": "mesh.catalog",
"fact_tar_block": "tar_block",
"tar_block_source_pattern": "^tar_block\\(\"([A-Za-z0-9_-]+)\"\\);?\\s*$",
"http_method_syntax": "^[A-Z][A-Z0-9-]{0,31}$",
diff --git a/sdk/python/src/agent_mesh/_proto/agentmesh_pb2.py b/sdk/python/src/agent_mesh/_proto/agentmesh_pb2.py
index 2d9874bb..be4059d3 100644
--- a/sdk/python/src/agent_mesh/_proto/agentmesh_pb2.py
+++ b/sdk/python/src/agent_mesh/_proto/agentmesh_pb2.py
@@ -15,7 +15,7 @@ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0f\x61gentmesh.proto\x12\x0c\x61gentmesh.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"4\n\tAuthFrame\x12\x0f\n\x07\x62iscuit\x18\x01 \x01(\x0c\x12\x16\n\x0etarget_service\x18\x02 \x01(\t\"?\n\x0c\x41uthResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12\x0f\n\x07\x62iscuit\x18\x03 \x01(\x0c\"\xb1\x01\n\x0cRouterGoAway\x12\x31\n\x06reason\x18\x01 \x01(\x0e\x32!.agentmesh.v1.RouterGoAway.Reason\x12.\n\x0bretry_after\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\">\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44RAINING\x10\x01\x12\x0e\n\nOVERLOADED\x10\x02\"\xdc\x01\n\tMeshEvent\x12*\n\x04type\x18\x01 \x01(\x0e\x32\x1c.agentmesh.v1.MeshEvent.Type\x12\x0f\n\x07peer_id\x18\x02 \x01(\t\x12.\n\nevent_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x16\n\x0enew_public_key\x18\x04 \x01(\x0c\x12\x11\n\tsignature\x18\x05 \x01(\x0c\"7\n\x04Type\x12\n\n\x06\x42\x41NNED\x10\x00\x12\x10\n\x0cKEY_ROTATION\x10\x01\x12\x11\n\rPOLICY_UPDATE\x10\x02\"\xf9\x01\n\rEnrollRequest\x12\x0b\n\x03jwt\x18\x01 \x01(\t\x12\x0f\n\x07peer_id\x18\x02 \x01(\t\x12\x12\n\npublic_key\x18\x03 \x01(\x0c\x12\x16\n\x0erequested_role\x18\x04 \x01(\t\x12\x37\n\x06labels\x18\x05 \x03(\x0b\x32\'.agentmesh.v1.EnrollRequest.LabelsEntry\x12\x19\n\x11\x63hallenge_unix_ms\x18\x06 \x01(\x03\x12\x1b\n\x13\x63hallenge_signature\x18\x07 \x01(\x0c\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xab\x01\n\x0e\x45nrollResponse\x12\x15\n\rbiscuit_token\x18\x01 \x01(\x0c\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12 \n\x18\x63ontrol_plane_public_key\x18\x03 \x01(\x0c\x12\x18\n\x10router_addresses\x18\x04 \x03(\t\x12/\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x97\x02\n\x16\x42ootstrapEnrollRequest\x12\x17\n\x0f\x62ootstrap_token\x18\x01 \x01(\t\x12\x0f\n\x07peer_id\x18\x02 \x01(\t\x12\x12\n\npublic_key\x18\x03 \x01(\x0c\x12\x16\n\x0erequested_role\x18\x04 \x01(\t\x12@\n\x06labels\x18\x05 \x03(\x0b\x32\x30.agentmesh.v1.BootstrapEnrollRequest.LabelsEntry\x12\x19\n\x11\x63hallenge_unix_ms\x18\x06 \x01(\x03\x12\x1b\n\x13\x63hallenge_signature\x18\x07 \x01(\x0c\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x83\x02\n\x17\x42ootstrapEnrollResponse\x12.\n\x06status\x18\x01 \x01(\x0e\x32\x1e.agentmesh.v1.EnrollmentStatus\x12\x15\n\rbiscuit_token\x18\x02 \x01(\x0c\x12\x1d\n\x15poll_interval_seconds\x18\x03 \x01(\x05\x12\x15\n\rerror_message\x18\x04 \x01(\t\x12 \n\x18\x63ontrol_plane_public_key\x18\x05 \x01(\x0c\x12\x18\n\x10router_addresses\x18\x06 \x03(\t\x12/\n\x0b\x65xpire_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Y\n\x0bServiceInfo\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.agentmesh.v1.ServiceType\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"\x81\x01\n\x0e\x43ommandBackend\x12\x0f\n\x07\x63ommand\x18\x01 \x03(\t\x12\x32\n\x03\x65nv\x18\x02 \x03(\x0b\x32%.agentmesh.v1.CommandBackend.EnvEntry\x1a*\n\x08\x45nvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x96\x01\n\x16RegisterServiceRequest\x12*\n\x07service\x18\x01 \x01(\x0b\x32\x19.agentmesh.v1.ServiceInfo\x12\x14\n\ntarget_url\x18\x02 \x01(\tH\x00\x12/\n\x07\x63ommand\x18\x03 \x01(\x0b\x32\x1c.agentmesh.v1.CommandBackendH\x00\x42\t\n\x07\x62\x61\x63kend\"i\n\x12\x44iscoveredProvider\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\x17\n\x0flocal_proxy_url\x18\x02 \x01(\t\x12\x10\n\x08srv_name\x18\x03 \x01(\t\x12\x17\n\x0fsrv_description\x18\x04 \x01(\t\"\xe8\x01\n\x18\x43ontrolPlaneInfoResponse\x12\x13\n\x0boidc_issuer\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\x12\x10\n\x08\x61udience\x18\x03 \x01(\t\x12\x18\n\x10router_addresses\x18\x04 \x03(\t\x12\x17\n\x0f\x62\x61nned_peer_ids\x18\x05 \x03(\t\x12)\n\x07routers\x18\x06 \x03(\x0b\x32\x18.agentmesh.v1.RouterInfo\x12\x34\n\tdirectory\x18\x07 \x01(\x0b\x32!.agentmesh.v1.DirectoryParameters\"\x90\x01\n\x13\x44irectoryParameters\x12\x13\n\x0breplication\x18\x01 \x01(\x05\x12\x35\n\x12reprovide_interval\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\nrecord_ttl\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xfb\x01\n\x10\x44irectoryRequest\x12\x31\n\x07provide\x18\x01 \x01(\x0b\x32\x1e.agentmesh.v1.DirectoryProvideH\x00\x12>\n\x0e\x66ind_providers\x18\x02 \x01(\x0b\x32$.agentmesh.v1.DirectoryFindProvidersH\x00\x12\x34\n\tfind_peer\x18\x03 \x01(\x0b\x32\x1f.agentmesh.v1.DirectoryFindPeerH\x00\x12\x33\n\x08withdraw\x18\x04 \x01(\x0b\x32\x1f.agentmesh.v1.DirectoryWithdrawH\x00\x42\t\n\x07request\"Q\n\x10\x44irectoryProvide\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05\x61\x64\x64rs\x18\x02 \x03(\t\x12\x10\n\x08provider\x18\x03 \x01(\t\x12\x0f\n\x07service\x18\x04 \x01(\t\"2\n\x11\x44irectoryWithdraw\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\x10\n\x08provider\x18\x02 \x01(\t\"4\n\x16\x44irectoryFindProviders\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05limit\x18\x02 \x01(\r\"$\n\x11\x44irectoryFindPeer\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\"w\n\x11\x44irectoryResponse\x12+\n\tproviders\x18\x01 \x03(\x0b\x32\x18.agentmesh.v1.PeerRecord\x12&\n\x04peer\x18\x02 \x01(\x0b\x32\x18.agentmesh.v1.PeerRecord\x12\r\n\x05\x65rror\x18\x03 \x01(\t\",\n\nPeerRecord\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\r\n\x05\x61\x64\x64rs\x18\x02 \x03(\t\"\xc4\x01\n\nRouterInfo\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\x11\n\taddresses\x18\x02 \x03(\t\x12\x34\n\x06labels\x18\x03 \x03(\x0b\x32$.agentmesh.v1.RouterInfo.LabelsEntry\x12\x13\n\x0b\x63onnections\x18\x04 \x01(\x05\x12\x18\n\x10\x63onnection_limit\x18\x05 \x01(\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x83\x02\n\x12RouterLeaseRequest\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\x11\n\taddresses\x18\x02 \x03(\t\x12\x0f\n\x07\x62iscuit\x18\x03 \x01(\x0c\x12\x17\n\x0f\x63onnected_peers\x18\x04 \x03(\t\x12\x10\n\x08\x64ht_size\x18\x05 \x01(\x05\x12\x19\n\x11\x63hallenge_unix_ms\x18\x06 \x01(\x03\x12\x1b\n\x13\x63hallenge_signature\x18\x07 \x01(\x0c\x12&\n\x03ttl\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x13\n\x0b\x63onnections\x18\t \x01(\x05\x12\x18\n\x10\x63onnection_limit\x18\n \x01(\x05\"f\n\x13RouterLeaseResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa4\x01\n\nPolicyRole\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x0f\x61llowed_targets\x18\x02 \x03(\t\x12\x18\n\x10\x61llowed_services\x18\x03 \x03(\t\x12\x16\n\x0e\x63ustom_datalog\x18\x04 \x03(\t\x12\x16\n\x0e\x61llowed_labels\x18\x05 \x03(\t\x12%\n\x04http\x18\x06 \x03(\x0b\x32\x17.agentmesh.v1.HTTPGrant\"<\n\tHTTPGrant\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x0f\n\x07methods\x18\x02 \x03(\t\x12\r\n\x05paths\x18\x03 \x03(\t\"\xa1\x02\n\x11\x45gressDestination\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ntarget_url\x18\x02 \x01(\t\x12\x12\n\ncredential\x18\x03 \x01(\t\x12\x11\n\tserved_by\x18\x04 \x03(\t\x12.\n\x06\x62roker\x18\x05 \x01(\x0b\x32\x1e.agentmesh.v1.CredentialBroker\x12,\n\ninspection\x18\x06 \x01(\x0b\x32\x18.agentmesh.v1.Inspection\x12&\n\x04mode\x18\x07 \x01(\x0e\x32\x18.agentmesh.v1.EgressMode\x12\r\n\x05ports\x18\x08 \x03(\r\x12\x15\n\rpreserve_host\x18\t \x01(\x08\x12\x17\n\x0f\x66orward_context\x18\n \x01(\x08\"9\n\nInspection\x12+\n\ninspectors\x18\x01 \x03(\x0b\x32\x17.agentmesh.v1.Inspector\"o\n\tInspector\x12/\n\x0bmodel_armor\x18\x01 \x01(\x0b\x32\x18.agentmesh.v1.ModelArmorH\x00\x12)\n\x08\x65xt_proc\x18\x02 \x01(\x0b\x32\x15.agentmesh.v1.ExtProcH\x00\x42\x06\n\x04kind\"\x91\x01\n\nModelArmor\x12\x10\n\x08template\x18\x01 \x01(\t\x12\x32\n\x08response\x18\x02 \x01(\x0e\x32 .agentmesh.v1.ResponseInspection\x12\x11\n\tfail_open\x18\x03 \x01(\x08\x12*\n\x07timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x88\x02\n\x07\x45xtProc\x12\x0e\n\x06target\x18\x01 \x01(\t\x12\n\n\x02\x63\x61\x18\x02 \x01(\t\x12\x1a\n\x12\x63lient_certificate\x18\x03 \x01(\t\x12<\n\x0fprocessing_mode\x18\x04 \x01(\x0b\x32#.agentmesh.v1.ExtProcProcessingMode\x12\x1b\n\x13\x61llow_mode_override\x18\x05 \x01(\x08\x12\x32\n\x0fmessage_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12\x66\x61ilure_mode_allow\x18\x07 \x01(\x08\x12\x1a\n\x12max_buffered_bytes\x18\x08 \x01(\r\"\xff\x04\n\x15\x45xtProcProcessingMode\x12K\n\x13request_header_mode\x18\x01 \x01(\x0e\x32..agentmesh.v1.ExtProcProcessingMode.HeaderMode\x12L\n\x14response_header_mode\x18\x02 \x01(\x0e\x32..agentmesh.v1.ExtProcProcessingMode.HeaderMode\x12G\n\x11request_body_mode\x18\x03 \x01(\x0e\x32,.agentmesh.v1.ExtProcProcessingMode.BodyMode\x12H\n\x12response_body_mode\x18\x04 \x01(\x0e\x32,.agentmesh.v1.ExtProcProcessingMode.BodyMode\x12L\n\x14request_trailer_mode\x18\x05 \x01(\x0e\x32..agentmesh.v1.ExtProcProcessingMode.HeaderMode\x12M\n\x15response_trailer_mode\x18\x06 \x01(\x0e\x32..agentmesh.v1.ExtProcProcessingMode.HeaderMode\"9\n\nHeaderMode\x12\x17\n\x13HEADER_MODE_DEFAULT\x10\x00\x12\x08\n\x04SEND\x10\x01\x12\x08\n\x04SKIP\x10\x02\"`\n\x08\x42odyMode\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08STREAMED\x10\x01\x12\x0c\n\x08\x42UFFERED\x10\x02\x12\x14\n\x10\x42UFFERED_PARTIAL\x10\x03\x12\x18\n\x14\x46ULL_DUPLEX_STREAMED\x10\x04\"\xe1\x01\n\x10\x43redentialBroker\x12\x17\n\rstatic_secret\x18\x01 \x01(\tH\x00\x12\x37\n\x0foidc_federation\x18\x02 \x01(\x0b\x32\x1c.agentmesh.v1.OIDCFederationH\x00\x12\x36\n\x0f\x61ws_assume_role\x18\x03 \x01(\x0b\x32\x1b.agentmesh.v1.AWSAssumeRoleH\x00\x12;\n\x11platform_identity\x18\x04 \x01(\x0b\x32\x1e.agentmesh.v1.PlatformIdentityH\x00\x42\x06\n\x04kind\"_\n\x0eOIDCFederation\x12\x16\n\x0etoken_endpoint\x18\x01 \x01(\t\x12\x10\n\x08\x61udience\x18\x02 \x01(\t\x12\x13\n\x0bimpersonate\x18\x03 \x01(\t\x12\x0e\n\x06scopes\x18\x04 \x03(\t\"9\n\rAWSAssumeRole\x12\x10\n\x08role_arn\x18\x01 \x01(\t\x12\x16\n\x0esession_policy\x18\x02 \x01(\t\"\"\n\x10PlatformIdentity\x12\x0e\n\x06scopes\x18\x01 \x03(\t\".\n\rPolicyBinding\x12\x0c\n\x04role\x18\x01 \x01(\t\x12\x0f\n\x07members\x18\x02 \x03(\t\"\x97\x01\n\x0cPolicyConfig\x12\'\n\x05roles\x18\x01 \x03(\x0b\x32\x18.agentmesh.v1.PolicyRole\x12-\n\x08\x62indings\x18\x02 \x03(\x0b\x32\x1b.agentmesh.v1.PolicyBinding\x12/\n\x06\x65gress\x18\x03 \x03(\x0b\x32\x1f.agentmesh.v1.EgressDestination\"\x18\n\x16PolicyConfigGetRequest\"0\n\x17PolicyConfigGetResponse\x12\x15\n\rdatalog_rules\x18\x01 \x03(\t\"<\n\x1aPolicyConfigUpdateResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"\x1a\n\x18\x45gressAssignmentsRequest\"L\n\x19\x45gressAssignmentsResponse\x12/\n\x06\x65gress\x18\x01 \x03(\x0b\x32\x1f.agentmesh.v1.EgressDestination\"f\n\x0cKeysResponse\x12\x13\n\x0bpublic_keys\x18\x01 \x03(\x0c\x12-\n\tsign_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nsignatures\x18\x03 \x03(\x0c\"k\n\x13TokenRefreshRequest\x12\x1b\n\x13\x63hallenge_signature\x18\x01 \x01(\x0c\x12\x19\n\x11\x63hallenge_unix_ms\x18\x02 \x01(\x03\x12\x0f\n\x07peer_id\x18\x03 \x01(\t\x12\x0b\n\x03jwt\x18\x04 \x01(\t\"u\n\x14TokenRefreshResponse\x12\x15\n\rbiscuit_token\x18\x01 \x01(\x0c\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rerror_message\x18\x03 \x01(\t\"@\n\x11NodeCatalogReport\x12+\n\x08services\x18\x01 \x03(\x0b\x32\x19.agentmesh.v1.ServiceInfo\"%\n\x12TokenRevokeRequest\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\"5\n\x13TokenRevokeResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"\x96\x01\n\x1b\x42ootstrapTokenCreateRequest\x12\x0c\n\x04role\x18\x01 \x01(\t\x12\x10\n\x08owner_id\x18\x02 \x01(\t\x12\x11\n\tttl_hours\x18\x03 \x01(\x05\x12\x12\n\nmax_usages\x18\x04 \x01(\x05\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x1b\n\x13\x61utonomous_recovery\x18\x06 \x01(\x08\"\x8a\x01\n\x1c\x42ootstrapTokenCreateResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\x12\x0c\n\x04role\x18\x03 \x01(\t\x12\x10\n\x08owner_id\x18\x04 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xab\x02\n\x0e\x42ootstrapToken\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04role\x18\x02 \x01(\t\x12\x10\n\x08owner_id\x18\x03 \x01(\t\x12\x12\n\nmax_usages\x18\x04 \x01(\x05\x12\x14\n\x0cusages_count\x18\x05 \x01(\x05\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x65xpire_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0brevoke_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1b\n\x13\x61utonomous_recovery\x18\n \x01(\x08\"J\n\x1a\x42ootstrapTokenListResponse\x12,\n\x06tokens\x18\x01 \x03(\x0b\x32\x1c.agentmesh.v1.BootstrapToken\"\xd6\x02\n\x11\x45nrollmentRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07peer_id\x18\x02 \x01(\t\x12\x10\n\x08token_id\x18\x03 \x01(\t\x12.\n\x06status\x18\x04 \x01(\x0e\x32\x1e.agentmesh.v1.EnrollmentStatus\x12;\n\x06labels\x18\x05 \x03(\x0b\x32+.agentmesh.v1.EnrollmentRequest.LabelsEntry\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cresolve_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0bresolved_by\x18\x08 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"R\n\x1d\x45nrollmentRequestListResponse\x12\x31\n\x08requests\x18\x01 \x03(\x0b\x32\x1f.agentmesh.v1.EnrollmentRequest\"p\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06issuer\x18\x02 \x01(\t\x12\r\n\x05\x65mail\x18\x03 \x01(\t\x12\x0c\n\x04role\x18\x04 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe3\x02\n\x0c\x45nrolledNode\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\x0c\n\x04role\x18\x02 \x01(\t\x12\x17\n\x0f\x65nrollment_type\x18\x03 \x01(\t\x12\x13\n\x0b\x63laims_json\x18\x04 \x01(\t\x12\x10\n\x08owner_id\x18\x05 \x01(\t\x12\x36\n\x06labels\x18\x06 \x03(\x0b\x32&.agentmesh.v1.EnrolledNode.LabelsEntry\x12/\n\x0b\x65nroll_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x65xpire_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06\x62\x61nned\x18\t \x01(\x08\x12\x1b\n\x13\x61utonomous_recovery\x18\n \x01(\x08\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc4\x01\n\x0bRouterLease\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\x11\n\taddresses\x18\x02 \x03(\t\x12\x35\n\x11last_renewal_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x65xpire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63onnected_peers\x18\x05 \x03(\t\x12\x10\n\x08\x64ht_size\x18\x06 \x01(\x05\"l\n\x0cNodeServices\x12+\n\x08services\x18\x01 \x03(\x0b\x32\x19.agentmesh.v1.ServiceInfo\x12/\n\x0breport_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xdb\x03\n\x13\x41\x64minStatusResponse\x12!\n\x05users\x18\x01 \x03(\x0b\x32\x12.agentmesh.v1.User\x12\x31\n\x0e\x61\x63tive_routers\x18\x02 \x03(\x0b\x32\x19.agentmesh.v1.RouterLease\x12\x32\n\x0e\x65nrolled_nodes\x18\x03 \x03(\x0b\x32\x1a.agentmesh.v1.EnrolledNode\x12<\n\x13\x65nrollment_requests\x18\x04 \x03(\x0b\x32\x1f.agentmesh.v1.EnrollmentRequest\x12\x36\n\x10\x62ootstrap_tokens\x18\x05 \x03(\x0b\x32\x1c.agentmesh.v1.BootstrapToken\x12*\n\x06policy\x18\x06 \x01(\x0b\x32\x1a.agentmesh.v1.PolicyConfig\x12H\n\x0cnode_catalog\x18\x07 \x03(\x0b\x32\x32.agentmesh.v1.AdminStatusResponse.NodeCatalogEntry\x1aN\n\x10NodeCatalogEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.agentmesh.v1.NodeServices:\x02\x38\x01\"\x81\x02\n\x12UserStatusResponse\x12 \n\x04user\x18\x01 \x01(\x0b\x32\x12.agentmesh.v1.User\x12\x32\n\x0e\x65nrolled_nodes\x18\x02 \x03(\x0b\x32\x1a.agentmesh.v1.EnrolledNode\x12\x36\n\x10\x62ootstrap_tokens\x18\x03 \x03(\x0b\x32\x1c.agentmesh.v1.BootstrapToken\x12\x31\n\x0e\x61\x63tive_routers\x18\x04 \x03(\x0b\x32\x19.agentmesh.v1.RouterLease\x12*\n\x06policy\x18\x05 \x01(\x0b\x32\x1a.agentmesh.v1.PolicyConfig\"\xe4\x01\n\x18IdentityEvidenceResponse\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\x0f\n\x07\x62iscuit\x18\x02 \x01(\x0c\x12\x37\n\x13\x62iscuit_expire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontrol_plane_url\x18\x04 \x01(\t\x12\"\n\x1atrusted_control_plane_keys\x18\x05 \x03(\x0c\x12.\n\ncheck_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc6\x02\n\x14PeerEvidenceResponse\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\x0f\n\x07\x62iscuit\x18\x02 \x01(\x0c\x12\x15\n\rverifying_key\x18\x03 \x01(\x0c\x12\r\n\x05roles\x18\x04 \x03(\t\x12>\n\x06labels\x18\x05 \x03(\x0b\x32..agentmesh.v1.PeerEvidenceResponse.LabelsEntry\x12/\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x16\n\x0erevocation_ids\x18\x07 \x03(\t\x12.\n\ncheck_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8c\x02\n\x10MemberCredential\x12\x19\n\x11\x63ontrol_plane_url\x18\x01 \x01(\t\x12\x0f\n\x07\x62iscuit\x18\x02 \x01(\x0c\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x0ctrusted_keys\x18\x04 \x03(\x0b\x32\x1f.agentmesh.v1.TrustedSigningKey\x12\x19\n\x11issued_under_keys\x18\x05 \x03(\x0c\x12\x18\n\x10router_addresses\x18\x06 \x03(\t\x12/\n\x0coidc_session\x18\x07 \x01(\x0b\x32\x19.agentmesh.v1.OIDCSession\"Y\n\x11TrustedSigningKey\x12\x12\n\npublic_key\x18\x01 \x01(\x0c\x12\x30\n\x0creceive_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Y\n\x0bOIDCSession\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\x12\x10\n\x08\x61udience\x18\x03 \x01(\t\x12\x15\n\rrefresh_token\x18\x04 \x01(\t\"\x93\x01\n\x15TaskAuthorizationRule\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12%\n\x05rules\x18\x03 \x03(\x0b\x32\x16.agentmesh.v1.TaskRule\x12/\n\x0b\x65xpire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x84\x01\n\x08TaskRule\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x18\n\x10\x61llowed_services\x18\x02 \x03(\t\x12.\n\toperation\x18\x03 \x01(\x0b\x32\x1b.agentmesh.v1.TaskOperation\x12\x19\n\x11\x61llowed_resources\x18\x04 \x03(\t\"s\n\rTaskOperation\x12\x15\n\rallowed_tools\x18\x01 \x03(\t\x12\x17\n\x0f\x61llowed_methods\x18\x02 \x03(\t\x12\x15\n\rallowed_paths\x18\x03 \x03(\t\x12\x1b\n\x13\x61llowed_permissions\x18\x04 \x03(\t\"\xab\x01\n\x14TokenExchangeRequest\x12\x15\n\rsubject_token\x18\x01 \x01(\t\x12\x36\n\ttask_rule\x18\x02 \x01(\x0b\x32#.agentmesh.v1.TaskAuthorizationRule\x12\x0c\n\x04seal\x18\x03 \x01(\x08\x12\x19\n\x11\x63hallenge_unix_ms\x18\x04 \x01(\x03\x12\x1b\n\x13\x63hallenge_signature\x18\x05 \x01(\x0c\"\x7f\n\x15TokenExchangeResponse\x12\x15\n\rbiscuit_token\x18\x01 \x01(\x0c\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05roles\x18\x03 \x03(\t\x12\x0f\n\x07subject\x18\x04 \x01(\t\"\x81\x01\n\x0fSTSTokenRequest\x12\x0f\n\x07\x62iscuit\x18\x01 \x01(\x0c\x12\x13\n\x0b\x64\x65stination\x18\x02 \x01(\t\x12\x10\n\x08\x61udience\x18\x03 \x01(\t\x12\x19\n\x11\x63hallenge_unix_ms\x18\x04 \x01(\x03\x12\x1b\n\x13\x63hallenge_signature\x18\x05 \x01(\x0c\"\x83\x01\n\x10STSTokenResponse\x12\x0b\n\x03jwt\x18\x01 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07subject\x18\x03 \x01(\t\x12\r\n\x05roles\x18\x04 \x03(\t\x12\x11\n\ttask_name\x18\x05 \x01(\t\"F\n\x13RevocationsResponse\x12\x16\n\x0erevocation_ids\x18\x01 \x03(\t\x12\x17\n\x0f\x62\x61nned_peer_ids\x18\x02 \x03(\t*\x94\x01\n\x10\x45nrollmentStatus\x12!\n\x1d\x45NROLLMENT_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x45NROLLMENT_STATUS_PENDING\x10\x01\x12\x1e\n\x1a\x45NROLLMENT_STATUS_APPROVED\x10\x02\x12\x1e\n\x1a\x45NROLLMENT_STATUS_REJECTED\x10\x03*\x8c\x01\n\x0bServiceType\x12\x1c\n\x18SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10SERVICE_TYPE_MCP\x10\x01\x12\x1a\n\x16SERVICE_TYPE_INFERENCE\x10\x02\x12\x14\n\x10SERVICE_TYPE_A2A\x10\x03\x12\x17\n\x13SERVICE_TYPE_EGRESS\x10\x04*7\n\nEgressMode\x12\x14\n\x10\x45GRESS_MODE_HTTP\x10\x00\x12\x13\n\x0f\x45GRESS_MODE_TCP\x10\x01*\\\n\x12ResponseInspection\x12 \n\x1cRESPONSE_INSPECTION_BUFFERED\x10\x00\x12$\n RESPONSE_INSPECTION_REQUEST_ONLY\x10\x01\x42!Z\x1fgithub.com/google/agentmesh/apib\x06proto3')
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0f\x61gentmesh.proto\x12\x0c\x61gentmesh.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"4\n\tAuthFrame\x12\x0f\n\x07\x62iscuit\x18\x01 \x01(\x0c\x12\x16\n\x0etarget_service\x18\x02 \x01(\t\"?\n\x0c\x41uthResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12\x0f\n\x07\x62iscuit\x18\x03 \x01(\x0c\"\xb1\x01\n\x0cRouterGoAway\x12\x31\n\x06reason\x18\x01 \x01(\x0e\x32!.agentmesh.v1.RouterGoAway.Reason\x12.\n\x0bretry_after\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\">\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44RAINING\x10\x01\x12\x0e\n\nOVERLOADED\x10\x02\"\xdc\x01\n\tMeshEvent\x12*\n\x04type\x18\x01 \x01(\x0e\x32\x1c.agentmesh.v1.MeshEvent.Type\x12\x0f\n\x07peer_id\x18\x02 \x01(\t\x12.\n\nevent_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x16\n\x0enew_public_key\x18\x04 \x01(\x0c\x12\x11\n\tsignature\x18\x05 \x01(\x0c\"7\n\x04Type\x12\n\n\x06\x42\x41NNED\x10\x00\x12\x10\n\x0cKEY_ROTATION\x10\x01\x12\x11\n\rPOLICY_UPDATE\x10\x02\"\xf9\x01\n\rEnrollRequest\x12\x0b\n\x03jwt\x18\x01 \x01(\t\x12\x0f\n\x07peer_id\x18\x02 \x01(\t\x12\x12\n\npublic_key\x18\x03 \x01(\x0c\x12\x16\n\x0erequested_role\x18\x04 \x01(\t\x12\x37\n\x06labels\x18\x05 \x03(\x0b\x32\'.agentmesh.v1.EnrollRequest.LabelsEntry\x12\x19\n\x11\x63hallenge_unix_ms\x18\x06 \x01(\x03\x12\x1b\n\x13\x63hallenge_signature\x18\x07 \x01(\x0c\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xab\x01\n\x0e\x45nrollResponse\x12\x15\n\rbiscuit_token\x18\x01 \x01(\x0c\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12 \n\x18\x63ontrol_plane_public_key\x18\x03 \x01(\x0c\x12\x18\n\x10router_addresses\x18\x04 \x03(\t\x12/\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x97\x02\n\x16\x42ootstrapEnrollRequest\x12\x17\n\x0f\x62ootstrap_token\x18\x01 \x01(\t\x12\x0f\n\x07peer_id\x18\x02 \x01(\t\x12\x12\n\npublic_key\x18\x03 \x01(\x0c\x12\x16\n\x0erequested_role\x18\x04 \x01(\t\x12@\n\x06labels\x18\x05 \x03(\x0b\x32\x30.agentmesh.v1.BootstrapEnrollRequest.LabelsEntry\x12\x19\n\x11\x63hallenge_unix_ms\x18\x06 \x01(\x03\x12\x1b\n\x13\x63hallenge_signature\x18\x07 \x01(\x0c\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x83\x02\n\x17\x42ootstrapEnrollResponse\x12.\n\x06status\x18\x01 \x01(\x0e\x32\x1e.agentmesh.v1.EnrollmentStatus\x12\x15\n\rbiscuit_token\x18\x02 \x01(\x0c\x12\x1d\n\x15poll_interval_seconds\x18\x03 \x01(\x05\x12\x15\n\rerror_message\x18\x04 \x01(\t\x12 \n\x18\x63ontrol_plane_public_key\x18\x05 \x01(\x0c\x12\x18\n\x10router_addresses\x18\x06 \x03(\t\x12/\n\x0b\x65xpire_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Y\n\x0bServiceInfo\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.agentmesh.v1.ServiceType\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"\x81\x01\n\x0e\x43ommandBackend\x12\x0f\n\x07\x63ommand\x18\x01 \x03(\t\x12\x32\n\x03\x65nv\x18\x02 \x03(\x0b\x32%.agentmesh.v1.CommandBackend.EnvEntry\x1a*\n\x08\x45nvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x96\x01\n\x16RegisterServiceRequest\x12*\n\x07service\x18\x01 \x01(\x0b\x32\x19.agentmesh.v1.ServiceInfo\x12\x14\n\ntarget_url\x18\x02 \x01(\tH\x00\x12/\n\x07\x63ommand\x18\x03 \x01(\x0b\x32\x1c.agentmesh.v1.CommandBackendH\x00\x42\t\n\x07\x62\x61\x63kend\"i\n\x12\x44iscoveredProvider\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\x17\n\x0flocal_proxy_url\x18\x02 \x01(\t\x12\x10\n\x08srv_name\x18\x03 \x01(\t\x12\x17\n\x0fsrv_description\x18\x04 \x01(\t\"\xe8\x01\n\x18\x43ontrolPlaneInfoResponse\x12\x13\n\x0boidc_issuer\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\x12\x10\n\x08\x61udience\x18\x03 \x01(\t\x12\x18\n\x10router_addresses\x18\x04 \x03(\t\x12\x17\n\x0f\x62\x61nned_peer_ids\x18\x05 \x03(\t\x12)\n\x07routers\x18\x06 \x03(\x0b\x32\x18.agentmesh.v1.RouterInfo\x12\x34\n\tdirectory\x18\x07 \x01(\x0b\x32!.agentmesh.v1.DirectoryParameters\"\x90\x01\n\x13\x44irectoryParameters\x12\x13\n\x0breplication\x18\x01 \x01(\x05\x12\x35\n\x12reprovide_interval\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\nrecord_ttl\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xfb\x01\n\x10\x44irectoryRequest\x12\x31\n\x07provide\x18\x01 \x01(\x0b\x32\x1e.agentmesh.v1.DirectoryProvideH\x00\x12>\n\x0e\x66ind_providers\x18\x02 \x01(\x0b\x32$.agentmesh.v1.DirectoryFindProvidersH\x00\x12\x34\n\tfind_peer\x18\x03 \x01(\x0b\x32\x1f.agentmesh.v1.DirectoryFindPeerH\x00\x12\x33\n\x08withdraw\x18\x04 \x01(\x0b\x32\x1f.agentmesh.v1.DirectoryWithdrawH\x00\x42\t\n\x07request\"Q\n\x10\x44irectoryProvide\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05\x61\x64\x64rs\x18\x02 \x03(\t\x12\x10\n\x08provider\x18\x03 \x01(\t\x12\x0f\n\x07service\x18\x04 \x01(\t\"2\n\x11\x44irectoryWithdraw\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\x10\n\x08provider\x18\x02 \x01(\t\"4\n\x16\x44irectoryFindProviders\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05limit\x18\x02 \x01(\r\"$\n\x11\x44irectoryFindPeer\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\"w\n\x11\x44irectoryResponse\x12+\n\tproviders\x18\x01 \x03(\x0b\x32\x18.agentmesh.v1.PeerRecord\x12&\n\x04peer\x18\x02 \x01(\x0b\x32\x18.agentmesh.v1.PeerRecord\x12\r\n\x05\x65rror\x18\x03 \x01(\t\",\n\nPeerRecord\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\r\n\x05\x61\x64\x64rs\x18\x02 \x03(\t\"\xc4\x01\n\nRouterInfo\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\x11\n\taddresses\x18\x02 \x03(\t\x12\x34\n\x06labels\x18\x03 \x03(\x0b\x32$.agentmesh.v1.RouterInfo.LabelsEntry\x12\x13\n\x0b\x63onnections\x18\x04 \x01(\x05\x12\x18\n\x10\x63onnection_limit\x18\x05 \x01(\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x83\x02\n\x12RouterLeaseRequest\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\x11\n\taddresses\x18\x02 \x03(\t\x12\x0f\n\x07\x62iscuit\x18\x03 \x01(\x0c\x12\x17\n\x0f\x63onnected_peers\x18\x04 \x03(\t\x12\x10\n\x08\x64ht_size\x18\x05 \x01(\x05\x12\x19\n\x11\x63hallenge_unix_ms\x18\x06 \x01(\x03\x12\x1b\n\x13\x63hallenge_signature\x18\x07 \x01(\x0c\x12&\n\x03ttl\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x13\n\x0b\x63onnections\x18\t \x01(\x05\x12\x18\n\x10\x63onnection_limit\x18\n \x01(\x05\"f\n\x13RouterLeaseResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xbd\x01\n\nPolicyRole\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x0f\x61llowed_targets\x18\x02 \x03(\t\x12\x18\n\x10\x61llowed_services\x18\x03 \x03(\t\x12\x16\n\x0e\x63ustom_datalog\x18\x04 \x03(\t\x12\x16\n\x0e\x61llowed_labels\x18\x05 \x03(\t\x12%\n\x04http\x18\x06 \x03(\x0b\x32\x17.agentmesh.v1.HTTPGrant\x12\x17\n\x0f\x61llowed_publish\x18\x07 \x03(\t\"<\n\tHTTPGrant\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x0f\n\x07methods\x18\x02 \x03(\t\x12\r\n\x05paths\x18\x03 \x03(\t\"\xa1\x02\n\x11\x45gressDestination\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ntarget_url\x18\x02 \x01(\t\x12\x12\n\ncredential\x18\x03 \x01(\t\x12\x11\n\tserved_by\x18\x04 \x03(\t\x12.\n\x06\x62roker\x18\x05 \x01(\x0b\x32\x1e.agentmesh.v1.CredentialBroker\x12,\n\ninspection\x18\x06 \x01(\x0b\x32\x18.agentmesh.v1.Inspection\x12&\n\x04mode\x18\x07 \x01(\x0e\x32\x18.agentmesh.v1.EgressMode\x12\r\n\x05ports\x18\x08 \x03(\r\x12\x15\n\rpreserve_host\x18\t \x01(\x08\x12\x17\n\x0f\x66orward_context\x18\n \x01(\x08\"9\n\nInspection\x12+\n\ninspectors\x18\x01 \x03(\x0b\x32\x17.agentmesh.v1.Inspector\"o\n\tInspector\x12/\n\x0bmodel_armor\x18\x01 \x01(\x0b\x32\x18.agentmesh.v1.ModelArmorH\x00\x12)\n\x08\x65xt_proc\x18\x02 \x01(\x0b\x32\x15.agentmesh.v1.ExtProcH\x00\x42\x06\n\x04kind\"\x91\x01\n\nModelArmor\x12\x10\n\x08template\x18\x01 \x01(\t\x12\x32\n\x08response\x18\x02 \x01(\x0e\x32 .agentmesh.v1.ResponseInspection\x12\x11\n\tfail_open\x18\x03 \x01(\x08\x12*\n\x07timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x88\x02\n\x07\x45xtProc\x12\x0e\n\x06target\x18\x01 \x01(\t\x12\n\n\x02\x63\x61\x18\x02 \x01(\t\x12\x1a\n\x12\x63lient_certificate\x18\x03 \x01(\t\x12<\n\x0fprocessing_mode\x18\x04 \x01(\x0b\x32#.agentmesh.v1.ExtProcProcessingMode\x12\x1b\n\x13\x61llow_mode_override\x18\x05 \x01(\x08\x12\x32\n\x0fmessage_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12\x66\x61ilure_mode_allow\x18\x07 \x01(\x08\x12\x1a\n\x12max_buffered_bytes\x18\x08 \x01(\r\"\xff\x04\n\x15\x45xtProcProcessingMode\x12K\n\x13request_header_mode\x18\x01 \x01(\x0e\x32..agentmesh.v1.ExtProcProcessingMode.HeaderMode\x12L\n\x14response_header_mode\x18\x02 \x01(\x0e\x32..agentmesh.v1.ExtProcProcessingMode.HeaderMode\x12G\n\x11request_body_mode\x18\x03 \x01(\x0e\x32,.agentmesh.v1.ExtProcProcessingMode.BodyMode\x12H\n\x12response_body_mode\x18\x04 \x01(\x0e\x32,.agentmesh.v1.ExtProcProcessingMode.BodyMode\x12L\n\x14request_trailer_mode\x18\x05 \x01(\x0e\x32..agentmesh.v1.ExtProcProcessingMode.HeaderMode\x12M\n\x15response_trailer_mode\x18\x06 \x01(\x0e\x32..agentmesh.v1.ExtProcProcessingMode.HeaderMode\"9\n\nHeaderMode\x12\x17\n\x13HEADER_MODE_DEFAULT\x10\x00\x12\x08\n\x04SEND\x10\x01\x12\x08\n\x04SKIP\x10\x02\"`\n\x08\x42odyMode\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08STREAMED\x10\x01\x12\x0c\n\x08\x42UFFERED\x10\x02\x12\x14\n\x10\x42UFFERED_PARTIAL\x10\x03\x12\x18\n\x14\x46ULL_DUPLEX_STREAMED\x10\x04\"\xe1\x01\n\x10\x43redentialBroker\x12\x17\n\rstatic_secret\x18\x01 \x01(\tH\x00\x12\x37\n\x0foidc_federation\x18\x02 \x01(\x0b\x32\x1c.agentmesh.v1.OIDCFederationH\x00\x12\x36\n\x0f\x61ws_assume_role\x18\x03 \x01(\x0b\x32\x1b.agentmesh.v1.AWSAssumeRoleH\x00\x12;\n\x11platform_identity\x18\x04 \x01(\x0b\x32\x1e.agentmesh.v1.PlatformIdentityH\x00\x42\x06\n\x04kind\"_\n\x0eOIDCFederation\x12\x16\n\x0etoken_endpoint\x18\x01 \x01(\t\x12\x10\n\x08\x61udience\x18\x02 \x01(\t\x12\x13\n\x0bimpersonate\x18\x03 \x01(\t\x12\x0e\n\x06scopes\x18\x04 \x03(\t\"9\n\rAWSAssumeRole\x12\x10\n\x08role_arn\x18\x01 \x01(\t\x12\x16\n\x0esession_policy\x18\x02 \x01(\t\"\"\n\x10PlatformIdentity\x12\x0e\n\x06scopes\x18\x01 \x03(\t\".\n\rPolicyBinding\x12\x0c\n\x04role\x18\x01 \x01(\t\x12\x0f\n\x07members\x18\x02 \x03(\t\"\x97\x01\n\x0cPolicyConfig\x12\'\n\x05roles\x18\x01 \x03(\x0b\x32\x18.agentmesh.v1.PolicyRole\x12-\n\x08\x62indings\x18\x02 \x03(\x0b\x32\x1b.agentmesh.v1.PolicyBinding\x12/\n\x06\x65gress\x18\x03 \x03(\x0b\x32\x1f.agentmesh.v1.EgressDestination\"\x18\n\x16PolicyConfigGetRequest\"0\n\x17PolicyConfigGetResponse\x12\x15\n\rdatalog_rules\x18\x01 \x03(\t\"<\n\x1aPolicyConfigUpdateResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"\x1a\n\x18\x45gressAssignmentsRequest\"L\n\x19\x45gressAssignmentsResponse\x12/\n\x06\x65gress\x18\x01 \x03(\x0b\x32\x1f.agentmesh.v1.EgressDestination\"f\n\x0cKeysResponse\x12\x13\n\x0bpublic_keys\x18\x01 \x03(\x0c\x12-\n\tsign_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nsignatures\x18\x03 \x03(\x0c\"k\n\x13TokenRefreshRequest\x12\x1b\n\x13\x63hallenge_signature\x18\x01 \x01(\x0c\x12\x19\n\x11\x63hallenge_unix_ms\x18\x02 \x01(\x03\x12\x0f\n\x07peer_id\x18\x03 \x01(\t\x12\x0b\n\x03jwt\x18\x04 \x01(\t\"u\n\x14TokenRefreshResponse\x12\x15\n\rbiscuit_token\x18\x01 \x01(\x0c\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rerror_message\x18\x03 \x01(\t\"@\n\x11NodeCatalogReport\x12+\n\x08services\x18\x01 \x03(\x0b\x32\x19.agentmesh.v1.ServiceInfo\"%\n\x12TokenRevokeRequest\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\"5\n\x13TokenRevokeResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"\x96\x01\n\x1b\x42ootstrapTokenCreateRequest\x12\x0c\n\x04role\x18\x01 \x01(\t\x12\x10\n\x08owner_id\x18\x02 \x01(\t\x12\x11\n\tttl_hours\x18\x03 \x01(\x05\x12\x12\n\nmax_usages\x18\x04 \x01(\x05\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x1b\n\x13\x61utonomous_recovery\x18\x06 \x01(\x08\"\x8a\x01\n\x1c\x42ootstrapTokenCreateResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\x12\x0c\n\x04role\x18\x03 \x01(\t\x12\x10\n\x08owner_id\x18\x04 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xab\x02\n\x0e\x42ootstrapToken\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04role\x18\x02 \x01(\t\x12\x10\n\x08owner_id\x18\x03 \x01(\t\x12\x12\n\nmax_usages\x18\x04 \x01(\x05\x12\x14\n\x0cusages_count\x18\x05 \x01(\x05\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x65xpire_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0brevoke_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1b\n\x13\x61utonomous_recovery\x18\n \x01(\x08\"J\n\x1a\x42ootstrapTokenListResponse\x12,\n\x06tokens\x18\x01 \x03(\x0b\x32\x1c.agentmesh.v1.BootstrapToken\"\xd6\x02\n\x11\x45nrollmentRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07peer_id\x18\x02 \x01(\t\x12\x10\n\x08token_id\x18\x03 \x01(\t\x12.\n\x06status\x18\x04 \x01(\x0e\x32\x1e.agentmesh.v1.EnrollmentStatus\x12;\n\x06labels\x18\x05 \x03(\x0b\x32+.agentmesh.v1.EnrollmentRequest.LabelsEntry\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cresolve_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0bresolved_by\x18\x08 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"R\n\x1d\x45nrollmentRequestListResponse\x12\x31\n\x08requests\x18\x01 \x03(\x0b\x32\x1f.agentmesh.v1.EnrollmentRequest\"p\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06issuer\x18\x02 \x01(\t\x12\r\n\x05\x65mail\x18\x03 \x01(\t\x12\x0c\n\x04role\x18\x04 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe3\x02\n\x0c\x45nrolledNode\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\x0c\n\x04role\x18\x02 \x01(\t\x12\x17\n\x0f\x65nrollment_type\x18\x03 \x01(\t\x12\x13\n\x0b\x63laims_json\x18\x04 \x01(\t\x12\x10\n\x08owner_id\x18\x05 \x01(\t\x12\x36\n\x06labels\x18\x06 \x03(\x0b\x32&.agentmesh.v1.EnrolledNode.LabelsEntry\x12/\n\x0b\x65nroll_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x65xpire_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06\x62\x61nned\x18\t \x01(\x08\x12\x1b\n\x13\x61utonomous_recovery\x18\n \x01(\x08\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc4\x01\n\x0bRouterLease\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\x11\n\taddresses\x18\x02 \x03(\t\x12\x35\n\x11last_renewal_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x65xpire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63onnected_peers\x18\x05 \x03(\t\x12\x10\n\x08\x64ht_size\x18\x06 \x01(\x05\"l\n\x0cNodeServices\x12+\n\x08services\x18\x01 \x03(\x0b\x32\x19.agentmesh.v1.ServiceInfo\x12/\n\x0breport_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xdb\x03\n\x13\x41\x64minStatusResponse\x12!\n\x05users\x18\x01 \x03(\x0b\x32\x12.agentmesh.v1.User\x12\x31\n\x0e\x61\x63tive_routers\x18\x02 \x03(\x0b\x32\x19.agentmesh.v1.RouterLease\x12\x32\n\x0e\x65nrolled_nodes\x18\x03 \x03(\x0b\x32\x1a.agentmesh.v1.EnrolledNode\x12<\n\x13\x65nrollment_requests\x18\x04 \x03(\x0b\x32\x1f.agentmesh.v1.EnrollmentRequest\x12\x36\n\x10\x62ootstrap_tokens\x18\x05 \x03(\x0b\x32\x1c.agentmesh.v1.BootstrapToken\x12*\n\x06policy\x18\x06 \x01(\x0b\x32\x1a.agentmesh.v1.PolicyConfig\x12H\n\x0cnode_catalog\x18\x07 \x03(\x0b\x32\x32.agentmesh.v1.AdminStatusResponse.NodeCatalogEntry\x1aN\n\x10NodeCatalogEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.agentmesh.v1.NodeServices:\x02\x38\x01\"\x81\x02\n\x12UserStatusResponse\x12 \n\x04user\x18\x01 \x01(\x0b\x32\x12.agentmesh.v1.User\x12\x32\n\x0e\x65nrolled_nodes\x18\x02 \x03(\x0b\x32\x1a.agentmesh.v1.EnrolledNode\x12\x36\n\x10\x62ootstrap_tokens\x18\x03 \x03(\x0b\x32\x1c.agentmesh.v1.BootstrapToken\x12\x31\n\x0e\x61\x63tive_routers\x18\x04 \x03(\x0b\x32\x19.agentmesh.v1.RouterLease\x12*\n\x06policy\x18\x05 \x01(\x0b\x32\x1a.agentmesh.v1.PolicyConfig\"\xe4\x01\n\x18IdentityEvidenceResponse\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\x0f\n\x07\x62iscuit\x18\x02 \x01(\x0c\x12\x37\n\x13\x62iscuit_expire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontrol_plane_url\x18\x04 \x01(\t\x12\"\n\x1atrusted_control_plane_keys\x18\x05 \x03(\x0c\x12.\n\ncheck_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc6\x02\n\x14PeerEvidenceResponse\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12\x0f\n\x07\x62iscuit\x18\x02 \x01(\x0c\x12\x15\n\rverifying_key\x18\x03 \x01(\x0c\x12\r\n\x05roles\x18\x04 \x03(\t\x12>\n\x06labels\x18\x05 \x03(\x0b\x32..agentmesh.v1.PeerEvidenceResponse.LabelsEntry\x12/\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x16\n\x0erevocation_ids\x18\x07 \x03(\t\x12.\n\ncheck_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8c\x02\n\x10MemberCredential\x12\x19\n\x11\x63ontrol_plane_url\x18\x01 \x01(\t\x12\x0f\n\x07\x62iscuit\x18\x02 \x01(\x0c\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x0ctrusted_keys\x18\x04 \x03(\x0b\x32\x1f.agentmesh.v1.TrustedSigningKey\x12\x19\n\x11issued_under_keys\x18\x05 \x03(\x0c\x12\x18\n\x10router_addresses\x18\x06 \x03(\t\x12/\n\x0coidc_session\x18\x07 \x01(\x0b\x32\x19.agentmesh.v1.OIDCSession\"Y\n\x11TrustedSigningKey\x12\x12\n\npublic_key\x18\x01 \x01(\x0c\x12\x30\n\x0creceive_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Y\n\x0bOIDCSession\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\x12\x10\n\x08\x61udience\x18\x03 \x01(\t\x12\x15\n\rrefresh_token\x18\x04 \x01(\t\"\x93\x01\n\x15TaskAuthorizationRule\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12%\n\x05rules\x18\x03 \x03(\x0b\x32\x16.agentmesh.v1.TaskRule\x12/\n\x0b\x65xpire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x84\x01\n\x08TaskRule\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x18\n\x10\x61llowed_services\x18\x02 \x03(\t\x12.\n\toperation\x18\x03 \x01(\x0b\x32\x1b.agentmesh.v1.TaskOperation\x12\x19\n\x11\x61llowed_resources\x18\x04 \x03(\t\"s\n\rTaskOperation\x12\x15\n\rallowed_tools\x18\x01 \x03(\t\x12\x17\n\x0f\x61llowed_methods\x18\x02 \x03(\t\x12\x15\n\rallowed_paths\x18\x03 \x03(\t\x12\x1b\n\x13\x61llowed_permissions\x18\x04 \x03(\t\"\xab\x01\n\x14TokenExchangeRequest\x12\x15\n\rsubject_token\x18\x01 \x01(\t\x12\x36\n\ttask_rule\x18\x02 \x01(\x0b\x32#.agentmesh.v1.TaskAuthorizationRule\x12\x0c\n\x04seal\x18\x03 \x01(\x08\x12\x19\n\x11\x63hallenge_unix_ms\x18\x04 \x01(\x03\x12\x1b\n\x13\x63hallenge_signature\x18\x05 \x01(\x0c\"\x7f\n\x15TokenExchangeResponse\x12\x15\n\rbiscuit_token\x18\x01 \x01(\x0c\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05roles\x18\x03 \x03(\t\x12\x0f\n\x07subject\x18\x04 \x01(\t\"\x81\x01\n\x0fSTSTokenRequest\x12\x0f\n\x07\x62iscuit\x18\x01 \x01(\x0c\x12\x13\n\x0b\x64\x65stination\x18\x02 \x01(\t\x12\x10\n\x08\x61udience\x18\x03 \x01(\t\x12\x19\n\x11\x63hallenge_unix_ms\x18\x04 \x01(\x03\x12\x1b\n\x13\x63hallenge_signature\x18\x05 \x01(\x0c\"\x83\x01\n\x10STSTokenResponse\x12\x0b\n\x03jwt\x18\x01 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07subject\x18\x03 \x01(\t\x12\r\n\x05roles\x18\x04 \x03(\t\x12\x11\n\ttask_name\x18\x05 \x01(\t\"F\n\x13RevocationsResponse\x12\x16\n\x0erevocation_ids\x18\x01 \x03(\t\x12\x17\n\x0f\x62\x61nned_peer_ids\x18\x02 \x03(\t*\x94\x01\n\x10\x45nrollmentStatus\x12!\n\x1d\x45NROLLMENT_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x45NROLLMENT_STATUS_PENDING\x10\x01\x12\x1e\n\x1a\x45NROLLMENT_STATUS_APPROVED\x10\x02\x12\x1e\n\x1a\x45NROLLMENT_STATUS_REJECTED\x10\x03*\x8c\x01\n\x0bServiceType\x12\x1c\n\x18SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10SERVICE_TYPE_MCP\x10\x01\x12\x1a\n\x16SERVICE_TYPE_INFERENCE\x10\x02\x12\x14\n\x10SERVICE_TYPE_A2A\x10\x03\x12\x17\n\x13SERVICE_TYPE_EGRESS\x10\x04*7\n\nEgressMode\x12\x14\n\x10\x45GRESS_MODE_HTTP\x10\x00\x12\x13\n\x0f\x45GRESS_MODE_TCP\x10\x01*\\\n\x12ResponseInspection\x12 \n\x1cRESPONSE_INSPECTION_BUFFERED\x10\x00\x12$\n RESPONSE_INSPECTION_REQUEST_ONLY\x10\x01\x42!Z\x1fgithub.com/google/agentmesh/apib\x06proto3')
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'agentmesh_pb2', globals())
@@ -39,14 +39,14 @@ if _descriptor._USE_C_DESCRIPTORS == False:
_ADMINSTATUSRESPONSE_NODECATALOGENTRY._serialized_options = b'8\001'
_PEEREVIDENCERESPONSE_LABELSENTRY._options = None
_PEEREVIDENCERESPONSE_LABELSENTRY._serialized_options = b'8\001'
- _ENROLLMENTSTATUS._serialized_start=11453
- _ENROLLMENTSTATUS._serialized_end=11601
- _SERVICETYPE._serialized_start=11604
- _SERVICETYPE._serialized_end=11744
- _EGRESSMODE._serialized_start=11746
- _EGRESSMODE._serialized_end=11801
- _RESPONSEINSPECTION._serialized_start=11803
- _RESPONSEINSPECTION._serialized_end=11895
+ _ENROLLMENTSTATUS._serialized_start=11478
+ _ENROLLMENTSTATUS._serialized_end=11626
+ _SERVICETYPE._serialized_start=11629
+ _SERVICETYPE._serialized_end=11769
+ _EGRESSMODE._serialized_start=11771
+ _EGRESSMODE._serialized_end=11826
+ _RESPONSEINSPECTION._serialized_start=11828
+ _RESPONSEINSPECTION._serialized_end=11920
_AUTHFRAME._serialized_start=98
_AUTHFRAME._serialized_end=150
_AUTHRESPONSE._serialized_start=152
@@ -108,115 +108,115 @@ if _descriptor._USE_C_DESCRIPTORS == False:
_ROUTERLEASERESPONSE._serialized_start=3564
_ROUTERLEASERESPONSE._serialized_end=3666
_POLICYROLE._serialized_start=3669
- _POLICYROLE._serialized_end=3833
- _HTTPGRANT._serialized_start=3835
- _HTTPGRANT._serialized_end=3895
- _EGRESSDESTINATION._serialized_start=3898
- _EGRESSDESTINATION._serialized_end=4187
- _INSPECTION._serialized_start=4189
- _INSPECTION._serialized_end=4246
- _INSPECTOR._serialized_start=4248
- _INSPECTOR._serialized_end=4359
- _MODELARMOR._serialized_start=4362
- _MODELARMOR._serialized_end=4507
- _EXTPROC._serialized_start=4510
- _EXTPROC._serialized_end=4774
- _EXTPROCPROCESSINGMODE._serialized_start=4777
- _EXTPROCPROCESSINGMODE._serialized_end=5416
- _EXTPROCPROCESSINGMODE_HEADERMODE._serialized_start=5261
- _EXTPROCPROCESSINGMODE_HEADERMODE._serialized_end=5318
- _EXTPROCPROCESSINGMODE_BODYMODE._serialized_start=5320
- _EXTPROCPROCESSINGMODE_BODYMODE._serialized_end=5416
- _CREDENTIALBROKER._serialized_start=5419
- _CREDENTIALBROKER._serialized_end=5644
- _OIDCFEDERATION._serialized_start=5646
- _OIDCFEDERATION._serialized_end=5741
- _AWSASSUMEROLE._serialized_start=5743
- _AWSASSUMEROLE._serialized_end=5800
- _PLATFORMIDENTITY._serialized_start=5802
- _PLATFORMIDENTITY._serialized_end=5836
- _POLICYBINDING._serialized_start=5838
- _POLICYBINDING._serialized_end=5884
- _POLICYCONFIG._serialized_start=5887
- _POLICYCONFIG._serialized_end=6038
- _POLICYCONFIGGETREQUEST._serialized_start=6040
- _POLICYCONFIGGETREQUEST._serialized_end=6064
- _POLICYCONFIGGETRESPONSE._serialized_start=6066
- _POLICYCONFIGGETRESPONSE._serialized_end=6114
- _POLICYCONFIGUPDATERESPONSE._serialized_start=6116
- _POLICYCONFIGUPDATERESPONSE._serialized_end=6176
- _EGRESSASSIGNMENTSREQUEST._serialized_start=6178
- _EGRESSASSIGNMENTSREQUEST._serialized_end=6204
- _EGRESSASSIGNMENTSRESPONSE._serialized_start=6206
- _EGRESSASSIGNMENTSRESPONSE._serialized_end=6282
- _KEYSRESPONSE._serialized_start=6284
- _KEYSRESPONSE._serialized_end=6386
- _TOKENREFRESHREQUEST._serialized_start=6388
- _TOKENREFRESHREQUEST._serialized_end=6495
- _TOKENREFRESHRESPONSE._serialized_start=6497
- _TOKENREFRESHRESPONSE._serialized_end=6614
- _NODECATALOGREPORT._serialized_start=6616
- _NODECATALOGREPORT._serialized_end=6680
- _TOKENREVOKEREQUEST._serialized_start=6682
- _TOKENREVOKEREQUEST._serialized_end=6719
- _TOKENREVOKERESPONSE._serialized_start=6721
- _TOKENREVOKERESPONSE._serialized_end=6774
- _BOOTSTRAPTOKENCREATEREQUEST._serialized_start=6777
- _BOOTSTRAPTOKENCREATEREQUEST._serialized_end=6927
- _BOOTSTRAPTOKENCREATERESPONSE._serialized_start=6930
- _BOOTSTRAPTOKENCREATERESPONSE._serialized_end=7068
- _BOOTSTRAPTOKEN._serialized_start=7071
- _BOOTSTRAPTOKEN._serialized_end=7370
- _BOOTSTRAPTOKENLISTRESPONSE._serialized_start=7372
- _BOOTSTRAPTOKENLISTRESPONSE._serialized_end=7446
- _ENROLLMENTREQUEST._serialized_start=7449
- _ENROLLMENTREQUEST._serialized_end=7791
+ _POLICYROLE._serialized_end=3858
+ _HTTPGRANT._serialized_start=3860
+ _HTTPGRANT._serialized_end=3920
+ _EGRESSDESTINATION._serialized_start=3923
+ _EGRESSDESTINATION._serialized_end=4212
+ _INSPECTION._serialized_start=4214
+ _INSPECTION._serialized_end=4271
+ _INSPECTOR._serialized_start=4273
+ _INSPECTOR._serialized_end=4384
+ _MODELARMOR._serialized_start=4387
+ _MODELARMOR._serialized_end=4532
+ _EXTPROC._serialized_start=4535
+ _EXTPROC._serialized_end=4799
+ _EXTPROCPROCESSINGMODE._serialized_start=4802
+ _EXTPROCPROCESSINGMODE._serialized_end=5441
+ _EXTPROCPROCESSINGMODE_HEADERMODE._serialized_start=5286
+ _EXTPROCPROCESSINGMODE_HEADERMODE._serialized_end=5343
+ _EXTPROCPROCESSINGMODE_BODYMODE._serialized_start=5345
+ _EXTPROCPROCESSINGMODE_BODYMODE._serialized_end=5441
+ _CREDENTIALBROKER._serialized_start=5444
+ _CREDENTIALBROKER._serialized_end=5669
+ _OIDCFEDERATION._serialized_start=5671
+ _OIDCFEDERATION._serialized_end=5766
+ _AWSASSUMEROLE._serialized_start=5768
+ _AWSASSUMEROLE._serialized_end=5825
+ _PLATFORMIDENTITY._serialized_start=5827
+ _PLATFORMIDENTITY._serialized_end=5861
+ _POLICYBINDING._serialized_start=5863
+ _POLICYBINDING._serialized_end=5909
+ _POLICYCONFIG._serialized_start=5912
+ _POLICYCONFIG._serialized_end=6063
+ _POLICYCONFIGGETREQUEST._serialized_start=6065
+ _POLICYCONFIGGETREQUEST._serialized_end=6089
+ _POLICYCONFIGGETRESPONSE._serialized_start=6091
+ _POLICYCONFIGGETRESPONSE._serialized_end=6139
+ _POLICYCONFIGUPDATERESPONSE._serialized_start=6141
+ _POLICYCONFIGUPDATERESPONSE._serialized_end=6201
+ _EGRESSASSIGNMENTSREQUEST._serialized_start=6203
+ _EGRESSASSIGNMENTSREQUEST._serialized_end=6229
+ _EGRESSASSIGNMENTSRESPONSE._serialized_start=6231
+ _EGRESSASSIGNMENTSRESPONSE._serialized_end=6307
+ _KEYSRESPONSE._serialized_start=6309
+ _KEYSRESPONSE._serialized_end=6411
+ _TOKENREFRESHREQUEST._serialized_start=6413
+ _TOKENREFRESHREQUEST._serialized_end=6520
+ _TOKENREFRESHRESPONSE._serialized_start=6522
+ _TOKENREFRESHRESPONSE._serialized_end=6639
+ _NODECATALOGREPORT._serialized_start=6641
+ _NODECATALOGREPORT._serialized_end=6705
+ _TOKENREVOKEREQUEST._serialized_start=6707
+ _TOKENREVOKEREQUEST._serialized_end=6744
+ _TOKENREVOKERESPONSE._serialized_start=6746
+ _TOKENREVOKERESPONSE._serialized_end=6799
+ _BOOTSTRAPTOKENCREATEREQUEST._serialized_start=6802
+ _BOOTSTRAPTOKENCREATEREQUEST._serialized_end=6952
+ _BOOTSTRAPTOKENCREATERESPONSE._serialized_start=6955
+ _BOOTSTRAPTOKENCREATERESPONSE._serialized_end=7093
+ _BOOTSTRAPTOKEN._serialized_start=7096
+ _BOOTSTRAPTOKEN._serialized_end=7395
+ _BOOTSTRAPTOKENLISTRESPONSE._serialized_start=7397
+ _BOOTSTRAPTOKENLISTRESPONSE._serialized_end=7471
+ _ENROLLMENTREQUEST._serialized_start=7474
+ _ENROLLMENTREQUEST._serialized_end=7816
_ENROLLMENTREQUEST_LABELSENTRY._serialized_start=825
_ENROLLMENTREQUEST_LABELSENTRY._serialized_end=870
- _ENROLLMENTREQUESTLISTRESPONSE._serialized_start=7793
- _ENROLLMENTREQUESTLISTRESPONSE._serialized_end=7875
- _USER._serialized_start=7877
- _USER._serialized_end=7989
- _ENROLLEDNODE._serialized_start=7992
- _ENROLLEDNODE._serialized_end=8347
+ _ENROLLMENTREQUESTLISTRESPONSE._serialized_start=7818
+ _ENROLLMENTREQUESTLISTRESPONSE._serialized_end=7900
+ _USER._serialized_start=7902
+ _USER._serialized_end=8014
+ _ENROLLEDNODE._serialized_start=8017
+ _ENROLLEDNODE._serialized_end=8372
_ENROLLEDNODE_LABELSENTRY._serialized_start=825
_ENROLLEDNODE_LABELSENTRY._serialized_end=870
- _ROUTERLEASE._serialized_start=8350
- _ROUTERLEASE._serialized_end=8546
- _NODESERVICES._serialized_start=8548
- _NODESERVICES._serialized_end=8656
- _ADMINSTATUSRESPONSE._serialized_start=8659
- _ADMINSTATUSRESPONSE._serialized_end=9134
- _ADMINSTATUSRESPONSE_NODECATALOGENTRY._serialized_start=9056
- _ADMINSTATUSRESPONSE_NODECATALOGENTRY._serialized_end=9134
- _USERSTATUSRESPONSE._serialized_start=9137
- _USERSTATUSRESPONSE._serialized_end=9394
- _IDENTITYEVIDENCERESPONSE._serialized_start=9397
- _IDENTITYEVIDENCERESPONSE._serialized_end=9625
- _PEEREVIDENCERESPONSE._serialized_start=9628
- _PEEREVIDENCERESPONSE._serialized_end=9954
+ _ROUTERLEASE._serialized_start=8375
+ _ROUTERLEASE._serialized_end=8571
+ _NODESERVICES._serialized_start=8573
+ _NODESERVICES._serialized_end=8681
+ _ADMINSTATUSRESPONSE._serialized_start=8684
+ _ADMINSTATUSRESPONSE._serialized_end=9159
+ _ADMINSTATUSRESPONSE_NODECATALOGENTRY._serialized_start=9081
+ _ADMINSTATUSRESPONSE_NODECATALOGENTRY._serialized_end=9159
+ _USERSTATUSRESPONSE._serialized_start=9162
+ _USERSTATUSRESPONSE._serialized_end=9419
+ _IDENTITYEVIDENCERESPONSE._serialized_start=9422
+ _IDENTITYEVIDENCERESPONSE._serialized_end=9650
+ _PEEREVIDENCERESPONSE._serialized_start=9653
+ _PEEREVIDENCERESPONSE._serialized_end=9979
_PEEREVIDENCERESPONSE_LABELSENTRY._serialized_start=825
_PEEREVIDENCERESPONSE_LABELSENTRY._serialized_end=870
- _MEMBERCREDENTIAL._serialized_start=9957
- _MEMBERCREDENTIAL._serialized_end=10225
- _TRUSTEDSIGNINGKEY._serialized_start=10227
- _TRUSTEDSIGNINGKEY._serialized_end=10316
- _OIDCSESSION._serialized_start=10318
- _OIDCSESSION._serialized_end=10407
- _TASKAUTHORIZATIONRULE._serialized_start=10410
- _TASKAUTHORIZATIONRULE._serialized_end=10557
- _TASKRULE._serialized_start=10560
- _TASKRULE._serialized_end=10692
- _TASKOPERATION._serialized_start=10694
- _TASKOPERATION._serialized_end=10809
- _TOKENEXCHANGEREQUEST._serialized_start=10812
- _TOKENEXCHANGEREQUEST._serialized_end=10983
- _TOKENEXCHANGERESPONSE._serialized_start=10985
- _TOKENEXCHANGERESPONSE._serialized_end=11112
- _STSTOKENREQUEST._serialized_start=11115
- _STSTOKENREQUEST._serialized_end=11244
- _STSTOKENRESPONSE._serialized_start=11247
- _STSTOKENRESPONSE._serialized_end=11378
- _REVOCATIONSRESPONSE._serialized_start=11380
- _REVOCATIONSRESPONSE._serialized_end=11450
+ _MEMBERCREDENTIAL._serialized_start=9982
+ _MEMBERCREDENTIAL._serialized_end=10250
+ _TRUSTEDSIGNINGKEY._serialized_start=10252
+ _TRUSTEDSIGNINGKEY._serialized_end=10341
+ _OIDCSESSION._serialized_start=10343
+ _OIDCSESSION._serialized_end=10432
+ _TASKAUTHORIZATIONRULE._serialized_start=10435
+ _TASKAUTHORIZATIONRULE._serialized_end=10582
+ _TASKRULE._serialized_start=10585
+ _TASKRULE._serialized_end=10717
+ _TASKOPERATION._serialized_start=10719
+ _TASKOPERATION._serialized_end=10834
+ _TOKENEXCHANGEREQUEST._serialized_start=10837
+ _TOKENEXCHANGEREQUEST._serialized_end=11008
+ _TOKENEXCHANGERESPONSE._serialized_start=11010
+ _TOKENEXCHANGERESPONSE._serialized_end=11137
+ _STSTOKENREQUEST._serialized_start=11140
+ _STSTOKENREQUEST._serialized_end=11269
+ _STSTOKENRESPONSE._serialized_start=11272
+ _STSTOKENRESPONSE._serialized_end=11403
+ _REVOCATIONSRESPONSE._serialized_start=11405
+ _REVOCATIONSRESPONSE._serialized_end=11475
# @@protoc_insertion_point(module_scope)
diff --git a/sdk/python/src/agent_mesh/_proto/agentmesh_pb2.pyi b/sdk/python/src/agent_mesh/_proto/agentmesh_pb2.pyi
index 26bc72f6..8ddc53b0 100644
--- a/sdk/python/src/agent_mesh/_proto/agentmesh_pb2.pyi
+++ b/sdk/python/src/agent_mesh/_proto/agentmesh_pb2.pyi
@@ -698,20 +698,22 @@ class PolicyConfigUpdateResponse(_message.Message):
def __init__(self, success: bool = ..., error: _Optional[str] = ...) -> None: ...
class PolicyRole(_message.Message):
- __slots__ = ["allowed_labels", "allowed_services", "allowed_targets", "custom_datalog", "http", "name"]
+ __slots__ = ["allowed_labels", "allowed_publish", "allowed_services", "allowed_targets", "custom_datalog", "http", "name"]
ALLOWED_LABELS_FIELD_NUMBER: _ClassVar[int]
+ ALLOWED_PUBLISH_FIELD_NUMBER: _ClassVar[int]
ALLOWED_SERVICES_FIELD_NUMBER: _ClassVar[int]
ALLOWED_TARGETS_FIELD_NUMBER: _ClassVar[int]
CUSTOM_DATALOG_FIELD_NUMBER: _ClassVar[int]
HTTP_FIELD_NUMBER: _ClassVar[int]
NAME_FIELD_NUMBER: _ClassVar[int]
allowed_labels: _containers.RepeatedScalarFieldContainer[str]
+ allowed_publish: _containers.RepeatedScalarFieldContainer[str]
allowed_services: _containers.RepeatedScalarFieldContainer[str]
allowed_targets: _containers.RepeatedScalarFieldContainer[str]
custom_datalog: _containers.RepeatedScalarFieldContainer[str]
http: _containers.RepeatedCompositeFieldContainer[HTTPGrant]
name: str
- def __init__(self, name: _Optional[str] = ..., allowed_targets: _Optional[_Iterable[str]] = ..., allowed_services: _Optional[_Iterable[str]] = ..., custom_datalog: _Optional[_Iterable[str]] = ..., allowed_labels: _Optional[_Iterable[str]] = ..., http: _Optional[_Iterable[_Union[HTTPGrant, _Mapping]]] = ...) -> None: ...
+ def __init__(self, name: _Optional[str] = ..., allowed_targets: _Optional[_Iterable[str]] = ..., allowed_services: _Optional[_Iterable[str]] = ..., custom_datalog: _Optional[_Iterable[str]] = ..., allowed_labels: _Optional[_Iterable[str]] = ..., http: _Optional[_Iterable[_Union[HTTPGrant, _Mapping]]] = ..., allowed_publish: _Optional[_Iterable[str]] = ...) -> None: ...
class RegisterServiceRequest(_message.Message):
__slots__ = ["command", "service", "target_url"]
diff --git a/sdk/python/src/agent_mesh/biscuit.py b/sdk/python/src/agent_mesh/biscuit.py
index 043ac456..279a818e 100644
--- a/sdk/python/src/agent_mesh/biscuit.py
+++ b/sdk/python/src/agent_mesh/biscuit.py
@@ -57,6 +57,9 @@ class VerifiedBiscuit:
labels: dict[str, str] = field(default_factory=dict)
task_rules: list[agentmesh_pb2.TaskAuthorizationRule] = field(default_factory=list)
actor_node: Optional[str] = None
+ # The token as received, for what is decided over its facts after
+ # verification (require_publish).
+ token: bytes = b""
def _limits() -> ba.AuthorizerLimits:
@@ -157,6 +160,7 @@ def verify_peer_biscuit(
labels=labels,
task_rules=task_rules,
actor_node=actor_nodes[0] if actor_nodes else None,
+ token=bytes(biscuit),
)
@@ -296,3 +300,26 @@ def require_role(verified: VerifiedBiscuit, role: str) -> None:
if role not in verified.roles:
raise BiscuitVerificationError(f"biscuit lacks expected role {role!r}")
+
+def require_publish(verified: VerifiedBiscuit, target_service: str) -> None:
+ """Requires that an already verified provider credential grants serving
+ target_service ("<type>://<name>"), as identity.RequirePublish: the
+ directory names whoever announced the service, only the credential says
+ who may serve it. The provider's own catalog names no service and needs
+ no grant; so does an empty target."""
+ if target_service == "" or target_service == f"system://{_DATALOG['catalog_target']}":
+ return
+ scheme, sep, name = target_service.partition("://")
+ if not sep or not scheme or not name:
+ raise BiscuitVerificationError(f"service {target_service!r} must be <type>://<name>")
+ token = ba.Biscuit.from_bytes(verified.token, ba.PublicKey.from_bytes(bytes(verified.verifying_key), ba.Algorithm.Ed25519))
+ builder = ba.AuthorizerBuilder()
+ builder.set_limits(_limits())
+ builder.add_fact(ba.Fact(_DATALOG["fact_publish"] + "({t}, {n})", {"t": scheme, "n": name}))
+ for policy in _DATALOG["publish_policies"]:
+ builder.add_policy(ba.Policy(policy))
+ try:
+ builder.build(token).authorize()
+ except Exception as err: # noqa: BLE001 - no policy matched
+ raise BiscuitVerificationError(f"peer {verified.peer_id} is not granted serving {target_service}") from err
+
diff --git a/sdk/python/src/agent_mesh/httpx_transport.py b/sdk/python/src/agent_mesh/httpx_transport.py
index 7ba9d078..286adf8a 100644
--- a/sdk/python/src/agent_mesh/httpx_transport.py
+++ b/sdk/python/src/agent_mesh/httpx_transport.py
@@ -40,9 +40,10 @@ if TYPE_CHECKING:
_REQUEST_TIMEOUT = 60.0
-def split_mesh_url(url: httpx.URL) -> tuple[str, str]:
- """(peer ID, request target) of a mesh URL; the target is the
- /<type>/<name>/<path>?<query> the peer's ingress takes."""
+def split_mesh_url(url: httpx.URL) -> tuple[str, str, str]:
+ """(peer ID, service, request target) of a mesh URL: the service is
+ "<type>://<name>", the target the /<type>/<name>/<path>?<query> the
+ peer's ingress takes."""
raw = url.raw_path.decode("latin-1")
path, _, query = raw.partition("?")
if not path.startswith(MESH_PATH_PREFIX):
@@ -51,7 +52,7 @@ def split_mesh_url(url: httpx.URL) -> tuple[str, str]:
parts = rest.split("/")
if not peer_id or len(parts) < 2 or not parts[0] or not parts[1]:
raise httpx.UnsupportedProtocol(f"a mesh URL names a peer, a service type and a name, got {url}")
- return peer_id, "/" + rest + (f"?{query}" if query else "")
+ return peer_id, f"{parts[0]}://{parts[1]}", "/" + rest + (f"?{query}" if query else "")
class _BodyStream(httpx.AsyncByteStream):
@@ -76,8 +77,8 @@ class MeshTransport(httpx.AsyncBaseTransport):
self._timeout = timeout
async def handle_async_request(self, request: httpx.Request) -> httpx.Response:
- peer_text, target = split_mesh_url(request.url)
- peer_id = await self._session._egress_peer(peer_text) # noqa: SLF001 - the session's verified egress path, not a caller option
+ peer_text, service, target = split_mesh_url(request.url)
+ peer_id = await self._session._egress_peer(peer_text, service) # noqa: SLF001 - the session's verified egress path, not a caller option
body = await request.aread()
headers = {k.decode("latin-1"): v.decode("latin-1") for k, v in request.headers.raw}
biscuit = getattr(self._session, "biscuit", None) or self._session.mesh.credential.biscuit
diff --git a/sdk/python/src/agent_mesh/mcp_client.py b/sdk/python/src/agent_mesh/mcp_client.py
index b60b486a..3080efc2 100644
--- a/sdk/python/src/agent_mesh/mcp_client.py
+++ b/sdk/python/src/agent_mesh/mcp_client.py
@@ -40,7 +40,7 @@ from .auth import (
AuthRejectedError,
read_bounded_varint_prefixed_bytes,
)
-from .biscuit import BiscuitVerificationError, VerifiedBiscuit, require_role, verify_peer_biscuit
+from .biscuit import BiscuitVerificationError, VerifiedBiscuit, require_publish, require_role, verify_peer_biscuit
from .controlplane import ROLE_NODE
from .host import open_stream
@@ -132,6 +132,8 @@ async def open_mcp_session(
provider = verify_peer_biscuit(resp.biscuit, str(peer_id), trusted_keys)
# Only nodes host services; a router's or an admin's credential is a member, not a provider.
require_role(provider, ROLE_NODE)
+ # And only a node the policy lets serve the named service is one.
+ require_publish(provider, pb.AuthFrame.FromString(frame).target_service)
except BiscuitVerificationError as err:
raise AuthRejectedError(str(peer_id), f"provider credential rejected: {err}") from err
require_labels(provider, required_labels)
diff --git a/sdk/python/src/agent_mesh/session.py b/sdk/python/src/agent_mesh/session.py
index 2959d0aa..9d2a74aa 100644
--- a/sdk/python/src/agent_mesh/session.py
+++ b/sdk/python/src/agent_mesh/session.py
@@ -45,7 +45,7 @@ from .auth import (
go_away_stream_handler,
)
from .authorizer import ProviderAuthorizerOptions
-from .biscuit import ROLE_ROUTER, VerifiedBiscuit, attenuate_biscuit, require_role, seal_biscuit
+from .biscuit import ROLE_ROUTER, VerifiedBiscuit, attenuate_biscuit, require_publish, require_role, seal_biscuit
from .controlplane import ROLE_NODE
from .credential import encode_auth_frame
from .discovery import DiscoveredProvider, find_peer, find_providers, parse_service_target, peer_key, provide, service_key, withdraw
@@ -998,22 +998,25 @@ class MeshSession:
) -> HTTPResponse:
"""Calls an inference or A2A service on a provider over /libp2p-http,
the way agentmesh-node's egress proxy does for /mesh/<peer>/<type>/<name>/<path>."""
- peer_id = await self._egress_peer(peer)
+ peer_id = await self._egress_peer(peer, target_service)
return await http_request_over_stream(
self.host, peer_id, self.biscuit, target_service, path, method=method, headers=headers, body=body
)
- async def _egress_peer(self, peer: Peer) -> ID:
+ async def _egress_peer(self, peer: Peer, target_service: str) -> ID:
"""The peer an HTTP call goes out to, verified as an enrolled node
- holding the floor before anything is sent (agentmesh-node's VerifyPeerLabels)."""
+ holding the floor and granted the service before anything is sent
+ (agentmesh-node's VerifyProvider)."""
peer_id = await self.connect(peer)
- if self._egress_verdicts.get(str(peer_id), 0.0) > time.monotonic():
+ verdict = f"{peer_id}|{target_service}"
+ if self._egress_verdicts.get(verdict, 0.0) > time.monotonic():
return peer_id
provider = await authenticate_with_peer(self.host, peer_id, self.mesh.auth_frame(), self.mesh.credential.control_plane_keys)
# Only nodes host services; a router's or an admin's credential is a member, not a provider.
require_role(provider, ROLE_NODE)
+ require_publish(provider, target_service)
require_egress_labels(provider, self.egress_require_labels)
- self._egress_verdicts[str(peer_id)] = time.monotonic() + EGRESS_VERDICT_TTL
+ self._egress_verdicts[verdict] = time.monotonic() + EGRESS_VERDICT_TTL
return peer_id
async def accept_a2a(self, target: Union[str, HTTPHandler], *, name: str = DEFAULT_A2A_NAME) -> str:
diff --git a/sdk/python/tests/test_libp2p_http.py b/sdk/python/tests/test_libp2p_http.py
index 2af740dd..e138c7e5 100644
--- a/sdk/python/tests/test_libp2p_http.py
+++ b/sdk/python/tests/test_libp2p_http.py
@@ -186,7 +186,7 @@ class FakeSession:
self.host = host
self.mesh = _Mesh(_Credential(biscuit))
- async def _egress_peer(self, peer) -> ID:
+ async def _egress_peer(self, peer, target_service) -> ID:
return ID.from_base58(str(peer))
@@ -410,8 +410,8 @@ def test_an_in_process_handler_sees_the_verified_caller():
def test_mesh_urls_name_a_peer_and_a_service():
peer = "12D3KooWJ2Yhy3CKwVPDw7AnkxN5HbZbb65xDoRif54hdXXUzh1U"
- assert split_mesh_url(httpx.URL(f"http://mesh/mesh/{peer}/a2a/agent")) == (peer, "/a2a/agent")
- assert split_mesh_url(httpx.URL(f"http://anything:1/mesh/{peer}/inference/llm/v1/models?x=1")) == (peer, "/inference/llm/v1/models?x=1")
+ assert split_mesh_url(httpx.URL(f"http://mesh/mesh/{peer}/a2a/agent")) == (peer, "a2a://agent", "/a2a/agent")
+ assert split_mesh_url(httpx.URL(f"http://anything:1/mesh/{peer}/inference/llm/v1/models?x=1")) == (peer, "inference://llm", "/inference/llm/v1/models?x=1")
for bad in ("http://mesh/a2a/agent", f"http://mesh/mesh/{peer}", f"http://mesh/mesh/{peer}/a2a", f"http://mesh/mesh//a2a/agent"):
with pytest.raises(httpx.UnsupportedProtocol):
split_mesh_url(httpx.URL(bad))
diff --git a/sdk/python/tests/test_mcp.py b/sdk/python/tests/test_mcp.py
index 64966a76..9325feae 100644
--- a/sdk/python/tests/test_mcp.py
+++ b/sdk/python/tests/test_mcp.py
@@ -44,13 +44,27 @@ from .test_session import CP, CP_KEY, libp2p_host
FIXTURE = json.loads((Path(__file__).resolve().parents[2] / "testdata" / "service_keys.json").read_text())
-def mint(peer_id: str, role: str, labels: dict[str, str] | None = None) -> bytes:
+def mint(peer_id: str, role: str, labels: dict[str, str] | None = None, publish: tuple[str, ...] = ("mcp://calc",)) -> bytes:
+ """A credential as the control plane issues one to a member whose role
+ grants publishing the given services (allowed_publish syntax, as
+ granted_publish_* facts); a provider's needs the grant for what it serves."""
code = "node({p}); expiration(2035-01-01T00:00:00Z); role({r});"
params = {"p": peer_id, "r": role}
for i, (k, v) in enumerate((labels or {}).items()):
code += f" label({{k{i}}}, {{v{i}}});"
params[f"k{i}"] = k
params[f"v{i}"] = v
+ for i, svc in enumerate(publish):
+ scheme, sep, name = svc.partition("://")
+ if not sep:
+ code += " granted_publish_all_types(true);"
+ elif name == "*":
+ code += f" granted_publish_all({{pt{i}}});"
+ params[f"pt{i}"] = scheme
+ else:
+ code += f" granted_publish_exact({{pt{i}}}, {{pn{i}}});"
+ params[f"pt{i}"] = scheme
+ params[f"pn{i}"] = name
return ba.BiscuitBuilder(code, params).build(CP.private_key).to_bytes()
@@ -129,10 +143,10 @@ def mcp_stream_handler(provider_biscuit: bytes, served: list[str]):
return handle
-async def start_provider(nursery, labels=None, role=ROLE_NODE):
+async def start_provider(nursery, labels=None, role=ROLE_NODE, publish=("mcp://calc",)):
identity = Identity.generate()
host = libp2p_host(identity)
- biscuit = mint(identity.peer_id, role, labels)
+ biscuit = mint(identity.peer_id, role, labels, publish)
served: list[str] = []
host.set_stream_handler(MCP_PROTOCOL, mcp_stream_handler(biscuit, served))
started = trio.Event()
@@ -235,6 +249,23 @@ def test_tools_over_the_mesh_stream():
with pytest.raises(AuthRejectedError, match="lacks expected role 'mesh:role:node'"):
async with open_mcp_session(caller, router.get_id(), frame(caller_biscuit, "mcp://calc"), [CP_KEY], egress_require_labels={"region": "eu"}):
pass
+
+ # Only a node granted the service is its provider, as agentmesh-node's
+ # checkProvider requires: the directory names whoever announced calc,
+ # the credential says who may serve it. A grant by type or for
+ # everything serves too; the provider's own catalog needs none.
+ for publish, ok in ((("mcp://weather",), False), ((), False), (("mcp://*",), True), (("*",), True)):
+ other, other_addr, _ = await start_provider(nursery, publish=publish)
+ await caller.connect(info_from_p2p_addr(other_addr))
+ if ok:
+ async with open_mcp_session(caller, other.get_id(), frame(caller_biscuit, "mcp://calc"), [CP_KEY]):
+ pass
+ else:
+ with pytest.raises(AuthRejectedError, match="is not granted serving mcp://calc"):
+ async with open_mcp_session(caller, other.get_id(), frame(caller_biscuit, "mcp://calc"), [CP_KEY]):
+ pass
+ async with open_mcp_session(caller, other.get_id(), frame(caller_biscuit, ""), [CP_KEY]):
+ pass
nursery.cancel_scope.cancel()
async def with_timeout():
diff --git a/sdk/python/tests/test_session.py b/sdk/python/tests/test_session.py
index e767d5ca..93f8dd3b 100644
--- a/sdk/python/tests/test_session.py
+++ b/sdk/python/tests/test_session.py
@@ -84,6 +84,9 @@ CP_KEY = CP.public_key.to_bytes()
def mint(peer_id: str, role: str, expiration: str = "2035-01-01T00:00:00Z", labels: dict[str, str] | None = None, signer: ba.KeyPair = CP) -> bytes:
code = "node({p}); client_peer_id({p}); expiration(" + expiration + "); role({r});"
+ if role == ROLE_NODE:
+ # The node role of these meshes serves everything.
+ code += " granted_publish_all_types(true);"
params = {"p": peer_id, "r": role}
for i, (k, v) in enumerate((labels or {}).items()):
code += f" label({{k{i}}}, {{v{i}}});"
diff --git a/site/content/docs/concepts/authorization.md b/site/content/docs/concepts/authorization.md
index 6f02aa0b..ae8347cf 100644
--- a/site/content/docs/concepts/authorization.md
+++ b/site/content/docs/concepts/authorization.md
@@ -25,8 +25,9 @@ A node publishes services, each with a type and a name: `mcp://calculator`,
`inference://vllm-eu`, `a2a://triage`, `egress://bigquery.googleapis.com`, and
the built-in `system://mesh.catalog` that answers discovery queries.
-Standing mesh roles grant access to services by name (`allowed_services`) and
-can narrow HTTP methods and paths (`http`). On top of standing roles, a
+Standing mesh roles grant access to services by name (`allowed_services`),
+grant the right to serve them (`allowed_publish`) and can narrow HTTP
+methods and paths (`http`). On top of standing roles, a
holder can append `TaskAuthorizationRule` blocks (`tar_block`) to scope a
token for a single task or sub-agent hop—narrowing which services, MCP tools
(`operation.allowed_tools`), HTTP methods and paths
@@ -46,6 +47,7 @@ from a file (`--policy-file`).
{
"name": "developer",
"allowed_services": ["mcp://code-reviewer", "mcp://build-runner.*", "inference://*"],
+ "allowed_publish": ["mcp://build-runner.*"],
"allowed_targets": ["group:dev-nodes"],
"allowed_labels": ["region=*"],
"http": [
@@ -59,6 +61,11 @@ from a file (`--policy-file`).
can stand for the whole name, for a leading component (`mcp://*.internal`)
or for a trailing one (`mcp://build-runner.*`). A bare `*` means every
service.
+- `allowed_publish`: the services holders may serve, in the same syntax.
+ A member announces a service to the directory, and is accepted as its
+ provider by callers, only when its own credential grants it here. If
+ absent, holders may publish nothing. Calling and serving are granted
+ separately: a role that may call `mcp://calculator` does not serve it.
- `allowed_targets`: the nodes holders may call, as facts about the
destination node's identity: `node:<peer-id>`, `user:<sub>`,
`email:<addr>`, `group:<name>`, `idp_role:<name>`, or `*`. If absent, any
diff --git a/site/content/docs/concepts/networking.md b/site/content/docs/concepts/networking.md
index 58b921b2..08462aec 100644
--- a/site/content/docs/concepts/networking.md
+++ b/site/content/docs/concepts/networking.md
@@ -137,10 +137,14 @@ and the node adds the `/v1` prefix. The same backend is therefore reachable
through the `/v1` endpoint and, with `/v1/...` appended, through the proxy
path.
-A caller can restrict which providers are acceptable with
-`X-Mesh-Required-Labels: key=value[,key=value]`. The node then verifies the
-provider's credential and confirms that every listed label is attested in it
-before forwarding. The header is removed before the request leaves the node.
+Before any request leaves the node for a provider, the node verifies the
+provider's credential and that its role grants serving the service the
+request names (`allowed_publish`): the directory says who announced a
+name, the credential says who may serve it. A caller can restrict which
+providers are acceptable further with
+`X-Mesh-Required-Labels: key=value[,key=value]`. The node then confirms
+that every listed label is attested in the credential as well before
+forwarding. The header is removed before the request leaves the node.
An operator can set a floor that every provider must meet with
`egress.require_labels` in the node configuration.
diff --git a/site/content/docs/contributing/security-architecture.md b/site/content/docs/contributing/security-architecture.md
index 244e50d1..ffb965b5 100644
--- a/site/content/docs/contributing/security-architecture.md
+++ b/site/content/docs/contributing/security-architecture.md
@@ -605,3 +605,14 @@ response directly).
a router's routing table admits authenticated peer routers only. A
directory lookup and a gossip subscription are mesh data, so this covers
reads as much as writes.
+8. A member serves only what its credential grants. `PolicyRole.allowed_publish`
+ is minted as `granted_publish_*` facts, the dual of `allowed_services`, and
+ `api.PublishPolicies` decide them over a `publish(type, name)` fact. The
+ router a member announces a directory record to checks the grant against
+ the credential it holds from the handshake and refuses the record otherwise
+ (`result="denied"`); every caller, `agentmesh-node` and both SDKs, checks it
+ on the provider's credential before sending a request for a named service,
+ so a record is never trusted for who may serve a name. A member's own record
+ under its peer ID and the catalog name no service. A delegated credential
+ grants publishing nothing. An egress destination's `served_by` is its
+ publish grant, minted with the destination.
diff --git a/site/content/docs/guides/exposing-services.md b/site/content/docs/guides/exposing-services.md
index 60e49c9e..c225d00c 100644
--- a/site/content/docs/guides/exposing-services.md
+++ b/site/content/docs/guides/exposing-services.md
@@ -147,21 +147,28 @@ must use the A2A 1.0 format. Older formats are refused. The
## Making it reachable
-Declaring a service publishes it, but nobody can call it until the mesh
-policy grants access. Two conditions must hold:
-
-1. The caller's identity resolves to a role whose `allowed_services`
+Declaring a service is not enough on its own: the mesh policy has to let
+this node serve it and let callers call it. Three conditions must hold:
+
+1. This node's identity resolves to a role whose `allowed_publish`
+ includes `mcp://calculator`, or a pattern that covers it. Without it the
+ router refuses the node's directory record and callers refuse the node
+ as a provider, whatever the node declares in its configuration: the
+ configuration says what the node offers, the policy says what the mesh
+ lets it serve.
+2. The caller's identity resolves to a role whose `allowed_services`
includes `mcp://calculator`, or a pattern that covers it.
-2. If that role has `allowed_targets`, one of them matches this node's
+3. If that role has `allowed_targets`, one of them matches this node's
identity: its peer ID as `node:<id>`, or a claim from the identity it
enrolled with.
-A policy that grants the service to a role bound to your users:
+A policy that lets nodes serve the calculator and grants it to a role bound
+to your users:
```json
{
"roles": [
- { "name": "mesh:role:node", "allowed_labels": ["region=*"] },
+ { "name": "mesh:role:node", "allowed_publish": ["mcp://calculator"], "allowed_labels": ["region=*"] },
{ "name": "calc-users", "allowed_services": ["mcp://calculator"] }
],
"bindings": [
diff --git a/site/content/docs/guides/kubernetes.md b/site/content/docs/guides/kubernetes.md
index 15b771ff..acbbbdc9 100644
--- a/site/content/docs/guides/kubernetes.md
+++ b/site/content/docs/guides/kubernetes.md
@@ -39,7 +39,8 @@ helm upgrade --install agentmesh ./charts/agentmesh \
--set controlPlane.workloadIssuer="$ISSUER" \
--set controlPlane.insecureSkipTlsVerify=true \
--set bootstrap.nodeMembers='{user:system:serviceaccount:agentmesh-nodes:calc-mcp-agentmesh-node}' \
- --set bootstrap.nodeServices='{mcp://calculator,system://mesh.catalog}'
+ --set bootstrap.nodeServices='{mcp://calculator,system://mesh.catalog}' \
+ --set bootstrap.nodePublish='{mcp://calculator}'
```
`controlPlane.workloadIssuer` marks the cluster issuer as a workload identity
@@ -51,12 +52,15 @@ for a public provider. On a managed cluster the issuer is often public (on
GKE: `https://container.googleapis.com/v1/projects/.../clusters/...`) and
does not need the flag.
-The three `bootstrap.*` values write the initial policy:
+The four `bootstrap.*` values write the initial policy:
- `nodeMembers`: the identities that may enroll as `mesh:role:node`. If
empty, no node can join until you post a policy.
- `nodeServices`: the services that nodes may call. If empty, nodes can call
nothing.
+- `nodePublish`: the services that nodes may serve: announce to the
+ directory and be accepted as a provider of. If empty, nodes can publish
+ nothing.
- `nodeLabels`: the label patterns that nodes may attest. If empty, nodes
cannot declare labels.
diff --git a/site/content/docs/guides/native-sdks.md b/site/content/docs/guides/native-sdks.md
index f08f6737..6035e758 100644
--- a/site/content/docs/guides/native-sdks.md
+++ b/site/content/docs/guides/native-sdks.md
@@ -914,9 +914,12 @@ never forwarded. The connection is encrypted end to end between the two
peers; the router forwards ciphertext.
Under the open development policy of `agentmesh-one`, every member holds the
-`node` role and that role may call any service. On a shared mesh the policy
-grants a role the services it may call (`allowed_services: ["a2a://agent"]`
-or a pattern) and the members it may reach; see
+`node` role and that role may call and serve any service. On a shared mesh
+the policy grants a role the services it may call (`allowed_services:
+["a2a://agent"]` or a pattern) and the members it may reach, and grants the
+agent's own role the service it serves (`allowed_publish: ["a2a://agent"]`):
+a caller verifies that grant on the agent's credential before sending a
+request, and refuses an agent that lacks it; see
[Mesh policy](../../reference/policy/). A refused caller receives `403`.
## Beyond the examples
diff --git a/site/content/docs/reference/node-api.md b/site/content/docs/reference/node-api.md
index 6a51f3f3..898bfd86 100644
--- a/site/content/docs/reference/node-api.md
+++ b/site/content/docs/reference/node-api.md
@@ -233,8 +233,11 @@ server-sent events as they are found, and the stream ends with
/mesh/<peer-id>/<type>/<name>/<path...>
```
-The node verifies the peer's credential and, if set, the operator's
-`egress.require_labels`. It then opens an authenticated stream (presenting the
+The node verifies the peer's credential: that it is an enrolled node, that
+its role grants serving `<type>://<name>` (`allowed_publish`), and, if set,
+the operator's `egress.require_labels`. A peer whose credential does not
+grant the service is refused with `403`, whatever the directory said about
+it. It then opens an authenticated stream (presenting the
caller's Task Biscuit when one was supplied in `X-Mesh-Authentication`) and
forwards the request to `/<type>/<name>/<path>` on the peer, which proxies it
to the backend. Headers pass through, including `Authorization`. Paths that
diff --git a/site/content/docs/reference/policy.md b/site/content/docs/reference/policy.md
index 63e662e0..bdabc4c8 100644
--- a/site/content/docs/reference/policy.md
+++ b/site/content/docs/reference/policy.md
@@ -18,6 +18,7 @@ back from `GET /admin/policy`, edited in the console, or given to
{
"name": "mesh:role:node",
"allowed_services": ["system://mesh.catalog"],
+ "allowed_publish": ["mcp://code-reviewer", "mcp://build-runner.*", "inference://*"],
"allowed_labels": ["region=*", "team=platform"]
},
{
@@ -66,6 +67,7 @@ notice.
|---|---|---|
| `name` | string, required, unique | The role name. `mesh:role:node` and `mesh:role:router` are the roles that the two binaries request at enrollment. Any other name is an ordinary role. |
| `allowed_services` | list of service patterns | Services that holders may call. |
+| `allowed_publish` | list of service patterns | Services that holders may serve. A router keeps a member's directory record only for a service its credential grants here, and a caller sends a request to a provider it reached by name only when the provider's credential does. If absent, holders may publish nothing. See [Publishing](#publishing). |
| `allowed_targets` | list of target patterns | Nodes that holders may call. If absent, any node may be called. |
| `allowed_labels` | list of label patterns | Labels that a node holding this role may declare at enrollment. If absent, no labels may be declared. |
| `custom_datalog` | list of Datalog statements | Facts are minted into the credentials of holders. Rules are distributed to nodes and applied when a holder is verified. |
@@ -95,6 +97,30 @@ The same holds for `target_unrestricted(true)` below.
`system://mesh.catalog` is the built-in discovery service that every node
runs. A role that should be able to list the tools of a node needs it.
+### Publishing
+
+`allowed_publish` takes the same patterns and compiles them to
+`granted_publish_*` facts: `granted_publish_exact("mcp", "calculator")`,
+`granted_publish_all("mcp")`, `granted_publish_all_types(true)` and so on.
+They say what a member may serve, where `allowed_services` says what it may
+call, and the two are independent: a role that may call `mcp://calc` may
+not serve it unless granted here.
+
+Two parties check the grant, on the holder's own credential. The router a
+member announces a record to refuses a record for a service the grant does
+not cover (`agentmesh_router_directory_requests_total{op="provide",result="denied"}`),
+so a member cannot put itself in the directory under a name it may not
+serve. A caller that reaches a provider by name, from the directory or by
+peer ID, verifies the provider's credential before sending the request and
+refuses a provider the grant does not cover, so a record that reached the
+directory some other way is still not called. `agentmesh-node` and both
+SDKs make the check; a member's own record under its peer ID, and a node's
+catalog (`system://mesh.catalog`), name no service and need no grant.
+
+An egress destination needs no entry: `served_by` selects the nodes that
+serve it, and the control plane mints `granted_publish_exact("egress", "<name>")`
+into their credentials with the destination.
+
### Target patterns
`fact:value`, where `fact` is one of the identity facts that a node's
diff --git a/site/content/docs/reference/router.md b/site/content/docs/reference/router.md
index f5f87834..32eada20 100644
--- a/site/content/docs/reference/router.md
+++ b/site/content/docs/reference/router.md
@@ -75,7 +75,10 @@ replica count.
holds. A member announces each service it publishes and where it is
reached; the router keeps the record and places it on the routers
closest to the key, as many as the mesh's replication (`/info`). A
- record lives for the mesh's record TTL after its last announcement,
+ record is kept only for a service the member's credential grants serving
+ (the role's `allowed_publish`), checked against the credential the
+ handshake presented; a record for anything else is refused. A record
+ lives for the mesh's record TTL after its last announcement,
and an announcement replaces the addresses of the one before; a member
that stops a service or leaves withdraws its records, and the router
withdraws them from the same routers. A member asks for providers of
@@ -134,7 +137,7 @@ The metrics address exposes, next to the Go runtime metrics:
| `agentmesh_router_connected_peers`, `agentmesh_router_authenticated_peers`, `agentmesh_router_banned_peers` | Peers in each state. |
| `agentmesh_router_peer_routers{state}` | Other routers this one knows, from the control plane's list or a handshake that proved the router role: `listed`, and `authenticated` for those it currently holds a mutual authentication with. The two differ while a federation pass is pending or a peer router is down. |
| `agentmesh_router_dht_routing_table_size` | Peer routers in the DHT's routing table: the authenticated peer routers, since nothing else enters it. |
-| `agentmesh_router_directory_requests_total{op,result}`, `agentmesh_router_directory_request_seconds{op}` | Directory requests served, by operation (`provide`, `withdraw`, `find_providers`, `find_peer`; `place` is a record or withdrawal another router put here, `lookup` a find another router ran here) and result (`ok`, `empty`, `invalid`, `error`), with the time each took. |
+| `agentmesh_router_directory_requests_total{op,result}`, `agentmesh_router_directory_request_seconds{op}` | Directory requests served, by operation (`provide`, `withdraw`, `find_providers`, `find_peer`; `place` is a record or withdrawal another router put here, `lookup` a find another router ran here) and result (`ok`, `empty`, `invalid`, `denied` for a record naming a service the member's credential does not grant serving, `error`), with the time each took. |
| `agentmesh_router_directory_records` | Directory records this router holds: its own members' and the copies placed on it. |
| `agentmesh_router_directory_records_expired_total` | Records dropped because their provider stopped announcing them for the mesh's record TTL. |
| `agentmesh_router_directory_placements_total{result}` | Copies of a member's record, or of its withdrawal, this router placed on the routers closest to the key. |
diff --git a/tests/e2e/lib/container_mesh.bash b/tests/e2e/lib/container_mesh.bash
index d2a7738d..59505415 100644
--- a/tests/e2e/lib/container_mesh.bash
+++ b/tests/e2e/lib/container_mesh.bash
@@ -474,6 +474,7 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
--set console.enabled=false
--set 'router.externalAddrs={/dns4/agentmesh-router/tcp/4501}'
--set 'bootstrap.nodeServices={mcp://calculator,mcp://db-agent,mcp://http-tool,mcp://stdio-tool,a2a://echo,system://mesh.catalog}'
+ --set 'bootstrap.nodePublish={mcp://calculator,mcp://db-agent,mcp://http-tool,mcp://stdio-tool,a2a://echo}'
--set 'bootstrap.nodeMembers={user:test-user}'
--set 'bootstrap.nodeLabels={region=*}')
if ! "${helm_bin}" "${helm_args[@]}"; then
diff --git a/tests/integration/biscuit_expiry_test.go b/tests/integration/biscuit_expiry_test.go
index a1c4bed8..5a2e38fa 100644
--- a/tests/integration/biscuit_expiry_test.go
+++ b/tests/integration/biscuit_expiry_test.go
@@ -84,7 +84,7 @@ func TestBiscuitExpiryIsEnforcedOnEveryPath(t *testing.T) {
// The grants mirror the shape this test always ran with (the no-policy
// mint fallback): unrestricted, because the subject here is expiry.
policyFile := filepath.Join(tmpDir, "policies.yaml")
- policyYAML := "roles:\n - name: mesh:role:node\n allowed_services: [\"*\"]\n allowed_targets: []\n custom_datalog: [\"target_unrestricted(true);\"]\nbindings:\n - role: mesh:role:node\n members: [\"user:expiry-user\"]\n"
+ policyYAML := "roles:\n - name: mesh:role:node\n allowed_services: [\"*\"]\n allowed_publish: [\"*\"]\n allowed_targets: []\n custom_datalog: [\"target_unrestricted(true);\"]\nbindings:\n - role: mesh:role:node\n members: [\"user:expiry-user\"]\n"
if err := os.WriteFile(policyFile, []byte(policyYAML), 0644); err != nil {
t.Fatal(err)
}
diff --git a/tests/integration/minimal_helpers_test.go b/tests/integration/minimal_helpers_test.go
index 5611d772..3f54ddeb 100644
--- a/tests/integration/minimal_helpers_test.go
+++ b/tests/integration/minimal_helpers_test.go
@@ -337,6 +337,14 @@ func createMockBiscuitToken(t *testing.T, peerID string, priv ed25519.PrivateKey
}
}
+ // The mock router stands in for a control plane whose node role grants
+ // allowed_publish ["*"], as the policy fixtures in this suite do.
+ if role == api.RoleNode {
+ if err := builder.AddAuthorityFact(api.MarkerFact(api.FactGrantedPublishAllTypes)); err != nil {
+ t.Fatalf("failed to add publish grant: %v", err)
+ }
+ }
+
err = builder.AddAuthorityFact(biscuit.Fact{Predicate: biscuit.Predicate{
Name: api.FactExpiration,
IDs: []biscuit.Term{biscuit.Date(time.Now().Add(1 * time.Hour))},
@@ -721,7 +729,8 @@ func writePolicyWithRouter(t *testing.T, path string, yamlContent string) {
allowed_targets: ["*"]
- name: %s
allowed_services: []
- allowed_targets: []`, api.RoleRouter, api.RoleNode)
+ allowed_targets: []
+ allowed_publish: ["*"]`, api.RoleRouter, api.RoleNode)
routerBinding := fmt.Sprintf(` - role: %s
members: ["group:routers"]`, api.RoleRouter)
diff --git a/tests/integration/readmission_test.go b/tests/integration/readmission_test.go
index 75464b0f..53181521 100644
--- a/tests/integration/readmission_test.go
+++ b/tests/integration/readmission_test.go
@@ -131,7 +131,7 @@ func startReadmissionMesh(t *testing.T, ctx context.Context) *readmissionMesh {
// through group "routers"; what either may reach is not the subject here.
roles := []*api.PolicyRole{
{Name: api.RoleRouter, AllowedServices: []string{"*"}, AllowedTargets: []string{"*"}},
- {Name: api.RoleNode, AllowedServices: []string{"*"}, AllowedTargets: []string{"*"}},
+ {Name: api.RoleNode, AllowedServices: []string{"*"}, AllowedPublish: []string{"*"}, AllowedTargets: []string{"*"}},
}
bindings := []*api.PolicyBinding{
{Role: api.RoleRouter, Members: []string{"group:routers"}},
diff --git a/tests/integration/router_attachment_test.go b/tests/integration/router_attachment_test.go
index 4422e7c9..3a438e17 100644
--- a/tests/integration/router_attachment_test.go
+++ b/tests/integration/router_attachment_test.go
@@ -346,6 +346,7 @@ func startAttachmentMesh(t *testing.T) *attachmentMesh {
allowed_labels: ["site=*", "pa=*", "pb=*"]
- name: %s
allowed_services: ["mcp://*"]
+ allowed_publish: ["mcp://*"]
allowed_targets: ["*"]
bindings:
- role: %s
diff --git a/tests/integration/sdk_mesh_test.go b/tests/integration/sdk_mesh_test.go
index 76e789f1..41dfc6bd 100644
--- a/tests/integration/sdk_mesh_test.go
+++ b/tests/integration/sdk_mesh_test.go
@@ -180,6 +180,7 @@ func startSDKMesh(t *testing.T) *sdkMesh {
allowed_labels: ["zone=*"]
- name: %s
allowed_services: ["*"]
+ allowed_publish: ["*"]
allowed_targets: ["*"]
allowed_labels: ["region=*", "team=*"]
bindings:
diff --git a/tests/integration/sts_cuj_test.go b/tests/integration/sts_cuj_test.go
index 01df7c93..cedaaa9f 100644
--- a/tests/integration/sts_cuj_test.go
+++ b/tests/integration/sts_cuj_test.go
@@ -153,6 +153,7 @@ func TestSTSTaskScopedSecurityCUJ(t *testing.T) {
policyYAML := fmt.Sprintf(`roles:
- name: pep
allowed_services: ["egress://api.github.com", "mcp://github"]
+ allowed_publish: ["mcp://github"]
allowed_targets: ["*"]
- name: developer
allowed_services: ["egress://api.github.com", "mcp://github"]
diff --git a/tests/ui/dev.sh b/tests/ui/dev.sh
index e21bf3da..8d559c02 100755
--- a/tests/ui/dev.sh
+++ b/tests/ui/dev.sh
@@ -52,7 +52,7 @@ api POST /policies -H "Content-Type: application/json" -d '{
"roles": [
{"name": "mesh-admin", "allowed_services": ["*"], "allowed_targets": ["*"]},
{"name": "mesh:role:router", "allowed_services": ["*"], "allowed_targets": ["*"]},
- {"name": "mesh:role:node", "allowed_services": ["mcp://*", "system://mesh.catalog"], "allowed_targets": ["*"]}
+ {"name": "mesh:role:node", "allowed_services": ["mcp://*", "system://mesh.catalog"], "allowed_publish": ["mcp://*"], "allowed_targets": ["*"]}
],
"bindings": [
{"role": "mesh:role:router", "members": ["group:routers"]},