S09-09 - Approvals
Purpose: What an approval adds, the checks that each request goes through, and approvals for a joining project.
Design
Section titled “Design”Before an approval request is shown, the rule it would add goes through a risk check. The check compares the policy with and without the rule, and reports what the rule adds. Findings are part of the request.
Only the user approves a request.
Approved rule
Section titled “Approved rule”An approval adds one rule of a fixed form:
- one exact host, with no wildcard;
protocol: rest;enforcement: enforce;access: read-only(GET, HEAD and OPTIONS);binaries: /**.
A write method needs a separate request (S07-17-approvals-and-learningS07-17-approvals-and-learning: Approvals and LearningHow an unknown destination reaches the user as an approval request, what an approval grants, and how learn mode collects names.,
“What an approval grants”). It adds a
rule of the same fixed form, with one named method and the exact path,
or path prefix, that the request used, in place of access: read-only.
Both forms only allow: no denies, no audit mode, no extension keys.
wb allow adds only a rule of the first form. It never adds a pass
host or a raw TCP entry (S07-15-non-http-streamsS07-15-non-http-streams: Non-HTTP StreamsHow wb-proxyd checks the protocol of each stream, and what it does with SSH, other protocols and raw TCP.).
Host name
Section titled “Host name”The host in an approved rule comes from the guest. It must pass the same ASCII, control-byte and length rules as policy strings before the risk check or the prover sees it. Otherwise the request stays denied, and is logged with the rule.
Checks
Section titled “Checks”Each check reports under a name. The first four take their names from OpenShell’s proposal risk check.
link_local_reach(OpenShell): the rule reaches a link-local or cloud metadata address.credential_reach_expansion(OpenShell): the rule gives a host and port with a credential binding reach it didn’t have.capability_expansion(OpenShell): the rule adds a method on a host that already had reach with a credential.l7_bypass_credentialed(OpenShell’s name, Wraith Box’s meaning): the rule puts a host with a credential binding into pass mode, or gives it an L4-only endpoint.- Wraith Box only: a first write method on a host without a credential (S07-17-approvals-and-learningS07-17-approvals-and-learning: Approvals and LearningHow an unknown destination reaches the user as an approval request, what an approval grants, and how learn mode collects names., “What an approval grants”).
- Wraith Box only: a shared object-storage host or a wildcard over one, and signature parameters on a write method (X22-no-guest-credentialsX22-no-guest-credentials: Clients without guest credentialsWhich common clients (Homebrew against ghcr.io, git, gh, npm, pip, uv, SwiftPM, Go, cargo, Claude Code) break when wb-proxyd removes every guest-supplied Authorization header and cookie on inspected hosts?, and S07-08-requests-and-credentialsS07-08-requests-and-credentials: Requests and CredentialsThe form of each request wb-proxyd sends upstream, and how it removes the guest's credentials and injects bound ones., “Signed URLs”).
- Wraith Box only: a host that mirrors a gated registry (S07-12-dependency-gateS07-12-dependency-gate: Dependency GateHow wb-proxyd keeps young and vulnerable package versions from the guest on the gated registries., the condition on which T07-ungated-sourcesT07-ungated-sources: Dependencies from ungated sourcesThe dependency gate (SEC07-dep-gate) covers the npm, PyPI, Go module proxy and crates.io hosts only. was accepted).
Why l7_bypass_credentialed matters
Section titled “Why l7_bypass_credentialed matters”wb-proxyd injects credentials only into inspected HTTP. So no program
that doesn’t speak HTTP gets a credential, and this is the bypass that
matters.
OpenShell keys this check on its list of known programs. It never
reports a /** rule (X24-openshell-artifactsX24-openshell-artifacts: OpenShell artifactsDo the OpenShell parts that S07-egress-gateway, S09-policy-credentials-audit and S10-tech-stack build on exist in the assumed form, under a permissive license, at a version that can be pinned: the networkpolicies sche…).
Source
Section titled “Source”The risk check is Go code in wb-hostd. It:
- follows the four categories and names of OpenShell’s check at v0.1.2;
- adds Wraith Box’s own checks (“Checks”);
- runs OpenShell’s cases as its tests.
Boundary
Section titled “Boundary”A request whose rule would leave the boundary isn’t shown.
The prover checks the rule alone, in the approved form, against the boundary. An approved rule only allows. So a rule inside the boundary can’t take a policy that is inside it outside. The user’s own policy is checked at session start for that reason (S09-04-boundary-checkS09-04-boundary-check: Boundary CheckThe check of a project's policy against the boundary policy with OpenShell's prover, and which policy it checks when.).
A refusal is logged as a Device Config State Change (5019) event.
Limits
Section titled “Limits”The guest triggers approval requests: one per unknown name it looks up, outside the guest OS’s background list and the hosts of parts that are off (S07-03-dnsS07-03-dns: DNSHow wb-netd answers the guest's DNS queries: synthetic addresses, the name form, negative answers and the wildcard budget.). So prover runs are bounded (SEC13-bounded-resourcesSEC13-bounded-resources: Bounded resourcesCPU, memory and disk of each VM are capped.).
- Requests are deduplicated by host.
- Each VM has limits on pending and new requests (S09-10-approval-flowS09-10-approval-flow: Approval FlowHow an approval request for a name behaves, from the lookup that raises it to its answer or its expiry.).
- A deny holds until the sessions running at the deny have ended.
- An answer given after the VM’s sessions changed is refused. The request is shown again as a new request (S09-10-approval-flowS09-10-approval-flow: Approval FlowHow an approval request for a name behaves, from the lookup that raises it to its answer or its expiry., and S07-04-dns-refusalsS07-04-dns-refusals: DNS RefusalsHow wb-netd refuses a name: approval events, the hold before each refusal, quiet refusals, and the answer that is the same for every reason., “Deny duration”, “Session set at the answer”).
- Each VM has a cap on concurrent prover runs (S04-architectureS04-architecture: ArchitectureName the processes, the boundaries between them, and which requirement each boundary serves.).
- Boundary results are cached per host, port and rule form, keyed on the SHA-256 of the boundary document. So a changed boundary is checked again.
A request over a limit stays denied, and is logged with the rule that limited it.
Failure
Section titled “Failure”A request whose risk check or boundary check fails or can’t run can’t be approved. The destination stays denied, and the failure is logged.
Join approval
Section titled “Join approval”The risk check can find something in a joining project’s rules and bindings, compared with the VM’s current union (S07-01-per-vm-policyS07-01-per-vm-policy: Enforced per VMWhy the VM is the unit the gateway enforces, how the policies of its projects combine, and what happens when they conflict or change.). The session start then waits on a join approval.
It is delivered like any approval request. It lists:
- the joining project;
- the projects already in the VM;
- each finding.
The answer is a Device Config State Change (5019) event. It records:
- the projects;
- the findings;
- the decision;
- the SHA-256 of the joining project’s policy and of the union, without a held source if the VM has one (S07-01-per-vm-policyS07-01-per-vm-policy: Enforced per VMWhy the VM is the unit the gateway enforces, how the policies of its projects combine, and what happens when they conflict or change., “Session end”).
An approval is cached on that pair. So the next start with the same policy and the same union doesn’t ask again. Any change to either asks again.
A denial, or no answer before the request expires, refuses the start.
Expiry
Section titled “Expiry”The set a join approval records holds the sessions in the VM and the
waiting wb process. The request expires:
- when that
wbexits; - when the VM’s set of sessions changes before the answer.
The expiry is a Device Config State Change (5019) event, with the rule
approval-expired, and the start is refused.
Delivery
Section titled “Delivery”Approval requests are delivered:
- as native notifications, through the platform’s notification helper (S12-platformsS12-platforms: PlatformsWhich host and guest operating systems Wraith Box targets, how platform-specific code is isolated, what each platform uses, and how wb works inside WSL.);
- through
wb approve/wb deny.
They are never written to the terminal stream of an agent session, which the guest controls.
Guest-influenced text in a request is stripped of control and escape sequences wherever it is shown.
Decisions
Section titled “Decisions”Wraith Box’s own risk check, in Go
Section titled “Wraith Box’s own risk check, in Go”- Why: OpenShell’s check can’t be run as it is. It is a Rust
library API that OpenShell’s gateway calls. It isn’t in the
standalone
openshell-proverbinary (X24-openshell-artifactsX24-openshell-artifacts: OpenShell artifactsDo the OpenShell parts that S07-egress-gateway, S09-policy-credentials-audit and S10-tech-stack build on exist in the assumed form, under a permissive license, at a version that can be pinned: the networkpolicies sche…). - Decided: I35I35 (closed): X24-openshell-artifacts: OpenShell artifactsX24-openshell-artifacts (added to S11-verification-and-spikes in #14) (B35-openshell-artifactsB35-openshell-artifacts: Do the OpenShell parts the specs reuse exist as assumed?Yes, with conditions., S10-tech-stackS10-tech-stack: Technology ChoicesFix languages, libraries, packaging, and repository layout, with the reason for each choice.).
Approvals are bound by the boundary
Section titled “Approvals are bound by the boundary”- Decided: I35I35 (closed): X24-openshell-artifacts: OpenShell artifactsX24-openshell-artifacts (added to S11-verification-and-spikes in #14) (B35-openshell-artifactsB35-openshell-artifacts: Do the OpenShell parts the specs reuse exist as assumed?Yes, with conditions.).
Status: Draft