Documentation
¶
Index ¶
- Constants
- Variables
- func BuildServiceDatalogFact(serviceStr string) biscuit.Fact
- func BuildServiceDatalogFacts(services []string) []biscuit.Fact
- func BuildTargetDatalogFact(targetStr string) biscuit.Fact
- func BuildTargetDatalogFacts(targets []string) []biscuit.Fact
- func OIDCClaimToFact() map[string]string
- func ParseServiceTarget(target string) (svcType, svcName string)
- func ServiceTypeToString(t ServiceType) (string, error)
- func SplitToolName(toolName string) (targetService, originalToolName string, err error)
- func ValidateServiceFormat(svc string) error
- func ValidateTargetFormat(target string) error
- type Attenuation
- type AuthFrame
- type AuthResponse
- func (*AuthResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AuthResponse) GetBiscuit() []byte
- func (x *AuthResponse) GetError() string
- func (x *AuthResponse) GetSuccess() bool
- func (*AuthResponse) ProtoMessage()
- func (x *AuthResponse) ProtoReflect() protoreflect.Message
- func (x *AuthResponse) Reset()
- func (x *AuthResponse) String() string
- type BootstrapEnrollRequest
- func (*BootstrapEnrollRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BootstrapEnrollRequest) GetBootstrapToken() string
- func (x *BootstrapEnrollRequest) GetPeerId() string
- func (x *BootstrapEnrollRequest) GetPublicKey() []byte
- func (x *BootstrapEnrollRequest) GetRequestedRole() string
- func (*BootstrapEnrollRequest) ProtoMessage()
- func (x *BootstrapEnrollRequest) ProtoReflect() protoreflect.Message
- func (x *BootstrapEnrollRequest) Reset()
- func (x *BootstrapEnrollRequest) String() string
- type BootstrapEnrollResponse
- func (*BootstrapEnrollResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BootstrapEnrollResponse) GetBiscuitToken() []byte
- func (x *BootstrapEnrollResponse) GetErrorMessage() string
- func (x *BootstrapEnrollResponse) GetExpiration() int64
- func (x *BootstrapEnrollResponse) GetHubAddresses() []string
- func (x *BootstrapEnrollResponse) GetHubPublicKey() []byte
- func (x *BootstrapEnrollResponse) GetPollIntervalSeconds() int32
- func (x *BootstrapEnrollResponse) GetStatus() EnrollmentStatus
- func (*BootstrapEnrollResponse) ProtoMessage()
- func (x *BootstrapEnrollResponse) ProtoReflect() protoreflect.Message
- func (x *BootstrapEnrollResponse) Reset()
- func (x *BootstrapEnrollResponse) String() string
- type CommandBackend
- func (*CommandBackend) Descriptor() ([]byte, []int)deprecated
- func (x *CommandBackend) GetCommand() []string
- func (x *CommandBackend) GetEnv() map[string]string
- func (*CommandBackend) ProtoMessage()
- func (x *CommandBackend) ProtoReflect() protoreflect.Message
- func (x *CommandBackend) Reset()
- func (x *CommandBackend) String() string
- type DiscoveredProvider
- func (*DiscoveredProvider) Descriptor() ([]byte, []int)deprecated
- func (x *DiscoveredProvider) GetLocalProxyUrl() string
- func (x *DiscoveredProvider) GetPeerId() string
- func (x *DiscoveredProvider) GetSrvDescription() string
- func (x *DiscoveredProvider) GetSrvName() string
- func (*DiscoveredProvider) ProtoMessage()
- func (x *DiscoveredProvider) ProtoReflect() protoreflect.Message
- func (x *DiscoveredProvider) Reset()
- func (x *DiscoveredProvider) String() string
- type EnrollRequest
- func (*EnrollRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EnrollRequest) GetJwt() string
- func (x *EnrollRequest) GetPeerId() string
- func (x *EnrollRequest) GetPublicKey() []byte
- func (x *EnrollRequest) GetRequestedRole() string
- func (*EnrollRequest) ProtoMessage()
- func (x *EnrollRequest) ProtoReflect() protoreflect.Message
- func (x *EnrollRequest) Reset()
- func (x *EnrollRequest) String() string
- type EnrollResponse
- func (*EnrollResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EnrollResponse) GetBiscuitToken() []byte
- func (x *EnrollResponse) GetErrorMessage() string
- func (x *EnrollResponse) GetExpiration() int64
- func (x *EnrollResponse) GetHubAddresses() []string
- func (x *EnrollResponse) GetHubPublicKey() []byte
- func (*EnrollResponse) ProtoMessage()
- func (x *EnrollResponse) ProtoReflect() protoreflect.Message
- func (x *EnrollResponse) Reset()
- func (x *EnrollResponse) String() string
- type EnrollmentStatus
- func (EnrollmentStatus) Descriptor() protoreflect.EnumDescriptor
- func (x EnrollmentStatus) Enum() *EnrollmentStatus
- func (EnrollmentStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x EnrollmentStatus) Number() protoreflect.EnumNumber
- func (x EnrollmentStatus) String() string
- func (EnrollmentStatus) Type() protoreflect.EnumType
- type EnrollmentStatusRequest
- func (*EnrollmentStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EnrollmentStatusRequest) GetPeerId() string
- func (*EnrollmentStatusRequest) ProtoMessage()
- func (x *EnrollmentStatusRequest) ProtoReflect() protoreflect.Message
- func (x *EnrollmentStatusRequest) Reset()
- func (x *EnrollmentStatusRequest) String() string
- type HubInfoResponse
- func (*HubInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HubInfoResponse) GetAudience() string
- func (x *HubInfoResponse) GetClientId() string
- func (x *HubInfoResponse) GetHubAddresses() []string
- func (x *HubInfoResponse) GetOidcIssuer() string
- func (*HubInfoResponse) ProtoMessage()
- func (x *HubInfoResponse) ProtoReflect() protoreflect.Message
- func (x *HubInfoResponse) Reset()
- func (x *HubInfoResponse) String() string
- type KeysResponse
- type MeshEvent
- func (*MeshEvent) Descriptor() ([]byte, []int)deprecated
- func (x *MeshEvent) GetNewPublicKey() []byte
- func (x *MeshEvent) GetPeerId() string
- func (x *MeshEvent) GetSignature() []byte
- func (x *MeshEvent) GetTimestamp() int64
- func (x *MeshEvent) GetType() MeshEvent_Type
- func (*MeshEvent) ProtoMessage()
- func (x *MeshEvent) ProtoReflect() protoreflect.Message
- func (x *MeshEvent) Reset()
- func (x *MeshEvent) String() string
- type MeshEvent_Type
- func (MeshEvent_Type) Descriptor() protoreflect.EnumDescriptor
- func (x MeshEvent_Type) Enum() *MeshEvent_Type
- func (MeshEvent_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x MeshEvent_Type) Number() protoreflect.EnumNumber
- func (x MeshEvent_Type) String() string
- func (MeshEvent_Type) Type() protoreflect.EnumType
- type NodeConfig
- type PolicyBinding
- func (*PolicyBinding) Descriptor() ([]byte, []int)deprecated
- func (x *PolicyBinding) GetMembers() []string
- func (x *PolicyBinding) GetRole() string
- func (*PolicyBinding) ProtoMessage()
- func (x *PolicyBinding) ProtoReflect() protoreflect.Message
- func (x *PolicyBinding) Reset()
- func (x *PolicyBinding) String() string
- type PolicyConfigGetRequest
- type PolicyConfigGetResponse
- func (*PolicyConfigGetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PolicyConfigGetResponse) GetBindings() []*PolicyBinding
- func (x *PolicyConfigGetResponse) GetRoles() []*PolicyRole
- func (*PolicyConfigGetResponse) ProtoMessage()
- func (x *PolicyConfigGetResponse) ProtoReflect() protoreflect.Message
- func (x *PolicyConfigGetResponse) Reset()
- func (x *PolicyConfigGetResponse) String() string
- type PolicyConfigUpdateRequest
- func (*PolicyConfigUpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PolicyConfigUpdateRequest) GetBindings() []*PolicyBinding
- func (x *PolicyConfigUpdateRequest) GetRoles() []*PolicyRole
- func (*PolicyConfigUpdateRequest) ProtoMessage()
- func (x *PolicyConfigUpdateRequest) ProtoReflect() protoreflect.Message
- func (x *PolicyConfigUpdateRequest) Reset()
- func (x *PolicyConfigUpdateRequest) String() string
- type PolicyConfigUpdateResponse
- func (*PolicyConfigUpdateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PolicyConfigUpdateResponse) GetError() string
- func (x *PolicyConfigUpdateResponse) GetSuccess() bool
- func (*PolicyConfigUpdateResponse) ProtoMessage()
- func (x *PolicyConfigUpdateResponse) ProtoReflect() protoreflect.Message
- func (x *PolicyConfigUpdateResponse) Reset()
- func (x *PolicyConfigUpdateResponse) String() string
- type PolicyRole
- func (*PolicyRole) Descriptor() ([]byte, []int)deprecated
- func (x *PolicyRole) GetAllowedServices() []string
- func (x *PolicyRole) GetAllowedTargets() []string
- func (x *PolicyRole) GetCustomDatalog() []string
- func (x *PolicyRole) GetName() string
- func (*PolicyRole) ProtoMessage()
- func (x *PolicyRole) ProtoReflect() protoreflect.Message
- func (x *PolicyRole) Reset()
- func (x *PolicyRole) String() string
- type RegisterServiceRequest
- func (*RegisterServiceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterServiceRequest) GetBackend() isRegisterServiceRequest_Backend
- func (x *RegisterServiceRequest) GetCommand() *CommandBackend
- func (x *RegisterServiceRequest) GetService() *ServiceInfo
- func (x *RegisterServiceRequest) GetTargetUrl() string
- func (*RegisterServiceRequest) ProtoMessage()
- func (x *RegisterServiceRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterServiceRequest) Reset()
- func (x *RegisterServiceRequest) String() string
- type RegisterServiceRequest_Command
- type RegisterServiceRequest_TargetUrl
- type RouterLeaseRequest
- func (*RouterLeaseRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RouterLeaseRequest) GetAddresses() []string
- func (x *RouterLeaseRequest) GetBiscuit() []byte
- func (x *RouterLeaseRequest) GetConnectedPeers() []string
- func (x *RouterLeaseRequest) GetDhtSize() int32
- func (x *RouterLeaseRequest) GetPeerId() string
- func (*RouterLeaseRequest) ProtoMessage()
- func (x *RouterLeaseRequest) ProtoReflect() protoreflect.Message
- func (x *RouterLeaseRequest) Reset()
- func (x *RouterLeaseRequest) String() string
- type RouterLeaseResponse
- func (*RouterLeaseResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RouterLeaseResponse) GetError() string
- func (x *RouterLeaseResponse) GetExpiresAt() int64
- func (x *RouterLeaseResponse) GetSuccess() bool
- func (*RouterLeaseResponse) ProtoMessage()
- func (x *RouterLeaseResponse) ProtoReflect() protoreflect.Message
- func (x *RouterLeaseResponse) Reset()
- func (x *RouterLeaseResponse) String() string
- type ServiceConfig
- type ServiceInfo
- func (*ServiceInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ServiceInfo) GetDescription() string
- func (x *ServiceInfo) GetName() string
- func (x *ServiceInfo) GetType() ServiceType
- func (*ServiceInfo) ProtoMessage()
- func (x *ServiceInfo) ProtoReflect() protoreflect.Message
- func (x *ServiceInfo) Reset()
- func (x *ServiceInfo) String() string
- type ServiceType
- func (ServiceType) Descriptor() protoreflect.EnumDescriptor
- func (x ServiceType) Enum() *ServiceType
- func (ServiceType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ServiceType) Number() protoreflect.EnumNumber
- func (x ServiceType) String() string
- func (ServiceType) Type() protoreflect.EnumType
- type TokenRefreshRequest
- func (*TokenRefreshRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TokenRefreshRequest) GetChallengeSignature() []byte
- func (x *TokenRefreshRequest) GetTimestamp() int64
- func (*TokenRefreshRequest) ProtoMessage()
- func (x *TokenRefreshRequest) ProtoReflect() protoreflect.Message
- func (x *TokenRefreshRequest) Reset()
- func (x *TokenRefreshRequest) String() string
- type TokenRefreshResponse
- func (*TokenRefreshResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TokenRefreshResponse) GetBiscuitToken() []byte
- func (x *TokenRefreshResponse) GetErrorMessage() string
- func (x *TokenRefreshResponse) GetExpiresAt() int64
- func (*TokenRefreshResponse) ProtoMessage()
- func (x *TokenRefreshResponse) ProtoReflect() protoreflect.Message
- func (x *TokenRefreshResponse) Reset()
- func (x *TokenRefreshResponse) String() string
- type TokenRevokeRequest
- func (*TokenRevokeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TokenRevokeRequest) GetPeerId() string
- func (*TokenRevokeRequest) ProtoMessage()
- func (x *TokenRevokeRequest) ProtoReflect() protoreflect.Message
- func (x *TokenRevokeRequest) Reset()
- func (x *TokenRevokeRequest) String() string
- type TokenRevokeResponse
- func (*TokenRevokeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TokenRevokeResponse) GetError() string
- func (x *TokenRevokeResponse) GetSuccess() bool
- func (*TokenRevokeResponse) ProtoMessage()
- func (x *TokenRevokeResponse) ProtoReflect() protoreflect.Message
- func (x *TokenRevokeResponse) Reset()
- func (x *TokenRevokeResponse) String() string
Constants ¶
const ( // FactExpiration defines the token expiration time. // Contains: biscuit.Date(expirationTime) // Example Datalog: check if time($time), expiration($exp), $time <= $exp FactExpiration = "expiration" // FactNode defines the PeerID of the node that this token belongs to. // Contains: biscuit.String(nodePeerID) // Example Datalog: allow if node("12D3KooWP2G8nJCLASp1Kb4TmQS4wCpMH2vpSUz8ug8DYEJiuf1i") FactNode = "node" // FactClientPeerID defines the client PeerID performing the request, used for replay defense. // Contains: biscuit.String(clientPeerID) // Example Datalog: check if client_peer_id($id), connection_peer_id($id) FactClientPeerID = "client_peer_id" // FactGroup defines the group claim extracted from the OIDC token. // Contains: biscuit.String(groupName) // Example Datalog: allow if group("data-science") FactGroup = "group" // FactRole defines a custom SAM role assigned to the user or node. // Contains: biscuit.String(roleName) // Example Datalog: allow if role("mesh-member") FactRole = "role" // FactRight defines the cryptographically signed capability/right. // Contains: biscuit.String(rightName) // Example Datalog: allow if right("relay") FactRight = "right" // RightRelay defines the transport relaying/bridging right. RightRelay = "relay" // RightServiceInvoke defines the edge service invocation right. RightServiceInvoke = "service:invoke" // Standard role values RoleRouter = "sam:role:router" RoleNode = "sam:role:node" RoleSamBox = "sam:role:sambox" // FactUser defines the subject (username/userID) claim extracted from the OIDC token. // Contains: biscuit.String(username) // Example Datalog: allow if user("alice") FactUser = "user" // FactEmail defines the email claim extracted from the OIDC token. // Contains: biscuit.String(emailAddress) // Example Datalog: allow if email("bob@example.com") FactEmail = "email" // FactGrantedServiceAllTypes allows access to all service types (e.g., mcp, inference) and all targets. // Contains: (no terms) // Example Datalog: allow if granted_service_all_types() FactGrantedServiceAllTypes = "granted_service_all_types" // FactGrantedServiceAll allows access to all targets under a specific service type. // Contains: biscuit.String(serviceType) (e.g., "mcp") // Example Datalog: allow if service("mcp", $target), granted_service_all("mcp") FactGrantedServiceAll = "granted_service_all" // FactGrantedServiceSuffix allows access to services matching a suffix pattern (e.g. *.service.local). // Contains: biscuit.String(serviceType), biscuit.String(suffixPattern) FactGrantedServiceSuffix = "granted_service_suffix" // FactGrantedServicePrefix allows access to services matching a prefix pattern (e.g. calculator.*). // Contains: biscuit.String(serviceType), biscuit.String(prefixPattern) FactGrantedServicePrefix = "granted_service_prefix" // FactGrantedServiceExact allows access to a specific service type and target. // Contains: biscuit.String(serviceType), biscuit.String(targetName) // Example Datalog: allow if service("mcp", "calculator"), granted_service_exact("mcp", "calculator") FactGrantedServiceExact = "granted_service_exact" // FactGrantedServiceSet allows access to a Set of exact service names under a specific service // type. This lets many exact grants for the same type be carried as a single Datalog fact instead // of one fact per entry, which keeps token/world fact counts flat regardless of list length. // Contains: biscuit.String(serviceType), biscuit.Set of biscuit.String(serviceName) // Example Datalog: allow if service("mcp", "calculator"), granted_service_set("mcp", $set), $set.contains("calculator") FactGrantedServiceSet = "granted_service_set" // FactGrantedTargetAllTypes allows target access to all network targets (unrestricted). // Contains: (no terms) FactGrantedTargetAllTypes = "granted_target_all_types" // FactGrantedTargetAll allows target access to all values of a specific fact. // Contains: biscuit.String(factName) (e.g., "group") FactGrantedTargetAll = "granted_target_all" // FactGrantedTargetSuffix allows target access to values matching a suffix pattern. // Contains: biscuit.String(factName), biscuit.String(suffixPattern) FactGrantedTargetSuffix = "granted_target_suffix" // FactGrantedTargetPrefix allows target access to values matching a prefix pattern. // Contains: biscuit.String(factName), biscuit.String(prefixPattern) FactGrantedTargetPrefix = "granted_target_prefix" // FactGrantedTargetExact allows target access to a specific fact name and value combination. // Contains: biscuit.String(factName), biscuit.String(factValue) // Example Datalog: allow_network_target("group", "backend") <- target_fact("group", "backend"), granted_target_exact("group", "backend") FactGrantedTargetExact = "granted_target_exact" // FactGrantedTargetAllFacts allows target access to any fact name and value combination. // Contains: (no terms) FactGrantedTargetAllFacts = "granted_target_all_facts" // FactGrantedTargetSet allows target access to a Set of exact values for a specific fact name. // This lets many exact target grants for the same fact name be carried as a single Datalog fact // instead of one fact per entry, which keeps token/world fact counts flat regardless of list length. // Contains: biscuit.String(factName), biscuit.Set of biscuit.String(factValue) FactGrantedTargetSet = "granted_target_set" // FactConnectionPeerID defines the actual PeerID of the remote peer making the connection. // Contains: biscuit.String(connectionPeerID) // Example Datalog: check if client_peer_id($id), connection_peer_id($id) FactConnectionPeerID = "connection_peer_id" // FactTargetFact normalizes identity assertions (claims, node, user) to a standardized target. // Contains: biscuit.String(factName), biscuit.String(factValue) // Example Datalog: target_fact("group", $val) <- group($val) FactTargetFact = "target_fact" // FactAllowNetworkTarget evaluates whether a target assertion meets the token access grants. // Contains: biscuit.String(factName), biscuit.String(factValue) // Example Datalog: allow_network_target("group", "backend") FactAllowNetworkTarget = "allow_network_target" // FactTargetUnrestricted indicates that target authorization checks are bypassed. // Contains: (no terms) // Example Datalog: check if allow_network_target($fact, $val) or target_unrestricted() FactTargetUnrestricted = "target_unrestricted" // FactTargetRestricted indicates that target authorization checks must be enforced. // Contains: (no terms) FactTargetRestricted = "target_restricted" // FactService represents the service target that a node is requesting access to. // Contains: biscuit.String(serviceType), biscuit.String(serviceName) // Example Datalog: service("mcp", "calculator") FactService = "service" // FactTime defines the current system time injected during evaluation. // Contains: biscuit.Date(currentTime) // Example Datalog: check if time($time) FactTime = "time" )
Biscuit fact names represent the Datalog predicates used in auth tokens and policy evaluation.
const ( // EnrollProtocolID is the libp2p protocol identifier for node enrollment. EnrollProtocolID protocol.ID = "/sam/enroll/1.0.0" // MCPProtocolID is the libp2p protocol identifier for Model Context Protocol streams. MCPProtocolID protocol.ID = "/sam/mcp/1.0.0" // AuthProtocolID is the libp2p protocol identifier for the zero-trust auth handshake. AuthProtocolID protocol.ID = "/sam/auth/1.0.0" // GossipEvents is the GossipSub topic used to broadcast mesh event updates (e.g., node bans). GossipEvents = "/sam/mesh/events/v1" // GossipHubSync is the GossipSub topic used by the Hub to sync cluster state. GossipHubSync = "/sam/hub/sync/v1" // DefaultAudience is the default audience string used in OIDC token validation. DefaultAudience = "sam-mesh-audience" )
const ( // BiscuitTokenTTL is the strict cryptographically enforced lifespan // of a minted Biscuit token (24 hours). // This is verified locally by each peer on every connection. BiscuitTokenTTL = 24 * time.Hour // OIDCSessionTTL is the maximum database-enforced lifespan of a node's OIDC // interactive enrollment session (90 days). After this period, the node // must re-authenticate with the OIDC provider to establish a new session. OIDCSessionTTL = 90 * 24 * time.Hour // TokenRefreshCheckInterval is the frequency at which the node daemon and router check // if their current Biscuit token is close to expiration and needs to be proactively refreshed. TokenRefreshCheckInterval = 10 * time.Minute )
const ( // HeaderSamBiscuit is the custom HTTP header used to carry the base64-encoded // Biscuit token containing the node's identity credentials when forwarding requests // over libp2p HTTP between nodes in the mesh. // // This header is internal to the SAM mesh datapath and is stripped before requests // are forwarded to backend services. HeaderSamBiscuit = "X-Sam-Biscuit" // HeaderSamAuthorization is the custom HTTP header that a client can pass to a local // SAM node's egress proxy to supply the Authorization header intended for the remote service. // // The egress proxy uses "Authorization: Bearer <token>" for its own local authentication. // By specifying the target service's auth token in HeaderSamAuthorization, the client avoids // stomping local authentication, and prevents the egress proxy from leaking the local sidecar // authentication token to the remote peer. The egress proxy maps this header back to // "Authorization" before transmitting the request to the destination node. HeaderSamAuthorization = "X-Sam-Authorization" // HeaderSamNoTrailingSlash is the custom HTTP header set by the ingress handler // to indicate that the original request had no trailing slash. // // This helps backward-compatibility with services that strictly distinguish // between a root path "/" and an empty path "". HeaderSamNoTrailingSlash = "X-Sam-No-Trailing-Slash" )
const ( // SystemNamespace is the namespace reserved for built-in mesh services and protocols. SystemNamespace = "sam:system" // CatalogTarget is the special system service name used to retrieve tool catalogs. // In policy rules, it must be referred to explicitly as: system://sam.catalog CatalogTarget = "sam.catalog" // MCPServicePrefix is the scheme prefix for Model Context Protocol services. // Fully qualified MCP services use the URI format: mcp://<service-name> MCPServicePrefix = "mcp://" // InferenceServicePrefix is the scheme prefix for LLM Inference services. // Fully qualified inference services use the URI format: inference://<service-name> InferenceServicePrefix = "inference://" )
const ( // ServiceTypeStringMCP is the string identifier for MCP services. ServiceTypeStringMCP = "mcp" // ServiceTypeStringInference is the string identifier for Inference services. ServiceTypeStringInference = "inference" )
const (
// SystemAuthenticated is a special member string representing any authenticated user.
SystemAuthenticated = "sam:system:authenticated"
)
Variables ¶
var ( // BaselinePolicies are the pre-compiled authorization policies for the node middleware. BaselinePolicies []biscuit.Policy // BaselineRules are the pre-compiled target evaluation rules for the node middleware. BaselineRules []biscuit.Rule // BaselineReplayCheck verifies that the client peer ID matches the connection peer ID. BaselineReplayCheck biscuit.Check // BaselineTargetCheck verifies that the target matches one of the allowed network targets. BaselineTargetCheck biscuit.Check // TargetFactRules maps node and OIDC claims to target_fact datalog facts. TargetFactRules []biscuit.Rule // HubStaticTimeCheck is the standard check for verifying OIDC token expiration. HubStaticTimeCheck biscuit.Check // AllowIfTruePolicy is the static policy "allow if true" used during token verification. AllowIfTruePolicy biscuit.Policy )
var ( EnrollmentStatus_name = map[int32]string{ 0: "ENROLLMENT_STATUS_UNSPECIFIED", 1: "ENROLLMENT_STATUS_PENDING", 2: "ENROLLMENT_STATUS_APPROVED", 3: "ENROLLMENT_STATUS_REJECTED", } EnrollmentStatus_value = map[string]int32{ "ENROLLMENT_STATUS_UNSPECIFIED": 0, "ENROLLMENT_STATUS_PENDING": 1, "ENROLLMENT_STATUS_APPROVED": 2, "ENROLLMENT_STATUS_REJECTED": 3, } )
Enum value maps for EnrollmentStatus.
var ( ServiceType_name = map[int32]string{ 0: "SERVICE_TYPE_UNSPECIFIED", 1: "SERVICE_TYPE_MCP", 2: "SERVICE_TYPE_INFERENCE", } ServiceType_value = map[string]int32{ "SERVICE_TYPE_UNSPECIFIED": 0, "SERVICE_TYPE_MCP": 1, "SERVICE_TYPE_INFERENCE": 2, } )
Enum value maps for ServiceType.
var ( MeshEvent_Type_name = map[int32]string{ 0: "BANNED", 1: "KEY_ROTATION", 2: "POLICY_UPDATE", } MeshEvent_Type_value = map[string]int32{ "BANNED": 0, "KEY_ROTATION": 1, "POLICY_UPDATE": 2, } )
Enum value maps for MeshEvent_Type.
var File_api_sam_proto protoreflect.FileDescriptor
var ( // ValidMemberPrefixes defines the allowed identity prefixes in policy configuration. ValidMemberPrefixes = map[string]struct{}{ FactUser: {}, FactGroup: {}, FactEmail: {}, FactNode: {}, } )
Functions ¶
func BuildServiceDatalogFact ¶
BuildServiceDatalogFact translates a service pattern string into a Datalog Fact.
func BuildServiceDatalogFacts ¶
BuildServiceDatalogFacts translates a list of service patterns into a minimal set of Datalog facts. Exact-match entries are grouped by service type into a single granted_service_set fact each, so token/world fact counts stay flat regardless of how many exact services a role grants. Wildcard, prefix and suffix entries keep their existing one-fact-per-entry representation via BuildServiceDatalogFact, since those already collapse to a single fact per entry.
func BuildTargetDatalogFact ¶
BuildTargetDatalogFact translates a target pattern string into a Datalog Fact.
func BuildTargetDatalogFacts ¶
BuildTargetDatalogFacts translates a list of target patterns into a minimal set of Datalog facts. Exact-match entries are grouped by fact name into a single granted_target_set fact each, so token/world fact counts stay flat regardless of how many exact targets a role grants. Wildcard, prefix and suffix entries keep their existing one-fact-per-entry representation via BuildTargetDatalogFact, since those already collapse to a single fact per entry.
func OIDCClaimToFact ¶
OIDCClaimToFact returns a copy of the OIDC claims to Biscuit facts map. This ensures that the global map is immutable and thread-safe for concurrent readers.
func ParseServiceTarget ¶
ParseServiceTarget parses a service target string into its type (scheme) and name components.
Expected formats:
- Hierarchical service URIs: "scheme://name" (e.g., "mcp://my_service") or "scheme://name/path" (e.g., "mcp://my_service/tool").
- Target facts: "fact:value" (e.g., "group:backend" or "user:bob").
- Wildcards: "*" (maps type to "*" and name to "*").
If no scheme/colon is present, it returns an empty string for the type and the full target as the name. No fallback namespace is applied; callers must be explicit.
func ServiceTypeToString ¶
func ServiceTypeToString(t ServiceType) (string, error)
ServiceTypeToString converts a ServiceType protobuf enum back to its standard string identifier.
func SplitToolName ¶
SplitToolName splits a fully qualified MCP tool name into its target service URI and the original tool name.
Expected format: "scheme://service/tool" (e.g., "mcp://my-service/my-tool"). If the input is empty or invalid, it returns an error. No default fallback is applied.
func ValidateServiceFormat ¶
ValidateServiceFormat ensures the service string follows the explicit URI format.
func ValidateTargetFormat ¶
ValidateTargetFormat ensures the target string follows the explicit fact:value format.
Types ¶
type Attenuation ¶
type AuthFrame ¶
type AuthFrame struct {
Biscuit []byte `protobuf:"bytes,1,opt,name=biscuit,proto3" json:"biscuit,omitempty"`
TargetService string `protobuf:"bytes,2,opt,name=target_service,json=targetService,proto3" json:"target_service,omitempty"` // Optional: specific service requested
// contains filtered or unexported fields
}
func (*AuthFrame) Descriptor
deprecated
func (*AuthFrame) GetBiscuit ¶
func (*AuthFrame) GetTargetService ¶
func (*AuthFrame) ProtoMessage ¶
func (*AuthFrame) ProtoMessage()
func (*AuthFrame) ProtoReflect ¶
func (x *AuthFrame) ProtoReflect() protoreflect.Message
type AuthResponse ¶
type AuthResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // populated only if success is false
Biscuit []byte `protobuf:"bytes,3,opt,name=biscuit,proto3" json:"biscuit,omitempty"` // The server's own Biscuit token (for mutual auth)
// contains filtered or unexported fields
}
func (*AuthResponse) Descriptor
deprecated
func (*AuthResponse) Descriptor() ([]byte, []int)
Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead.
func (*AuthResponse) GetBiscuit ¶
func (x *AuthResponse) GetBiscuit() []byte
func (*AuthResponse) GetError ¶
func (x *AuthResponse) GetError() string
func (*AuthResponse) GetSuccess ¶
func (x *AuthResponse) GetSuccess() bool
func (*AuthResponse) ProtoMessage ¶
func (*AuthResponse) ProtoMessage()
func (*AuthResponse) ProtoReflect ¶
func (x *AuthResponse) ProtoReflect() protoreflect.Message
func (*AuthResponse) Reset ¶
func (x *AuthResponse) Reset()
func (*AuthResponse) String ¶
func (x *AuthResponse) String() string
type BootstrapEnrollRequest ¶
type BootstrapEnrollRequest struct {
BootstrapToken string `protobuf:"bytes,1,opt,name=bootstrap_token,json=bootstrapToken,proto3" json:"bootstrap_token,omitempty"`
PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
PublicKey []byte `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
RequestedRole string `protobuf:"bytes,4,opt,name=requested_role,json=requestedRole,proto3" json:"requested_role,omitempty"`
// contains filtered or unexported fields
}
func (*BootstrapEnrollRequest) Descriptor
deprecated
func (*BootstrapEnrollRequest) Descriptor() ([]byte, []int)
Deprecated: Use BootstrapEnrollRequest.ProtoReflect.Descriptor instead.
func (*BootstrapEnrollRequest) GetBootstrapToken ¶
func (x *BootstrapEnrollRequest) GetBootstrapToken() string
func (*BootstrapEnrollRequest) GetPeerId ¶
func (x *BootstrapEnrollRequest) GetPeerId() string
func (*BootstrapEnrollRequest) GetPublicKey ¶
func (x *BootstrapEnrollRequest) GetPublicKey() []byte
func (*BootstrapEnrollRequest) GetRequestedRole ¶
func (x *BootstrapEnrollRequest) GetRequestedRole() string
func (*BootstrapEnrollRequest) ProtoMessage ¶
func (*BootstrapEnrollRequest) ProtoMessage()
func (*BootstrapEnrollRequest) ProtoReflect ¶
func (x *BootstrapEnrollRequest) ProtoReflect() protoreflect.Message
func (*BootstrapEnrollRequest) Reset ¶
func (x *BootstrapEnrollRequest) Reset()
func (*BootstrapEnrollRequest) String ¶
func (x *BootstrapEnrollRequest) String() string
type BootstrapEnrollResponse ¶
type BootstrapEnrollResponse struct {
Status EnrollmentStatus `protobuf:"varint,1,opt,name=status,proto3,enum=sam.v1.EnrollmentStatus" json:"status,omitempty"`
BiscuitToken []byte `protobuf:"bytes,2,opt,name=biscuit_token,json=biscuitToken,proto3" json:"biscuit_token,omitempty"` // Populated only if APPROVED
PollIntervalSeconds int32 `protobuf:"varint,3,opt,name=poll_interval_seconds,json=pollIntervalSeconds,proto3" json:"poll_interval_seconds,omitempty"` // Recommended polling wait time
ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
HubPublicKey []byte `protobuf:"bytes,5,opt,name=hub_public_key,json=hubPublicKey,proto3" json:"hub_public_key,omitempty"` // Populated only if APPROVED
HubAddresses []string `protobuf:"bytes,6,rep,name=hub_addresses,json=hubAddresses,proto3" json:"hub_addresses,omitempty"` // Populated only if APPROVED
Expiration int64 `protobuf:"varint,7,opt,name=expiration,proto3" json:"expiration,omitempty"` // Populated only if APPROVED
// contains filtered or unexported fields
}
func (*BootstrapEnrollResponse) Descriptor
deprecated
func (*BootstrapEnrollResponse) Descriptor() ([]byte, []int)
Deprecated: Use BootstrapEnrollResponse.ProtoReflect.Descriptor instead.
func (*BootstrapEnrollResponse) GetBiscuitToken ¶
func (x *BootstrapEnrollResponse) GetBiscuitToken() []byte
func (*BootstrapEnrollResponse) GetErrorMessage ¶
func (x *BootstrapEnrollResponse) GetErrorMessage() string
func (*BootstrapEnrollResponse) GetExpiration ¶
func (x *BootstrapEnrollResponse) GetExpiration() int64
func (*BootstrapEnrollResponse) GetHubAddresses ¶
func (x *BootstrapEnrollResponse) GetHubAddresses() []string
func (*BootstrapEnrollResponse) GetHubPublicKey ¶
func (x *BootstrapEnrollResponse) GetHubPublicKey() []byte
func (*BootstrapEnrollResponse) GetPollIntervalSeconds ¶
func (x *BootstrapEnrollResponse) GetPollIntervalSeconds() int32
func (*BootstrapEnrollResponse) GetStatus ¶
func (x *BootstrapEnrollResponse) GetStatus() EnrollmentStatus
func (*BootstrapEnrollResponse) ProtoMessage ¶
func (*BootstrapEnrollResponse) ProtoMessage()
func (*BootstrapEnrollResponse) ProtoReflect ¶
func (x *BootstrapEnrollResponse) ProtoReflect() protoreflect.Message
func (*BootstrapEnrollResponse) Reset ¶
func (x *BootstrapEnrollResponse) Reset()
func (*BootstrapEnrollResponse) String ¶
func (x *BootstrapEnrollResponse) String() string
type CommandBackend ¶
type CommandBackend struct {
Command []string `protobuf:"bytes,1,rep,name=command,proto3" json:"command,omitempty"`
Env map[string]string `` /* 133-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*CommandBackend) Descriptor
deprecated
func (*CommandBackend) Descriptor() ([]byte, []int)
Deprecated: Use CommandBackend.ProtoReflect.Descriptor instead.
func (*CommandBackend) GetCommand ¶
func (x *CommandBackend) GetCommand() []string
func (*CommandBackend) GetEnv ¶
func (x *CommandBackend) GetEnv() map[string]string
func (*CommandBackend) ProtoMessage ¶
func (*CommandBackend) ProtoMessage()
func (*CommandBackend) ProtoReflect ¶
func (x *CommandBackend) ProtoReflect() protoreflect.Message
func (*CommandBackend) Reset ¶
func (x *CommandBackend) Reset()
func (*CommandBackend) String ¶
func (x *CommandBackend) String() string
type DiscoveredProvider ¶
type DiscoveredProvider struct {
PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
LocalProxyUrl string `protobuf:"bytes,2,opt,name=local_proxy_url,json=localProxyUrl,proto3" json:"local_proxy_url,omitempty"`
SrvName string `protobuf:"bytes,3,opt,name=srv_name,json=srvName,proto3" json:"srv_name,omitempty"`
SrvDescription string `protobuf:"bytes,4,opt,name=srv_description,json=srvDescription,proto3" json:"srv_description,omitempty"`
// contains filtered or unexported fields
}
func (*DiscoveredProvider) Descriptor
deprecated
func (*DiscoveredProvider) Descriptor() ([]byte, []int)
Deprecated: Use DiscoveredProvider.ProtoReflect.Descriptor instead.
func (*DiscoveredProvider) GetLocalProxyUrl ¶
func (x *DiscoveredProvider) GetLocalProxyUrl() string
func (*DiscoveredProvider) GetPeerId ¶
func (x *DiscoveredProvider) GetPeerId() string
func (*DiscoveredProvider) GetSrvDescription ¶
func (x *DiscoveredProvider) GetSrvDescription() string
func (*DiscoveredProvider) GetSrvName ¶
func (x *DiscoveredProvider) GetSrvName() string
func (*DiscoveredProvider) ProtoMessage ¶
func (*DiscoveredProvider) ProtoMessage()
func (*DiscoveredProvider) ProtoReflect ¶
func (x *DiscoveredProvider) ProtoReflect() protoreflect.Message
func (*DiscoveredProvider) Reset ¶
func (x *DiscoveredProvider) Reset()
func (*DiscoveredProvider) String ¶
func (x *DiscoveredProvider) String() string
type EnrollRequest ¶
type EnrollRequest struct {
Jwt string `protobuf:"bytes,1,opt,name=jwt,proto3" json:"jwt,omitempty"`
PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
PublicKey []byte `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
RequestedRole string `protobuf:"bytes,4,opt,name=requested_role,json=requestedRole,proto3" json:"requested_role,omitempty"`
// contains filtered or unexported fields
}
func (*EnrollRequest) Descriptor
deprecated
func (*EnrollRequest) Descriptor() ([]byte, []int)
Deprecated: Use EnrollRequest.ProtoReflect.Descriptor instead.
func (*EnrollRequest) GetJwt ¶
func (x *EnrollRequest) GetJwt() string
func (*EnrollRequest) GetPeerId ¶
func (x *EnrollRequest) GetPeerId() string
func (*EnrollRequest) GetPublicKey ¶
func (x *EnrollRequest) GetPublicKey() []byte
func (*EnrollRequest) GetRequestedRole ¶
func (x *EnrollRequest) GetRequestedRole() string
func (*EnrollRequest) ProtoMessage ¶
func (*EnrollRequest) ProtoMessage()
func (*EnrollRequest) ProtoReflect ¶
func (x *EnrollRequest) ProtoReflect() protoreflect.Message
func (*EnrollRequest) Reset ¶
func (x *EnrollRequest) Reset()
func (*EnrollRequest) String ¶
func (x *EnrollRequest) String() string
type EnrollResponse ¶
type EnrollResponse struct {
BiscuitToken []byte `protobuf:"bytes,1,opt,name=biscuit_token,json=biscuitToken,proto3" json:"biscuit_token,omitempty"`
ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
HubPublicKey []byte `protobuf:"bytes,3,opt,name=hub_public_key,json=hubPublicKey,proto3" json:"hub_public_key,omitempty"`
HubAddresses []string `protobuf:"bytes,4,rep,name=hub_addresses,json=hubAddresses,proto3" json:"hub_addresses,omitempty"`
Expiration int64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"`
// contains filtered or unexported fields
}
func (*EnrollResponse) Descriptor
deprecated
func (*EnrollResponse) Descriptor() ([]byte, []int)
Deprecated: Use EnrollResponse.ProtoReflect.Descriptor instead.
func (*EnrollResponse) GetBiscuitToken ¶
func (x *EnrollResponse) GetBiscuitToken() []byte
func (*EnrollResponse) GetErrorMessage ¶
func (x *EnrollResponse) GetErrorMessage() string
func (*EnrollResponse) GetExpiration ¶
func (x *EnrollResponse) GetExpiration() int64
func (*EnrollResponse) GetHubAddresses ¶
func (x *EnrollResponse) GetHubAddresses() []string
func (*EnrollResponse) GetHubPublicKey ¶
func (x *EnrollResponse) GetHubPublicKey() []byte
func (*EnrollResponse) ProtoMessage ¶
func (*EnrollResponse) ProtoMessage()
func (*EnrollResponse) ProtoReflect ¶
func (x *EnrollResponse) ProtoReflect() protoreflect.Message
func (*EnrollResponse) Reset ¶
func (x *EnrollResponse) Reset()
func (*EnrollResponse) String ¶
func (x *EnrollResponse) String() string
type EnrollmentStatus ¶
type EnrollmentStatus int32
const ( EnrollmentStatus_ENROLLMENT_STATUS_UNSPECIFIED EnrollmentStatus = 0 EnrollmentStatus_ENROLLMENT_STATUS_PENDING EnrollmentStatus = 1 EnrollmentStatus_ENROLLMENT_STATUS_APPROVED EnrollmentStatus = 2 EnrollmentStatus_ENROLLMENT_STATUS_REJECTED EnrollmentStatus = 3 )
func (EnrollmentStatus) Descriptor ¶
func (EnrollmentStatus) Descriptor() protoreflect.EnumDescriptor
func (EnrollmentStatus) Enum ¶
func (x EnrollmentStatus) Enum() *EnrollmentStatus
func (EnrollmentStatus) EnumDescriptor
deprecated
func (EnrollmentStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use EnrollmentStatus.Descriptor instead.
func (EnrollmentStatus) Number ¶
func (x EnrollmentStatus) Number() protoreflect.EnumNumber
func (EnrollmentStatus) String ¶
func (x EnrollmentStatus) String() string
func (EnrollmentStatus) Type ¶
func (EnrollmentStatus) Type() protoreflect.EnumType
type EnrollmentStatusRequest ¶
type EnrollmentStatusRequest struct {
PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
// contains filtered or unexported fields
}
func (*EnrollmentStatusRequest) Descriptor
deprecated
func (*EnrollmentStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use EnrollmentStatusRequest.ProtoReflect.Descriptor instead.
func (*EnrollmentStatusRequest) GetPeerId ¶
func (x *EnrollmentStatusRequest) GetPeerId() string
func (*EnrollmentStatusRequest) ProtoMessage ¶
func (*EnrollmentStatusRequest) ProtoMessage()
func (*EnrollmentStatusRequest) ProtoReflect ¶
func (x *EnrollmentStatusRequest) ProtoReflect() protoreflect.Message
func (*EnrollmentStatusRequest) Reset ¶
func (x *EnrollmentStatusRequest) Reset()
func (*EnrollmentStatusRequest) String ¶
func (x *EnrollmentStatusRequest) String() string
type HubInfoResponse ¶
type HubInfoResponse struct {
OidcIssuer string `protobuf:"bytes,1,opt,name=oidc_issuer,json=oidcIssuer,proto3" json:"oidc_issuer,omitempty"`
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
Audience string `protobuf:"bytes,3,opt,name=audience,proto3" json:"audience,omitempty"`
HubAddresses []string `protobuf:"bytes,4,rep,name=hub_addresses,json=hubAddresses,proto3" json:"hub_addresses,omitempty"`
// contains filtered or unexported fields
}
func (*HubInfoResponse) Descriptor
deprecated
func (*HubInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use HubInfoResponse.ProtoReflect.Descriptor instead.
func (*HubInfoResponse) GetAudience ¶
func (x *HubInfoResponse) GetAudience() string
func (*HubInfoResponse) GetClientId ¶
func (x *HubInfoResponse) GetClientId() string
func (*HubInfoResponse) GetHubAddresses ¶
func (x *HubInfoResponse) GetHubAddresses() []string
func (*HubInfoResponse) GetOidcIssuer ¶
func (x *HubInfoResponse) GetOidcIssuer() string
func (*HubInfoResponse) ProtoMessage ¶
func (*HubInfoResponse) ProtoMessage()
func (*HubInfoResponse) ProtoReflect ¶
func (x *HubInfoResponse) ProtoReflect() protoreflect.Message
func (*HubInfoResponse) Reset ¶
func (x *HubInfoResponse) Reset()
func (*HubInfoResponse) String ¶
func (x *HubInfoResponse) String() string
type KeysResponse ¶
type KeysResponse struct {
PublicKeys [][]byte `protobuf:"bytes,1,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty"`
// contains filtered or unexported fields
}
func (*KeysResponse) Descriptor
deprecated
func (*KeysResponse) Descriptor() ([]byte, []int)
Deprecated: Use KeysResponse.ProtoReflect.Descriptor instead.
func (*KeysResponse) GetPublicKeys ¶
func (x *KeysResponse) GetPublicKeys() [][]byte
func (*KeysResponse) ProtoMessage ¶
func (*KeysResponse) ProtoMessage()
func (*KeysResponse) ProtoReflect ¶
func (x *KeysResponse) ProtoReflect() protoreflect.Message
func (*KeysResponse) Reset ¶
func (x *KeysResponse) Reset()
func (*KeysResponse) String ¶
func (x *KeysResponse) String() string
type MeshEvent ¶
type MeshEvent struct {
Type MeshEvent_Type `protobuf:"varint,1,opt,name=type,proto3,enum=sam.v1.MeshEvent_Type" json:"type,omitempty"`
PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
NewPublicKey []byte `protobuf:"bytes,4,opt,name=new_public_key,json=newPublicKey,proto3" json:"new_public_key,omitempty"`
Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
// contains filtered or unexported fields
}
func (*MeshEvent) Descriptor
deprecated
func (*MeshEvent) GetNewPublicKey ¶
func (*MeshEvent) GetSignature ¶
func (*MeshEvent) GetTimestamp ¶
func (*MeshEvent) GetType ¶
func (x *MeshEvent) GetType() MeshEvent_Type
func (*MeshEvent) ProtoMessage ¶
func (*MeshEvent) ProtoMessage()
func (*MeshEvent) ProtoReflect ¶
func (x *MeshEvent) ProtoReflect() protoreflect.Message
type MeshEvent_Type ¶
type MeshEvent_Type int32
const ( MeshEvent_BANNED MeshEvent_Type = 0 MeshEvent_KEY_ROTATION MeshEvent_Type = 1 MeshEvent_POLICY_UPDATE MeshEvent_Type = 2 )
func (MeshEvent_Type) Descriptor ¶
func (MeshEvent_Type) Descriptor() protoreflect.EnumDescriptor
func (MeshEvent_Type) Enum ¶
func (x MeshEvent_Type) Enum() *MeshEvent_Type
func (MeshEvent_Type) EnumDescriptor
deprecated
func (MeshEvent_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use MeshEvent_Type.Descriptor instead.
func (MeshEvent_Type) Number ¶
func (x MeshEvent_Type) Number() protoreflect.EnumNumber
func (MeshEvent_Type) String ¶
func (x MeshEvent_Type) String() string
func (MeshEvent_Type) Type ¶
func (MeshEvent_Type) Type() protoreflect.EnumType
type NodeConfig ¶
type NodeConfig struct {
Version string `yaml:"version"`
Attenuation Attenuation `yaml:"attenuation"`
Services []ServiceConfig `yaml:"services"`
}
NodeConfig defines the optional attenuation rules and static services for a specific SAM Node.
type PolicyBinding ¶
type PolicyBinding struct {
Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
Members []string `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"`
// contains filtered or unexported fields
}
func (*PolicyBinding) Descriptor
deprecated
func (*PolicyBinding) Descriptor() ([]byte, []int)
Deprecated: Use PolicyBinding.ProtoReflect.Descriptor instead.
func (*PolicyBinding) GetMembers ¶
func (x *PolicyBinding) GetMembers() []string
func (*PolicyBinding) GetRole ¶
func (x *PolicyBinding) GetRole() string
func (*PolicyBinding) ProtoMessage ¶
func (*PolicyBinding) ProtoMessage()
func (*PolicyBinding) ProtoReflect ¶
func (x *PolicyBinding) ProtoReflect() protoreflect.Message
func (*PolicyBinding) Reset ¶
func (x *PolicyBinding) Reset()
func (*PolicyBinding) String ¶
func (x *PolicyBinding) String() string
type PolicyConfigGetRequest ¶
type PolicyConfigGetRequest struct {
// contains filtered or unexported fields
}
func (*PolicyConfigGetRequest) Descriptor
deprecated
func (*PolicyConfigGetRequest) Descriptor() ([]byte, []int)
Deprecated: Use PolicyConfigGetRequest.ProtoReflect.Descriptor instead.
func (*PolicyConfigGetRequest) ProtoMessage ¶
func (*PolicyConfigGetRequest) ProtoMessage()
func (*PolicyConfigGetRequest) ProtoReflect ¶
func (x *PolicyConfigGetRequest) ProtoReflect() protoreflect.Message
func (*PolicyConfigGetRequest) Reset ¶
func (x *PolicyConfigGetRequest) Reset()
func (*PolicyConfigGetRequest) String ¶
func (x *PolicyConfigGetRequest) String() string
type PolicyConfigGetResponse ¶
type PolicyConfigGetResponse struct {
Roles []*PolicyRole `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`
Bindings []*PolicyBinding `protobuf:"bytes,2,rep,name=bindings,proto3" json:"bindings,omitempty"`
// contains filtered or unexported fields
}
func (*PolicyConfigGetResponse) Descriptor
deprecated
func (*PolicyConfigGetResponse) Descriptor() ([]byte, []int)
Deprecated: Use PolicyConfigGetResponse.ProtoReflect.Descriptor instead.
func (*PolicyConfigGetResponse) GetBindings ¶
func (x *PolicyConfigGetResponse) GetBindings() []*PolicyBinding
func (*PolicyConfigGetResponse) GetRoles ¶
func (x *PolicyConfigGetResponse) GetRoles() []*PolicyRole
func (*PolicyConfigGetResponse) ProtoMessage ¶
func (*PolicyConfigGetResponse) ProtoMessage()
func (*PolicyConfigGetResponse) ProtoReflect ¶
func (x *PolicyConfigGetResponse) ProtoReflect() protoreflect.Message
func (*PolicyConfigGetResponse) Reset ¶
func (x *PolicyConfigGetResponse) Reset()
func (*PolicyConfigGetResponse) String ¶
func (x *PolicyConfigGetResponse) String() string
type PolicyConfigUpdateRequest ¶
type PolicyConfigUpdateRequest struct {
Roles []*PolicyRole `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`
Bindings []*PolicyBinding `protobuf:"bytes,2,rep,name=bindings,proto3" json:"bindings,omitempty"`
// contains filtered or unexported fields
}
func (*PolicyConfigUpdateRequest) Descriptor
deprecated
func (*PolicyConfigUpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use PolicyConfigUpdateRequest.ProtoReflect.Descriptor instead.
func (*PolicyConfigUpdateRequest) GetBindings ¶
func (x *PolicyConfigUpdateRequest) GetBindings() []*PolicyBinding
func (*PolicyConfigUpdateRequest) GetRoles ¶
func (x *PolicyConfigUpdateRequest) GetRoles() []*PolicyRole
func (*PolicyConfigUpdateRequest) ProtoMessage ¶
func (*PolicyConfigUpdateRequest) ProtoMessage()
func (*PolicyConfigUpdateRequest) ProtoReflect ¶
func (x *PolicyConfigUpdateRequest) ProtoReflect() protoreflect.Message
func (*PolicyConfigUpdateRequest) Reset ¶
func (x *PolicyConfigUpdateRequest) Reset()
func (*PolicyConfigUpdateRequest) String ¶
func (x *PolicyConfigUpdateRequest) String() string
type PolicyConfigUpdateResponse ¶
type PolicyConfigUpdateResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}
func (*PolicyConfigUpdateResponse) Descriptor
deprecated
func (*PolicyConfigUpdateResponse) Descriptor() ([]byte, []int)
Deprecated: Use PolicyConfigUpdateResponse.ProtoReflect.Descriptor instead.
func (*PolicyConfigUpdateResponse) GetError ¶
func (x *PolicyConfigUpdateResponse) GetError() string
func (*PolicyConfigUpdateResponse) GetSuccess ¶
func (x *PolicyConfigUpdateResponse) GetSuccess() bool
func (*PolicyConfigUpdateResponse) ProtoMessage ¶
func (*PolicyConfigUpdateResponse) ProtoMessage()
func (*PolicyConfigUpdateResponse) ProtoReflect ¶
func (x *PolicyConfigUpdateResponse) ProtoReflect() protoreflect.Message
func (*PolicyConfigUpdateResponse) Reset ¶
func (x *PolicyConfigUpdateResponse) Reset()
func (*PolicyConfigUpdateResponse) String ¶
func (x *PolicyConfigUpdateResponse) String() string
type PolicyRole ¶
type PolicyRole struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
AllowedTargets []string `protobuf:"bytes,2,rep,name=allowed_targets,json=allowedTargets,proto3" json:"allowed_targets,omitempty"`
AllowedServices []string `protobuf:"bytes,3,rep,name=allowed_services,json=allowedServices,proto3" json:"allowed_services,omitempty"`
CustomDatalog []string `protobuf:"bytes,4,rep,name=custom_datalog,json=customDatalog,proto3" json:"custom_datalog,omitempty"`
// contains filtered or unexported fields
}
func (*PolicyRole) Descriptor
deprecated
func (*PolicyRole) Descriptor() ([]byte, []int)
Deprecated: Use PolicyRole.ProtoReflect.Descriptor instead.
func (*PolicyRole) GetAllowedServices ¶
func (x *PolicyRole) GetAllowedServices() []string
func (*PolicyRole) GetAllowedTargets ¶
func (x *PolicyRole) GetAllowedTargets() []string
func (*PolicyRole) GetCustomDatalog ¶
func (x *PolicyRole) GetCustomDatalog() []string
func (*PolicyRole) GetName ¶
func (x *PolicyRole) GetName() string
func (*PolicyRole) ProtoMessage ¶
func (*PolicyRole) ProtoMessage()
func (*PolicyRole) ProtoReflect ¶
func (x *PolicyRole) ProtoReflect() protoreflect.Message
func (*PolicyRole) Reset ¶
func (x *PolicyRole) Reset()
func (*PolicyRole) String ¶
func (x *PolicyRole) String() string
type RegisterServiceRequest ¶
type RegisterServiceRequest struct {
Service *ServiceInfo `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
// Types that are valid to be assigned to Backend:
//
// *RegisterServiceRequest_TargetUrl
// *RegisterServiceRequest_Command
Backend isRegisterServiceRequest_Backend `protobuf_oneof:"backend"`
// contains filtered or unexported fields
}
func (*RegisterServiceRequest) Descriptor
deprecated
func (*RegisterServiceRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterServiceRequest.ProtoReflect.Descriptor instead.
func (*RegisterServiceRequest) GetBackend ¶
func (x *RegisterServiceRequest) GetBackend() isRegisterServiceRequest_Backend
func (*RegisterServiceRequest) GetCommand ¶
func (x *RegisterServiceRequest) GetCommand() *CommandBackend
func (*RegisterServiceRequest) GetService ¶
func (x *RegisterServiceRequest) GetService() *ServiceInfo
func (*RegisterServiceRequest) GetTargetUrl ¶
func (x *RegisterServiceRequest) GetTargetUrl() string
func (*RegisterServiceRequest) ProtoMessage ¶
func (*RegisterServiceRequest) ProtoMessage()
func (*RegisterServiceRequest) ProtoReflect ¶
func (x *RegisterServiceRequest) ProtoReflect() protoreflect.Message
func (*RegisterServiceRequest) Reset ¶
func (x *RegisterServiceRequest) Reset()
func (*RegisterServiceRequest) String ¶
func (x *RegisterServiceRequest) String() string
type RegisterServiceRequest_Command ¶
type RegisterServiceRequest_Command struct {
Command *CommandBackend `protobuf:"bytes,3,opt,name=command,proto3,oneof"`
}
type RegisterServiceRequest_TargetUrl ¶
type RegisterServiceRequest_TargetUrl struct {
TargetUrl string `protobuf:"bytes,2,opt,name=target_url,json=targetUrl,proto3,oneof"`
}
type RouterLeaseRequest ¶
type RouterLeaseRequest struct {
PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
Addresses []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"`
Biscuit []byte `protobuf:"bytes,3,opt,name=biscuit,proto3" json:"biscuit,omitempty"`
ConnectedPeers []string `protobuf:"bytes,4,rep,name=connected_peers,json=connectedPeers,proto3" json:"connected_peers,omitempty"`
DhtSize int32 `protobuf:"varint,5,opt,name=dht_size,json=dhtSize,proto3" json:"dht_size,omitempty"`
// contains filtered or unexported fields
}
func (*RouterLeaseRequest) Descriptor
deprecated
func (*RouterLeaseRequest) Descriptor() ([]byte, []int)
Deprecated: Use RouterLeaseRequest.ProtoReflect.Descriptor instead.
func (*RouterLeaseRequest) GetAddresses ¶
func (x *RouterLeaseRequest) GetAddresses() []string
func (*RouterLeaseRequest) GetBiscuit ¶
func (x *RouterLeaseRequest) GetBiscuit() []byte
func (*RouterLeaseRequest) GetConnectedPeers ¶
func (x *RouterLeaseRequest) GetConnectedPeers() []string
func (*RouterLeaseRequest) GetDhtSize ¶
func (x *RouterLeaseRequest) GetDhtSize() int32
func (*RouterLeaseRequest) GetPeerId ¶
func (x *RouterLeaseRequest) GetPeerId() string
func (*RouterLeaseRequest) ProtoMessage ¶
func (*RouterLeaseRequest) ProtoMessage()
func (*RouterLeaseRequest) ProtoReflect ¶
func (x *RouterLeaseRequest) ProtoReflect() protoreflect.Message
func (*RouterLeaseRequest) Reset ¶
func (x *RouterLeaseRequest) Reset()
func (*RouterLeaseRequest) String ¶
func (x *RouterLeaseRequest) String() string
type RouterLeaseResponse ¶
type RouterLeaseResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
ExpiresAt int64 `protobuf:"varint,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
// contains filtered or unexported fields
}
func (*RouterLeaseResponse) Descriptor
deprecated
func (*RouterLeaseResponse) Descriptor() ([]byte, []int)
Deprecated: Use RouterLeaseResponse.ProtoReflect.Descriptor instead.
func (*RouterLeaseResponse) GetError ¶
func (x *RouterLeaseResponse) GetError() string
func (*RouterLeaseResponse) GetExpiresAt ¶
func (x *RouterLeaseResponse) GetExpiresAt() int64
func (*RouterLeaseResponse) GetSuccess ¶
func (x *RouterLeaseResponse) GetSuccess() bool
func (*RouterLeaseResponse) ProtoMessage ¶
func (*RouterLeaseResponse) ProtoMessage()
func (*RouterLeaseResponse) ProtoReflect ¶
func (x *RouterLeaseResponse) ProtoReflect() protoreflect.Message
func (*RouterLeaseResponse) Reset ¶
func (x *RouterLeaseResponse) Reset()
func (*RouterLeaseResponse) String ¶
func (x *RouterLeaseResponse) String() string
type ServiceConfig ¶
type ServiceInfo ¶
type ServiceInfo struct {
Type ServiceType `protobuf:"varint,1,opt,name=type,proto3,enum=sam.v1.ServiceType" json:"type,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// contains filtered or unexported fields
}
func (*ServiceInfo) Descriptor
deprecated
func (*ServiceInfo) Descriptor() ([]byte, []int)
Deprecated: Use ServiceInfo.ProtoReflect.Descriptor instead.
func (*ServiceInfo) GetDescription ¶
func (x *ServiceInfo) GetDescription() string
func (*ServiceInfo) GetName ¶
func (x *ServiceInfo) GetName() string
func (*ServiceInfo) GetType ¶
func (x *ServiceInfo) GetType() ServiceType
func (*ServiceInfo) ProtoMessage ¶
func (*ServiceInfo) ProtoMessage()
func (*ServiceInfo) ProtoReflect ¶
func (x *ServiceInfo) ProtoReflect() protoreflect.Message
func (*ServiceInfo) Reset ¶
func (x *ServiceInfo) Reset()
func (*ServiceInfo) String ¶
func (x *ServiceInfo) String() string
type ServiceType ¶
type ServiceType int32
const ( ServiceType_SERVICE_TYPE_UNSPECIFIED ServiceType = 0 ServiceType_SERVICE_TYPE_MCP ServiceType = 1 ServiceType_SERVICE_TYPE_INFERENCE ServiceType = 2 )
func ParseServiceType ¶
func ParseServiceType(s string) (ServiceType, error)
ParseServiceType converts a string identifier (e.g. from JSON or REST) to the ServiceType protobuf enum.
func (ServiceType) Descriptor ¶
func (ServiceType) Descriptor() protoreflect.EnumDescriptor
func (ServiceType) Enum ¶
func (x ServiceType) Enum() *ServiceType
func (ServiceType) EnumDescriptor
deprecated
func (ServiceType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ServiceType.Descriptor instead.
func (ServiceType) Number ¶
func (x ServiceType) Number() protoreflect.EnumNumber
func (ServiceType) String ¶
func (x ServiceType) String() string
func (ServiceType) Type ¶
func (ServiceType) Type() protoreflect.EnumType
type TokenRefreshRequest ¶
type TokenRefreshRequest struct {
ChallengeSignature []byte `protobuf:"bytes,1,opt,name=challenge_signature,json=challengeSignature,proto3" json:"challenge_signature,omitempty"`
Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// contains filtered or unexported fields
}
func (*TokenRefreshRequest) Descriptor
deprecated
func (*TokenRefreshRequest) Descriptor() ([]byte, []int)
Deprecated: Use TokenRefreshRequest.ProtoReflect.Descriptor instead.
func (*TokenRefreshRequest) GetChallengeSignature ¶
func (x *TokenRefreshRequest) GetChallengeSignature() []byte
func (*TokenRefreshRequest) GetTimestamp ¶
func (x *TokenRefreshRequest) GetTimestamp() int64
func (*TokenRefreshRequest) ProtoMessage ¶
func (*TokenRefreshRequest) ProtoMessage()
func (*TokenRefreshRequest) ProtoReflect ¶
func (x *TokenRefreshRequest) ProtoReflect() protoreflect.Message
func (*TokenRefreshRequest) Reset ¶
func (x *TokenRefreshRequest) Reset()
func (*TokenRefreshRequest) String ¶
func (x *TokenRefreshRequest) String() string
type TokenRefreshResponse ¶
type TokenRefreshResponse struct {
BiscuitToken []byte `protobuf:"bytes,1,opt,name=biscuit_token,json=biscuitToken,proto3" json:"biscuit_token,omitempty"`
ExpiresAt int64 `protobuf:"varint,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
// contains filtered or unexported fields
}
func (*TokenRefreshResponse) Descriptor
deprecated
func (*TokenRefreshResponse) Descriptor() ([]byte, []int)
Deprecated: Use TokenRefreshResponse.ProtoReflect.Descriptor instead.
func (*TokenRefreshResponse) GetBiscuitToken ¶
func (x *TokenRefreshResponse) GetBiscuitToken() []byte
func (*TokenRefreshResponse) GetErrorMessage ¶
func (x *TokenRefreshResponse) GetErrorMessage() string
func (*TokenRefreshResponse) GetExpiresAt ¶
func (x *TokenRefreshResponse) GetExpiresAt() int64
func (*TokenRefreshResponse) ProtoMessage ¶
func (*TokenRefreshResponse) ProtoMessage()
func (*TokenRefreshResponse) ProtoReflect ¶
func (x *TokenRefreshResponse) ProtoReflect() protoreflect.Message
func (*TokenRefreshResponse) Reset ¶
func (x *TokenRefreshResponse) Reset()
func (*TokenRefreshResponse) String ¶
func (x *TokenRefreshResponse) String() string
type TokenRevokeRequest ¶
type TokenRevokeRequest struct {
PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
// contains filtered or unexported fields
}
func (*TokenRevokeRequest) Descriptor
deprecated
func (*TokenRevokeRequest) Descriptor() ([]byte, []int)
Deprecated: Use TokenRevokeRequest.ProtoReflect.Descriptor instead.
func (*TokenRevokeRequest) GetPeerId ¶
func (x *TokenRevokeRequest) GetPeerId() string
func (*TokenRevokeRequest) ProtoMessage ¶
func (*TokenRevokeRequest) ProtoMessage()
func (*TokenRevokeRequest) ProtoReflect ¶
func (x *TokenRevokeRequest) ProtoReflect() protoreflect.Message
func (*TokenRevokeRequest) Reset ¶
func (x *TokenRevokeRequest) Reset()
func (*TokenRevokeRequest) String ¶
func (x *TokenRevokeRequest) String() string
type TokenRevokeResponse ¶
type TokenRevokeResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}
func (*TokenRevokeResponse) Descriptor
deprecated
func (*TokenRevokeResponse) Descriptor() ([]byte, []int)
Deprecated: Use TokenRevokeResponse.ProtoReflect.Descriptor instead.
func (*TokenRevokeResponse) GetError ¶
func (x *TokenRevokeResponse) GetError() string
func (*TokenRevokeResponse) GetSuccess ¶
func (x *TokenRevokeResponse) GetSuccess() bool
func (*TokenRevokeResponse) ProtoMessage ¶
func (*TokenRevokeResponse) ProtoMessage()
func (*TokenRevokeResponse) ProtoReflect ¶
func (x *TokenRevokeResponse) ProtoReflect() protoreflect.Message
func (*TokenRevokeResponse) Reset ¶
func (x *TokenRevokeResponse) Reset()
func (*TokenRevokeResponse) String ¶
func (x *TokenRevokeResponse) String() string