openbaoexecutor

package
v0.1.0-c02.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 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 openbaoexecutor renders the temporary Kubernetes identities, Lease, and least-privilege RBAC required by the protected OpenBao bootstrap executor. It accepts no credentials, endpoints, certificates, or tokens.

Index

Constants

View Source
const (
	SchemaVersion = "cloudring.openbao-kubernetes-auth-executor/v1"
	MaxInputBytes = 128 * 1024
)

Variables

View Source
var (
	ErrInvalidProfile        = errors.New("invalid OpenBao executor profile")
	ErrRenderedManifestDrift = errors.New("rendered OpenBao executor manifest drift")
)

Functions

func Decode

func Decode(reader io.Reader) (Profile, []Problem, error)

Decode reads one bounded profile and rejects duplicate, unknown, trailing, or structurally invalid JSON without reflecting input values.

func ExecutorScopeName

func ExecutorScopeName(identity openbaoauth.WorkloadIdentity) string

ExecutorScopeName returns the stable cluster-scoped object name for one executor identity. Length prefixes make the preimage unambiguous, while the versioned domain and 160-bit SHA-256 prefix keep the DNS label at 63 bytes.

func Parse

func Parse(data []byte) (Profile, []Problem)

Parse strictly decodes and validates one in-memory profile.

func Render

func Render(profile Profile) ([]byte, error)

Render returns the exact deterministic 10-object executor bundle. Every substituted value has passed DNS-label validation before template execution.

func VerifyRendered

func VerifyRendered(profile Profile, manifest []byte) error

VerifyRendered proves byte-for-byte parity with the public renderer. This is intentionally stricter than semantic YAML equality so transforms, extra fields, preclaimed Leases, and widened RBAC cannot hide in formatting.

Types

type LeaseTarget

type LeaseTarget struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

LeaseTarget names the pre-created, initially empty coordination Lease. Its name must equal ExecutorScopeName(executorIdentity), which safely scopes the cluster-wide RBAC to that Kubernetes identity.

type NegativeIdentities

type NegativeIdentities struct {
	WrongServiceAccount openbaoauth.WorkloadIdentity `json:"wrongServiceAccount"`
	WrongNamespace      openbaoauth.WorkloadIdentity `json:"wrongNamespace"`
}

NegativeIdentities isolate the two Kubernetes-auth binding dimensions.

type Problem

type Problem struct {
	Path string `json:"path"`
	Code string `json:"code"`
}

Problem is a stable, value-free validation result safe for logs and tests.

func Validate

func Validate(profile Profile) []Problem

Validate enforces the exact identity relationships assumed by the executor state machine and renderer.

type Profile

type Profile struct {
	SchemaVersion      string                       `json:"schemaVersion"`
	Contract           openbaoauth.Contract         `json:"contract"`
	ExecutorIdentity   openbaoauth.WorkloadIdentity `json:"executorIdentity"`
	Lease              LeaseTarget                  `json:"lease"`
	NegativeIdentities NegativeIdentities           `json:"negativeIdentities"`
}

Profile binds one validated OpenBao workload contract to an ephemeral Kubernetes executor boundary. The positive workload identity and dedicated negative namespace are owned by the consumer installation and are deliberately not rendered by this package.

Jump to

Keyboard shortcuts

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