Documentation
¶
Overview ¶
Package authorityhttp contains only the managed node's public wire client. Hosted stores, account management, evaluators, and console handlers remain in the separately deployed private control plane.
Index ¶
- Constants
- func SignAgentRequest(request *http.Request, tenantID, agentID, keyID string, ...) error
- type ActivePolicyEnvelope
- type AgentRequestSigner
- type Client
- func (client *Client) Acknowledge(ctx context.Context, ack authority.PolicyAcknowledgement) (authority.RolloutStatus, error)
- func (client *Client) Activate(ctx context.Context, activation authority.PolicyActivation) (authority.RolloutStatus, error)
- func (client *Client) Candidate(ctx context.Context, tenantID, agentID string) (PublicationEnvelope, bool, error)
- func (client *Client) ConfigureAgentRequestSigning(agentID, keyID string, privateKey ed25519.PrivateKey) error
- func (client *Client) CurrentMandateBundle(ctx context.Context, tenantID, agentID string) (decision.MandateBundle, bool, error)
- func (client *Client) CurrentPolicy(ctx context.Context, tenantID, agentID string) (ActivePolicyEnvelope, bool, error)
- func (client *Client) CurrentTrust(ctx context.Context, tenantID string) (authority.TrustBundle, bool, error)
- func (client *Client) FleetCommands(ctx context.Context, tenantID, agentID string) ([]authority.FleetCommand, error)
- func (client *Client) FleetControl(ctx context.Context, tenantID, agentID string) (authority.FleetNodeControl, bool, error)
- func (client *Client) FleetStateMutations(ctx context.Context, tenantID, agentID string) ([]authority.FleetStateMutation, error)
- func (client *Client) FleetStateSnapshot(ctx context.Context, tenantID, agentID string) (authority.FleetStateSnapshot, bool, error)
- func (client *Client) ManagementState(ctx context.Context, tenantID string) (ManagementState, error)
- func (client *Client) Publish(ctx context.Context, publication authority.PolicyPublication, ...) (authority.RolloutStatus, error)
- func (client *Client) PublishMandateBundle(ctx context.Context, bundle decision.MandateBundle) (decision.MandateBundle, error)
- func (client *Client) PublishTrust(ctx context.Context, bundle authority.TrustBundle) (TrustPublicationResult, error)
- func (client *Client) Receipts(ctx context.Context, tenantID string, limit int) ([]decision.Receipt, error)
- func (client *Client) ReportFleetActivity(ctx context.Context, activity authority.FleetActivity) error
- func (client *Client) ReportFleetControlAcknowledgement(ctx context.Context, acknowledgement authority.FleetControlAcknowledgement) error
- func (client *Client) ReportFleetNode(ctx context.Context, report authority.FleetNodeReport) error
- func (client *Client) ReportFleetResult(ctx context.Context, result authority.FleetCommandResult) error
- func (client *Client) ReportFleetStateMutationResult(ctx context.Context, result authority.FleetStateMutationResult) error
- func (client *Client) ReportFleetStateSnapshot(ctx context.Context, snapshot authority.FleetStateSnapshot) error
- func (client *Client) Simulate(ctx context.Context, request SimulationRequest) (decisionpolicy.RolloutSimulation, error)
- func (client *Client) Status(ctx context.Context, publicationID string) (authority.RolloutStatus, error)
- type ManagementState
- type NodeEnrollmentClaimResponse
- type NodeEnrollmentOptions
- type PublicationEnvelope
- type SimulationRequest
- type TrustPublicationResult
Constants ¶
const NodeEnrollmentVersion uint16 = 1
Variables ¶
This section is empty.
Functions ¶
func SignAgentRequest ¶
func SignAgentRequest(request *http.Request, tenantID, agentID, keyID string, privateKey ed25519.PrivateKey) error
SignAgentRequest signs a bodyless GET for integrations that do not use Client. tenantID and agentID must exactly match the request query.
Types ¶
type ActivePolicyEnvelope ¶
type ActivePolicyEnvelope struct {
Publication authority.PolicyPublication `json:"publication"`
Bundle authority.PolicyBundle `json:"bundle"`
Activation authority.PolicyActivation `json:"activation"`
}
type AgentRequestSigner ¶
type AgentRequestSigner struct {
// contains filtered or unexported fields
}
AgentRequestSigner proves which enrolled node is fetching account-specific policy or control-plane state. It is intentionally limited to bodyless GETs: node reports already carry their own signed, validated artifacts.
func NewAgentRequestSigner ¶
func NewAgentRequestSigner(agentID, keyID string, privateKey ed25519.PrivateKey) (*AgentRequestSigner, error)
NewAgentRequestSigner binds one active agent intent key to node-plane reads.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Acknowledge ¶
func (client *Client) Acknowledge(ctx context.Context, ack authority.PolicyAcknowledgement) (authority.RolloutStatus, error)
func (*Client) Activate ¶
func (client *Client) Activate(ctx context.Context, activation authority.PolicyActivation) (authority.RolloutStatus, error)
Activate submits a pre-signed activation after the authority has verified the durable acknowledgement threshold. It cannot promote a bundle by time or client-side state alone.
func (*Client) Candidate ¶
func (client *Client) Candidate(ctx context.Context, tenantID, agentID string) (PublicationEnvelope, bool, error)
Candidate retrieves the newest unactivated signed policy publication that explicitly targets agentID. A false found result is normal: it means the authority has no staged change for that workload, not that the current policy permits an action.
func (*Client) ConfigureAgentRequestSigning ¶
func (client *Client) ConfigureAgentRequestSigning(agentID, keyID string, privateKey ed25519.PrivateKey) error
ConfigureAgentRequestSigning enables authenticated policy, mandate, and fleet reads. Configure the client before concurrent use.
func (*Client) CurrentMandateBundle ¶
func (client *Client) CurrentMandateBundle(ctx context.Context, tenantID, agentID string) (decision.MandateBundle, bool, error)
CurrentMandateBundle retrieves the complete, revisioned mandate snapshot for one workload. A false found result is a normal no-delegation state; it must never be treated as an authorization allow.
func (*Client) CurrentPolicy ¶
func (client *Client) CurrentPolicy(ctx context.Context, tenantID, agentID string) (ActivePolicyEnvelope, bool, error)
CurrentPolicy retrieves the authority's signed publication, bundle, and activation proof for one targeted agent. The caller must still verify all three objects against its locally pinned trust state.
func (*Client) CurrentTrust ¶
func (client *Client) CurrentTrust(ctx context.Context, tenantID string) (authority.TrustBundle, bool, error)
CurrentTrust retrieves the authority's current root-signed trust bundle for a tenant. The caller verifies it against an out-of-band pinned root before making it active.
func (*Client) FleetCommands ¶
func (client *Client) FleetCommands(ctx context.Context, tenantID, agentID string) ([]authority.FleetCommand, error)
FleetCommands retrieves the short-lived signed commands addressed to one agent. The caller must independently verify each command before execution.
func (*Client) FleetControl ¶
func (*Client) FleetStateMutations ¶
func (*Client) FleetStateSnapshot ¶
func (*Client) ManagementState ¶
func (client *Client) ManagementState(ctx context.Context, tenantID string) (ManagementState, error)
ManagementState retrieves the read-only control-plane snapshot used by an authenticated operator CLI or UI. The reference authority keeps this route loopback-only; callers using a remotely exposed management gateway supply its authenticated HTTP client. This helper validates structure only—local enforcement must still verify signed objects against its pinned root.
func (*Client) Publish ¶
func (client *Client) Publish(ctx context.Context, publication authority.PolicyPublication, bundle authority.PolicyBundle) (authority.RolloutStatus, error)
Publish submits a pre-signed policy publication and its exact pre-signed bundle through the authenticated management boundary. This client never signs policy state; an operator CLI is only a transport for tenant-owned authority artifacts.
func (*Client) PublishMandateBundle ¶
func (client *Client) PublishMandateBundle(ctx context.Context, bundle decision.MandateBundle) (decision.MandateBundle, error)
PublishMandateBundle submits a pre-signed full delegation snapshot. It is deliberately unable to create or modify tenant signatures.
func (*Client) PublishTrust ¶
func (client *Client) PublishTrust(ctx context.Context, bundle authority.TrustBundle) (TrustPublicationResult, error)
PublishTrust transports a pre-signed root trust bundle through the protected management boundary. It cannot create a root signature; the returned hash proves exactly which signed state the authority durably accepted.
func (*Client) Receipts ¶
func (client *Client) Receipts(ctx context.Context, tenantID string, limit int) ([]decision.Receipt, error)
Receipts reads the bounded authenticated evidence view. Returned objects retain their original enforcement signatures for independent verification.
func (*Client) ReportFleetActivity ¶
func (*Client) ReportFleetControlAcknowledgement ¶
func (*Client) ReportFleetNode ¶
func (*Client) ReportFleetResult ¶
func (*Client) ReportFleetStateMutationResult ¶
func (*Client) ReportFleetStateSnapshot ¶
func (*Client) Simulate ¶
func (client *Client) Simulate(ctx context.Context, request SimulationRequest) (decisionpolicy.RolloutSimulation, error)
Simulate evaluates a signed candidate without publishing or activating it.
type ManagementState ¶
type ManagementState struct {
Trust authority.TrustBundle `json:"trust"`
ActivePolicy authority.PolicyBundle `json:"active_policy"`
Rollouts []authority.RolloutStatus `json:"rollouts"`
MandateBundles []decision.MandateBundle `json:"mandate_bundles,omitempty"`
RecentReceipts []decision.Receipt `json:"recent_receipts,omitempty"`
RecentWorkflows []decisionhttp.WorkflowRecord `json:"recent_workflows,omitempty"`
UsageExport *decision.UsageExportStatus `json:"usage_export,omitempty"`
}
type NodeEnrollmentClaimResponse ¶
type NodeEnrollmentClaimResponse struct {
Version uint16 `json:"version"`
EnrollmentID string `json:"enrollment_id"`
TenantID string `json:"tenant_id"`
AgentID string `json:"agent_id"`
HarnessID string `json:"harness_id"`
DisplayName string `json:"display_name"`
RunID string `json:"run_id"`
PublicOrigin string `json:"public_origin"`
FederationEndpoint string `json:"federation_endpoint"`
Options NodeEnrollmentOptions `json:"options"`
Credential json.RawMessage `json:"credential"`
Policy json.RawMessage `json:"policy"`
ClaimedAt int64 `json:"claimed_at"`
}
NodeEnrollmentClaimResponse is the atomic one-time response consumed by pilotctl. It intentionally carries no tenant root or platform credential.
type NodeEnrollmentOptions ¶
type PublicationEnvelope ¶
type PublicationEnvelope struct {
Publication authority.PolicyPublication `json:"publication"`
Bundle authority.PolicyBundle `json:"bundle"`
}
type SimulationRequest ¶
type SimulationRequest struct {
Publication authority.PolicyPublication `json:"publication"`
Bundle authority.PolicyBundle `json:"bundle"`
Intents []decision.Intent `json:"intents"`
Inputs []decisionpolicy.SimulationInput `json:"inputs,omitempty"`
}
type TrustPublicationResult ¶
type TrustPublicationResult struct {
TenantID string `json:"tenant_id"`
Revision uint64 `json:"revision"`
BundleHash string `json:"bundle_hash"`
}
TrustPublicationResult is the durable identity returned after the authority accepts a root-signed trust/revocation update through its management plane.