Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
api: egress destinations and HTTP narrowing in the policy vocabulary
Antonio Ojea69b807ed1485
diff --git a/api/datalog.go b/api/datalog.goindex 72a85102..e7fbf150 100644--- a/api/datalog.go+++ b/api/datalog.go@@ -261,6 +261,94 @@ const (// Example Datalog: service("mcp", "calculator")FactService = "service"+ // Request facts. The verifying node injects them from the request on the+ // wire, never from the token, so a holder cannot assert them. They are+ // present when the node handles the request as HTTP, and absent on a+ // stream that carries no HTTP request.++ // FactMethod is the HTTP method of the request as received, or "CONNECT"+ // for a tunnel the node opens without terminating HTTP.+ // Contains: biscuit.String(method)+ // Example Datalog: deny if method($m), !($m == "GET")+ FactMethod = "method"++ // FactPath is the request path as the backend sees it: leading slash, no+ // query, with the mesh routing prefix removed. A tunnel carries path("").+ // Contains: biscuit.String(path)+ // Example Datalog: deny if path($p), !$p.starts_with("/v2/public/")+ FactPath = "path"++ // FactHost is the destination hostname of an egress request, lowercase,+ // as authorized: the same string as the service name.+ // Contains: biscuit.String(host)+ // Example Datalog: deny if host("payroll.internal.example.com")+ FactHost = "host"++ // FactPort is the destination port of an egress request.+ // Contains: biscuit.Integer(port)+ // Example Datalog: deny if port($p), !($p == 443)+ FactPort = "port"++ // HTTP narrowing (PolicyRole.http). A narrowed allowed_services entry is+ // minted as an http_granted_service_* fact instead of the plain+ // granted_service_* one, together with the methods and paths it permits.+ // BaselineHTTPRules derive the plain grant only for a request whose+ // method() and path() facts match, so the ordinary allow policies apply+ // unchanged and a request without those facts matches nothing.+ //+ // Every fact below is keyed by ($type, $key), where $key is the term the+ // corresponding granted_service_* fact would carry: the exact name, the+ // suffix with its leading dot, the prefix with its trailing dot, or "*".++ // FactHTTPGrantedServiceExact is granted_service_exact, narrowed.+ // Contains: biscuit.String(serviceType), biscuit.String(serviceName)+ FactHTTPGrantedServiceExact = "http_granted_service_exact"++ // FactHTTPGrantedServiceSuffix is granted_service_suffix, narrowed.+ // Contains: biscuit.String(serviceType), biscuit.String(suffixPattern)+ FactHTTPGrantedServiceSuffix = "http_granted_service_suffix"++ // FactHTTPGrantedServicePrefix is granted_service_prefix, narrowed.+ // Contains: biscuit.String(serviceType), biscuit.String(prefixPattern)+ FactHTTPGrantedServicePrefix = "http_granted_service_prefix"++ // FactHTTPGrantedServiceAll is granted_service_all, narrowed. Its key is "*".+ // Contains: biscuit.String(serviceType)+ FactHTTPGrantedServiceAll = "http_granted_service_all"++ // FactHTTPGrantedServiceAllTypes is granted_service_all_types, narrowed.+ // Its type and key are both "*".+ // Contains: biscuit.Bool(true) (marker fact)+ FactHTTPGrantedServiceAllTypes = "http_granted_service_all_types"++ // FactGrantedMethod lists the methods a narrowed grant permits.+ // Contains: biscuit.String(serviceType), biscuit.String(key), biscuit.Set of biscuit.String(method)+ FactGrantedMethod = "granted_method"++ // FactGrantedMethodAny marks a narrowed grant that permits every method.+ // Contains: biscuit.String(serviceType), biscuit.String(key)+ FactGrantedMethodAny = "granted_method_any"++ // FactGrantedPathExact lists the exact paths a narrowed grant permits.+ // Contains: biscuit.String(serviceType), biscuit.String(key), biscuit.Set of biscuit.String(path)+ FactGrantedPathExact = "granted_path_exact"++ // FactGrantedPathPrefix permits every path under one prefix, one fact per prefix.+ // Contains: biscuit.String(serviceType), biscuit.String(key), biscuit.String(prefix)+ FactGrantedPathPrefix = "granted_path_prefix"++ // FactGrantedPathAny marks a narrowed grant that permits every path.+ // Contains: biscuit.String(serviceType), biscuit.String(key)+ FactGrantedPathAny = "granted_path_any"++ // FactHTTPMethodOK is derived when the request method satisfies a narrowed grant.+ // Contains: biscuit.String(serviceType), biscuit.String(key)+ FactHTTPMethodOK = "http_method_ok"++ // FactHTTPPathOK is derived when the request path satisfies a narrowed grant.+ // Contains: biscuit.String(serviceType), biscuit.String(key)+ FactHTTPPathOK = "http_path_ok"+// FactLabel is a control-plane-attested key=value label on the token's// node (see api/labels.go). The control plane mints one fact per// declared label, so a requirement is a single exact match: a node@@ -338,6 +426,11 @@ var (// BaselineRules are the pre-compiled target evaluation rules for the node middleware.BaselineRules []biscuit.Rule+ // BaselineHTTPRules derive the plain granted_service_* facts from the+ // http_granted_service_* facts of a narrowed grant when the request's+ // method() and path() satisfy it. Added wherever BaselineRules are.+ BaselineHTTPRules []biscuit.Rule+// BaselineReplayCheck verifies that the client peer ID matches the connection peer ID.BaselineReplayCheck biscuit.Check@@ -375,6 +468,8 @@ type DatalogSources struct {Policies []string `json:"policies"`// Rules derive allow_network_target from target grants (BaselineRules).Rules []string `json:"rules"`+ // HTTPRules derive service grants from narrowed grants (BaselineHTTPRules).+ HTTPRules []string `json:"http_rules"`// AgentRules derive agent_authorized from agent grants (BaselineAgentRules).AgentRules []string `json:"agent_rules"`// TargetFactRules map identity facts to target_fact (TargetFactRules).@@ -458,6 +553,33 @@ func init() {BaselineRules = append(BaselineRules, r)}+ // 2b. HTTP Narrowing Rules (PolicyRole.http).+ // A narrowed grant yields the plain granted_service_* fact only when the+ // request's method and path match, so the allow policies above decide as+ // they do for any grant. Both axes must hold; an axis with no restriction+ // carries the *_any marker. The rules are positive, so a request with no+ // method() or path() fact derives nothing and a narrowed grant fails closed.+ BaselineSources.HTTPRules = []string{+ fmt.Sprintf(`%s($t, $k) <- %s($m), %s($t, $k, $set), $set.contains($m)`, FactHTTPMethodOK, FactMethod, FactGrantedMethod),+ fmt.Sprintf(`%s($t, $k) <- %s($t, $k)`, FactHTTPMethodOK, FactGrantedMethodAny),+ fmt.Sprintf(`%s($t, $k) <- %s($p), %s($t, $k, $set), $set.contains($p)`, FactHTTPPathOK, FactPath, FactGrantedPathExact),+ fmt.Sprintf(`%s($t, $k) <- %s($p), %s($t, $k, $prefix), $p.starts_with($prefix)`, FactHTTPPathOK, FactPath, FactGrantedPathPrefix),+ fmt.Sprintf(`%s($t, $k) <- %s($t, $k)`, FactHTTPPathOK, FactGrantedPathAny),+ fmt.Sprintf(`%s($t, $n) <- %s($t, $n), %s($t, $n), %s($t, $n), %s($t, $n)`, FactGrantedServiceExact, FactService, FactHTTPGrantedServiceExact, FactHTTPMethodOK, FactHTTPPathOK),+ fmt.Sprintf(`%s($t, $s) <- %s($t, $n), %s($t, $s), $n.ends_with($s), %s($t, $s), %s($t, $s)`, FactGrantedServiceSuffix, FactService, FactHTTPGrantedServiceSuffix, FactHTTPMethodOK, FactHTTPPathOK),+ fmt.Sprintf(`%s($t, $p) <- %s($t, $n), %s($t, $p), $n.starts_with($p), %s($t, $p), %s($t, $p)`, FactGrantedServicePrefix, FactService, FactHTTPGrantedServicePrefix, FactHTTPMethodOK, FactHTTPPathOK),+ fmt.Sprintf(`%s($t) <- %s($t, $n), %s($t), %s($t, "*"), %s($t, "*")`, FactGrantedServiceAll, FactService, FactHTTPGrantedServiceAll, FactHTTPMethodOK, FactHTTPPathOK),+ fmt.Sprintf(`%s(true) <- %s($t, $n), %s(true), %s("*", "*"), %s("*", "*")`, FactGrantedServiceAllTypes, FactService, FactHTTPGrantedServiceAllTypes, FactHTTPMethodOK, FactHTTPPathOK),+ }++ for i, rStr := range BaselineSources.HTTPRules {+ r, err := parser.FromStringRule(rStr)+ if err != nil {+ panic(fmt.Sprintf("failed to parse baseline http rule %d: %v", i, err))+ }+ BaselineHTTPRules = append(BaselineHTTPRules, r)+ }+var err error// BaselineReplayCheck prevents token theft/replay by ensuring the client_peer_id fact (embedded by the control plane during issuance)diff --git a/api/egress.go b/api/egress.gonew file mode 100644index 00000000..f0846614--- /dev/null+++ b/api/egress.go@@ -0,0 +1,189 @@+// Copyright 2026 Google LLC+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++package api++import (+ "fmt"+ "net/url"+ "regexp"+ "strings"++ "github.com/biscuit-auth/biscuit-go/v2"+)++// credentialNameSyntax bounds a credential name to one safe file name: the+// serving node resolves it under its secrets directory, so it must not be+// able to name a path.+var credentialNameSyntax = regexp.MustCompile(`^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,63}$`)++// ValidateEgressDestination checks one PolicyConfig.egress entry. roleNames+// are the roles the same document defines, so served_by can be checked+// against them; a label entry is checked for form only.+func ValidateEgressDestination(d *EgressDestination, roleNames map[string]bool) error {+ if d == nil {+ return fmt.Errorf("egress entry is nil")+ }+ if err := ValidateEgressName(d.GetName()); err != nil {+ return err+ }+ if d.GetTargetUrl() != "" {+ if err := validateEgressTargetURL(d.GetTargetUrl()); err != nil {+ return fmt.Errorf("egress %q: %w", d.GetName(), err)+ }+ }+ if d.GetCredential() != "" && !credentialNameSyntax.MatchString(d.GetCredential()) {+ return fmt.Errorf("egress %q: credential %q must be a name of 1-64 chars of [a-zA-Z0-9_.-], not a path or a value", d.GetName(), d.GetCredential())+ }+ if len(d.GetServedBy()) == 0 {+ return fmt.Errorf("egress %q: served_by must select at least one role or label", d.GetName())+ }+ for _, sel := range d.GetServedBy() {+ if key, value, isLabel := strings.Cut(sel, "="); isLabel {+ if err := ValidateLabelKey(key); err != nil {+ return fmt.Errorf("egress %q: served_by %q: %w", d.GetName(), sel, err)+ }+ if err := ValidateLabelValue(value); err != nil {+ return fmt.Errorf("egress %q: served_by %q: %w", d.GetName(), sel, err)+ }+ continue+ }+ if !roleNames[sel] {+ return fmt.Errorf("egress %q: served_by %q is neither a role in this policy nor a key=value label", d.GetName(), sel)+ }+ }+ return nil+}++// ValidateEgressName checks a destination name: a lowercase hostname with no+// wildcard, port or path. It is the service name of egress://<name>, so it+// must also be valid there.+func ValidateEgressName(name string) error {+ if name == "" {+ return fmt.Errorf("egress entry has no name")+ }+ if name != NormalizeMeshHost(name) {+ return fmt.Errorf("egress name %q must be lowercase with no trailing dot", name)+ }+ if strings.ContainsAny(name, "*:/") {+ return fmt.Errorf("egress name %q must be one hostname: no wildcard, port or path", name)+ }+ if err := ValidateServiceFormat(EgressServicePrefix + name); err != nil {+ return err+ }+ return nil+}++// ValidateEgressServicePattern checks an egress entry of allowed_services or+// http.service. The generic service validator accepts a path and any case,+// which for the other types name a service that may exist; an egress name is+// a hostname, matched against a lowercase destination name, so a path, a+// port, uppercase or a trailing dot would compile to a grant that matches+// nothing. Entries of other types pass through unchanged.+func ValidateEgressServicePattern(svc string) error {+ svcType, name := ParseServiceTarget(svc)+ if svcType != ServiceTypeStringEgress {+ return nil+ }+ if err := ValidateServiceFormat(svc); err != nil {+ return err+ }+ if name == "*" {+ return nil+ }+ if strings.ContainsAny(name, ":/") {+ return fmt.Errorf("invalid egress pattern %q: a destination is a hostname, without a scheme, a port or a path (write the path in the role's http entry)", svc)+ }+ if name != NormalizeMeshHost(name) {+ return fmt.Errorf("invalid egress pattern %q: destination names are lowercase with no trailing dot", svc)+ }+ return nil+}++// validateEgressTargetURL accepts an http or https URL with a host and no+// credential; a credential is named by EgressDestination.credential and+// resolved on the serving node.+func validateEgressTargetURL(raw string) error {+ u, err := url.Parse(raw)+ if err != nil {+ return fmt.Errorf("invalid target_url")+ }+ if u.Scheme != "http" && u.Scheme != "https" {+ return fmt.Errorf("target_url %q must use http or https", raw)+ }+ if u.Host == "" {+ return fmt.Errorf("target_url %q has no host", raw)+ }+ if u.User != nil {+ return fmt.Errorf("target_url must not carry a credential; name one in credential instead")+ }+ if u.RawQuery != "" || u.Fragment != "" {+ return fmt.Errorf("target_url %q must not carry a query or a fragment", raw)+ }+ return nil+}++// EgressTargetURL is where the serving node forwards requests for d:+// target_url when set, otherwise https on the destination name.+func EgressTargetURL(d *EgressDestination) string {+ if d.GetTargetUrl() != "" {+ return d.GetTargetUrl()+ }+ return "https://" + d.GetName()+}++// EgressServedBy reports whether a node with these roles and labels is+// selected to serve d.+func EgressServedBy(d *EgressDestination, roles []string, labels map[string]string) bool {+ for _, sel := range d.GetServedBy() {+ if key, value, isLabel := strings.Cut(sel, "="); isLabel {+ if labels[key] == value {+ return true+ }+ continue+ }+ for _, r := range roles {+ if r == sel {+ return true+ }+ }+ }+ return false+}++// 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+// client asks for the destination, so the grant has to reach it; the rules+// travel with the mesh policy like every other grant.+func BuildEgressServingRules(egress []*EgressDestination) []PolicyRule {+ var rules []PolicyRule+ for _, d := range egress {+ if d == nil || d.GetName() == "" {+ continue+ }+ head := biscuit.Predicate{Name: FactGrantedServiceExact, IDs: []biscuit.Term{biscuit.String(ServiceTypeStringEgress), biscuit.String(d.GetName())}}+ for _, sel := range d.GetServedBy() {+ var body biscuit.Predicate+ if key, value, isLabel := strings.Cut(sel, "="); isLabel {+ body = biscuit.Predicate{Name: FactLabel, IDs: []biscuit.Term{biscuit.String(key), biscuit.String(value)}}+ } else {+ body = biscuit.Predicate{Name: FactRole, IDs: []biscuit.Term{biscuit.String(sel)}}+ }+ r := biscuit.Rule{Head: head, Body: []biscuit.Predicate{body}}+ rules = append(rules, PolicyRule{Rule: r, Text: renderRule(r)})+ }+ }+ return rules+}diff --git a/api/egress_test.go b/api/egress_test.gonew file mode 100644index 00000000..52dfa7da--- /dev/null+++ b/api/egress_test.go@@ -0,0 +1,164 @@+// Copyright 2026 Google LLC+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++package api++import (+ "slices"+ "strings"+ "testing"++ "github.com/biscuit-auth/biscuit-go/v2"+)++func TestEgressServiceType(t *testing.T) {+ got, err := ParseServiceType("egress")+ if err != nil || got != ServiceType_SERVICE_TYPE_EGRESS {+ t.Fatalf("ParseServiceType(egress) = %v, %v", got, err)+ }+ s, err := ServiceTypeToString(ServiceType_SERVICE_TYPE_EGRESS)+ if err != nil || s != ServiceTypeStringEgress {+ t.Fatalf("ServiceTypeToString = %q, %v", s, err)+ }+ for _, svc := range []string{"egress://api.github.com", "egress://*.internal.example.com", "egress://*"} {+ if err := ValidateServiceFormat(svc); err != nil {+ t.Errorf("ValidateServiceFormat(%q): %v", svc, err)+ }+ }+ // The grant compiler needs no egress-specific case.+ if f := BuildServiceDatalogFact("egress://*.internal.example.com"); f.Name != FactGrantedServiceSuffix || f.IDs[1] != biscuit.String(".internal.example.com") {+ t.Errorf("suffix grant = %v", f)+ }+}++// TestValidateEgressServicePattern: a grant is a hostname pattern. The forms+// the generic validator lets through, a path or uppercase, would compile to a+// grant that matches no destination, so they are refused here.+func TestValidateEgressServicePattern(t *testing.T) {+ for _, ok := range []string{+ "egress://api.github.com",+ "egress://*.internal.example.com",+ "egress://api.*",+ "egress://*",+ "*",+ // Other types keep their own rules.+ "mcp://Calc/add",+ } {+ if err := ValidateEgressServicePattern(ok); err != nil {+ t.Errorf("%q: %v", ok, err)+ }+ }+ for _, bad := range []string{+ "egress://api.github.com/v3",+ "egress://api.github.com:443",+ "egress://https://api.github.com",+ "egress://API.github.com",+ "egress://api.github.com.",+ "egress://a*.example.com",+ "egress://",+ } {+ if err := ValidateEgressServicePattern(bad); err == nil {+ t.Errorf("%q accepted", bad)+ }+ }+}++func TestEgressHasNoMeshHost(t *testing.T) {+ if _, err := ParseMeshHost("api.github.com.egress.sam.alt"); err == nil || !strings.Contains(err.Error(), "egress") {+ t.Errorf("ParseMeshHost accepted an egress projection: %v", err)+ }+ if _, err := MeshHost(ServiceType_SERVICE_TYPE_EGRESS, "api.github.com"); err == nil {+ t.Error("MeshHost rendered an egress destination")+ }+ // The other types are unaffected.+ if uri, err := ParseMeshHost("tools.mcp.sam.alt"); err != nil || uri != "mcp://tools" {+ t.Errorf("ParseMeshHost(tools.mcp.sam.alt) = %q, %v", uri, err)+ }+}++func TestValidateEgressDestination(t *testing.T) {+ roles := map[string]bool{"pep": true}+ tests := []struct {+ name string+ d *EgressDestination+ wantErr string+ }{+ {"valid by role", &EgressDestination{Name: "api.github.com", Credential: "github-eu", ServedBy: []string{"pep"}}, ""},+ {"valid by label with target_url", &EgressDestination{Name: "mam.internal.example.com", TargetUrl: "http://mam.internal.example.com:8080", ServedBy: []string{"site=dc1"}}, ""},+ {"no name", &EgressDestination{ServedBy: []string{"pep"}}, "no name"},+ {"uppercase", &EgressDestination{Name: "API.github.com", ServedBy: []string{"pep"}}, "lowercase"},+ {"wildcard", &EgressDestination{Name: "*.github.com", ServedBy: []string{"pep"}}, "one hostname"},+ {"port", &EgressDestination{Name: "api.github.com:443", ServedBy: []string{"pep"}}, "one hostname"},+ {"path", &EgressDestination{Name: "api.github.com/v3", ServedBy: []string{"pep"}}, "one hostname"},+ {"target_url with credential", &EgressDestination{Name: "api.github.com", TargetUrl: "https://:[email protected]", ServedBy: []string{"pep"}}, "must not carry a credential"},+ {"target_url scheme", &EgressDestination{Name: "api.github.com", TargetUrl: "ftp://api.github.com", ServedBy: []string{"pep"}}, "http or https"},+ {"credential is a path", &EgressDestination{Name: "api.github.com", Credential: "/etc/passwd", ServedBy: []string{"pep"}}, "not a path"},+ {"no served_by", &EgressDestination{Name: "api.github.com"}, "served_by"},+ {"unknown role", &EgressDestination{Name: "api.github.com", ServedBy: []string{"nobody"}}, "neither a role"},+ {"bad label value", &EgressDestination{Name: "api.github.com", ServedBy: []string{"site="}}, "label value"},+ }+ for _, tt := range tests {+ t.Run(tt.name, func(t *testing.T) {+ err := ValidateEgressDestination(tt.d, roles)+ if tt.wantErr == "" {+ if err != nil {+ t.Fatalf("unexpected error: %v", err)+ }+ return+ }+ if err == nil || !strings.Contains(err.Error(), tt.wantErr) {+ t.Fatalf("error = %v, want it to contain %q", err, tt.wantErr)+ }+ })+ }+}++func TestEgressServedBy(t *testing.T) {+ d := &EgressDestination{Name: "api.github.com", ServedBy: []string{"pep", "site=eu"}}+ if !EgressServedBy(d, []string{"sam:role:node", "pep"}, nil) {+ t.Error("role match missed")+ }+ if !EgressServedBy(d, []string{"sam:role:node"}, map[string]string{"site": "eu"}) {+ t.Error("label match missed")+ }+ if EgressServedBy(d, []string{"sam:role:node"}, map[string]string{"site": "us"}) {+ t.Error("matched a node it does not select")+ }+ if EgressTargetURL(d) != "https://api.github.com" {+ t.Errorf("default target = %q", EgressTargetURL(d))+ }+ d.TargetUrl = "http://localhost:9"+ if EgressTargetURL(d) != "http://localhost:9" {+ t.Errorf("explicit target = %q", EgressTargetURL(d))+ }+}++func TestBuildEgressServingRules(t *testing.T) {+ rules := BuildEgressServingRules([]*EgressDestination{+ {Name: "api.github.com", ServedBy: []string{"pep", "site=eu"}},+ nil,+ {Name: "", ServedBy: []string{"pep"}},+ })+ texts := PolicyRuleTexts(rules)+ want := []string{+ `granted_service_exact("egress", "api.github.com") <- role("pep")`,+ `granted_service_exact("egress", "api.github.com") <- label("site", "eu")`,+ }+ if !slices.Equal(texts, want) {+ t.Errorf("rules = %v, want %v", texts, want)+ }+ if _, err := ParseDatalogRules(texts); err != nil {+ t.Fatalf("rendered rules do not parse back: %v", err)+ }+}diff --git a/api/http_grants.go b/api/http_grants.gonew file mode 100644index 00000000..756f2cd9--- /dev/null+++ b/api/http_grants.go@@ -0,0 +1,192 @@+// Copyright 2026 Google LLC+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++package api++import (+ "fmt"+ "regexp"+ "slices"+ "sort"+ "strings"++ "github.com/biscuit-auth/biscuit-go/v2"+)++// httpMethodSyntax is the token form of an HTTP method, uppercase as the+// registered methods are written. A method is compared byte for byte with+// the request, so the case has to be fixed here.+var httpMethodSyntax = regexp.MustCompile(`^[A-Z][A-Z0-9-]{0,31}$`)++// HTTPGrantKey returns the fact a narrowed grant is minted as and the key its+// method and path facts are keyed by, for one allowed_services entry. The key+// is the term the plain granted_service_* fact would carry, so+// BaselineHTTPRules can derive that fact from it.+func HTTPGrantKey(service string) (factName, svcType, key string) {+ plain := BuildServiceDatalogFact(service)+ svcType, svcName := ParseServiceTarget(service)+ switch plain.Name {+ case FactGrantedServiceAllTypes:+ return FactHTTPGrantedServiceAllTypes, "*", "*"+ case FactGrantedServiceAll:+ return FactHTTPGrantedServiceAll, svcType, "*"+ case FactGrantedServiceSuffix:+ return FactHTTPGrantedServiceSuffix, svcType, svcName[1:]+ case FactGrantedServicePrefix:+ return FactHTTPGrantedServicePrefix, svcType, svcName[:len(svcName)-1]+ default:+ return FactHTTPGrantedServiceExact, svcType, svcName+ }+}++// ValidateHTTPGrant checks one PolicyRole.http entry against the role's+// allowed_services: the entry must narrow a grant the role makes, written the+// same way, and its methods and paths must be well-formed.+func ValidateHTTPGrant(g *HTTPGrant, allowedServices []string) error {+ if g == nil {+ return fmt.Errorf("http entry is nil")+ }+ if g.GetService() == "" {+ return fmt.Errorf("http entry has no service")+ }+ if !slices.Contains(allowedServices, g.GetService()) {+ return fmt.Errorf("http entry %q does not name one of the role's allowed_services", g.GetService())+ }+ if err := ValidateServiceFormat(g.GetService()); err != nil {+ return err+ }+ if len(g.GetMethods()) == 0 && len(g.GetPaths()) == 0 {+ return fmt.Errorf("http entry %q narrows nothing: set methods, paths or both, or remove the entry", g.GetService())+ }+ for _, m := range g.GetMethods() {+ if !httpMethodSyntax.MatchString(m) {+ return fmt.Errorf("http entry %q: method %q must be an uppercase HTTP method such as \"GET\"", g.GetService(), m)+ }+ }+ for _, p := range g.GetPaths() {+ if err := validateHTTPGrantPath(p); err != nil {+ return fmt.Errorf("http entry %q: %w", g.GetService(), err)+ }+ }+ return nil+}++// validateHTTPGrantPath accepts "/exact" or "/prefix/*". The path is matched+// against path($p) as the backend sees it, so it carries no query and no+// dot segment, and a wildcard is only meaningful at the end.+func validateHTTPGrantPath(p string) error {+ if !strings.HasPrefix(p, "/") {+ return fmt.Errorf("path %q must start with \"/\"", p)+ }+ if strings.ContainsAny(p, "?#") {+ return fmt.Errorf("path %q must not carry a query or a fragment", p)+ }+ trimmed := strings.TrimSuffix(p, "*")+ if strings.Contains(trimmed, "*") {+ return fmt.Errorf("path %q: \"*\" is only allowed at the end, as in \"/v2/*\"", p)+ }+ for _, seg := range strings.Split(trimmed, "/") {+ if seg == "." || seg == ".." {+ return fmt.Errorf("path %q must not contain a dot segment", p)+ }+ }+ return nil+}++// BuildHTTPGrantFacts compiles one narrowed grant into the facts minted into+// the holder's credential: the http_granted_service_* fact for the entry,+// then one fact per axis. Methods and exact paths travel as one Set each;+// each prefix is its own fact, because starts_with has no set form.+func BuildHTTPGrantFacts(g *HTTPGrant) []biscuit.Fact {+ factName, svcType, key := HTTPGrantKey(g.GetService())+ keyTerms := []biscuit.Term{biscuit.String(svcType), biscuit.String(key)}++ var facts []biscuit.Fact+ switch factName {+ case FactHTTPGrantedServiceAllTypes:+ facts = append(facts, MarkerFact(factName))+ case FactHTTPGrantedServiceAll:+ facts = append(facts, biscuit.Fact{Predicate: biscuit.Predicate{Name: factName, IDs: []biscuit.Term{biscuit.String(svcType)}}})+ default:+ facts = append(facts, biscuit.Fact{Predicate: biscuit.Predicate{Name: factName, IDs: keyTerms}})+ }++ if len(g.GetMethods()) == 0 {+ facts = append(facts, biscuit.Fact{Predicate: biscuit.Predicate{Name: FactGrantedMethodAny, IDs: keyTerms}})+ } else {+ facts = append(facts, biscuit.Fact{Predicate: biscuit.Predicate{+ Name: FactGrantedMethod,+ IDs: append(slices.Clone(keyTerms), stringSet(g.GetMethods())),+ }})+ }++ var exact, prefixes []string+ for _, p := range g.GetPaths() {+ if strings.HasSuffix(p, "*") {+ prefixes = append(prefixes, strings.TrimSuffix(p, "*"))+ } else {+ exact = append(exact, p)+ }+ }+ if len(exact) == 0 && len(prefixes) == 0 {+ facts = append(facts, biscuit.Fact{Predicate: biscuit.Predicate{Name: FactGrantedPathAny, IDs: keyTerms}})+ }+ if len(exact) > 0 {+ facts = append(facts, biscuit.Fact{Predicate: biscuit.Predicate{+ Name: FactGrantedPathExact,+ IDs: append(slices.Clone(keyTerms), stringSet(exact)),+ }})+ }+ sort.Strings(prefixes)+ for _, prefix := range prefixes {+ facts = append(facts, biscuit.Fact{Predicate: biscuit.Predicate{+ Name: FactGrantedPathPrefix,+ IDs: append(slices.Clone(keyTerms), biscuit.String(prefix)),+ }})+ }+ return facts+}++// stringSet builds a sorted, deduplicated Biscuit Set of strings.+func stringSet(values []string) biscuit.Set {+ sorted := slices.Clone(values)+ sort.Strings(sorted)+ sorted = slices.Compact(sorted)+ set := make(biscuit.Set, 0, len(sorted))+ for _, v := range sorted {+ set = append(set, biscuit.String(v))+ }+ return set+}++// SplitHTTPGrants separates a role's allowed_services into the entries minted+// as plain grants and the entries narrowed by PolicyRole.http. A narrowed entry+// is withheld from the plain list: it exists only as its http_granted_service_*+// fact, and the request has to earn the plain fact through BaselineHTTPRules.+func SplitHTTPGrants(role *PolicyRole) (plain []string, narrowed []*HTTPGrant) {+ narrowedByService := make(map[string]bool, len(role.GetHttp()))+ for _, g := range role.GetHttp() {+ if g == nil || g.GetService() == "" {+ continue+ }+ narrowedByService[g.GetService()] = true+ narrowed = append(narrowed, g)+ }+ for _, svc := range role.GetAllowedServices() {+ if !narrowedByService[svc] {+ plain = append(plain, svc)+ }+ }+ return plain, narrowed+}diff --git a/api/http_grants_test.go b/api/http_grants_test.gonew file mode 100644index 00000000..7bded6f8--- /dev/null+++ b/api/http_grants_test.go@@ -0,0 +1,289 @@+// Copyright 2026 Google LLC+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++package api++import (+ "slices"+ "strings"+ "testing"+ "time"++ "github.com/biscuit-auth/biscuit-go/v2"+ "github.com/biscuit-auth/biscuit-go/v2/datalog"+)++// authorizeHTTP evaluates the baseline policies plus BaselineHTTPRules for a+// token minted with the given facts, against a request on target with the+// given method and path. An empty method leaves the request facts out, as a+// stream that carries no HTTP request does.+func authorizeHTTP(t *testing.T, tokenFacts []biscuit.Fact, target, method, path string) error {+ t.Helper()+ pub, priv := makeKeyPair(t)+ builder := biscuit.NewBuilder(priv)+ for _, f := range tokenFacts {+ if err := builder.AddAuthorityFact(f); err != nil {+ t.Fatalf("AddAuthorityFact: %v", err)+ }+ }+ tok, err := builder.Build()+ if err != nil {+ t.Fatalf("Build: %v", err)+ }+ authorizer, err := tok.Authorizer(pub, biscuit.WithWorldOptions(datalog.WithMaxDuration(5*time.Second)))+ if err != nil {+ t.Fatalf("Authorizer: %v", err)+ }+ opType, opName := ParseServiceTarget(target)+ authorizer.AddFact(biscuit.Fact{Predicate: biscuit.Predicate{Name: FactService, IDs: []biscuit.Term{biscuit.String(opType), biscuit.String(opName)}}})+ if method != "" {+ authorizer.AddFact(biscuit.Fact{Predicate: biscuit.Predicate{Name: FactMethod, IDs: []biscuit.Term{biscuit.String(method)}}})+ authorizer.AddFact(biscuit.Fact{Predicate: biscuit.Predicate{Name: FactPath, IDs: []biscuit.Term{biscuit.String(path)}}})+ }+ for _, p := range BaselinePolicies {+ authorizer.AddPolicy(p)+ }+ for _, r := range BaselineHTTPRules {+ authorizer.AddRule(r)+ }+ return authorizer.Authorize()+}++func TestHTTPGrantNarrowsServiceGrant(t *testing.T) {+ narrowed := BuildHTTPGrantFacts(&HTTPGrant{+ Service: "egress://api.github.com",+ Methods: []string{"GET", "HEAD"},+ Paths: []string{"/repos/acme/*", "/user"},+ })++ tests := []struct {+ name string+ facts []biscuit.Fact+ target string+ method string+ path string+ expectAllow bool+ }{+ {"allowed method under the prefix", narrowed, "egress://api.github.com", "GET", "/repos/acme/dubbing/pulls", true},+ {"allowed method on the exact path", narrowed, "egress://api.github.com", "HEAD", "/user", true},+ {"method outside the grant", narrowed, "egress://api.github.com", "POST", "/repos/acme/dubbing/pulls", false},+ {"path outside the grant", narrowed, "egress://api.github.com", "GET", "/repos/other/x", false},+ {"the prefix itself is not the exact path", narrowed, "egress://api.github.com", "GET", "/userinfo", false},+ {"another service is not granted at all", narrowed, "egress://api.other.com", "GET", "/user", false},+ // A tunnel is CONNECT with an empty path: neither axis matches.+ {"a tunnel fails closed", narrowed, "egress://api.github.com", "CONNECT", "", false},+ // No method() fact at all: the positive rules derive nothing.+ {"a request without HTTP facts fails closed", narrowed, "egress://api.github.com", "", "", false},+ {+ name: "methods narrowed, any path",+ facts: BuildHTTPGrantFacts(&HTTPGrant{Service: "mcp://tools", Methods: []string{"GET"}}),+ target: "mcp://tools",+ method: "GET",+ path: "/anything/at/all",+ expectAllow: true,+ },+ {+ name: "paths narrowed, any method",+ facts: BuildHTTPGrantFacts(&HTTPGrant{Service: "mcp://tools", Paths: []string{"/mcp"}}),+ target: "mcp://tools",+ method: "POST",+ path: "/mcp",+ expectAllow: true,+ },+ {+ name: "paths narrowed fails closed on a tunnel",+ facts: BuildHTTPGrantFacts(&HTTPGrant{Service: "mcp://tools", Paths: []string{"/mcp"}}),+ target: "mcp://tools",+ method: "CONNECT",+ path: "",+ expectAllow: false,+ },+ {+ name: "suffix pattern narrowed",+ facts: BuildHTTPGrantFacts(&HTTPGrant{Service: "egress://*.internal.example.com", Methods: []string{"GET"}}),+ target: "egress://mam.internal.example.com",+ method: "GET",+ path: "/v2",+ expectAllow: true,+ },+ {+ name: "suffix pattern narrowed, wrong method",+ facts: BuildHTTPGrantFacts(&HTTPGrant{Service: "egress://*.internal.example.com", Methods: []string{"GET"}}),+ target: "egress://mam.internal.example.com",+ method: "PUT",+ path: "/v2",+ expectAllow: false,+ },+ {+ name: "prefix pattern narrowed",+ facts: BuildHTTPGrantFacts(&HTTPGrant{Service: "mcp://calc.*", Paths: []string{"/mcp"}}),+ target: "mcp://calc.service.internal",+ method: "POST",+ path: "/mcp",+ expectAllow: true,+ },+ {+ name: "type wildcard narrowed",+ facts: BuildHTTPGrantFacts(&HTTPGrant{Service: "egress://*", Methods: []string{"GET"}}),+ target: "egress://anything.example",+ method: "GET",+ path: "/",+ expectAllow: true,+ },+ {+ name: "type wildcard narrowed does not leak to another type",+ facts: BuildHTTPGrantFacts(&HTTPGrant{Service: "egress://*", Methods: []string{"GET"}}),+ target: "mcp://anything",+ method: "GET",+ path: "/",+ expectAllow: false,+ },+ {+ name: "global wildcard narrowed",+ facts: BuildHTTPGrantFacts(&HTTPGrant{Service: "*", Methods: []string{"GET"}}),+ target: "inference://anything",+ method: "GET",+ path: "/v1/models",+ expectAllow: true,+ },+ {+ name: "global wildcard narrowed, wrong method",+ facts: BuildHTTPGrantFacts(&HTTPGrant{Service: "*", Methods: []string{"GET"}}),+ target: "inference://anything",+ method: "POST",+ path: "/v1/chat/completions",+ expectAllow: false,+ },+ {+ // Union semantics: a plain grant from another role is not narrowed.+ name: "a plain grant alongside a narrowed one is still plain",+ facts: append(slices.Clone(narrowed),+ biscuit.Fact{Predicate: biscuit.Predicate{Name: FactGrantedServiceExact, IDs: []biscuit.Term{biscuit.String("egress"), biscuit.String("api.github.com")}}}),+ target: "egress://api.github.com",+ method: "DELETE",+ path: "/repos/other",+ expectAllow: true,+ },+ }+ for _, tt := range tests {+ t.Run(tt.name, func(t *testing.T) {+ err := authorizeHTTP(t, tt.facts, tt.target, tt.method, tt.path)+ if tt.expectAllow && err != nil {+ t.Errorf("expected allow, got %v", err)+ }+ if !tt.expectAllow && err == nil {+ t.Error("expected deny, got allow")+ }+ })+ }+}++func TestHTTPGrantKey(t *testing.T) {+ tests := []struct {+ service string+ wantFact, want string+ wantType string+ }{+ {"egress://api.github.com", FactHTTPGrantedServiceExact, "api.github.com", "egress"},+ {"egress://*.internal.example.com", FactHTTPGrantedServiceSuffix, ".internal.example.com", "egress"},+ {"mcp://calc.*", FactHTTPGrantedServicePrefix, "calc.", "mcp"},+ {"egress://*", FactHTTPGrantedServiceAll, "*", "egress"},+ {"*", FactHTTPGrantedServiceAllTypes, "*", "*"},+ }+ for _, tt := range tests {+ fact, typ, key := HTTPGrantKey(tt.service)+ if fact != tt.wantFact || typ != tt.wantType || key != tt.want {+ t.Errorf("HTTPGrantKey(%q) = (%s, %s, %s), want (%s, %s, %s)", tt.service, fact, typ, key, tt.wantFact, tt.wantType, tt.want)+ }+ }+}++func TestSplitHTTPGrants(t *testing.T) {+ role := &PolicyRole{+ AllowedServices: []string{"mcp://a", "egress://b", "inference://*"},+ Http: []*HTTPGrant{{Service: "egress://b", Methods: []string{"GET"}}},+ }+ plain, narrowed := SplitHTTPGrants(role)+ if want := []string{"mcp://a", "inference://*"}; !slices.Equal(plain, want) {+ t.Errorf("plain = %v, want %v", plain, want)+ }+ if len(narrowed) != 1 || narrowed[0].Service != "egress://b" {+ t.Errorf("narrowed = %v, want the egress://b entry", narrowed)+ }+}++func TestBuildPolicyRulesRendersHTTPGrants(t *testing.T) {+ rules, warnings := BuildPolicyRules([]*PolicyRole{{+ Name: "contractor",+ AllowedServices: []string{"mcp://tools", "egress://mam.internal.example.com"},+ Http: []*HTTPGrant{{Service: "egress://mam.internal.example.com", Methods: []string{"GET"}, Paths: []string{"/v2/public/*"}}},+ }}, nil)+ if len(warnings) != 0 {+ t.Fatalf("warnings: %v", warnings)+ }+ texts := PolicyRuleTexts(rules)+ for _, want := range []string{+ `granted_service_set("mcp", ["tools"]) <- role("contractor")`,+ `http_granted_service_exact("egress", "mam.internal.example.com") <- role("contractor")`,+ `granted_method("egress", "mam.internal.example.com", ["GET"]) <- role("contractor")`,+ `granted_path_prefix("egress", "mam.internal.example.com", "/v2/public/") <- role("contractor")`,+ } {+ if !slices.Contains(texts, want) {+ t.Errorf("rules lack %q; got:\n%s", want, strings.Join(texts, "\n"))+ }+ }+ for _, text := range texts {+ if strings.HasPrefix(text, `granted_service_exact("egress"`) || strings.HasPrefix(text, `granted_service_set("egress"`) {+ t.Errorf("narrowed entry rendered as a plain grant: %s", text)+ }+ }+ // The rendered text is what every other implementation parses.+ if _, err := ParseDatalogRules(texts); err != nil {+ t.Fatalf("rendered rules do not parse back: %v", err)+ }+}++func TestValidateHTTPGrant(t *testing.T) {+ allowed := []string{"egress://api.github.com", "mcp://tools"}+ tests := []struct {+ name string+ grant *HTTPGrant+ wantErr string+ }{+ {"valid", &HTTPGrant{Service: "egress://api.github.com", Methods: []string{"GET", "HEAD"}, Paths: []string{"/user", "/repos/*"}}, ""},+ {"valid with one axis", &HTTPGrant{Service: "mcp://tools", Paths: []string{"/mcp"}}, ""},+ {"narrows nothing", &HTTPGrant{Service: "mcp://tools"}, "narrows nothing"},+ {"not one of allowed_services", &HTTPGrant{Service: "egress://other.example"}, "does not name one of the role's allowed_services"},+ {"empty service", &HTTPGrant{}, "no service"},+ {"lowercase method", &HTTPGrant{Service: "mcp://tools", Methods: []string{"get"}}, "uppercase HTTP method"},+ {"relative path", &HTTPGrant{Service: "mcp://tools", Paths: []string{"user"}}, `must start with "/"`},+ {"query in path", &HTTPGrant{Service: "mcp://tools", Paths: []string{"/user?x=1"}}, "query"},+ {"wildcard in the middle", &HTTPGrant{Service: "mcp://tools", Paths: []string{"/a/*/b"}}, "only allowed at the end"},+ {"dot segment", &HTTPGrant{Service: "mcp://tools", Paths: []string{"/a/../b"}}, "dot segment"},+ }+ for _, tt := range tests {+ t.Run(tt.name, func(t *testing.T) {+ err := ValidateHTTPGrant(tt.grant, allowed)+ if tt.wantErr == "" {+ if err != nil {+ t.Fatalf("unexpected error: %v", err)+ }+ return+ }+ if err == nil || !strings.Contains(err.Error(), tt.wantErr) {+ t.Fatalf("error = %v, want it to contain %q", err, tt.wantErr)+ }+ })+ }+}diff --git a/api/names.go b/api/names.goindex 6fda3d3f..720b627f 100644--- a/api/names.go+++ b/api/names.go@@ -131,9 +131,15 @@ func ParseMeshHost(host string) (serviceURI string, err error) {}name, typeStr := rest[:dot], rest[dot+1:]- if _, err := ParseServiceType(typeStr); err != nil {+ serviceType, err := ParseServiceType(typeStr)+ if err != nil {return "", fmt.Errorf("mesh host %q: %w", host, err)}+ // An egress destination is addressed by its own name; projecting it into+ // the zone would give one destination two names on the boundary.+ if serviceType == ServiceType_SERVICE_TYPE_EGRESS {+ return "", fmt.Errorf("mesh host %q: egress destinations have no %s name; connect to %q itself", host, MeshZone, name)+ }uri := typeStr + "://" + nameif err := ValidateServiceFormat(uri); err != nil {@@ -145,6 +151,9 @@ func ParseMeshHost(host string) (serviceURI string, err error) {// MeshHost is the inverse of ParseMeshHost: it renders the hostname a sandboxed// agent should connect to in order to reach the given service.func MeshHost(t ServiceType, serviceName string) (string, error) {+ if t == ServiceType_SERVICE_TYPE_EGRESS {+ return "", fmt.Errorf("egress destination %q has no %s name; it is reached by its own name", serviceName, MeshZone)+ }typeStr, err := ServiceTypeToString(t)if err != nil {return "", errdiff --git a/api/network.go b/api/network.goindex 38ce4660..2a2b541e 100644--- a/api/network.go+++ b/api/network.go@@ -212,6 +212,11 @@ const (// InferenceServicePrefix is the scheme prefix for LLM Inference services.// Fully qualified inference services use the URI format: inference://<service-name>InferenceServicePrefix = "inference://"++ // EgressServicePrefix is the scheme prefix for destinations outside the+ // mesh, served by a node that enforces policy on them. The name is the+ // destination hostname: egress://api.github.com+ EgressServicePrefix = "egress://")// ============================================================================@@ -227,6 +232,9 @@ const (// ServiceTypeStringA2A is the string identifier for A2A (Agent2Agent) services.ServiceTypeStringA2A = "a2a"++ // ServiceTypeStringEgress is the string identifier for egress destinations.+ ServiceTypeStringEgress = "egress")// ParseServiceType converts a string identifier (e.g. from JSON or REST) to the ServiceType protobuf enum.@@ -238,6 +246,8 @@ func ParseServiceType(s string) (ServiceType, error) {return ServiceType_SERVICE_TYPE_INFERENCE, nilcase ServiceTypeStringA2A:return ServiceType_SERVICE_TYPE_A2A, nil+ case ServiceTypeStringEgress:+ return ServiceType_SERVICE_TYPE_EGRESS, nildefault:return ServiceType_SERVICE_TYPE_UNSPECIFIED, fmt.Errorf("invalid service type: %s", s)}@@ -252,6 +262,8 @@ func ServiceTypeToString(t ServiceType) (string, error) {return ServiceTypeStringInference, nilcase ServiceType_SERVICE_TYPE_A2A:return ServiceTypeStringA2A, nil+ case ServiceType_SERVICE_TYPE_EGRESS:+ return ServiceTypeStringEgress, nildefault:return "", fmt.Errorf("invalid or unspecified service type")}diff --git a/api/policy_rules.go b/api/policy_rules.goindex 24ce1b31..22384ffd 100644--- a/api/policy_rules.go+++ b/api/policy_rules.go@@ -86,9 +86,15 @@ func BuildPolicyRules(roles []*PolicyRole, bindings []*PolicyBinding) (rules []ProleName := role.NamefromRole := biscuit.Predicate{Name: FactRole, IDs: []biscuit.Term{biscuit.String(roleName)}}- for _, fact := range BuildServiceDatalogFacts(role.AllowedServices) {+ plainServices, narrowed := SplitHTTPGrants(role)+ for _, fact := range BuildServiceDatalogFacts(plainServices) {add(fact.Predicate, fromRole)}+ for _, g := range narrowed {+ for _, fact := range BuildHTTPGrantFacts(g) {+ add(fact.Predicate, fromRole)+ }+ }hasUnrestricted := falsevar nonWildcardTargets []stringdiff --git a/api/sam.pb.go b/api/sam.pb.goindex 291e6373..4d830601 100644--- a/api/sam.pb.go+++ b/api/sam.pb.go@@ -95,6 +95,12 @@ const (ServiceType_SERVICE_TYPE_MCP ServiceType = 1ServiceType_SERVICE_TYPE_INFERENCE ServiceType = 2ServiceType_SERVICE_TYPE_A2A ServiceType = 3+ // A destination outside the mesh, reached through a node that enforces+ // policy on it. The service name is the destination hostname, so a grant+ // reads egress://api.github.com and the request fact+ // service("egress", "api.github.com"). Egress names have no .sam.alt form:+ // a sandboxed agent connects to the destination name itself.+ ServiceType_SERVICE_TYPE_EGRESS ServiceType = 4)// Enum value maps for ServiceType.@@ -104,12 +110,14 @@ var (1: "SERVICE_TYPE_MCP",2: "SERVICE_TYPE_INFERENCE",3: "SERVICE_TYPE_A2A",+ 4: "SERVICE_TYPE_EGRESS",}ServiceType_value = map[string]int32{"SERVICE_TYPE_UNSPECIFIED": 0,"SERVICE_TYPE_MCP": 1,"SERVICE_TYPE_INFERENCE": 2,"SERVICE_TYPE_A2A": 3,+ "SERVICE_TYPE_EGRESS": 4,})@@ -1403,6 +1411,8 @@ type PolicyRole struct {// or "key=value". A node declares its own labels, so this is what turns a// declaration into something the control plane is willing to sign.AllowedLabels []string `protobuf:"bytes,6,rep,name=allowed_labels,json=allowedLabels,proto3" json:"allowed_labels,omitempty"`+ // HTTP narrowing of allowed_services entries; see HTTPGrant.+ Http []*HTTPGrant `protobuf:"bytes,7,rep,name=http,proto3" json:"http,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -1479,6 +1489,168 @@ func (x *PolicyRole) GetAllowedLabels() []string {return nil}+func (x *PolicyRole) GetHttp() []*HTTPGrant {+ if x != nil {+ return x.Http+ }+ 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+// entry. The baseline rules derive the service grant only for a request+// whose method($m) and path($p) facts match, so a request that carries no+// HTTP method (a tunnel, a non-HTTP stream) does not match a narrowed entry.+type HTTPGrant struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // One of the role's allowed_services entries, written identically.+ Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`+ // Methods the holder may use, e.g. "GET", "HEAD". Empty means any method.+ Methods []string `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty"`+ // Paths the holder may request, as the backend sees them: "/user" matches+ // that path only, "/v2/public/*" matches every path under the prefix.+ // Empty means any path. At least one of methods and paths must be set.+ Paths []string `protobuf:"bytes,3,rep,name=paths,proto3" json:"paths,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *HTTPGrant) Reset() {+ *x = HTTPGrant{}+ mi := &file_api_sam_proto_msgTypes[16]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *HTTPGrant) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*HTTPGrant) ProtoMessage() {}++func (x *HTTPGrant) ProtoReflect() protoreflect.Message {+ mi := &file_api_sam_proto_msgTypes[16]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use HTTPGrant.ProtoReflect.Descriptor instead.+func (*HTTPGrant) Descriptor() ([]byte, []int) {+ return file_api_sam_proto_rawDescGZIP(), []int{16}+}++func (x *HTTPGrant) GetService() string {+ if x != nil {+ return x.Service+ }+ return ""+}++func (x *HTTPGrant) GetMethods() []string {+ if x != nil {+ return x.Methods+ }+ return nil+}++func (x *HTTPGrant) GetPaths() []string {+ if x != nil {+ return x.Paths+ }+ return nil+}++// EgressDestination is a destination outside the mesh that selected nodes+// serve as egress://<name>. It is part of the policy document the admin+// writes; a node receives the destinations that select it at GET /egress+// and serves them without configuration of its own.+type EgressDestination struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The destination hostname, lowercase, without a port or a path. It is the+ // service name in grants (egress://<name>) and the DHT key.+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ // Where the serving node forwards requests. Optional; https://<name> when+ // empty. Must not carry a credential.+ TargetUrl string `protobuf:"bytes,2,opt,name=target_url,json=targetUrl,proto3" json:"target_url,omitempty"`+ // Name of the credential the serving node presents upstream, resolved by+ // the node from its secrets directory. Never a value: secret material does+ // not travel through this API.+ Credential string `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"`+ // Role names or key=value labels selecting the nodes that serve this+ // destination. A node matches when any entry names one of its roles or+ // labels. The control plane also grants the destination to the selected+ // nodes, so the serving node authorizes local requests with its own+ // credential; other callers need the grant on their own role.+ ServedBy []string `protobuf:"bytes,4,rep,name=served_by,json=servedBy,proto3" json:"served_by,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *EgressDestination) Reset() {+ *x = EgressDestination{}+ mi := &file_api_sam_proto_msgTypes[17]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *EgressDestination) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*EgressDestination) ProtoMessage() {}++func (x *EgressDestination) ProtoReflect() protoreflect.Message {+ mi := &file_api_sam_proto_msgTypes[17]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use EgressDestination.ProtoReflect.Descriptor instead.+func (*EgressDestination) Descriptor() ([]byte, []int) {+ return file_api_sam_proto_rawDescGZIP(), []int{17}+}++func (x *EgressDestination) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *EgressDestination) GetTargetUrl() string {+ if x != nil {+ return x.TargetUrl+ }+ return ""+}++func (x *EgressDestination) GetCredential() string {+ if x != nil {+ return x.Credential+ }+ return ""+}++func (x *EgressDestination) GetServedBy() []string {+ if x != nil {+ return x.ServedBy+ }+ return nil+}+type PolicyBinding struct {state protoimpl.MessageState `protogen:"open.v1"`Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`@@ -1489,7 +1661,7 @@ type PolicyBinding struct {func (x *PolicyBinding) Reset() {*x = PolicyBinding{}- mi := &file_api_sam_proto_msgTypes[16]+ mi := &file_api_sam_proto_msgTypes[18]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1501,7 +1673,7 @@ func (x *PolicyBinding) String() string {func (*PolicyBinding) ProtoMessage() {}func (x *PolicyBinding) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[16]+ mi := &file_api_sam_proto_msgTypes[18]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1514,7 +1686,7 @@ func (x *PolicyBinding) ProtoReflect() protoreflect.Message {// Deprecated: Use PolicyBinding.ProtoReflect.Descriptor instead.func (*PolicyBinding) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{16}+ return file_api_sam_proto_rawDescGZIP(), []int{18}}func (x *PolicyBinding) GetRole() string {@@ -1539,13 +1711,14 @@ type PolicyConfig struct {state protoimpl.MessageState `protogen:"open.v1"`Roles []*PolicyRole `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`Bindings []*PolicyBinding `protobuf:"bytes,2,rep,name=bindings,proto3" json:"bindings,omitempty"`+ Egress []*EgressDestination `protobuf:"bytes,3,rep,name=egress,proto3" json:"egress,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}func (x *PolicyConfig) Reset() {*x = PolicyConfig{}- mi := &file_api_sam_proto_msgTypes[17]+ mi := &file_api_sam_proto_msgTypes[19]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1557,7 +1730,7 @@ func (x *PolicyConfig) String() string {func (*PolicyConfig) ProtoMessage() {}func (x *PolicyConfig) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[17]+ mi := &file_api_sam_proto_msgTypes[19]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1570,7 +1743,7 @@ func (x *PolicyConfig) ProtoReflect() protoreflect.Message {// Deprecated: Use PolicyConfig.ProtoReflect.Descriptor instead.func (*PolicyConfig) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{17}+ return file_api_sam_proto_rawDescGZIP(), []int{19}}func (x *PolicyConfig) GetRoles() []*PolicyRole {@@ -1587,6 +1760,13 @@ func (x *PolicyConfig) GetBindings() []*PolicyBinding {return nil}+func (x *PolicyConfig) GetEgress() []*EgressDestination {+ if x != nil {+ return x.Egress+ }+ return nil+}+type PolicyConfigGetRequest struct {state protoimpl.MessageState `protogen:"open.v1"`unknownFields protoimpl.UnknownFields@@ -1595,7 +1775,7 @@ type PolicyConfigGetRequest struct {func (x *PolicyConfigGetRequest) Reset() {*x = PolicyConfigGetRequest{}- mi := &file_api_sam_proto_msgTypes[18]+ mi := &file_api_sam_proto_msgTypes[20]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1607,7 +1787,7 @@ func (x *PolicyConfigGetRequest) String() string {func (*PolicyConfigGetRequest) ProtoMessage() {}func (x *PolicyConfigGetRequest) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[18]+ mi := &file_api_sam_proto_msgTypes[20]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1620,7 +1800,7 @@ func (x *PolicyConfigGetRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use PolicyConfigGetRequest.ProtoReflect.Descriptor instead.func (*PolicyConfigGetRequest) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{18}+ return file_api_sam_proto_rawDescGZIP(), []int{20}}// PolicyConfigGetResponse answers GET /policies for a mesh member holding a@@ -1636,7 +1816,7 @@ type PolicyConfigGetResponse struct {func (x *PolicyConfigGetResponse) Reset() {*x = PolicyConfigGetResponse{}- mi := &file_api_sam_proto_msgTypes[19]+ mi := &file_api_sam_proto_msgTypes[21]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1648,7 +1828,7 @@ func (x *PolicyConfigGetResponse) String() string {func (*PolicyConfigGetResponse) ProtoMessage() {}func (x *PolicyConfigGetResponse) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[19]+ mi := &file_api_sam_proto_msgTypes[21]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1661,7 +1841,7 @@ func (x *PolicyConfigGetResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use PolicyConfigGetResponse.ProtoReflect.Descriptor instead.func (*PolicyConfigGetResponse) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{19}+ return file_api_sam_proto_rawDescGZIP(), []int{21}}func (x *PolicyConfigGetResponse) GetDatalogRules() []string {@@ -1681,7 +1861,7 @@ type PolicyConfigUpdateResponse struct {func (x *PolicyConfigUpdateResponse) Reset() {*x = PolicyConfigUpdateResponse{}- mi := &file_api_sam_proto_msgTypes[20]+ mi := &file_api_sam_proto_msgTypes[22]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1693,7 +1873,7 @@ func (x *PolicyConfigUpdateResponse) String() string {func (*PolicyConfigUpdateResponse) ProtoMessage() {}func (x *PolicyConfigUpdateResponse) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[20]+ mi := &file_api_sam_proto_msgTypes[22]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1706,7 +1886,7 @@ func (x *PolicyConfigUpdateResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use PolicyConfigUpdateResponse.ProtoReflect.Descriptor instead.func (*PolicyConfigUpdateResponse) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{20}+ return file_api_sam_proto_rawDescGZIP(), []int{22}}func (x *PolicyConfigUpdateResponse) GetSuccess() bool {@@ -1723,6 +1903,90 @@ func (x *PolicyConfigUpdateResponse) GetError() string {return ""}+type EgressAssignmentsRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *EgressAssignmentsRequest) Reset() {+ *x = EgressAssignmentsRequest{}+ mi := &file_api_sam_proto_msgTypes[23]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *EgressAssignmentsRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*EgressAssignmentsRequest) ProtoMessage() {}++func (x *EgressAssignmentsRequest) ProtoReflect() protoreflect.Message {+ mi := &file_api_sam_proto_msgTypes[23]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use EgressAssignmentsRequest.ProtoReflect.Descriptor instead.+func (*EgressAssignmentsRequest) Descriptor() ([]byte, []int) {+ return file_api_sam_proto_rawDescGZIP(), []int{23}+}++// EgressAssignmentsResponse answers GET /egress for a mesh member holding a+// biscuit: the destinations whose served_by selects that node. It is a+// separate endpoint from GET /policies so that a node predating it keeps+// syncing rules unchanged.+type EgressAssignmentsResponse struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Egress []*EgressDestination `protobuf:"bytes,1,rep,name=egress,proto3" json:"egress,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *EgressAssignmentsResponse) Reset() {+ *x = EgressAssignmentsResponse{}+ mi := &file_api_sam_proto_msgTypes[24]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *EgressAssignmentsResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*EgressAssignmentsResponse) ProtoMessage() {}++func (x *EgressAssignmentsResponse) ProtoReflect() protoreflect.Message {+ mi := &file_api_sam_proto_msgTypes[24]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use EgressAssignmentsResponse.ProtoReflect.Descriptor instead.+func (*EgressAssignmentsResponse) Descriptor() ([]byte, []int) {+ return file_api_sam_proto_rawDescGZIP(), []int{24}+}++func (x *EgressAssignmentsResponse) GetEgress() []*EgressDestination {+ if x != nil {+ return x.Egress+ }+ return nil+}+type KeysResponse struct {state protoimpl.MessageState `protogen:"open.v1"`PublicKeys [][]byte `protobuf:"bytes,1,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty"`@@ -1740,7 +2004,7 @@ type KeysResponse struct {func (x *KeysResponse) Reset() {*x = KeysResponse{}- mi := &file_api_sam_proto_msgTypes[21]+ mi := &file_api_sam_proto_msgTypes[25]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1752,7 +2016,7 @@ func (x *KeysResponse) String() string {func (*KeysResponse) ProtoMessage() {}func (x *KeysResponse) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[21]+ mi := &file_api_sam_proto_msgTypes[25]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1765,7 +2029,7 @@ func (x *KeysResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use KeysResponse.ProtoReflect.Descriptor instead.func (*KeysResponse) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{21}+ return file_api_sam_proto_rawDescGZIP(), []int{25}}func (x *KeysResponse) GetPublicKeys() [][]byte {@@ -1813,7 +2077,7 @@ type TokenRefreshRequest struct {func (x *TokenRefreshRequest) Reset() {*x = TokenRefreshRequest{}- mi := &file_api_sam_proto_msgTypes[22]+ mi := &file_api_sam_proto_msgTypes[26]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1825,7 +2089,7 @@ func (x *TokenRefreshRequest) String() string {func (*TokenRefreshRequest) ProtoMessage() {}func (x *TokenRefreshRequest) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[22]+ mi := &file_api_sam_proto_msgTypes[26]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1838,7 +2102,7 @@ func (x *TokenRefreshRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use TokenRefreshRequest.ProtoReflect.Descriptor instead.func (*TokenRefreshRequest) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{22}+ return file_api_sam_proto_rawDescGZIP(), []int{26}}func (x *TokenRefreshRequest) GetChallengeSignature() []byte {@@ -1873,7 +2137,7 @@ type TokenRefreshResponse struct {func (x *TokenRefreshResponse) Reset() {*x = TokenRefreshResponse{}- mi := &file_api_sam_proto_msgTypes[23]+ mi := &file_api_sam_proto_msgTypes[27]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1885,7 +2149,7 @@ func (x *TokenRefreshResponse) String() string {func (*TokenRefreshResponse) ProtoMessage() {}func (x *TokenRefreshResponse) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[23]+ mi := &file_api_sam_proto_msgTypes[27]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1898,7 +2162,7 @@ func (x *TokenRefreshResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use TokenRefreshResponse.ProtoReflect.Descriptor instead.func (*TokenRefreshResponse) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{23}+ return file_api_sam_proto_rawDescGZIP(), []int{27}}func (x *TokenRefreshResponse) GetBiscuitToken() []byte {@@ -1935,7 +2199,7 @@ type NodeCatalogReport struct {func (x *NodeCatalogReport) Reset() {*x = NodeCatalogReport{}- mi := &file_api_sam_proto_msgTypes[24]+ mi := &file_api_sam_proto_msgTypes[28]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1947,7 +2211,7 @@ func (x *NodeCatalogReport) String() string {func (*NodeCatalogReport) ProtoMessage() {}func (x *NodeCatalogReport) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[24]+ mi := &file_api_sam_proto_msgTypes[28]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1960,7 +2224,7 @@ func (x *NodeCatalogReport) ProtoReflect() protoreflect.Message {// Deprecated: Use NodeCatalogReport.ProtoReflect.Descriptor instead.func (*NodeCatalogReport) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{24}+ return file_api_sam_proto_rawDescGZIP(), []int{28}}func (x *NodeCatalogReport) GetServices() []*ServiceInfo {@@ -1979,7 +2243,7 @@ type TokenRevokeRequest struct {func (x *TokenRevokeRequest) Reset() {*x = TokenRevokeRequest{}- mi := &file_api_sam_proto_msgTypes[25]+ mi := &file_api_sam_proto_msgTypes[29]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1991,7 +2255,7 @@ func (x *TokenRevokeRequest) String() string {func (*TokenRevokeRequest) ProtoMessage() {}func (x *TokenRevokeRequest) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[25]+ mi := &file_api_sam_proto_msgTypes[29]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2004,7 +2268,7 @@ func (x *TokenRevokeRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use TokenRevokeRequest.ProtoReflect.Descriptor instead.func (*TokenRevokeRequest) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{25}+ return file_api_sam_proto_rawDescGZIP(), []int{29}}func (x *TokenRevokeRequest) GetPeerId() string {@@ -2024,7 +2288,7 @@ type TokenRevokeResponse struct {func (x *TokenRevokeResponse) Reset() {*x = TokenRevokeResponse{}- mi := &file_api_sam_proto_msgTypes[26]+ mi := &file_api_sam_proto_msgTypes[30]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2036,7 +2300,7 @@ func (x *TokenRevokeResponse) String() string {func (*TokenRevokeResponse) ProtoMessage() {}func (x *TokenRevokeResponse) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[26]+ mi := &file_api_sam_proto_msgTypes[30]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2049,7 +2313,7 @@ func (x *TokenRevokeResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use TokenRevokeResponse.ProtoReflect.Descriptor instead.func (*TokenRevokeResponse) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{26}+ return file_api_sam_proto_rawDescGZIP(), []int{30}}func (x *TokenRevokeResponse) GetSuccess() bool {@@ -2080,7 +2344,7 @@ type AgentSecret struct {func (x *AgentSecret) Reset() {*x = AgentSecret{}- mi := &file_api_sam_proto_msgTypes[27]+ mi := &file_api_sam_proto_msgTypes[31]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2092,7 +2356,7 @@ func (x *AgentSecret) String() string {func (*AgentSecret) ProtoMessage() {}func (x *AgentSecret) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[27]+ mi := &file_api_sam_proto_msgTypes[31]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2105,7 +2369,7 @@ func (x *AgentSecret) ProtoReflect() protoreflect.Message {// Deprecated: Use AgentSecret.ProtoReflect.Descriptor instead.func (*AgentSecret) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{27}+ return file_api_sam_proto_rawDescGZIP(), []int{31}}func (x *AgentSecret) GetHost() string {@@ -2148,7 +2412,7 @@ type AgentEgress struct {func (x *AgentEgress) Reset() {*x = AgentEgress{}- mi := &file_api_sam_proto_msgTypes[28]+ mi := &file_api_sam_proto_msgTypes[32]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2160,7 +2424,7 @@ func (x *AgentEgress) String() string {func (*AgentEgress) ProtoMessage() {}func (x *AgentEgress) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[28]+ mi := &file_api_sam_proto_msgTypes[32]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2173,7 +2437,7 @@ func (x *AgentEgress) ProtoReflect() protoreflect.Message {// Deprecated: Use AgentEgress.ProtoReflect.Descriptor instead.func (*AgentEgress) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{28}+ return file_api_sam_proto_rawDescGZIP(), []int{32}}func (x *AgentEgress) GetAllow() []string {@@ -2205,7 +2469,7 @@ type AgentIngress struct {func (x *AgentIngress) Reset() {*x = AgentIngress{}- mi := &file_api_sam_proto_msgTypes[29]+ mi := &file_api_sam_proto_msgTypes[33]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2217,7 +2481,7 @@ func (x *AgentIngress) String() string {func (*AgentIngress) ProtoMessage() {}func (x *AgentIngress) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[29]+ mi := &file_api_sam_proto_msgTypes[33]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2230,7 +2494,7 @@ func (x *AgentIngress) ProtoReflect() protoreflect.Message {// Deprecated: Use AgentIngress.ProtoReflect.Descriptor instead.func (*AgentIngress) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{29}+ return file_api_sam_proto_rawDescGZIP(), []int{33}}func (x *AgentIngress) GetType() ServiceType {@@ -2288,7 +2552,7 @@ type AgentBundle struct {func (x *AgentBundle) Reset() {*x = AgentBundle{}- mi := &file_api_sam_proto_msgTypes[30]+ mi := &file_api_sam_proto_msgTypes[34]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2300,7 +2564,7 @@ func (x *AgentBundle) String() string {func (*AgentBundle) ProtoMessage() {}func (x *AgentBundle) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[30]+ mi := &file_api_sam_proto_msgTypes[34]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2313,7 +2577,7 @@ func (x *AgentBundle) ProtoReflect() protoreflect.Message {// Deprecated: Use AgentBundle.ProtoReflect.Descriptor instead.func (*AgentBundle) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{30}+ return file_api_sam_proto_rawDescGZIP(), []int{34}}func (x *AgentBundle) GetVersion() string {@@ -2369,7 +2633,7 @@ type AgentAttachRequest struct {func (x *AgentAttachRequest) Reset() {*x = AgentAttachRequest{}- mi := &file_api_sam_proto_msgTypes[31]+ mi := &file_api_sam_proto_msgTypes[35]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2381,7 +2645,7 @@ func (x *AgentAttachRequest) String() string {func (*AgentAttachRequest) ProtoMessage() {}func (x *AgentAttachRequest) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[31]+ mi := &file_api_sam_proto_msgTypes[35]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2394,7 +2658,7 @@ func (x *AgentAttachRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use AgentAttachRequest.ProtoReflect.Descriptor instead.func (*AgentAttachRequest) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{31}+ return file_api_sam_proto_rawDescGZIP(), []int{35}}func (x *AgentAttachRequest) GetBundle() *AgentBundle {@@ -2418,7 +2682,7 @@ type AgentAttachResponse struct {func (x *AgentAttachResponse) Reset() {*x = AgentAttachResponse{}- mi := &file_api_sam_proto_msgTypes[32]+ mi := &file_api_sam_proto_msgTypes[36]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2430,7 +2694,7 @@ func (x *AgentAttachResponse) String() string {func (*AgentAttachResponse) ProtoMessage() {}func (x *AgentAttachResponse) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[32]+ mi := &file_api_sam_proto_msgTypes[36]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2443,7 +2707,7 @@ func (x *AgentAttachResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use AgentAttachResponse.ProtoReflect.Descriptor instead.func (*AgentAttachResponse) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{32}+ return file_api_sam_proto_rawDescGZIP(), []int{36}}func (x *AgentAttachResponse) GetEgressSocket() string {@@ -2478,7 +2742,7 @@ type AgentDetachRequest struct {func (x *AgentDetachRequest) Reset() {*x = AgentDetachRequest{}- mi := &file_api_sam_proto_msgTypes[33]+ mi := &file_api_sam_proto_msgTypes[37]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2490,7 +2754,7 @@ func (x *AgentDetachRequest) String() string {func (*AgentDetachRequest) ProtoMessage() {}func (x *AgentDetachRequest) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[33]+ mi := &file_api_sam_proto_msgTypes[37]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2503,7 +2767,7 @@ func (x *AgentDetachRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use AgentDetachRequest.ProtoReflect.Descriptor instead.func (*AgentDetachRequest) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{33}+ return file_api_sam_proto_rawDescGZIP(), []int{37}}func (x *AgentDetachRequest) GetAgentId() string {@@ -2523,7 +2787,7 @@ type AgentDetachResponse struct {func (x *AgentDetachResponse) Reset() {*x = AgentDetachResponse{}- mi := &file_api_sam_proto_msgTypes[34]+ mi := &file_api_sam_proto_msgTypes[38]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2535,7 +2799,7 @@ func (x *AgentDetachResponse) String() string {func (*AgentDetachResponse) ProtoMessage() {}func (x *AgentDetachResponse) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[34]+ mi := &file_api_sam_proto_msgTypes[38]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2548,7 +2812,7 @@ func (x *AgentDetachResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use AgentDetachResponse.ProtoReflect.Descriptor instead.func (*AgentDetachResponse) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{34}+ return file_api_sam_proto_rawDescGZIP(), []int{38}}func (x *AgentDetachResponse) GetSuccess() bool {@@ -2578,7 +2842,7 @@ type AgentRefreshRequest struct {func (x *AgentRefreshRequest) Reset() {*x = AgentRefreshRequest{}- mi := &file_api_sam_proto_msgTypes[35]+ mi := &file_api_sam_proto_msgTypes[39]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2590,7 +2854,7 @@ func (x *AgentRefreshRequest) String() string {func (*AgentRefreshRequest) ProtoMessage() {}func (x *AgentRefreshRequest) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[35]+ mi := &file_api_sam_proto_msgTypes[39]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2603,7 +2867,7 @@ func (x *AgentRefreshRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use AgentRefreshRequest.ProtoReflect.Descriptor instead.func (*AgentRefreshRequest) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{35}+ return file_api_sam_proto_rawDescGZIP(), []int{39}}func (x *AgentRefreshRequest) GetAgentId() string {@@ -2631,7 +2895,7 @@ type AgentRefreshResponse struct {func (x *AgentRefreshResponse) Reset() {*x = AgentRefreshResponse{}- mi := &file_api_sam_proto_msgTypes[36]+ mi := &file_api_sam_proto_msgTypes[40]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2643,7 +2907,7 @@ func (x *AgentRefreshResponse) String() string {func (*AgentRefreshResponse) ProtoMessage() {}func (x *AgentRefreshResponse) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[36]+ mi := &file_api_sam_proto_msgTypes[40]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2656,7 +2920,7 @@ func (x *AgentRefreshResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use AgentRefreshResponse.ProtoReflect.Descriptor instead.func (*AgentRefreshResponse) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{36}+ return file_api_sam_proto_rawDescGZIP(), []int{40}}func (x *AgentRefreshResponse) GetSuccess() bool {@@ -2691,7 +2955,7 @@ type AgentStatusRequest struct {func (x *AgentStatusRequest) Reset() {*x = AgentStatusRequest{}- mi := &file_api_sam_proto_msgTypes[37]+ mi := &file_api_sam_proto_msgTypes[41]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2703,7 +2967,7 @@ func (x *AgentStatusRequest) String() string {func (*AgentStatusRequest) ProtoMessage() {}func (x *AgentStatusRequest) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[37]+ mi := &file_api_sam_proto_msgTypes[41]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2716,7 +2980,7 @@ func (x *AgentStatusRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use AgentStatusRequest.ProtoReflect.Descriptor instead.func (*AgentStatusRequest) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{37}+ return file_api_sam_proto_rawDescGZIP(), []int{41}}func (x *AgentStatusRequest) GetAgentId() string {@@ -2738,7 +3002,7 @@ type AgentStatus struct {func (x *AgentStatus) Reset() {*x = AgentStatus{}- mi := &file_api_sam_proto_msgTypes[38]+ mi := &file_api_sam_proto_msgTypes[42]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2750,7 +3014,7 @@ func (x *AgentStatus) String() string {func (*AgentStatus) ProtoMessage() {}func (x *AgentStatus) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[38]+ mi := &file_api_sam_proto_msgTypes[42]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2763,7 +3027,7 @@ func (x *AgentStatus) ProtoReflect() protoreflect.Message {// Deprecated: Use AgentStatus.ProtoReflect.Descriptor instead.func (*AgentStatus) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{38}+ return file_api_sam_proto_rawDescGZIP(), []int{42}}func (x *AgentStatus) GetAgentId() string {@@ -2804,7 +3068,7 @@ type AgentStatusResponse struct {func (x *AgentStatusResponse) Reset() {*x = AgentStatusResponse{}- mi := &file_api_sam_proto_msgTypes[39]+ mi := &file_api_sam_proto_msgTypes[43]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2816,7 +3080,7 @@ func (x *AgentStatusResponse) String() string {func (*AgentStatusResponse) ProtoMessage() {}func (x *AgentStatusResponse) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[39]+ mi := &file_api_sam_proto_msgTypes[43]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2829,7 +3093,7 @@ func (x *AgentStatusResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use AgentStatusResponse.ProtoReflect.Descriptor instead.func (*AgentStatusResponse) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{39}+ return file_api_sam_proto_rawDescGZIP(), []int{43}}func (x *AgentStatusResponse) GetAgents() []*AgentStatus {@@ -2860,7 +3124,7 @@ type IdentityEvidenceResponse struct {func (x *IdentityEvidenceResponse) Reset() {*x = IdentityEvidenceResponse{}- mi := &file_api_sam_proto_msgTypes[40]+ mi := &file_api_sam_proto_msgTypes[44]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2872,7 +3136,7 @@ func (x *IdentityEvidenceResponse) String() string {func (*IdentityEvidenceResponse) ProtoMessage() {}func (x *IdentityEvidenceResponse) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[40]+ mi := &file_api_sam_proto_msgTypes[44]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2885,7 +3149,7 @@ func (x *IdentityEvidenceResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use IdentityEvidenceResponse.ProtoReflect.Descriptor instead.func (*IdentityEvidenceResponse) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{40}+ return file_api_sam_proto_rawDescGZIP(), []int{44}}func (x *IdentityEvidenceResponse) GetPeerId() string {@@ -2946,7 +3210,7 @@ type PeerEvidenceResponse struct {func (x *PeerEvidenceResponse) Reset() {*x = PeerEvidenceResponse{}- mi := &file_api_sam_proto_msgTypes[41]+ mi := &file_api_sam_proto_msgTypes[45]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2958,7 +3222,7 @@ func (x *PeerEvidenceResponse) String() string {func (*PeerEvidenceResponse) ProtoMessage() {}func (x *PeerEvidenceResponse) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[41]+ mi := &file_api_sam_proto_msgTypes[45]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2971,7 +3235,7 @@ func (x *PeerEvidenceResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use PeerEvidenceResponse.ProtoReflect.Descriptor instead.func (*PeerEvidenceResponse) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{41}+ return file_api_sam_proto_rawDescGZIP(), []int{45}}func (x *PeerEvidenceResponse) GetPeerId() string {@@ -3056,7 +3320,7 @@ type MemberCredential struct {func (x *MemberCredential) Reset() {*x = MemberCredential{}- mi := &file_api_sam_proto_msgTypes[42]+ mi := &file_api_sam_proto_msgTypes[46]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3068,7 +3332,7 @@ func (x *MemberCredential) String() string {func (*MemberCredential) ProtoMessage() {}func (x *MemberCredential) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[42]+ mi := &file_api_sam_proto_msgTypes[46]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3081,7 +3345,7 @@ func (x *MemberCredential) ProtoReflect() protoreflect.Message {// Deprecated: Use MemberCredential.ProtoReflect.Descriptor instead.func (*MemberCredential) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{42}+ return file_api_sam_proto_rawDescGZIP(), []int{46}}func (x *MemberCredential) GetControlPlaneUrl() string {@@ -3146,7 +3410,7 @@ type TrustedSigningKey struct {func (x *TrustedSigningKey) Reset() {*x = TrustedSigningKey{}- mi := &file_api_sam_proto_msgTypes[43]+ mi := &file_api_sam_proto_msgTypes[47]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3158,7 +3422,7 @@ func (x *TrustedSigningKey) String() string {func (*TrustedSigningKey) ProtoMessage() {}func (x *TrustedSigningKey) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[43]+ mi := &file_api_sam_proto_msgTypes[47]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3171,7 +3435,7 @@ func (x *TrustedSigningKey) ProtoReflect() protoreflect.Message {// Deprecated: Use TrustedSigningKey.ProtoReflect.Descriptor instead.func (*TrustedSigningKey) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{43}+ return file_api_sam_proto_rawDescGZIP(), []int{47}}func (x *TrustedSigningKey) GetPublicKey() []byte {@@ -3200,7 +3464,7 @@ type OIDCSession struct {func (x *OIDCSession) Reset() {*x = OIDCSession{}- mi := &file_api_sam_proto_msgTypes[44]+ mi := &file_api_sam_proto_msgTypes[48]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3212,7 +3476,7 @@ func (x *OIDCSession) String() string {func (*OIDCSession) ProtoMessage() {}func (x *OIDCSession) ProtoReflect() protoreflect.Message {- mi := &file_api_sam_proto_msgTypes[44]+ mi := &file_api_sam_proto_msgTypes[48]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3225,7 +3489,7 @@ func (x *OIDCSession) ProtoReflect() protoreflect.Message {// Deprecated: Use OIDCSession.ProtoReflect.Descriptor instead.func (*OIDCSession) Descriptor() ([]byte, []int) {- return file_api_sam_proto_rawDescGZIP(), []int{44}+ return file_api_sam_proto_rawDescGZIP(), []int{48}}func (x *OIDCSession) GetIssuer() string {@@ -3373,7 +3637,7 @@ const file_api_sam_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\"\xe9\x01\n" ++ "expireTime\"\x90\x02\n" +"\n" +"PolicyRole\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x12'\n" +@@ -3381,19 +3645,36 @@ const file_api_sam_proto_rawDesc = "" +"\x10allowed_services\x18\x03 \x03(\tR\x0fallowedServices\x12%\n" +"\x0ecustom_datalog\x18\x04 \x03(\tR\rcustomDatalog\x12%\n" +"\x0eallowed_agents\x18\x05 \x03(\tR\rallowedAgents\x12%\n" +- "\x0eallowed_labels\x18\x06 \x03(\tR\rallowedLabels\"=\n" ++ "\x0eallowed_labels\x18\x06 \x03(\tR\rallowedLabels\x12%\n" ++ "\x04http\x18\a \x03(\v2\x11.sam.v1.HTTPGrantR\x04http\"U\n" ++ "\tHTTPGrant\x12\x18\n" ++ "\aservice\x18\x01 \x01(\tR\aservice\x12\x18\n" ++ "\amethods\x18\x02 \x03(\tR\amethods\x12\x14\n" ++ "\x05paths\x18\x03 \x03(\tR\x05paths\"\x83\x01\n" ++ "\x11EgressDestination\x12\x12\n" ++ "\x04name\x18\x01 \x01(\tR\x04name\x12\x1d\n" ++ "\n" ++ "target_url\x18\x02 \x01(\tR\ttargetUrl\x12\x1e\n" ++ "\n" ++ "credential\x18\x03 \x01(\tR\n" ++ "credential\x12\x1b\n" ++ "\tserved_by\x18\x04 \x03(\tR\bservedBy\"=\n" +"\rPolicyBinding\x12\x12\n" +"\x04role\x18\x01 \x01(\tR\x04role\x12\x18\n" +- "\amembers\x18\x02 \x03(\tR\amembers\"k\n" ++ "\amembers\x18\x02 \x03(\tR\amembers\"\x9e\x01\n" +"\fPolicyConfig\x12(\n" +"\x05roles\x18\x01 \x03(\v2\x12.sam.v1.PolicyRoleR\x05roles\x121\n" +- "\bbindings\x18\x02 \x03(\v2\x15.sam.v1.PolicyBindingR\bbindings\"\x18\n" ++ "\bbindings\x18\x02 \x03(\v2\x15.sam.v1.PolicyBindingR\bbindings\x121\n" ++ "\x06egress\x18\x03 \x03(\v2\x19.sam.v1.EgressDestinationR\x06egress\"\x18\n" +"\x16PolicyConfigGetRequest\"[\n" +"\x17PolicyConfigGetResponse\x12#\n" +"\rdatalog_rules\x18\x03 \x03(\tR\fdatalogRulesJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03R\x05rolesR\bbindings\"L\n" +"\x1aPolicyConfigUpdateResponse\x12\x18\n" +"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +- "\x05error\x18\x02 \x01(\tR\x05error\"\x88\x01\n" ++ "\x05error\x18\x02 \x01(\tR\x05error\"\x1a\n" ++ "\x18EgressAssignmentsRequest\"N\n" ++ "\x19EgressAssignmentsResponse\x121\n" ++ "\x06egress\x18\x01 \x03(\v2\x19.sam.v1.EgressDestinationR\x06egress\"\x88\x01\n" +"\fKeysResponse\x12\x1f\n" +"\vpublic_keys\x18\x01 \x03(\fR\n" +"publicKeys\x127\n" +@@ -3513,12 +3794,13 @@ const file_api_sam_proto_rawDesc = "" +"\x1dENROLLMENT_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n" +"\x19ENROLLMENT_STATUS_PENDING\x10\x01\x12\x1e\n" +"\x1aENROLLMENT_STATUS_APPROVED\x10\x02\x12\x1e\n" +- "\x1aENROLLMENT_STATUS_REJECTED\x10\x03*s\n" ++ "\x1aENROLLMENT_STATUS_REJECTED\x10\x03*\x8c\x01\n" +"\vServiceType\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\x03B\x1bZ\x19github.com/google/sam/apib\x06proto3"+ "\x10SERVICE_TYPE_A2A\x10\x03\x12\x17\n" ++ "\x13SERVICE_TYPE_EGRESS\x10\x04B\x1bZ\x19github.com/google/sam/apib\x06proto3"var (file_api_sam_proto_rawDescOnce sync.Once@@ -3533,7 +3815,7 @@ func file_api_sam_proto_rawDescGZIP() []byte {}var file_api_sam_proto_enumTypes = make([]protoimpl.EnumInfo, 3)-var file_api_sam_proto_msgTypes = make([]protoimpl.MessageInfo, 50)+var file_api_sam_proto_msgTypes = make([]protoimpl.MessageInfo, 54)var file_api_sam_proto_goTypes = []any{(EnrollmentStatus)(0), // 0: sam.v1.EnrollmentStatus(ServiceType)(0), // 1: sam.v1.ServiceType@@ -3554,86 +3836,93 @@ var file_api_sam_proto_goTypes = []any{(*RouterLeaseRequest)(nil), // 16: sam.v1.RouterLeaseRequest(*RouterLeaseResponse)(nil), // 17: sam.v1.RouterLeaseResponse(*PolicyRole)(nil), // 18: sam.v1.PolicyRole- (*PolicyBinding)(nil), // 19: sam.v1.PolicyBinding- (*PolicyConfig)(nil), // 20: sam.v1.PolicyConfig- (*PolicyConfigGetRequest)(nil), // 21: sam.v1.PolicyConfigGetRequest- (*PolicyConfigGetResponse)(nil), // 22: sam.v1.PolicyConfigGetResponse- (*PolicyConfigUpdateResponse)(nil), // 23: sam.v1.PolicyConfigUpdateResponse- (*KeysResponse)(nil), // 24: sam.v1.KeysResponse- (*TokenRefreshRequest)(nil), // 25: sam.v1.TokenRefreshRequest- (*TokenRefreshResponse)(nil), // 26: sam.v1.TokenRefreshResponse- (*NodeCatalogReport)(nil), // 27: sam.v1.NodeCatalogReport- (*TokenRevokeRequest)(nil), // 28: sam.v1.TokenRevokeRequest- (*TokenRevokeResponse)(nil), // 29: sam.v1.TokenRevokeResponse- (*AgentSecret)(nil), // 30: sam.v1.AgentSecret- (*AgentEgress)(nil), // 31: sam.v1.AgentEgress- (*AgentIngress)(nil), // 32: sam.v1.AgentIngress- (*AgentBundle)(nil), // 33: sam.v1.AgentBundle- (*AgentAttachRequest)(nil), // 34: sam.v1.AgentAttachRequest- (*AgentAttachResponse)(nil), // 35: sam.v1.AgentAttachResponse- (*AgentDetachRequest)(nil), // 36: sam.v1.AgentDetachRequest- (*AgentDetachResponse)(nil), // 37: sam.v1.AgentDetachResponse- (*AgentRefreshRequest)(nil), // 38: sam.v1.AgentRefreshRequest- (*AgentRefreshResponse)(nil), // 39: sam.v1.AgentRefreshResponse- (*AgentStatusRequest)(nil), // 40: sam.v1.AgentStatusRequest- (*AgentStatus)(nil), // 41: sam.v1.AgentStatus- (*AgentStatusResponse)(nil), // 42: sam.v1.AgentStatusResponse- (*IdentityEvidenceResponse)(nil), // 43: sam.v1.IdentityEvidenceResponse- (*PeerEvidenceResponse)(nil), // 44: sam.v1.PeerEvidenceResponse- (*MemberCredential)(nil), // 45: sam.v1.MemberCredential- (*TrustedSigningKey)(nil), // 46: sam.v1.TrustedSigningKey- (*OIDCSession)(nil), // 47: sam.v1.OIDCSession- nil, // 48: sam.v1.EnrollRequest.LabelsEntry- nil, // 49: sam.v1.BootstrapEnrollRequest.LabelsEntry- nil, // 50: sam.v1.CommandBackend.EnvEntry- nil, // 51: sam.v1.ServiceAnnounce.LabelsEntry- nil, // 52: sam.v1.PeerEvidenceResponse.LabelsEntry- (*timestamppb.Timestamp)(nil), // 53: google.protobuf.Timestamp+ (*HTTPGrant)(nil), // 19: sam.v1.HTTPGrant+ (*EgressDestination)(nil), // 20: sam.v1.EgressDestination+ (*PolicyBinding)(nil), // 21: sam.v1.PolicyBinding+ (*PolicyConfig)(nil), // 22: sam.v1.PolicyConfig+ (*PolicyConfigGetRequest)(nil), // 23: sam.v1.PolicyConfigGetRequest+ (*PolicyConfigGetResponse)(nil), // 24: sam.v1.PolicyConfigGetResponse+ (*PolicyConfigUpdateResponse)(nil), // 25: sam.v1.PolicyConfigUpdateResponse+ (*EgressAssignmentsRequest)(nil), // 26: sam.v1.EgressAssignmentsRequest+ (*EgressAssignmentsResponse)(nil), // 27: sam.v1.EgressAssignmentsResponse+ (*KeysResponse)(nil), // 28: sam.v1.KeysResponse+ (*TokenRefreshRequest)(nil), // 29: sam.v1.TokenRefreshRequest+ (*TokenRefreshResponse)(nil), // 30: sam.v1.TokenRefreshResponse+ (*NodeCatalogReport)(nil), // 31: sam.v1.NodeCatalogReport+ (*TokenRevokeRequest)(nil), // 32: sam.v1.TokenRevokeRequest+ (*TokenRevokeResponse)(nil), // 33: sam.v1.TokenRevokeResponse+ (*AgentSecret)(nil), // 34: sam.v1.AgentSecret+ (*AgentEgress)(nil), // 35: sam.v1.AgentEgress+ (*AgentIngress)(nil), // 36: sam.v1.AgentIngress+ (*AgentBundle)(nil), // 37: sam.v1.AgentBundle+ (*AgentAttachRequest)(nil), // 38: sam.v1.AgentAttachRequest+ (*AgentAttachResponse)(nil), // 39: sam.v1.AgentAttachResponse+ (*AgentDetachRequest)(nil), // 40: sam.v1.AgentDetachRequest+ (*AgentDetachResponse)(nil), // 41: sam.v1.AgentDetachResponse+ (*AgentRefreshRequest)(nil), // 42: sam.v1.AgentRefreshRequest+ (*AgentRefreshResponse)(nil), // 43: sam.v1.AgentRefreshResponse+ (*AgentStatusRequest)(nil), // 44: sam.v1.AgentStatusRequest+ (*AgentStatus)(nil), // 45: sam.v1.AgentStatus+ (*AgentStatusResponse)(nil), // 46: sam.v1.AgentStatusResponse+ (*IdentityEvidenceResponse)(nil), // 47: sam.v1.IdentityEvidenceResponse+ (*PeerEvidenceResponse)(nil), // 48: sam.v1.PeerEvidenceResponse+ (*MemberCredential)(nil), // 49: sam.v1.MemberCredential+ (*TrustedSigningKey)(nil), // 50: sam.v1.TrustedSigningKey+ (*OIDCSession)(nil), // 51: sam.v1.OIDCSession+ nil, // 52: sam.v1.EnrollRequest.LabelsEntry+ nil, // 53: sam.v1.BootstrapEnrollRequest.LabelsEntry+ nil, // 54: sam.v1.CommandBackend.EnvEntry+ nil, // 55: sam.v1.ServiceAnnounce.LabelsEntry+ nil, // 56: sam.v1.PeerEvidenceResponse.LabelsEntry+ (*timestamppb.Timestamp)(nil), // 57: google.protobuf.Timestamp}var file_api_sam_proto_depIdxs = []int32{2, // 0: sam.v1.MeshEvent.type:type_name -> sam.v1.MeshEvent.Type- 53, // 1: sam.v1.MeshEvent.event_time:type_name -> google.protobuf.Timestamp- 48, // 2: sam.v1.EnrollRequest.labels:type_name -> sam.v1.EnrollRequest.LabelsEntry- 53, // 3: sam.v1.EnrollResponse.expire_time:type_name -> google.protobuf.Timestamp- 49, // 4: sam.v1.BootstrapEnrollRequest.labels:type_name -> sam.v1.BootstrapEnrollRequest.LabelsEntry+ 57, // 1: sam.v1.MeshEvent.event_time:type_name -> google.protobuf.Timestamp+ 52, // 2: sam.v1.EnrollRequest.labels:type_name -> sam.v1.EnrollRequest.LabelsEntry+ 57, // 3: sam.v1.EnrollResponse.expire_time:type_name -> google.protobuf.Timestamp+ 53, // 4: sam.v1.BootstrapEnrollRequest.labels:type_name -> sam.v1.BootstrapEnrollRequest.LabelsEntry0, // 5: sam.v1.BootstrapEnrollResponse.status:type_name -> sam.v1.EnrollmentStatus- 53, // 6: sam.v1.BootstrapEnrollResponse.expire_time:type_name -> google.protobuf.Timestamp+ 57, // 6: sam.v1.BootstrapEnrollResponse.expire_time:type_name -> google.protobuf.Timestamp1, // 7: sam.v1.ServiceInfo.type:type_name -> sam.v1.ServiceType- 50, // 8: sam.v1.CommandBackend.env:type_name -> sam.v1.CommandBackend.EnvEntry+ 54, // 8: sam.v1.CommandBackend.env:type_name -> sam.v1.CommandBackend.EnvEntry10, // 9: sam.v1.RegisterServiceRequest.service:type_name -> sam.v1.ServiceInfo11, // 10: sam.v1.RegisterServiceRequest.command:type_name -> sam.v1.CommandBackend1, // 11: sam.v1.ServiceAnnounce.type:type_name -> sam.v1.ServiceType- 51, // 12: sam.v1.ServiceAnnounce.labels:type_name -> sam.v1.ServiceAnnounce.LabelsEntry- 53, // 13: sam.v1.ServiceAnnounce.announce_time:type_name -> google.protobuf.Timestamp- 53, // 14: sam.v1.RouterLeaseResponse.expire_time:type_name -> google.protobuf.Timestamp- 18, // 15: sam.v1.PolicyConfig.roles:type_name -> sam.v1.PolicyRole- 19, // 16: sam.v1.PolicyConfig.bindings:type_name -> sam.v1.PolicyBinding- 53, // 17: sam.v1.KeysResponse.sign_time:type_name -> google.protobuf.Timestamp- 53, // 18: sam.v1.TokenRefreshResponse.expire_time:type_name -> google.protobuf.Timestamp- 10, // 19: sam.v1.NodeCatalogReport.services:type_name -> sam.v1.ServiceInfo- 30, // 20: sam.v1.AgentEgress.secrets:type_name -> sam.v1.AgentSecret- 1, // 21: sam.v1.AgentIngress.type:type_name -> sam.v1.ServiceType- 31, // 22: sam.v1.AgentBundle.egress:type_name -> sam.v1.AgentEgress- 32, // 23: sam.v1.AgentBundle.ingress:type_name -> sam.v1.AgentIngress- 33, // 24: sam.v1.AgentAttachRequest.bundle:type_name -> sam.v1.AgentBundle- 53, // 25: sam.v1.AgentRefreshResponse.expire_time:type_name -> google.protobuf.Timestamp- 32, // 26: sam.v1.AgentStatus.ingress:type_name -> sam.v1.AgentIngress- 53, // 27: sam.v1.AgentStatus.credential_expire_time:type_name -> google.protobuf.Timestamp- 41, // 28: sam.v1.AgentStatusResponse.agents:type_name -> sam.v1.AgentStatus- 53, // 29: sam.v1.IdentityEvidenceResponse.biscuit_expire_time:type_name -> google.protobuf.Timestamp- 53, // 30: sam.v1.IdentityEvidenceResponse.check_time:type_name -> google.protobuf.Timestamp- 52, // 31: sam.v1.PeerEvidenceResponse.labels:type_name -> sam.v1.PeerEvidenceResponse.LabelsEntry- 53, // 32: sam.v1.PeerEvidenceResponse.expire_time:type_name -> google.protobuf.Timestamp- 53, // 33: sam.v1.PeerEvidenceResponse.check_time:type_name -> google.protobuf.Timestamp- 53, // 34: sam.v1.MemberCredential.expire_time:type_name -> google.protobuf.Timestamp- 46, // 35: sam.v1.MemberCredential.trusted_keys:type_name -> sam.v1.TrustedSigningKey- 47, // 36: sam.v1.MemberCredential.oidc_session:type_name -> sam.v1.OIDCSession- 53, // 37: sam.v1.TrustedSigningKey.receive_time:type_name -> google.protobuf.Timestamp- 38, // [38:38] is the sub-list for method output_type- 38, // [38:38] is the sub-list for method input_type- 38, // [38:38] is the sub-list for extension type_name- 38, // [38:38] is the sub-list for extension extendee- 0, // [0:38] is the sub-list for field type_name+ 55, // 12: sam.v1.ServiceAnnounce.labels:type_name -> sam.v1.ServiceAnnounce.LabelsEntry+ 57, // 13: sam.v1.ServiceAnnounce.announce_time:type_name -> google.protobuf.Timestamp+ 57, // 14: sam.v1.RouterLeaseResponse.expire_time:type_name -> google.protobuf.Timestamp+ 19, // 15: sam.v1.PolicyRole.http:type_name -> sam.v1.HTTPGrant+ 18, // 16: sam.v1.PolicyConfig.roles:type_name -> sam.v1.PolicyRole+ 21, // 17: sam.v1.PolicyConfig.bindings:type_name -> sam.v1.PolicyBinding+ 20, // 18: sam.v1.PolicyConfig.egress:type_name -> sam.v1.EgressDestination+ 20, // 19: sam.v1.EgressAssignmentsResponse.egress:type_name -> sam.v1.EgressDestination+ 57, // 20: sam.v1.KeysResponse.sign_time:type_name -> google.protobuf.Timestamp+ 57, // 21: sam.v1.TokenRefreshResponse.expire_time:type_name -> google.protobuf.Timestamp+ 10, // 22: sam.v1.NodeCatalogReport.services:type_name -> sam.v1.ServiceInfo+ 34, // 23: sam.v1.AgentEgress.secrets:type_name -> sam.v1.AgentSecret+ 1, // 24: sam.v1.AgentIngress.type:type_name -> sam.v1.ServiceType+ 35, // 25: sam.v1.AgentBundle.egress:type_name -> sam.v1.AgentEgress+ 36, // 26: sam.v1.AgentBundle.ingress:type_name -> sam.v1.AgentIngress+ 37, // 27: sam.v1.AgentAttachRequest.bundle:type_name -> sam.v1.AgentBundle+ 57, // 28: sam.v1.AgentRefreshResponse.expire_time:type_name -> google.protobuf.Timestamp+ 36, // 29: sam.v1.AgentStatus.ingress:type_name -> sam.v1.AgentIngress+ 57, // 30: sam.v1.AgentStatus.credential_expire_time:type_name -> google.protobuf.Timestamp+ 45, // 31: sam.v1.AgentStatusResponse.agents:type_name -> sam.v1.AgentStatus+ 57, // 32: sam.v1.IdentityEvidenceResponse.biscuit_expire_time:type_name -> google.protobuf.Timestamp+ 57, // 33: sam.v1.IdentityEvidenceResponse.check_time:type_name -> google.protobuf.Timestamp+ 56, // 34: sam.v1.PeerEvidenceResponse.labels:type_name -> sam.v1.PeerEvidenceResponse.LabelsEntry+ 57, // 35: sam.v1.PeerEvidenceResponse.expire_time:type_name -> google.protobuf.Timestamp+ 57, // 36: sam.v1.PeerEvidenceResponse.check_time:type_name -> google.protobuf.Timestamp+ 57, // 37: sam.v1.MemberCredential.expire_time:type_name -> google.protobuf.Timestamp+ 50, // 38: sam.v1.MemberCredential.trusted_keys:type_name -> sam.v1.TrustedSigningKey+ 51, // 39: sam.v1.MemberCredential.oidc_session:type_name -> sam.v1.OIDCSession+ 57, // 40: sam.v1.TrustedSigningKey.receive_time:type_name -> google.protobuf.Timestamp+ 41, // [41:41] is the sub-list for method output_type+ 41, // [41:41] is the sub-list for method input_type+ 41, // [41:41] is the sub-list for extension type_name+ 41, // [41:41] is the sub-list for extension extendee+ 0, // [0:41] is the sub-list for field type_name}func init() { file_api_sam_proto_init() }@@ -3651,7 +3940,7 @@ func file_api_sam_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_sam_proto_rawDesc), len(file_api_sam_proto_rawDesc)),NumEnums: 3,- NumMessages: 50,+ NumMessages: 54,NumExtensions: 0,NumServices: 0,},diff --git a/api/sam.proto b/api/sam.protoindex 04f9eed7..1e6fe59c 100644--- a/api/sam.proto+++ b/api/sam.proto@@ -133,6 +133,12 @@ enum ServiceType {SERVICE_TYPE_MCP = 1;SERVICE_TYPE_INFERENCE = 2;SERVICE_TYPE_A2A = 3;+ // A destination outside the mesh, reached through a node that enforces+ // policy on it. The service name is the destination hostname, so a grant+ // reads egress://api.github.com and the request fact+ // service("egress", "api.github.com"). Egress names have no .sam.alt form:+ // a sandboxed agent connects to the destination name itself.+ SERVICE_TYPE_EGRESS = 4;}message ServiceInfo {@@ -230,6 +236,48 @@ message PolicyRole {// or "key=value". A node declares its own labels, so this is what turns a// declaration into something the control plane is willing to sign.repeated string allowed_labels = 6;+ // HTTP narrowing of allowed_services entries; see HTTPGrant.+ repeated HTTPGrant http = 7;+}++// 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+// entry. The baseline rules derive the service grant only for a request+// whose method($m) and path($p) facts match, so a request that carries no+// HTTP method (a tunnel, a non-HTTP stream) does not match a narrowed entry.+message HTTPGrant {+ // One of the role's allowed_services entries, written identically.+ string service = 1;+ // Methods the holder may use, e.g. "GET", "HEAD". Empty means any method.+ repeated string methods = 2;+ // Paths the holder may request, as the backend sees them: "/user" matches+ // that path only, "/v2/public/*" matches every path under the prefix.+ // Empty means any path. At least one of methods and paths must be set.+ repeated string paths = 3;+}++// EgressDestination is a destination outside the mesh that selected nodes+// serve as egress://<name>. It is part of the policy document the admin+// writes; a node receives the destinations that select it at GET /egress+// and serves them without configuration of its own.+message EgressDestination {+ // The destination hostname, lowercase, without a port or a path. It is the+ // service name in grants (egress://<name>) and the DHT key.+ string name = 1;+ // Where the serving node forwards requests. Optional; https://<name> when+ // empty. Must not carry a credential.+ string target_url = 2;+ // Name of the credential the serving node presents upstream, resolved by+ // the node from its secrets directory. Never a value: secret material does+ // not travel through this API.+ string credential = 3;+ // Role names or key=value labels selecting the nodes that serve this+ // destination. A node matches when any entry names one of its roles or+ // labels. The control plane also grants the destination to the selected+ // nodes, so the serving node authorizes local requests with its own+ // credential; other callers need the grant on their own role.+ repeated string served_by = 4;}message PolicyBinding {@@ -244,6 +292,7 @@ message PolicyBinding {message PolicyConfig {repeated PolicyRole roles = 1;repeated PolicyBinding bindings = 2;+ repeated EgressDestination egress = 3;}message PolicyConfigGetRequest {}@@ -265,6 +314,16 @@ message PolicyConfigUpdateResponse {string error = 2;}+message EgressAssignmentsRequest {}++// EgressAssignmentsResponse answers GET /egress for a mesh member holding a+// biscuit: the destinations whose served_by selects that node. It is a+// separate endpoint from GET /policies so that a node predating it keeps+// syncing rules unchanged.+message EgressAssignmentsResponse {+ repeated EgressDestination egress = 1;+}+message KeysResponse {repeated bytes public_keys = 1;// When the set was signed; receivers reject responses outside a shortdiff --git a/hack/gen-sdk-datalog/main.go b/hack/gen-sdk-datalog/main.goindex 39172347..cd34680c 100644--- a/hack/gen-sdk-datalog/main.go+++ b/hack/gen-sdk-datalog/main.go@@ -34,6 +34,8 @@ type artifact struct {FactService string `json:"fact_service"`FactConnectionPeer string `json:"fact_connection_peer_id"`FactAgent string `json:"fact_agent"`+ FactMethod string `json:"fact_method"`+ FactPath string `json:"fact_path"`FactTime string `json:"fact_time"`FactRole string `json:"fact_role"`FactTargetFact string `json:"fact_target_fact"`@@ -54,6 +56,8 @@ func main() {FactService: api.FactService,FactConnectionPeer: api.FactConnectionPeerID,FactAgent: api.FactAgent,+ FactMethod: api.FactMethod,+ FactPath: api.FactPath,FactTime: api.FactTime,FactRole: api.FactRole,FactTargetFact: api.FactTargetFact,diff --git a/internal/identity/biscuit.go b/internal/identity/biscuit.goindex f4556274..433f4226 100644--- a/internal/identity/biscuit.go+++ b/internal/identity/biscuit.go@@ -242,6 +242,9 @@ func mintBiscuit(signingKey ed25519.PrivateKey, remotePeer peer.ID, roles []stri// is accepted, which is what stops an unconfigured mesh from letting any// peer name any agent.var allAgents []string+ // 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.HTTPGrantfor _, role := range roles {if err := addFact(biscuit.Fact{Predicate: biscuit.Predicate{Name: api.FactRole,@@ -265,7 +268,9 @@ func mintBiscuit(signingKey ed25519.PrivateKey, remotePeer peer.ID, roles []stri}if pr, ok := rolesMap[role]; ok {- allServices = append(allServices, pr.AllowedServices...)+ plainServices, narrowed := api.SplitHTTPGrants(pr)+ allServices = append(allServices, plainServices...)+ allHTTP = append(allHTTP, narrowed...)allTargets = append(allTargets, pr.AllowedTargets...)allAgents = append(allAgents, pr.AllowedAgents...)@@ -297,6 +302,13 @@ func mintBiscuit(signingKey ed25519.PrivateKey, remotePeer peer.ID, roles []strierrs = append(errs, fmt.Errorf("failed to add service fact: %w", err))}}+ for _, g := range allHTTP {+ for _, fact := range api.BuildHTTPGrantFacts(g) {+ if err := addFact(fact); err != nil {+ errs = append(errs, fmt.Errorf("failed to add http grant fact: %w", err))+ }+ }+ }for _, fact := range api.BuildTargetDatalogFacts(allTargets) {if err := addFact(fact); err != nil {errs = append(errs, fmt.Errorf("failed to add target fact: %w", err))diff --git a/internal/identity/http_grants_test.go b/internal/identity/http_grants_test.gonew file mode 100644index 00000000..08b4d802--- /dev/null+++ b/internal/identity/http_grants_test.go@@ -0,0 +1,76 @@+// Copyright 2026 Google LLC+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++package identity++import (+ "crypto/ed25519"+ "crypto/rand"+ "strings"+ "testing"+ "time"++ "github.com/biscuit-auth/biscuit-go/v2"+ "github.com/google/sam/api"+)++// TestMintNarrowedGrant pins what a role with PolicyRole.http mints: the+// narrowed entry appears as its http_granted_service_* fact with its method+// and path facts, and not as a plain grant; the other entries are unchanged.+func TestMintNarrowedGrant(t *testing.T) {+ _, priv, err := ed25519.GenerateKey(rand.Reader)+ if err != nil {+ t.Fatal(err)+ }+ peerID := newTestPeer(t)++ role := &api.PolicyRole{+ Name: "contractor",+ AllowedServices: []string{"mcp://tools", "egress://mam.internal.example.com"},+ Http: []*api.HTTPGrant{{+ Service: "egress://mam.internal.example.com",+ Methods: []string{"GET"},+ Paths: []string{"/v2/public/*"},+ }},+ }+ token, err := MintBootstrapBiscuitToken(priv, peerID, "contractor", time.Now().Add(time.Hour), []*api.PolicyRole{role}, nil)+ if err != nil {+ t.Fatalf("mint: %v", err)+ }+ b, err := biscuit.Unmarshal(token)+ if err != nil {+ t.Fatal(err)+ }+ code := b.String()++ // Biscuit.String prints Set terms as symbol references, so the set facts+ // are matched on their name and key only.+ for _, want := range []string{+ `granted_service_set("mcp", [`,+ `http_granted_service_exact("egress", "mam.internal.example.com")`,+ `granted_method("egress", "mam.internal.example.com", [`,+ `granted_path_prefix("egress", "mam.internal.example.com", "/v2/public/")`,+ } {+ if !strings.Contains(code, want) {+ t.Errorf("token lacks %s; authority block:\n%s", want, code)+ }+ }+ // The facts line lists them space-separated; a plain egress grant would+ // start a token there, http_granted_service_exact would not.+ for _, tok := range strings.Fields(code) {+ if strings.HasPrefix(tok, `granted_service_exact("egress"`) || strings.HasPrefix(tok, `granted_service_set("egress"`) {+ t.Errorf("narrowed entry minted as a plain grant: %s", tok)+ }+ }+}diff --git a/sdk/js/src/gen/datalog.ts b/sdk/js/src/gen/datalog.tsindex 547b732b..a2ad2b7a 100644--- a/sdk/js/src/gen/datalog.ts+++ b/sdk/js/src/gen/datalog.ts@@ -19,6 +19,18 @@ export const BASELINE_DATALOG = {"allow_network_target($fact, $val) <- target_fact($fact, $val), granted_target_all($fact)","allow_network_target($fact, $val) <- target_fact($fact, $val), granted_target_all_facts(true)"],+ "http_rules": [+ "http_method_ok($t, $k) <- method($m), granted_method($t, $k, $set), $set.contains($m)",+ "http_method_ok($t, $k) <- granted_method_any($t, $k)",+ "http_path_ok($t, $k) <- path($p), granted_path_exact($t, $k, $set), $set.contains($p)",+ "http_path_ok($t, $k) <- path($p), granted_path_prefix($t, $k, $prefix), $p.starts_with($prefix)",+ "http_path_ok($t, $k) <- granted_path_any($t, $k)",+ "granted_service_exact($t, $n) <- service($t, $n), http_granted_service_exact($t, $n), http_method_ok($t, $n), http_path_ok($t, $n)",+ "granted_service_suffix($t, $s) <- service($t, $n), http_granted_service_suffix($t, $s), $n.ends_with($s), http_method_ok($t, $s), http_path_ok($t, $s)",+ "granted_service_prefix($t, $p) <- service($t, $n), http_granted_service_prefix($t, $p), $n.starts_with($p), http_method_ok($t, $p), http_path_ok($t, $p)",+ "granted_service_all($t) <- service($t, $n), http_granted_service_all($t), http_method_ok($t, \"*\"), http_path_ok($t, \"*\")",+ "granted_service_all_types(true) <- service($t, $n), http_granted_service_all_types(true), http_method_ok(\"*\", \"*\"), http_path_ok(\"*\", \"*\")"+ ],"agent_rules": ["agent_authorized(true) <- agent($a), granted_agent_exact($a)","agent_authorized(true) <- agent($a), granted_agent_set($set), $set.contains($a)",@@ -41,6 +53,8 @@ export const BASELINE_DATALOG = {"fact_service": "service","fact_connection_peer_id": "connection_peer_id","fact_agent": "agent",+ "fact_method": "method",+ "fact_path": "path","fact_time": "time","fact_role": "role","fact_target_fact": "target_fact",diff --git a/sdk/js/src/gen/sam_pb.ts b/sdk/js/src/gen/sam_pb.tsindex 94d899a9..4ee3d093 100644--- a/sdk/js/src/gen/sam_pb.ts+++ b/sdk/js/src/gen/sam_pb.ts@@ -26,7 +26,7 @@ import type { Message } from "@bufbuild/protobuf";* Describes the file sam.proto.*/export const file_sam: GenFile = /*@__PURE__*/- fileDesc("CglzYW0ucHJvdG8SBnNhbS52MSJDCglBdXRoRnJhbWUSDwoHYmlzY3VpdBgBIAEoDBIWCg50YXJnZXRfc2VydmljZRgCIAEoCRINCgVhZ2VudBgDIAEoCSI/CgxBdXRoUmVzcG9uc2USDwoHc3VjY2VzcxgBIAEoCBINCgVlcnJvchgCIAEoCRIPCgdiaXNjdWl0GAMgASgMItYBCglNZXNoRXZlbnQSJAoEdHlwZRgBIAEoDjIWLnNhbS52MS5NZXNoRXZlbnQuVHlwZRIPCgdwZWVyX2lkGAIgASgJEi4KCmV2ZW50X3RpbWUYAyABKAsyGi5nb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2V5EhIKCnB1YmxpY19rZXkYASABKAwSMAoMcmVjZWl2ZV90aW1lGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCJZCgtPSURDU2Vzc2lvbhIOCgZpc3N1ZXIYASABKAkSEQoJY2xpZW50X2lkGAIgASgJEhAKCGF1ZGllbmNlGAMgASgJEhUKDXJlZnJlc2hfdG9rZW4YBCABKAkqlAEKEEVucm9sbG1lbnRTdGF0dXMSIQodRU5ST0xMTUVOVF9TVEFUVVNfVU5TUEVDSUZJRUQQABIdChlFTlJPTExNRU5UX1NUQVRVU19QRU5ESU5HEAESHgoaRU5ST0xMTUVOVF9TVEFUVVNfQVBQUk9WRUQQAhIeChpFTlJPTExNRU5UX1NUQVRVU19SRUpFQ1RFRBADKowBCgtTZXJ2aWNlVHlwZRIcChhTRVJWSUNFX1RZUEVfVU5TUEVDSUZJRUQQABIUChBTRVJWSUNFX1RZUEVfTUNQEAESGgoWU0VSVklDRV9UWVBFX0lORkVSRU5DRRACEhQKEFNFUlZJQ0VfVFlQRV9BMkEQAxIXChNTRVJWSUNFX1RZUEVfRUdSRVNTEARCG1oZZ2l0aHViLmNvbS9nb29nbGUvc2FtL2FwaWIGcHJvdG8z", [file_google_protobuf_timestamp]);/*** @generated from message sam.v1.AuthFrame@@ -725,6 +725,13 @@ export type PolicyRole = Message<"sam.v1.PolicyRole"> & {* @generated from field: repeated string allowed_labels = 6;*/allowedLabels: string[];++ /**+ * HTTP narrowing of allowed_services entries; see HTTPGrant.+ *+ * @generated from field: repeated sam.v1.HTTPGrant http = 7;+ */+ http: HTTPGrant[];};/**@@ -734,6 +741,101 @@ export type PolicyRole = Message<"sam.v1.PolicyRole"> & {export const PolicyRoleSchema: GenMessage<PolicyRole> = /*@__PURE__*/messageDesc(file_sam, 15);+/**+ * 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+ * entry. The baseline rules derive the service grant only for a request+ * whose method($m) and path($p) facts match, so a request that carries no+ * HTTP method (a tunnel, a non-HTTP stream) does not match a narrowed entry.+ *+ * @generated from message sam.v1.HTTPGrant+ */+export type HTTPGrant = Message<"sam.v1.HTTPGrant"> & {+ /**+ * One of the role's allowed_services entries, written identically.+ *+ * @generated from field: string service = 1;+ */+ service: string;++ /**+ * Methods the holder may use, e.g. "GET", "HEAD". Empty means any method.+ *+ * @generated from field: repeated string methods = 2;+ */+ methods: string[];++ /**+ * Paths the holder may request, as the backend sees them: "/user" matches+ * that path only, "/v2/public/*" matches every path under the prefix.+ * Empty means any path. At least one of methods and paths must be set.+ *+ * @generated from field: repeated string paths = 3;+ */+ paths: string[];+};++/**+ * Describes the message sam.v1.HTTPGrant.+ * Use `create(HTTPGrantSchema)` to create a new message.+ */+export const HTTPGrantSchema: GenMessage<HTTPGrant> = /*@__PURE__*/+ messageDesc(file_sam, 16);++/**+ * EgressDestination is a destination outside the mesh that selected nodes+ * serve as egress://<name>. It is part of the policy document the admin+ * writes; a node receives the destinations that select it at GET /egress+ * and serves them without configuration of its own.+ *+ * @generated from message sam.v1.EgressDestination+ */+export type EgressDestination = Message<"sam.v1.EgressDestination"> & {+ /**+ * The destination hostname, lowercase, without a port or a path. It is the+ * service name in grants (egress://<name>) and the DHT key.+ *+ * @generated from field: string name = 1;+ */+ name: string;++ /**+ * Where the serving node forwards requests. Optional; https://<name> when+ * empty. Must not carry a credential.+ *+ * @generated from field: string target_url = 2;+ */+ targetUrl: string;++ /**+ * Name of the credential the serving node presents upstream, resolved by+ * the node from its secrets directory. Never a value: secret material does+ * not travel through this API.+ *+ * @generated from field: string credential = 3;+ */+ credential: string;++ /**+ * Role names or key=value labels selecting the nodes that serve this+ * destination. A node matches when any entry names one of its roles or+ * labels. The control plane also grants the destination to the selected+ * nodes, so the serving node authorizes local requests with its own+ * credential; other callers need the grant on their own role.+ *+ * @generated from field: repeated string served_by = 4;+ */+ servedBy: string[];+};++/**+ * Describes the message sam.v1.EgressDestination.+ * Use `create(EgressDestinationSchema)` to create a new message.+ */+export const EgressDestinationSchema: GenMessage<EgressDestination> = /*@__PURE__*/+ messageDesc(file_sam, 17);+/*** @generated from message sam.v1.PolicyBinding*/@@ -754,7 +856,7 @@ export type PolicyBinding = Message<"sam.v1.PolicyBinding"> & {* Use `create(PolicyBindingSchema)` to create a new message.*/export const PolicyBindingSchema: GenMessage<PolicyBinding> = /*@__PURE__*/- messageDesc(file_sam, 16);+ messageDesc(file_sam, 18);/*** PolicyConfig is the mesh policy as the operator writes it: roles and@@ -774,6 +876,11 @@ export type PolicyConfig = Message<"sam.v1.PolicyConfig"> & {* @generated from field: repeated sam.v1.PolicyBinding bindings = 2;*/bindings: PolicyBinding[];++ /**+ * @generated from field: repeated sam.v1.EgressDestination egress = 3;+ */+ egress: EgressDestination[];};/**@@ -781,7 +888,7 @@ export type PolicyConfig = Message<"sam.v1.PolicyConfig"> & {* Use `create(PolicyConfigSchema)` to create a new message.*/export const PolicyConfigSchema: GenMessage<PolicyConfig> = /*@__PURE__*/- messageDesc(file_sam, 17);+ messageDesc(file_sam, 19);/*** @generated from message sam.v1.PolicyConfigGetRequest@@ -794,7 +901,7 @@ export type PolicyConfigGetRequest = Message<"sam.v1.PolicyConfigGetRequest"> &* Use `create(PolicyConfigGetRequestSchema)` to create a new message.*/export const PolicyConfigGetRequestSchema: GenMessage<PolicyConfigGetRequest> = /*@__PURE__*/- messageDesc(file_sam, 18);+ messageDesc(file_sam, 20);/*** PolicyConfigGetResponse answers GET /policies for a mesh member holding a@@ -817,7 +924,7 @@ export type PolicyConfigGetResponse = Message<"sam.v1.PolicyConfigGetResponse">* Use `create(PolicyConfigGetResponseSchema)` to create a new message.*/export const PolicyConfigGetResponseSchema: GenMessage<PolicyConfigGetResponse> = /*@__PURE__*/- messageDesc(file_sam, 19);+ messageDesc(file_sam, 21);/*** @generated from message sam.v1.PolicyConfigUpdateResponse@@ -839,7 +946,42 @@ export type PolicyConfigUpdateResponse = Message<"sam.v1.PolicyConfigUpdateRespo* Use `create(PolicyConfigUpdateResponseSchema)` to create a new message.*/export const PolicyConfigUpdateResponseSchema: GenMessage<PolicyConfigUpdateResponse> = /*@__PURE__*/- messageDesc(file_sam, 20);+ messageDesc(file_sam, 22);++/**+ * @generated from message sam.v1.EgressAssignmentsRequest+ */+export type EgressAssignmentsRequest = Message<"sam.v1.EgressAssignmentsRequest"> & {+};++/**+ * Describes the message sam.v1.EgressAssignmentsRequest.+ * Use `create(EgressAssignmentsRequestSchema)` to create a new message.+ */+export const EgressAssignmentsRequestSchema: GenMessage<EgressAssignmentsRequest> = /*@__PURE__*/+ messageDesc(file_sam, 23);++/**+ * EgressAssignmentsResponse answers GET /egress for a mesh member holding a+ * biscuit: the destinations whose served_by selects that node. It is a+ * separate endpoint from GET /policies so that a node predating it keeps+ * syncing rules unchanged.+ *+ * @generated from message sam.v1.EgressAssignmentsResponse+ */+export type EgressAssignmentsResponse = Message<"sam.v1.EgressAssignmentsResponse"> & {+ /**+ * @generated from field: repeated sam.v1.EgressDestination egress = 1;+ */+ egress: EgressDestination[];+};++/**+ * Describes the message sam.v1.EgressAssignmentsResponse.+ * Use `create(EgressAssignmentsResponseSchema)` to create a new message.+ */+export const EgressAssignmentsResponseSchema: GenMessage<EgressAssignmentsResponse> = /*@__PURE__*/+ messageDesc(file_sam, 24);/*** @generated from message sam.v1.KeysResponse@@ -874,7 +1016,7 @@ export type KeysResponse = Message<"sam.v1.KeysResponse"> & {* Use `create(KeysResponseSchema)` to create a new message.*/export const KeysResponseSchema: GenMessage<KeysResponse> = /*@__PURE__*/- messageDesc(file_sam, 21);+ messageDesc(file_sam, 25);/*** @generated from message sam.v1.TokenRefreshRequest@@ -917,7 +1059,7 @@ export type TokenRefreshRequest = Message<"sam.v1.TokenRefreshRequest"> & {* Use `create(TokenRefreshRequestSchema)` to create a new message.*/export const TokenRefreshRequestSchema: GenMessage<TokenRefreshRequest> = /*@__PURE__*/- messageDesc(file_sam, 22);+ messageDesc(file_sam, 26);/*** @generated from message sam.v1.TokenRefreshResponse@@ -944,7 +1086,7 @@ export type TokenRefreshResponse = Message<"sam.v1.TokenRefreshResponse"> & {* Use `create(TokenRefreshResponseSchema)` to create a new message.*/export const TokenRefreshResponseSchema: GenMessage<TokenRefreshResponse> = /*@__PURE__*/- messageDesc(file_sam, 23);+ messageDesc(file_sam, 27);/*** NodeCatalogReport is the body of POST /nodes/catalog: a node's@@ -966,7 +1108,7 @@ export type NodeCatalogReport = Message<"sam.v1.NodeCatalogReport"> & {* Use `create(NodeCatalogReportSchema)` to create a new message.*/export const NodeCatalogReportSchema: GenMessage<NodeCatalogReport> = /*@__PURE__*/- messageDesc(file_sam, 24);+ messageDesc(file_sam, 28);/*** @generated from message sam.v1.TokenRevokeRequest@@ -983,7 +1125,7 @@ export type TokenRevokeRequest = Message<"sam.v1.TokenRevokeRequest"> & {* Use `create(TokenRevokeRequestSchema)` to create a new message.*/export const TokenRevokeRequestSchema: GenMessage<TokenRevokeRequest> = /*@__PURE__*/- messageDesc(file_sam, 25);+ messageDesc(file_sam, 29);/*** @generated from message sam.v1.TokenRevokeResponse@@ -1005,7 +1147,7 @@ export type TokenRevokeResponse = Message<"sam.v1.TokenRevokeResponse"> & {* Use `create(TokenRevokeResponseSchema)` to create a new message.*/export const TokenRevokeResponseSchema: GenMessage<TokenRevokeResponse> = /*@__PURE__*/- messageDesc(file_sam, 26);+ messageDesc(file_sam, 30);/*** AgentSecret configures credential injection for one destination. It carries@@ -1044,7 +1186,7 @@ export type AgentSecret = Message<"sam.v1.AgentSecret"> & {* Use `create(AgentSecretSchema)` to create a new message.*/export const AgentSecretSchema: GenMessage<AgentSecret> = /*@__PURE__*/- messageDesc(file_sam, 27);+ messageDesc(file_sam, 31);/*** AgentEgress is deny-by-default. Patterns are matched against the destination@@ -1069,7 +1211,7 @@ export type AgentEgress = Message<"sam.v1.AgentEgress"> & {* Use `create(AgentEgressSchema)` to create a new message.*/export const AgentEgressSchema: GenMessage<AgentEgress> = /*@__PURE__*/- messageDesc(file_sam, 28);+ messageDesc(file_sam, 32);/*** AgentIngress declares that the agent serves a mesh service. The name is the@@ -1105,7 +1247,7 @@ export type AgentIngress = Message<"sam.v1.AgentIngress"> & {* Use `create(AgentIngressSchema)` to create a new message.*/export const AgentIngressSchema: GenMessage<AgentIngress> = /*@__PURE__*/- messageDesc(file_sam, 29);+ messageDesc(file_sam, 33);/*** AgentBundle is everything the platform declares about one agent. Its@@ -1164,7 +1306,7 @@ export type AgentBundle = Message<"sam.v1.AgentBundle"> & {* Use `create(AgentBundleSchema)` to create a new message.*/export const AgentBundleSchema: GenMessage<AgentBundle> = /*@__PURE__*/- messageDesc(file_sam, 30);+ messageDesc(file_sam, 34);/*** AgentAttachRequest admits an agent. It is idempotent on agent_id: resuming@@ -1184,7 +1326,7 @@ export type AgentAttachRequest = Message<"sam.v1.AgentAttachRequest"> & {* Use `create(AgentAttachRequestSchema)` to create a new message.*/export const AgentAttachRequestSchema: GenMessage<AgentAttachRequest> = /*@__PURE__*/- messageDesc(file_sam, 31);+ messageDesc(file_sam, 35);/*** @generated from message sam.v1.AgentAttachResponse@@ -1215,7 +1357,7 @@ export type AgentAttachResponse = Message<"sam.v1.AgentAttachResponse"> & {* Use `create(AgentAttachResponseSchema)` to create a new message.*/export const AgentAttachResponseSchema: GenMessage<AgentAttachResponse> = /*@__PURE__*/- messageDesc(file_sam, 32);+ messageDesc(file_sam, 36);/*** AgentDetachRequest stops an agent: ingress is unregistered, channels are@@ -1235,7 +1377,7 @@ export type AgentDetachRequest = Message<"sam.v1.AgentDetachRequest"> & {* Use `create(AgentDetachRequestSchema)` to create a new message.*/export const AgentDetachRequestSchema: GenMessage<AgentDetachRequest> = /*@__PURE__*/- messageDesc(file_sam, 33);+ messageDesc(file_sam, 37);/*** @generated from message sam.v1.AgentDetachResponse@@ -1257,7 +1399,7 @@ export type AgentDetachResponse = Message<"sam.v1.AgentDetachResponse"> & {* Use `create(AgentDetachResponseSchema)` to create a new message.*/export const AgentDetachResponseSchema: GenMessage<AgentDetachResponse> = /*@__PURE__*/- messageDesc(file_sam, 34);+ messageDesc(file_sam, 38);/*** AgentRefreshRequest hands in a rotated workload credential. Platforms rotate@@ -1283,7 +1425,7 @@ export type AgentRefreshRequest = Message<"sam.v1.AgentRefreshRequest"> & {* Use `create(AgentRefreshRequestSchema)` to create a new message.*/export const AgentRefreshRequestSchema: GenMessage<AgentRefreshRequest> = /*@__PURE__*/- messageDesc(file_sam, 35);+ messageDesc(file_sam, 39);/*** @generated from message sam.v1.AgentRefreshResponse@@ -1310,7 +1452,7 @@ export type AgentRefreshResponse = Message<"sam.v1.AgentRefreshResponse"> & {* Use `create(AgentRefreshResponseSchema)` to create a new message.*/export const AgentRefreshResponseSchema: GenMessage<AgentRefreshResponse> = /*@__PURE__*/- messageDesc(file_sam, 36);+ messageDesc(file_sam, 40);/*** AgentStatusRequest reports on one agent, or on all of them when agent_id is@@ -1330,7 +1472,7 @@ export type AgentStatusRequest = Message<"sam.v1.AgentStatusRequest"> & {* Use `create(AgentStatusRequestSchema)` to create a new message.*/export const AgentStatusRequestSchema: GenMessage<AgentStatusRequest> = /*@__PURE__*/- messageDesc(file_sam, 37);+ messageDesc(file_sam, 41);/*** @generated from message sam.v1.AgentStatus@@ -1362,7 +1504,7 @@ export type AgentStatus = Message<"sam.v1.AgentStatus"> & {* Use `create(AgentStatusSchema)` to create a new message.*/export const AgentStatusSchema: GenMessage<AgentStatus> = /*@__PURE__*/- messageDesc(file_sam, 38);+ messageDesc(file_sam, 42);/*** @generated from message sam.v1.AgentStatusResponse@@ -1384,7 +1526,7 @@ export type AgentStatusResponse = Message<"sam.v1.AgentStatusResponse"> & {* Use `create(AgentStatusResponseSchema)` to create a new message.*/export const AgentStatusResponseSchema: GenMessage<AgentStatusResponse> = /*@__PURE__*/- messageDesc(file_sam, 39);+ messageDesc(file_sam, 43);/*** @generated from message sam.v1.IdentityEvidenceResponse@@ -1428,7 +1570,7 @@ export type IdentityEvidenceResponse = Message<"sam.v1.IdentityEvidenceResponse"* Use `create(IdentityEvidenceResponseSchema)` to create a new message.*/export const IdentityEvidenceResponseSchema: GenMessage<IdentityEvidenceResponse> = /*@__PURE__*/- messageDesc(file_sam, 40);+ messageDesc(file_sam, 44);/*** @generated from message sam.v1.PeerEvidenceResponse@@ -1484,7 +1626,7 @@ export type PeerEvidenceResponse = Message<"sam.v1.PeerEvidenceResponse"> & {* Use `create(PeerEvidenceResponseSchema)` to create a new message.*/export const PeerEvidenceResponseSchema: GenMessage<PeerEvidenceResponse> = /*@__PURE__*/- messageDesc(file_sam, 41);+ messageDesc(file_sam, 45);/*** @generated from message sam.v1.MemberCredential@@ -1549,7 +1691,7 @@ export type MemberCredential = Message<"sam.v1.MemberCredential"> & {* Use `create(MemberCredentialSchema)` to create a new message.*/export const MemberCredentialSchema: GenMessage<MemberCredential> = /*@__PURE__*/- messageDesc(file_sam, 42);+ messageDesc(file_sam, 46);/*** @generated from message sam.v1.TrustedSigningKey@@ -1576,7 +1718,7 @@ export type TrustedSigningKey = Message<"sam.v1.TrustedSigningKey"> & {* Use `create(TrustedSigningKeySchema)` to create a new message.*/export const TrustedSigningKeySchema: GenMessage<TrustedSigningKey> = /*@__PURE__*/- messageDesc(file_sam, 43);+ messageDesc(file_sam, 47);/*** @generated from message sam.v1.OIDCSession@@ -1608,7 +1750,7 @@ export type OIDCSession = Message<"sam.v1.OIDCSession"> & {* Use `create(OIDCSessionSchema)` to create a new message.*/export const OIDCSessionSchema: GenMessage<OIDCSession> = /*@__PURE__*/- messageDesc(file_sam, 44);+ messageDesc(file_sam, 48);/*** @generated from enum sam.v1.EnrollmentStatus@@ -1664,6 +1806,17 @@ export enum ServiceType {* @generated from enum value: SERVICE_TYPE_A2A = 3;*/A2A = 3,++ /**+ * A destination outside the mesh, reached through a node that enforces+ * policy on it. The service name is the destination hostname, so a grant+ * reads egress://api.github.com and the request fact+ * service("egress", "api.github.com"). Egress names have no .sam.alt form:+ * a sandboxed agent connects to the destination name itself.+ *+ * @generated from enum value: SERVICE_TYPE_EGRESS = 4;+ */+ EGRESS = 4,}/**diff --git a/sdk/python/src/agent_mesh/_gen/datalog.json b/sdk/python/src/agent_mesh/_gen/datalog.jsonindex f7d67abf..ff958550 100644--- a/sdk/python/src/agent_mesh/_gen/datalog.json+++ b/sdk/python/src/agent_mesh/_gen/datalog.json@@ -16,6 +16,18 @@"allow_network_target($fact, $val) <- target_fact($fact, $val), granted_target_all($fact)","allow_network_target($fact, $val) <- target_fact($fact, $val), granted_target_all_facts(true)"],+ "http_rules": [+ "http_method_ok($t, $k) <- method($m), granted_method($t, $k, $set), $set.contains($m)",+ "http_method_ok($t, $k) <- granted_method_any($t, $k)",+ "http_path_ok($t, $k) <- path($p), granted_path_exact($t, $k, $set), $set.contains($p)",+ "http_path_ok($t, $k) <- path($p), granted_path_prefix($t, $k, $prefix), $p.starts_with($prefix)",+ "http_path_ok($t, $k) <- granted_path_any($t, $k)",+ "granted_service_exact($t, $n) <- service($t, $n), http_granted_service_exact($t, $n), http_method_ok($t, $n), http_path_ok($t, $n)",+ "granted_service_suffix($t, $s) <- service($t, $n), http_granted_service_suffix($t, $s), $n.ends_with($s), http_method_ok($t, $s), http_path_ok($t, $s)",+ "granted_service_prefix($t, $p) <- service($t, $n), http_granted_service_prefix($t, $p), $n.starts_with($p), http_method_ok($t, $p), http_path_ok($t, $p)",+ "granted_service_all($t) <- service($t, $n), http_granted_service_all($t), http_method_ok($t, \"*\"), http_path_ok($t, \"*\")",+ "granted_service_all_types(true) <- service($t, $n), http_granted_service_all_types(true), http_method_ok(\"*\", \"*\"), http_path_ok(\"*\", \"*\")"+ ],"agent_rules": ["agent_authorized(true) <- agent($a), granted_agent_exact($a)","agent_authorized(true) <- agent($a), granted_agent_set($set), $set.contains($a)",@@ -38,6 +50,8 @@"fact_service": "service","fact_connection_peer_id": "connection_peer_id","fact_agent": "agent",+ "fact_method": "method",+ "fact_path": "path","fact_time": "time","fact_role": "role","fact_target_fact": "target_fact",diff --git a/sdk/python/src/agent_mesh/_proto/sam_pb2.py b/sdk/python/src/agent_mesh/_proto/sam_pb2.pyindex 05f2781d..a0ac4432 100644--- a/sdk/python/src/agent_mesh/_proto/sam_pb2.py+++ b/sdk/python/src/agent_mesh/_proto/sam_pb2.py@@ -14,7 +14,7 @@ _sym_db = _symbol_database.Default()from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tsam.proto\x12\x06sam.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"C\n\tAuthFrame\x12\x0f\n\x07\x62iscuit\x18\x01 \x01(\x0c\x12\x16\n\x0etarget_service\x18\x02 \x01(\t\x12\r\n\x05\x61gent\x18\x03 \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\"\xd6\x01\n\tMeshEvent\x12$\n\x04type\x18\x01 \x01(\x0e\x32\x16.sam.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\"\xf3\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\x31\n\x06labels\x18\x05 \x03(\x0b\x32!.sam.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\"\x91\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*.sam.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\"\xfd\x01\n\x17\x42ootstrapEnrollResponse\x12(\n\x06status\x18\x01 \x01(\x0e\x32\x18.sam.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\"S\n\x0bServiceInfo\x12!\n\x04type\x18\x01 \x01(\x0e\x32\x13.sam.v1.ServiceType\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"{\n\x0e\x43ommandBackend\x12\x0f\n\x07\x63ommand\x18\x01 \x03(\t\x12,\n\x03\x65nv\x18\x02 \x03(\x0b\x32\x1f.sam.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\"\x8a\x01\n\x16RegisterServiceRequest\x12$\n\x07service\x18\x01 \x01(\x0b\x32\x13.sam.v1.ServiceInfo\x12\x14\n\ntarget_url\x18\x02 \x01(\tH\x00\x12)\n\x07\x63ommand\x18\x03 \x01(\x0b\x32\x16.sam.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\"\xb2\x02\n\x0fServiceAnnounce\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12!\n\x04type\x18\x02 \x01(\x0e\x32\x13.sam.v1.ServiceType\x12\x14\n\x0cservice_name\x18\x03 \x01(\t\x12\x0c\n\x04keys\x18\x04 \x03(\t\x12\x33\n\x06labels\x18\x05 \x03(\x0b\x32#.sam.v1.ServiceAnnounce.LabelsEntry\x12\x17\n\x0f\x61\x63tive_requests\x18\x06 \x01(\r\x12\x17\n\x0flatency_ewma_ms\x18\x07 \x01(\x01\x12\x31\n\rannounce_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\"\x87\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\"\xac\x01\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\"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\"\x95\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_agents\x18\x05 \x03(\t\x12\x16\n\x0e\x61llowed_labels\x18\x06 \x03(\t\".\n\rPolicyBinding\x12\x0c\n\x04role\x18\x01 \x01(\t\x12\x0f\n\x07members\x18\x02 \x03(\t\"Z\n\x0cPolicyConfig\x12!\n\x05roles\x18\x01 \x03(\x0b\x32\x12.sam.v1.PolicyRole\x12\'\n\x08\x62indings\x18\x02 \x03(\x0b\x32\x15.sam.v1.PolicyBinding\"\x18\n\x16PolicyConfigGetRequest\"M\n\x17PolicyConfigGetResponse\x12\x15\n\rdatalog_rules\x18\x03 \x03(\tJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03R\x05rolesR\x08\x62indings\"<\n\x1aPolicyConfigUpdateResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"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\"^\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\"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\x13.sam.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\"R\n\x0b\x41gentSecret\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\x13\n\x0bheader_name\x18\x03 \x01(\t\x12\x12\n\nvalue_path\x18\x04 \x01(\t\"B\n\x0b\x41gentEgress\x12\r\n\x05\x61llow\x18\x01 \x03(\t\x12$\n\x07secrets\x18\x02 \x03(\x0b\x32\x13.sam.v1.AgentSecret\"b\n\x0c\x41gentIngress\x12!\n\x04type\x18\x01 \x01(\x0e\x32\x13.sam.v1.ServiceType\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\r\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\"\xaa\x01\n\x0b\x41gentBundle\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x10\n\x08\x61gent_id\x18\x02 \x01(\t\x12\x13\n\x0b\x65xternal_id\x18\x03 \x01(\t\x12\x17\n\x0f\x63redential_path\x18\x04 \x01(\t\x12#\n\x06\x65gress\x18\x05 \x01(\x0b\x32\x13.sam.v1.AgentEgress\x12%\n\x07ingress\x18\x06 \x03(\x0b\x32\x14.sam.v1.AgentIngress\"9\n\x12\x41gentAttachRequest\x12#\n\x06\x62undle\x18\x01 \x01(\x0b\x32\x13.sam.v1.AgentBundle\"S\n\x13\x41gentAttachResponse\x12\x15\n\regress_socket\x18\x01 \x01(\t\x12\x16\n\x0eingress_socket\x18\x02 \x01(\t\x12\r\n\x05\x65rror\x18\x03 \x01(\t\"&\n\x12\x41gentDetachRequest\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\"5\n\x13\x41gentDetachResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"@\n\x13\x41gentRefreshRequest\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\x12\x17\n\x0f\x63redential_path\x18\x02 \x01(\t\"g\n\x14\x41gentRefreshResponse\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\"&\n\x12\x41gentStatusRequest\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\"\x94\x01\n\x0b\x41gentStatus\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\x12\x10\n\x08\x61ttached\x18\x02 \x01(\x08\x12%\n\x07ingress\x18\x03 \x03(\x0b\x32\x14.sam.v1.AgentIngress\x12:\n\x16\x63redential_expire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"I\n\x13\x41gentStatusResponse\x12#\n\x06\x61gents\x18\x01 \x03(\x0b\x32\x13.sam.v1.AgentStatus\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"\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\"\xc0\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\x38\n\x06labels\x18\x05 \x03(\x0b\x32(.sam.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\"\x80\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/\n\x0ctrusted_keys\x18\x04 \x03(\x0b\x32\x19.sam.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\x13.sam.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*\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*s\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\x42\x1bZ\x19github.com/google/sam/apib\x06proto3')+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tsam.proto\x12\x06sam.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"C\n\tAuthFrame\x12\x0f\n\x07\x62iscuit\x18\x01 \x01(\x0c\x12\x16\n\x0etarget_service\x18\x02 \x01(\t\x12\r\n\x05\x61gent\x18\x03 \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\"\xd6\x01\n\tMeshEvent\x12$\n\x04type\x18\x01 \x01(\x0e\x32\x16.sam.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\"\xf3\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\x31\n\x06labels\x18\x05 \x03(\x0b\x32!.sam.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\"\x91\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*.sam.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\"\xfd\x01\n\x17\x42ootstrapEnrollResponse\x12(\n\x06status\x18\x01 \x01(\x0e\x32\x18.sam.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\"S\n\x0bServiceInfo\x12!\n\x04type\x18\x01 \x01(\x0e\x32\x13.sam.v1.ServiceType\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"{\n\x0e\x43ommandBackend\x12\x0f\n\x07\x63ommand\x18\x01 \x03(\t\x12,\n\x03\x65nv\x18\x02 \x03(\x0b\x32\x1f.sam.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\"\x8a\x01\n\x16RegisterServiceRequest\x12$\n\x07service\x18\x01 \x01(\x0b\x32\x13.sam.v1.ServiceInfo\x12\x14\n\ntarget_url\x18\x02 \x01(\tH\x00\x12)\n\x07\x63ommand\x18\x03 \x01(\x0b\x32\x16.sam.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\"\xb2\x02\n\x0fServiceAnnounce\x12\x0f\n\x07peer_id\x18\x01 \x01(\t\x12!\n\x04type\x18\x02 \x01(\x0e\x32\x13.sam.v1.ServiceType\x12\x14\n\x0cservice_name\x18\x03 \x01(\t\x12\x0c\n\x04keys\x18\x04 \x03(\t\x12\x33\n\x06labels\x18\x05 \x03(\x0b\x32#.sam.v1.ServiceAnnounce.LabelsEntry\x12\x17\n\x0f\x61\x63tive_requests\x18\x06 \x01(\r\x12\x17\n\x0flatency_ewma_ms\x18\x07 \x01(\x01\x12\x31\n\rannounce_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\"\x87\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\"\xac\x01\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\"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\"\xb6\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_agents\x18\x05 \x03(\t\x12\x16\n\x0e\x61llowed_labels\x18\x06 \x03(\t\x12\x1f\n\x04http\x18\x07 \x03(\x0b\x32\x11.sam.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\"\\\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\".\n\rPolicyBinding\x12\x0c\n\x04role\x18\x01 \x01(\t\x12\x0f\n\x07members\x18\x02 \x03(\t\"\x85\x01\n\x0cPolicyConfig\x12!\n\x05roles\x18\x01 \x03(\x0b\x32\x12.sam.v1.PolicyRole\x12\'\n\x08\x62indings\x18\x02 \x03(\x0b\x32\x15.sam.v1.PolicyBinding\x12)\n\x06\x65gress\x18\x03 \x03(\x0b\x32\x19.sam.v1.EgressDestination\"\x18\n\x16PolicyConfigGetRequest\"M\n\x17PolicyConfigGetResponse\x12\x15\n\rdatalog_rules\x18\x03 \x03(\tJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03R\x05rolesR\x08\x62indings\"<\n\x1aPolicyConfigUpdateResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"\x1a\n\x18\x45gressAssignmentsRequest\"F\n\x19\x45gressAssignmentsResponse\x12)\n\x06\x65gress\x18\x01 \x03(\x0b\x32\x19.sam.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\"^\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\"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\x13.sam.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\"R\n\x0b\x41gentSecret\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\x13\n\x0bheader_name\x18\x03 \x01(\t\x12\x12\n\nvalue_path\x18\x04 \x01(\t\"B\n\x0b\x41gentEgress\x12\r\n\x05\x61llow\x18\x01 \x03(\t\x12$\n\x07secrets\x18\x02 \x03(\x0b\x32\x13.sam.v1.AgentSecret\"b\n\x0c\x41gentIngress\x12!\n\x04type\x18\x01 \x01(\x0e\x32\x13.sam.v1.ServiceType\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\r\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\"\xaa\x01\n\x0b\x41gentBundle\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x10\n\x08\x61gent_id\x18\x02 \x01(\t\x12\x13\n\x0b\x65xternal_id\x18\x03 \x01(\t\x12\x17\n\x0f\x63redential_path\x18\x04 \x01(\t\x12#\n\x06\x65gress\x18\x05 \x01(\x0b\x32\x13.sam.v1.AgentEgress\x12%\n\x07ingress\x18\x06 \x03(\x0b\x32\x14.sam.v1.AgentIngress\"9\n\x12\x41gentAttachRequest\x12#\n\x06\x62undle\x18\x01 \x01(\x0b\x32\x13.sam.v1.AgentBundle\"S\n\x13\x41gentAttachResponse\x12\x15\n\regress_socket\x18\x01 \x01(\t\x12\x16\n\x0eingress_socket\x18\x02 \x01(\t\x12\r\n\x05\x65rror\x18\x03 \x01(\t\"&\n\x12\x41gentDetachRequest\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\"5\n\x13\x41gentDetachResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"@\n\x13\x41gentRefreshRequest\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\x12\x17\n\x0f\x63redential_path\x18\x02 \x01(\t\"g\n\x14\x41gentRefreshResponse\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\"&\n\x12\x41gentStatusRequest\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\"\x94\x01\n\x0b\x41gentStatus\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\x12\x10\n\x08\x61ttached\x18\x02 \x01(\x08\x12%\n\x07ingress\x18\x03 \x03(\x0b\x32\x14.sam.v1.AgentIngress\x12:\n\x16\x63redential_expire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"I\n\x13\x41gentStatusResponse\x12#\n\x06\x61gents\x18\x01 \x03(\x0b\x32\x13.sam.v1.AgentStatus\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"\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\"\xc0\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\x38\n\x06labels\x18\x05 \x03(\x0b\x32(.sam.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\"\x80\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/\n\x0ctrusted_keys\x18\x04 \x03(\x0b\x32\x19.sam.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\x13.sam.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*\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\x42\x1bZ\x19github.com/google/sam/apib\x06proto3')_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sam_pb2', globals())@@ -32,10 +32,10 @@ if _descriptor._USE_C_DESCRIPTORS == False:_SERVICEANNOUNCE_LABELSENTRY._serialized_options = b'8\001'_PEEREVIDENCERESPONSE_LABELSENTRY._options = None_PEEREVIDENCERESPONSE_LABELSENTRY._serialized_options = b'8\001'- _ENROLLMENTSTATUS._serialized_start=5570- _ENROLLMENTSTATUS._serialized_end=5718- _SERVICETYPE._serialized_start=5720- _SERVICETYPE._serialized_end=5835+ _ENROLLMENTSTATUS._serialized_start=5903+ _ENROLLMENTSTATUS._serialized_end=6051+ _SERVICETYPE._serialized_start=6054+ _SERVICETYPE._serialized_end=6194_AUTHFRAME._serialized_start=54_AUTHFRAME._serialized_end=121_AUTHRESPONSE._serialized_start=123@@ -77,65 +77,73 @@ if _descriptor._USE_C_DESCRIPTORS == False:_ROUTERLEASERESPONSE._serialized_start=2437_ROUTERLEASERESPONSE._serialized_end=2539_POLICYROLE._serialized_start=2542- _POLICYROLE._serialized_end=2691- _POLICYBINDING._serialized_start=2693- _POLICYBINDING._serialized_end=2739- _POLICYCONFIG._serialized_start=2741- _POLICYCONFIG._serialized_end=2831- _POLICYCONFIGGETREQUEST._serialized_start=2833- _POLICYCONFIGGETREQUEST._serialized_end=2857- _POLICYCONFIGGETRESPONSE._serialized_start=2859- _POLICYCONFIGGETRESPONSE._serialized_end=2936- _POLICYCONFIGUPDATERESPONSE._serialized_start=2938- _POLICYCONFIGUPDATERESPONSE._serialized_end=2998- _KEYSRESPONSE._serialized_start=3000- _KEYSRESPONSE._serialized_end=3102- _TOKENREFRESHREQUEST._serialized_start=3104- _TOKENREFRESHREQUEST._serialized_end=3198- _TOKENREFRESHRESPONSE._serialized_start=3200- _TOKENREFRESHRESPONSE._serialized_end=3317- _NODECATALOGREPORT._serialized_start=3319- _NODECATALOGREPORT._serialized_end=3377- _TOKENREVOKEREQUEST._serialized_start=3379- _TOKENREVOKEREQUEST._serialized_end=3416- _TOKENREVOKERESPONSE._serialized_start=3418- _TOKENREVOKERESPONSE._serialized_end=3471- _AGENTSECRET._serialized_start=3473- _AGENTSECRET._serialized_end=3555- _AGENTEGRESS._serialized_start=3557- _AGENTEGRESS._serialized_end=3623- _AGENTINGRESS._serialized_start=3625- _AGENTINGRESS._serialized_end=3723- _AGENTBUNDLE._serialized_start=3726- _AGENTBUNDLE._serialized_end=3896- _AGENTATTACHREQUEST._serialized_start=3898- _AGENTATTACHREQUEST._serialized_end=3955- _AGENTATTACHRESPONSE._serialized_start=3957- _AGENTATTACHRESPONSE._serialized_end=4040- _AGENTDETACHREQUEST._serialized_start=4042- _AGENTDETACHREQUEST._serialized_end=4080- _AGENTDETACHRESPONSE._serialized_start=4082- _AGENTDETACHRESPONSE._serialized_end=4135- _AGENTREFRESHREQUEST._serialized_start=4137- _AGENTREFRESHREQUEST._serialized_end=4201- _AGENTREFRESHRESPONSE._serialized_start=4203- _AGENTREFRESHRESPONSE._serialized_end=4306- _AGENTSTATUSREQUEST._serialized_start=4308- _AGENTSTATUSREQUEST._serialized_end=4346- _AGENTSTATUS._serialized_start=4349- _AGENTSTATUS._serialized_end=4497- _AGENTSTATUSRESPONSE._serialized_start=4499- _AGENTSTATUSRESPONSE._serialized_end=4572- _IDENTITYEVIDENCERESPONSE._serialized_start=4575- _IDENTITYEVIDENCERESPONSE._serialized_end=4803- _PEEREVIDENCERESPONSE._serialized_start=4806- _PEEREVIDENCERESPONSE._serialized_end=5126+ _POLICYROLE._serialized_end=2724+ _HTTPGRANT._serialized_start=2726+ _HTTPGRANT._serialized_end=2786+ _EGRESSDESTINATION._serialized_start=2788+ _EGRESSDESTINATION._serialized_end=2880+ _POLICYBINDING._serialized_start=2882+ _POLICYBINDING._serialized_end=2928+ _POLICYCONFIG._serialized_start=2931+ _POLICYCONFIG._serialized_end=3064+ _POLICYCONFIGGETREQUEST._serialized_start=3066+ _POLICYCONFIGGETREQUEST._serialized_end=3090+ _POLICYCONFIGGETRESPONSE._serialized_start=3092+ _POLICYCONFIGGETRESPONSE._serialized_end=3169+ _POLICYCONFIGUPDATERESPONSE._serialized_start=3171+ _POLICYCONFIGUPDATERESPONSE._serialized_end=3231+ _EGRESSASSIGNMENTSREQUEST._serialized_start=3233+ _EGRESSASSIGNMENTSREQUEST._serialized_end=3259+ _EGRESSASSIGNMENTSRESPONSE._serialized_start=3261+ _EGRESSASSIGNMENTSRESPONSE._serialized_end=3331+ _KEYSRESPONSE._serialized_start=3333+ _KEYSRESPONSE._serialized_end=3435+ _TOKENREFRESHREQUEST._serialized_start=3437+ _TOKENREFRESHREQUEST._serialized_end=3531+ _TOKENREFRESHRESPONSE._serialized_start=3533+ _TOKENREFRESHRESPONSE._serialized_end=3650+ _NODECATALOGREPORT._serialized_start=3652+ _NODECATALOGREPORT._serialized_end=3710+ _TOKENREVOKEREQUEST._serialized_start=3712+ _TOKENREVOKEREQUEST._serialized_end=3749+ _TOKENREVOKERESPONSE._serialized_start=3751+ _TOKENREVOKERESPONSE._serialized_end=3804+ _AGENTSECRET._serialized_start=3806+ _AGENTSECRET._serialized_end=3888+ _AGENTEGRESS._serialized_start=3890+ _AGENTEGRESS._serialized_end=3956+ _AGENTINGRESS._serialized_start=3958+ _AGENTINGRESS._serialized_end=4056+ _AGENTBUNDLE._serialized_start=4059+ _AGENTBUNDLE._serialized_end=4229+ _AGENTATTACHREQUEST._serialized_start=4231+ _AGENTATTACHREQUEST._serialized_end=4288+ _AGENTATTACHRESPONSE._serialized_start=4290+ _AGENTATTACHRESPONSE._serialized_end=4373+ _AGENTDETACHREQUEST._serialized_start=4375+ _AGENTDETACHREQUEST._serialized_end=4413+ _AGENTDETACHRESPONSE._serialized_start=4415+ _AGENTDETACHRESPONSE._serialized_end=4468+ _AGENTREFRESHREQUEST._serialized_start=4470+ _AGENTREFRESHREQUEST._serialized_end=4534+ _AGENTREFRESHRESPONSE._serialized_start=4536+ _AGENTREFRESHRESPONSE._serialized_end=4639+ _AGENTSTATUSREQUEST._serialized_start=4641+ _AGENTSTATUSREQUEST._serialized_end=4679+ _AGENTSTATUS._serialized_start=4682+ _AGENTSTATUS._serialized_end=4830+ _AGENTSTATUSRESPONSE._serialized_start=4832+ _AGENTSTATUSRESPONSE._serialized_end=4905+ _IDENTITYEVIDENCERESPONSE._serialized_start=4908+ _IDENTITYEVIDENCERESPONSE._serialized_end=5136+ _PEEREVIDENCERESPONSE._serialized_start=5139+ _PEEREVIDENCERESPONSE._serialized_end=5459_PEEREVIDENCERESPONSE_LABELSENTRY._serialized_start=604_PEEREVIDENCERESPONSE_LABELSENTRY._serialized_end=649- _MEMBERCREDENTIAL._serialized_start=5129- _MEMBERCREDENTIAL._serialized_end=5385- _TRUSTEDSIGNINGKEY._serialized_start=5387- _TRUSTEDSIGNINGKEY._serialized_end=5476- _OIDCSESSION._serialized_start=5478- _OIDCSESSION._serialized_end=5567+ _MEMBERCREDENTIAL._serialized_start=5462+ _MEMBERCREDENTIAL._serialized_end=5718+ _TRUSTEDSIGNINGKEY._serialized_start=5720+ _TRUSTEDSIGNINGKEY._serialized_end=5809+ _OIDCSESSION._serialized_start=5811+ _OIDCSESSION._serialized_end=5900# @@protoc_insertion_point(module_scope)diff --git a/sdk/python/src/agent_mesh/_proto/sam_pb2.pyi b/sdk/python/src/agent_mesh/_proto/sam_pb2.pyiindex ce8a269b..b172eb28 100644--- a/sdk/python/src/agent_mesh/_proto/sam_pb2.pyi+++ b/sdk/python/src/agent_mesh/_proto/sam_pb2.pyi@@ -11,6 +11,7 @@ ENROLLMENT_STATUS_PENDING: EnrollmentStatusENROLLMENT_STATUS_REJECTED: EnrollmentStatusENROLLMENT_STATUS_UNSPECIFIED: EnrollmentStatusSERVICE_TYPE_A2A: ServiceType+SERVICE_TYPE_EGRESS: ServiceTypeSERVICE_TYPE_INFERENCE: ServiceTypeSERVICE_TYPE_MCP: ServiceTypeSERVICE_TYPE_UNSPECIFIED: ServiceType@@ -241,6 +242,28 @@ class DiscoveredProvider(_message.Message):srv_name: strdef __init__(self, peer_id: _Optional[str] = ..., local_proxy_url: _Optional[str] = ..., srv_name: _Optional[str] = ..., srv_description: _Optional[str] = ...) -> None: ...+class EgressAssignmentsRequest(_message.Message):+ __slots__ = []+ def __init__(self) -> None: ...++class EgressAssignmentsResponse(_message.Message):+ __slots__ = ["egress"]+ EGRESS_FIELD_NUMBER: _ClassVar[int]+ egress: _containers.RepeatedCompositeFieldContainer[EgressDestination]+ def __init__(self, egress: _Optional[_Iterable[_Union[EgressDestination, _Mapping]]] = ...) -> None: ...++class EgressDestination(_message.Message):+ __slots__ = ["credential", "name", "served_by", "target_url"]+ CREDENTIAL_FIELD_NUMBER: _ClassVar[int]+ NAME_FIELD_NUMBER: _ClassVar[int]+ SERVED_BY_FIELD_NUMBER: _ClassVar[int]+ TARGET_URL_FIELD_NUMBER: _ClassVar[int]+ credential: str+ name: str+ served_by: _containers.RepeatedScalarFieldContainer[str]+ target_url: str+ def __init__(self, name: _Optional[str] = ..., target_url: _Optional[str] = ..., credential: _Optional[str] = ..., served_by: _Optional[_Iterable[str]] = ...) -> None: ...+class EnrollRequest(_message.Message):__slots__ = ["challenge_signature", "challenge_unix_ms", "jwt", "labels", "peer_id", "public_key", "requested_role"]class LabelsEntry(_message.Message):@@ -280,6 +303,16 @@ class EnrollResponse(_message.Message):router_addresses: _containers.RepeatedScalarFieldContainer[str]def __init__(self, biscuit_token: _Optional[bytes] = ..., error_message: _Optional[str] = ..., control_plane_public_key: _Optional[bytes] = ..., router_addresses: _Optional[_Iterable[str]] = ..., expire_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...+class HTTPGrant(_message.Message):+ __slots__ = ["methods", "paths", "service"]+ METHODS_FIELD_NUMBER: _ClassVar[int]+ PATHS_FIELD_NUMBER: _ClassVar[int]+ SERVICE_FIELD_NUMBER: _ClassVar[int]+ methods: _containers.RepeatedScalarFieldContainer[str]+ paths: _containers.RepeatedScalarFieldContainer[str]+ service: str+ def __init__(self, service: _Optional[str] = ..., methods: _Optional[_Iterable[str]] = ..., paths: _Optional[_Iterable[str]] = ...) -> None: ...+class IdentityEvidenceResponse(_message.Message):__slots__ = ["biscuit", "biscuit_expire_time", "check_time", "control_plane_url", "peer_id", "trusted_control_plane_keys"]BISCUIT_EXPIRE_TIME_FIELD_NUMBER: _ClassVar[int]@@ -397,12 +430,14 @@ class PolicyBinding(_message.Message):def __init__(self, role: _Optional[str] = ..., members: _Optional[_Iterable[str]] = ...) -> None: ...class PolicyConfig(_message.Message):- __slots__ = ["bindings", "roles"]+ __slots__ = ["bindings", "egress", "roles"]BINDINGS_FIELD_NUMBER: _ClassVar[int]+ EGRESS_FIELD_NUMBER: _ClassVar[int]ROLES_FIELD_NUMBER: _ClassVar[int]bindings: _containers.RepeatedCompositeFieldContainer[PolicyBinding]+ egress: _containers.RepeatedCompositeFieldContainer[EgressDestination]roles: _containers.RepeatedCompositeFieldContainer[PolicyRole]- def __init__(self, roles: _Optional[_Iterable[_Union[PolicyRole, _Mapping]]] = ..., bindings: _Optional[_Iterable[_Union[PolicyBinding, _Mapping]]] = ...) -> None: ...+ def __init__(self, roles: _Optional[_Iterable[_Union[PolicyRole, _Mapping]]] = ..., bindings: _Optional[_Iterable[_Union[PolicyBinding, _Mapping]]] = ..., egress: _Optional[_Iterable[_Union[EgressDestination, _Mapping]]] = ...) -> None: ...class PolicyConfigGetRequest(_message.Message):__slots__ = []@@ -423,20 +458,22 @@ class PolicyConfigUpdateResponse(_message.Message):def __init__(self, success: bool = ..., error: _Optional[str] = ...) -> None: ...class PolicyRole(_message.Message):- __slots__ = ["allowed_agents", "allowed_labels", "allowed_services", "allowed_targets", "custom_datalog", "name"]+ __slots__ = ["allowed_agents", "allowed_labels", "allowed_services", "allowed_targets", "custom_datalog", "http", "name"]ALLOWED_AGENTS_FIELD_NUMBER: _ClassVar[int]ALLOWED_LABELS_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_agents: _containers.RepeatedScalarFieldContainer[str]allowed_labels: _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_agents: _Optional[_Iterable[str]] = ..., allowed_labels: _Optional[_Iterable[str]] = ...) -> None: ...+ def __init__(self, name: _Optional[str] = ..., allowed_targets: _Optional[_Iterable[str]] = ..., allowed_services: _Optional[_Iterable[str]] = ..., custom_datalog: _Optional[_Iterable[str]] = ..., allowed_agents: _Optional[_Iterable[str]] = ..., allowed_labels: _Optional[_Iterable[str]] = ..., http: _Optional[_Iterable[_Union[HTTPGrant, _Mapping]]] = ...) -> None: ...class RegisterServiceRequest(_message.Message):__slots__ = ["command", "service", "target_url"]