Documentation
¶
Overview ¶
Package mcpcredential provides the small, root-pinned custody seam used by local MCP onboarding. It deliberately contains no OAuth or client policy.
Index ¶
Constants ¶
const ( BackendKeyring = "keyring" // BackendKeyring stores the generated key in the OS keyring. BackendFile = "file" // BackendFile stores the generated key in a protected file. // NativeNamespace is the credential-store namespace reserved for native MCP // custody. It is deliberately distinct from the legacy key_env namespace. NativeNamespace = "mecatl-mcp-oauth-native/v1" // #nosec G101 -- public namespace discriminator, not a credential. )
BackendKeyring stores generated keys in the OS keyring; BackendFile uses a protected file.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfirmFile ¶
ConfirmFile confirms the attended fallback to file custody.
type Keyring ¶
type Keyring interface {
Get(string, string) (string, error)
Set(string, string, string) error
Delete(string, string) error
}
Keyring reads and writes the OS credential entry used by MCP custody.
type MarkerInspection ¶
type MarkerInspection string
MarkerInspection is the bounded, non-secret result of inspecting custody metadata.
const ( // MarkerMissing means the custody marker does not exist. MarkerMissing MarkerInspection = "missing" MarkerUnavailable MarkerInspection = "unavailable" // MarkerLocked means the custody root is locked. MarkerLocked MarkerInspection = "locked" // MarkerRecovery means the marker requires recovery. MarkerRecovery MarkerInspection = "recovery required" // MarkerPresent means the custody marker is valid. MarkerPresent MarkerInspection = "present" )
func InspectMarker ¶
func InspectMarker(root string) MarkerInspection
InspectMarker checks only the root-pinned custody marker. It never opens a keyring, reads a credential, or returns marker contents. The result is safe for status/list projections.
type Options ¶
type Options struct {
Requested, FilePath, Platform string
Detect Detector
ConfirmFile ConfirmFile
Attended bool
Keyring Keyring
}
Options controls MCP credential custody selection.