endpoint

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMCPServerURL = "https://mcp.safedep.io/model-context-protocol/threats/v1/mcp"

DefaultMCPServerURL is the canonical SafeDep MCP endpoint. Both `protect mcp install` and `setup mcp install` default to this value; a single constant prevents drift between the two commands.

Variables

This section is empty.

Functions

func BuildMCPConfig

func BuildMCPConfig(mcpURL, apiKey, tenantID string, resolver endpointsync.EndpointIdentityResolver) (agent.MCPConfig, error)

BuildMCPConfig assembles the MCPConfig that agent.InjectAll expects. It populates all three SafeDep MCP headers:

  • Authorization: Bearer <apiKey>
  • X-Tenant-ID: <tenantID>
  • X-Endpoint-ID: base64(proto.Marshal(EndpointIdentity))

func IdentityHeaderValue

func IdentityHeaderValue(resolver endpointsync.EndpointIdentityResolver) (string, error)

IdentityHeaderValue returns the X-Endpoint-ID header value for the current machine: base64(proto.Marshal(EndpointIdentity)). The identity is derived from the machine's stable hardware UUID and hostname; it does not require backend registration.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL