Expand description
Binding values an enforcer computes from its own install.
A binding tells a workload which resource to use, such as the bucket
behind ALIEN_UPLOADS_BINDING. On a protected install the control plane
must not choose it, or it could point the vendor’s code at another
customer’s bucket. Each value comes from the first of:
binding_env: setup names each owned resource<prefix>-<id>, so for most types the value follows from the install’s prefix, account and region. The engine and every enforcer use this one function, and a test in the engine checks that its controllers produce the same values.- The enforcer’s own cloud reads, for types whose value isn’t a name (a database endpoint, a service URL): it describes the resource it finds by the derived name or setup’s tag in its own install.
- A signed
config/v1, for resources outside the customer’s cloud.
resolve_bindings applies that order. The control plane supplies none of
them.
Structs§
- Binding
Context - Where an enforcer runs, as it learned from its own identity.
- Bindings
- Binding values derived from the install, and the bindings that need another source.
- OwnBinding
Facts - What an enforcer knows about the resource a workload runs as, to check the workload’s own binding against. The binding tells the workload’s code where to reach itself, so every field that picks a destination has to come from the install, not from the control plane.
Constants§
- DEPLOYER_
SECRETS_ VAULT - Id of the vault a deployer writes its own secrets into.
Functions§
- binding_
env - The value of every binding in
bindings(resource id to resource type) that follows from the install, by environment name. - binding_
env_ name - The environment variable that carries binding
id. - binding_
env_ with binding_env, whereliveholds the ids of the signed stack’s Live resources. A Live resource is created by its controller, which names a GCP queue’s subscription<topic>-suband keeps a KV store in the(default)Firestore database, in the collectionkv-<prefix>-<id>; a Frozen one is created by setup, which names them differently.- check_
own_ binding - Check
value, a workload’s own binding, againstfacts: the binding of the platform the workload runs on, naming the workload’s own resource and nothing else, with no field the install doesn’t decide and every URL one offacts.urls. - resolve_
bindings - Every binding’s value, by environment name: derived values first, then
what the enforcer read from its own cloud (by resource id), then values a
verified
config/v1carries (by resource id). A source never overrides an earlier one, and a binding none of them covers is refused by name.