S07-10 - Anonymous Credentials
Purpose: How wb-proxyd answers hosts that want a token even for
public reads, without forwarding the guest’s token.
Design
Section titled “Design”Anonymous credentials
Section titled “Anonymous credentials”Some hosts answer public reads only to a request with a token.
wb-proxyd doesn’t forward the guest’s token for those, not even one
the host issued in the same session. A host-side binding with a fixed
public value injects one instead (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., “Credential replacement”).
The package registries profile has one: Authorization: Bearer QQ==
on GET and HEAD of ghcr.io /v2/homebrew/core/. That is the value
Homebrew itself sends.
- On those paths, any method other than GET and HEAD is refused. It is
logged with the rule
anonymous-binding-read-only. - Without the binding, every bottle download fails with a 401, because
brewnever asks the token endpoint for a token. ghcr.io/tokenis denied to the guest. No client needs it once the binding answers.
Token fallback
Section titled “Token fallback”If ghcr.io stops accepting the fixed value, wb-proxyd fetches an
anonymous token itself, by the documented flow
(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?). It injects that token in place of the
fixed value.
- The URL.
wb-proxydbuilds it itself: hostghcr.io, path/token, the parameterservice=ghcr.io, and the scoperepository:homebrew/core/<name>:pull, percent-encoded.<name>comes from the request path. It must match the OCI distribution specification’s repository-name grammar and the binding’s path rule, or the request is refused.- The URL never comes from the realm of a
WWW-Authenticateheader.
- Credentials.
wb-proxyddoesn’t send a credential with the fetch. - The response. It is read up to a fixed size, and a larger one
fails the fetch. Its
expires_inis clamped to a range fixed in code. - Cache and rate. A token is cached per scope until it expires.
Fetches are rate-limited per VM. A request over the rate is refused
with the rule
anonymous-token-cap(SEC13-bounded-resourcesSEC13-bounded-resources: Bounded resourcesCPU, memory and disk of each VM are capped.). - Retries. A request that gets a 401 with a freshly fetched token isn’t retried. The 401 goes to the guest, and is logged.
- Audit. Each fetch is a Network Activity (4001) event, with the
rule
anonymous-token-fallback(SEC10-auditSEC10-audit: AuditEvery egress decision, approval, and returned change is recorded on the host in a persisted log the guest cannot alter.).
Accepted gaps
Section titled “Accepted gaps”These fail or stay unknown in V1V1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there.:
brewalso readsghcr.io/v2/homebrew/command-not-found/.- Bottles of third-party taps can be on
ghcr.io, outsidehomebrew/core. - Claude Code sends a built-in
DD-API-KEYheader to Datadog’s log intake.
The first two are outside the profile and the anonymous binding, and fail in V1V1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there.. Datadog’s host stays out of the model API profile. It is an unknown destination like any other.
Decisions
Section titled “Decisions”A fixed public value for anonymous reads
Section titled “A fixed public value for anonymous reads”A host-side binding injects Homebrew’s own public value on reads of
ghcr.io /v2/homebrew/core/.
- Rejected:
- Forwarding guest tokens on reads only. It forwards an attacker’s token on every GET, and a placeholder without a binding then fails the request.
- Forwarding only tokens that the host issued in this session. It doesn’t fix Homebrew.
Status: Draft