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
- Variables
- func Decode(reader io.Reader) (Profile, []Problem, error)
- func ExecutorScopeName(identity openbaoauth.WorkloadIdentity) string
- func Parse(data []byte) (Profile, []Problem)
- func Render(profile Profile) ([]byte, error)
- func VerifyRendered(profile Profile, manifest []byte) error
- type LeaseTarget
- type NegativeIdentities
- type Problem
- type Profile
Constants ¶
const ( SchemaVersion = "cloudring.openbao-kubernetes-auth-executor/v1" MaxInputBytes = 128 * 1024 )
Variables ¶
var ( ErrInvalidProfile = errors.New("invalid OpenBao executor profile") ErrRenderedManifestDrift = errors.New("rendered OpenBao executor manifest drift") )
Functions ¶
func Decode ¶
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 Render ¶
Render returns the exact deterministic 10-object executor bundle. Every substituted value has passed DNS-label validation before template execution.
func VerifyRendered ¶
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 ¶
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 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.