Skip to main content
ctrlrun.context — function, defined at src/ctrlrun/control.py:140
Bind the principal for calls made inside the block. A protected function called outside any context() has no principal and is denied (SPEC-v0.1 §2.1). environment was a parameter here until v0.3 and is gone (SPEC-v0.3 §2.5). A grant may scope to an environment, which makes it an authorization input, and an authorization dimension the subject sets is not one — the same argument that removes --principal-from-client-info from the gateway. It is set once on the Control now, so every Action a deployment proposes carries the deployment’s own answer. Where an IdentityProvider is installed, the principal named here is a hint rather than an identity: the provider wins where it answers (§3.2).

Next