Documentation
¶
Overview ¶
Package mcppolicy owns the shared security policy for remote MCP endpoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateHeaders ¶
func ValidateHeaders(fixed, secret map[string]string, source HeaderSource, authEnabled bool) error
ValidateHeaders enforces header syntax, ownership, and duplicate rules. Fixed headers are always package-authored; source identifies secret headers.
func ValidateRemoteURL ¶
ValidateRemoteURL requires an absolute HTTP(S) endpoint and restricts plain HTTP to the exact localhost name or an IP loopback literal.
Types ¶
type Code ¶
type Code string
Code is a stable machine-readable policy failure reason.
const ( CodeInvalidHeaderName Code = "invalid_header_name" CodeInvalidHeaderValue Code = "invalid_header_value" CodeDuplicateHeader Code = "duplicate_header" CodeReservedHeader Code = "reserved_header" CodePackageCredential Code = "package_credential_forbidden" CodeOperatorCredential Code = "operator_credential_forbidden" CodeOAuthAuthorizationOwned Code = "oauth_authorization_owned" CodeInvalidHeaderSource Code = "invalid_header_source" )
type HeaderSource ¶
type HeaderSource int
HeaderSource identifies who supplied a header value.
const ( SourcePackageFixed HeaderSource = iota SourceOperatorSecret SourceOAuthOwned )
Click to show internal directories.
Click to hide internal directories.