Repository navigation
Description
Ruled 2026-10-21 (naming, enums, the command runner, the execution model: recorded on #520)
The authz provider is the one package that fulfils a unit's authorization requirement. A unit names an offer; the provider resolves it through its broker router to a configured broker and returns a grant and a lease. Across the three substrates the draft specification names, the grant is: a session on a command runner standing for an account (command execution; when the account is root this is an elevation); a token or credential bundle bridged to a consumer such as appnet (network and service access); a credential injected into a sandbox (sbx; nothing in the tree yet).
Names. Package pkg/op/provider/authz; authz.Provider, authz.ProviderConfig, authz.Broker, authz.BrokerConfig; the term in prose is authorization. The design document is 6.1-authorization.md with 6.1-authorization.status.md, superseding 6.1-privilege-elevation.md; the draft of 2026-10-16 is its source and lands through its own task. elevator is dead and is removed (#679); flow.Provider has no Elevate today, so nothing moves out of flow.
What is settled, and what the draft must change to match.
- Broker interface
{Type, Acquire, Revoke}and a provider-owned router built from the resolved config, per 3.2 § Pluggable brokers: the router is itself aBroker, and the pattern is recursive. No global registry. - Strategy and grant kind are string enums; the empty string is the zero value and means defer. The draft's int constants are replaced.
- There is no
Modeand no "whether": a unit's command declares the account it needs, and the runner standing for that account runs it. A runner under the caller's own account needs no grant. ProcessSpawnowns no worker. Its grant is a session on a runner from the pool (6.2, to be revised onto the account axis and the daemon model).- Every action takes an activation record and returns a product, a receipt and an error; the lease is the receipt, committed and pushed by the executor. The draft's
Authorize(req)gains the record, and "registered on the RecoveryStack" becomes "returned as the receipt". - Preflight: the graph-only check (every referenced offer is declared) sits in
op.ValidateGraph; the config cross-check needs the resolved profile and sits inGraphExecutor.Run's preflight. - Config:
authz.ProviderConfigfollows the pattern that exists,op.PoliciesConfig(AnnounceSection,devconfig.SectionBase), until the recursive tree lands; its path isproviders.authz, not top-level. - In the daemon model the provider is the client side: it requests; the broker daemon holds the policy, decides and routes. Where offers and brokers are configured, client or broker or both, is open.
Open, for the plan (the gap analysis on #520 has the full list): before or after the workflow rename (#451); where the fallback chain lives; the grant's slot type and what Zero() guarantees for the token case, given a promise result is retained on the stack; which substrates in the first cut; the headless case; the default host-escalation offer and whether writ asks by name.
First tasks, to be filed under this feature.
6.1-authorization.mdlands from the draft, corrected as above, with its status companion;6.1-privilege-elevation.mdand its status retire.pkg/op/provider/authz: the types, the broker interface, the router, string enums, the action signatures; announced;elevatorremoved (elevator is removed: the stub is dead, and its rename plan is withdrawn #679 closes into it).- The host-escalation broker:
Acquirereturns a runner session from the pool by account;Revokereleases it. pkg/platform:runCommand(argv, sudo bool)andrunWindowsCommand(command, elevated)go; each manager backend declares its account and obtains its runner (Route pkg/platform's inlined sudo -n through the elevation model #527 is this task).- Preflight: the two checks above.
- The Starlark surface for naming an offer on a unit, with Plan provider: the workflow-authoring surface (plan.*) #856.
Evidence of completion
-
6.1-authorization.mdis in the tree and6.1-privilege-elevation.mdis not -
pkg/op/provider/authzis announced, imported by the executor, andpkg/op/provider/elevatoris gone -
pkg/platformpasses nosudoboolean anywhere; every privileged command runs on a runner obtained by account - A unit naming an unconfigured offer is refused at preflight with
ReasonPreflightFailed -
writ deployof aSystem/tree on a Unix host succeeds from an unprivileged shell, through the runner standing for root (David-Noble-at-work/personal#289's acceptance)
Plan and design documents
| Kind | Document |
|---|---|
| Plan | Not yet opened |
| Design | 6.1-authorization.md, to land from the 2026-10-16 draft (task 1) |
Activity