workloadidentity

package
v2.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 14 Imported by: ? 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 workloadidentity signs scheduling leases for hosts with workload credentials.

Index

Constants

View Source
const LeaseTTL = 10 * time.Minute

LeaseTTL leaves time for several reconciliation retries before expiry.

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

func Load(path string) (*Signer, error)

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 NewSigner

func NewSigner(keyID string, key ed25519.PrivateKey, policies []Policy) (*Signer, error)

NewSigner copies key and policy so callers cannot change grants after setup.

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.

Jump to

Keyboard shortcuts

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