Documentation
¶
Overview ¶
Package federationcontrol binds the existing StackKits server to Home-issued Federation actions. It owns no fabric, provider lifecycle or identity issuer.
Index ¶
Constants ¶
const ActionPath = "/api/v1/federation/control/actions"
const ActionSchema = "stackkit.federation-remote-action/v1"
const StatusPath = "/api/v1/federation/control/status"
Variables ¶
This section is empty.
Functions ¶
func BindReceiver ¶
func BindReceiver(root string, c ReceiverCustody) error
func Handler ¶
Handler never substitutes forwarded certificates or ordinary API credentials for live TLS proof. Its journal is durable before dispatch and survives a server restart; an interrupted command remains consumed and fails closed.
func NewServer ¶
NewServer is mounted by the existing stackkit-server process. It is a Cloud receiver for Home-initiated requests, not a Cloud-to-Home management tunnel.
func WithdrawReceiver ¶
Types ¶
type Action ¶
type Action struct {
Schema string `json:"schema"`
Action string `json:"action"`
Nonce string `json:"nonce"`
IdempotencyKey string `json:"idempotencyKey"`
PlanHash string `json:"planHash"`
OwnerRef string `json:"ownerRef"`
HomeSiteRef string `json:"homeSiteRef"`
TargetSiteRef string `json:"targetSiteRef"`
TargetNodeRef string `json:"targetNodeRef"`
ExecutionChannelRef string `json:"executionChannelRef"`
IssuedAt time.Time `json:"issuedAt"`
ExpiresAt time.Time `json:"expiresAt"`
Approval json.RawMessage `json:"approval,omitempty"`
Signature localevidence.OwnerPolicyStateSignature `json:"signature"`
}
Action is the closed CUE remote-action envelope. Approval is preserved for the separate Home human-authentication verifier; this slice admits no mutation.
func DecodeAction ¶
type Denial ¶
type Endpoint ¶
type Endpoint struct {
URL string `json:"url"`
ServerCertificateSHA256 string `json:"serverCertificateSHA256"`
RootCertificatePath string `json:"rootCertificatePath"`
CertificatePath string `json:"certificatePath"`
PrivateKeyPath string `json:"privateKeyPath"`
}
Endpoint is selected locally by Home, never accepted in a remote Action.
type HomeTrust ¶
type HomeTrust struct {
OwnerRef string `json:"ownerRef"`
KeyID string `json:"keyId"`
PublicKey string `json:"publicKey"`
HomeSiteRef string `json:"homeSiteRef"`
ClientCertificateSHA256 string `json:"clientCertificateSHA256"`
RootCertificatePEM string `json:"rootCertificatePEM"`
ValidUntil time.Time `json:"validUntil"`
}
HomeTrust is explicit public custody admitted at Cloud. Withdrawing or replacing it takes effect on every request, including an existing TLS socket.
type ReceiverCustody ¶
type ReceiverCustody struct {
Trust HomeTrust `json:"trust"`
Policy runtimeexecutorlocal.FederationControlAgentApplyPolicy `json:"policy"`
PlanPath string `json:"planPath"`
PlanHash string `json:"planHash"`
Executable string `json:"executable"`
ExecutableSHA256 string `json:"executableSHA256"`
ExecutableVersion string `json:"executableVersion"`
ServerName string `json:"serverName"`
CertificatePath string `json:"certificatePath"`
PrivateKeyPath string `json:"privateKeyPath"`
Active bool `json:"active"`
}
ReceiverCustody supplies local handles only. It is never an Action payload. TLS keys are externally issued and held in confined files, not transported in this record or in an action. Only the selected Cloud node may receive.
type Result ¶
type Result struct {
Schema string `json:"schema"`
ActionDigest string `json:"actionDigest"`
Action string `json:"action"`
PlanHash string `json:"planHash"`
Status string `json:"status"`
ObservedAt time.Time `json:"observedAt"`
Output json.RawMessage `json:"output,omitempty"`
ReasonCode string `json:"reasonCode,omitempty"`
MutateCapabilities string `json:"mutateCapabilities"`
}