Documentation
¶
Overview ¶
Package authorityhttp exposes a narrow, mTLS-authenticated primary-lease Authority control endpoint. It is intentionally separate from the public database HTTP/RPC surface and from the quorum-member LeaseStore endpoint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrHTTPSRequired means the client did not obtain a verified, pinned HTTPS // response. It is fatal for a caller: treating it as a temporary controller // outage could hide an identity configuration error. ErrHTTPSRequired = errors.New("meldbase authority HTTP: verified pinned HTTPS is required") // ErrProtocol means an authenticated peer violated this strict control-plane // protocol. It is fatal for a caller and never permits a blind retry. ErrProtocol = errors.New("meldbase authority HTTP: invalid protocol response") )
Functions ¶
Types ¶
type Authorize ¶
type Authorize = replicationauth.Authorize
Authorize returns an identity derived from a verified server-to-server peer certificate. It must never take that identity from an HTTP field.
func NewMTLSAuthorizer ¶
func NewMTLSAuthorizer(config MTLSConfig) (Authorize, error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a node or operator control-plane client. It cannot impersonate an owner because the handler derives Owner from its verified mTLS identity.
func NewClient ¶
func NewClient(options ClientOptions) (*Client, error)
type ClientOptions ¶
type ClientOptions struct {
Endpoint string
ExpectedServerFingerprint string
ExpectedServerFingerprints []string
HTTPClient *http.Client
}
ClientOptions configures a private Authority API client. HTTPClient carries the caller's mTLS certificate and trusted roots. Exactly one of the legacy single pin or the rotation-aware pin list must be supplied.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler serves one controller issuer. It does not expose promotion because promotion must execute a deployment-specific, local history-readiness proof.
func NewHandler ¶
func NewHandler(config HandlerConfig) (*Handler, error)
type HandlerConfig ¶
type HandlerConfig struct {
Authority *primarylease.Authority
NodeAuthorize Authorize
OperatorAuthorize Authorize
}
HandlerConfig configures the private Authority API. NodeAuthorize maps each verified node certificate to the immutable lease Owner used by Grant. Revoke requires a separately configured operator authorizer; granting node identity alone never conveys the ability to fence another primary.
type MTLSConfig ¶
type MTLSConfig = replicationauth.MTLSConfig