authorityhttp

package
v1.13.10-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: AGPL-3.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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.

func (*AgentRequestSigner) Sign

func (signer *AgentRequestSigner) Sign(request *http.Request, tenantID, agentID string) error

Sign binds the method, normalized path and query, tenant, node identity, delegated key, short-lived timestamp, nonce, and empty-body digest.

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(endpoint string, httpClient *http.Client) (*Client, error)

func (*Client) Acknowledge

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 *Client) FleetControl(ctx context.Context, tenantID, agentID string) (authority.FleetNodeControl, bool, error)

func (*Client) FleetStateMutations

func (client *Client) FleetStateMutations(ctx context.Context, tenantID, agentID string) ([]authority.FleetStateMutation, error)

func (*Client) FleetStateSnapshot

func (client *Client) FleetStateSnapshot(ctx context.Context, tenantID, agentID string) (authority.FleetStateSnapshot, bool, error)

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 *Client) ReportFleetActivity(ctx context.Context, activity authority.FleetActivity) error

func (*Client) ReportFleetControlAcknowledgement

func (client *Client) ReportFleetControlAcknowledgement(ctx context.Context, acknowledgement authority.FleetControlAcknowledgement) error

func (*Client) ReportFleetNode

func (client *Client) ReportFleetNode(ctx context.Context, report authority.FleetNodeReport) error

func (*Client) ReportFleetResult

func (client *Client) ReportFleetResult(ctx context.Context, result authority.FleetCommandResult) error

func (*Client) ReportFleetStateMutationResult

func (client *Client) ReportFleetStateMutationResult(ctx context.Context, result authority.FleetStateMutationResult) error

func (*Client) ReportFleetStateSnapshot

func (client *Client) ReportFleetStateSnapshot(ctx context.Context, snapshot authority.FleetStateSnapshot) error

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.

func (*Client) Status

func (client *Client) Status(ctx context.Context, publicationID string) (authority.RolloutStatus, error)

Status returns the authority's durable rollout view for one publication.

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 NodeEnrollmentOptions struct {
	ActionControl bool `json:"action_control"`
	FleetControl  bool `json:"fleet_control"`
	StateSync     bool `json:"state_sync"`
	Apps          bool `json:"apps"`
}

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.

Jump to

Keyboard shortcuts

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