Documentation
¶
Overview ¶
Package workloadidentity signs scheduling leases for hosts with workload credentials.
Index ¶
Constants ¶
const LeaseTTL = 10 * time.Minute
LeaseTTL leaves time for several reconciliation retries before expiry.
const RenewInterval = 2 * time.Minute
RenewInterval bounds healthy workload polling when lease signing is enabled.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Policy ¶
type Policy struct {
Namespace string `json:"namespace"`
Identity *runtimev2.WorkloadIdentity `json:"identity"`
}
Policy is an operator-controlled identity grant, resolved within its namespace. Approved digests identify uncompressed Wasm bytes, never OCI manifests.
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer holds a local Ed25519 key and fixed identity policy. Sequence numbers must be durably reserved by the caller before a minted lease is published.
func Load ¶
Load reads a JSON signing configuration and a PEM PKCS#8 Ed25519 key. A relative private_key_file is resolved against the configuration directory.
func (*Signer) Mint ¶
func (s *Signer) Mint( hostID, workloadID, namespace, identityRef string, owner *runtimev2.WorkloadOwner, sequence uint64, now time.Time, ) (*runtimev2.WorkloadIdentity, error)
Mint signs a compact JWS for exactly this placement. The JWS itself is the issuer token, preventing an unsigned opaque token from poisoning issuance.