federationbinding

package
v0.51.3 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package federationbinding is the public producer contract for StackKits' provider-free external Federation link handshake. An external fabric authority builds the opaque, unsigned binding for one compiler-derived FederationLinkRequirement; the local Owner signs and adopts it with `stackkit federation binding adopt`. The package never creates a fabric, a key, an interface or an endpoint, and it accepts no provider, credential or lifecycle field.

Index

Constants

View Source
const (
	RequirementAPIVersion = "stackkit.federation-link-requirement/v1"
	BindingAPIVersion     = "stackkit.external-federation-link-binding/v1"
	Capability            = "inter-site-link"
	MaxValidity           = 24 * time.Hour

	SchemeBinding = "federation-link-binding"
	SchemeFabric  = "federation-link-fabric"
	SchemeCustody = "federation-link-custody-attestation"
)

Variables

This section is empty.

Functions

func ComputeHash

func ComputeHash(binding Document) (string, error)

ComputeHash is the canonical hash of the binding body without bindingHash.

func OpaqueReference

func OpaqueReference(scheme string, evidence []byte) (string, error)

OpaqueReference hashes evidence into an opaque reference of one scheme.

func Validate

func Validate(binding, requirement Document) error

Validate checks a binding against its exact requirement, the closed v1 shape, opaque references, canonical UTC timestamps, the 24 hour maximum validity and the binding hash.

Types

type Document

type Document map[string]any

func Build

func Build(requirement Document, input Input) (Document, error)

Build returns the unsigned binding for one requirement. The result passes Validate against that same requirement.

type Input

type Input struct {
	BindingEvidence  []byte
	FabricEvidence   []byte
	CustodyEvidence  []byte
	StackKitsVersion string
	CandidateDigest  string
	IssuedAt         time.Time
	ValidUntil       time.Time
}

Input is everything the fabric authority adds to the requirement. The three evidence values are hashed into opaque references and never emitted.

Jump to

Keyboard shortcuts

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