Skip to main content

Module mesh

Module mesh 

Source
Expand description

mesh.hyprstream.io/v1alpha1 — TenantBinding.

TenantBinding is the confused-deputy fix from the epic #778 threat table: an explicit, admin-created mapping between a Kubernetes namespace and a hyprstream tenant. Creating one is gated by the federation:register scope. The reconcilers (K5b) treat a binding as the only authority that lets a resource in namespace N reference tenant T; any cross-binding reference a TenantBinding does not cover is refused at admission.

It is deliberately cluster-scoped: a tenant confined to its own namespace must not be able to author the very binding that would grant it a tenant identity. Only a cluster admin (holding federation:register) may create these.

§CRD → grant compilation (#929)

A TenantBinding is an admin-authorable surface, never itself the authority: when TenantBindingSpec::entitlement is set, the operator compiles it into an issuer-signed UCAN grant (the operator signs as issuer) and a PDS allocation record that lands in the tenant’s inventory (PDS collection ai.hyprstream.ledger.allocation). The enforcers (#781/#787/#790/#793/#794/#527) verify the presented grant, not the CRD — the CRD only carries authorable intent. The compiled CIDs + epoch are recorded in TenantBindingStatus as observed truth.

Non-goal (per #921): a Kubernetes ResourceQuota as a central counter. The grant is a held, offline-verifiable capability; accounting lives in the cell ledger, never in a cluster-wide quota object.

Structs§

TenantBinding
Explicit, admin-created namespace ↔ hyprstream-tenant binding (the confused-deputy guard, gated by federation:register). Cluster-scoped so a tenant cannot forge its own binding. When spec.entitlement is set, the operator compiles it into an issuer-signed grant that lands in the tenant’s inventory (#929).
TenantBindingSpec
Desired state of a TenantBinding: namespace ↔ hyprstream tenant.
TenantBindingStatus
Observed truth for a TenantBinding. Written only by the operator.
TenantEntitlement
The authorable entitlement carried by a TenantBindingSpec.

Enums§

TenantGrantClass
Service-neutral grant classification.