Skip to content

#216 docs: add design doc for fetch credential references - #230

Merged
gregoryfoster merged 2 commits into
mainfrom
216-design
Nov 23, 2026
Merged

gregoryfoster merged 2 commits into
mainfrom
216-design

Conversation

@gregoryfoster

Copy link
Copy Markdown
Member

Refs #216

The design for resolving ContentFetchCommand.credential_headers (cannobserv#577, co-core 0.51.1). It contains no code. This PR waits for the operator's approval of the doc. Merging it is the approval.

Inputs: the brief (issuecomment-7088910682), the pickup corrections (issuecomment-7090721729) and upstream's approved design.

What it decides

  • D1: a binding table frozen at boot, REPLICATOR_FETCH_CREDENTIALS_FILE, in AliasTable's shape. Each entry is header + hosts (in PolicyHost form) + value_file.
  • D2: the value is held in a SecretStr and read at boot.
  • D3: a per-command scope transport, outermost, driven by a ContextVar. It refuses out-of-scope hops before they're sent, never mutates the request it's handed, and holds a cookie jar per command.
  • D4: the handler's refusal order, and which token each check gets.
  • D5: credentials under browser are refused.
  • D6: the two tokens.
  • The charter check.

Operator calls (approving the doc approves each recommendation)

  1. The cookie jar lives for one command, not the worker's life. This is a behaviour change, in its own commit. A jar that never stores would break a cookie set on a redirect, which works today [measured].
  2. The value is read at boot, so rotation is a restart.
  3. A binding pins its header name. This closes a header-reflection path for a hostile command.
  4. Port 443 only.
  5. credential_refused wins over destination_refused on a hop that is both.

Gates

Suite 2074 passed, 2 skipped (matches the base c08b818); ruff clean.

🤖 Generated with Claude Code

Resolves ContentFetchCommand.credential_headers (cannobserv#577, co-core
0.51.1) against a binding table frozen at boot, and scopes each value per
hop in a ContextVar-driven transport outside the destination guard. The doc
carries the handler's refusal order and token per check, the charter check,
and five operator calls: a cookie jar per command, values read at boot, a
binding that pins its header, port 443 only, and credential_refused winning
over destination_refused on a hop that is both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The operator approved the five calls as recommended: a per-command
cookie jar, values read at boot, a binding pins its header, port 443
only, credential_refused before destination_refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gregoryfoster
gregoryfoster merged commit c2b9dd5 into main Nov 23, 2026
4 checks passed
@gregoryfoster
gregoryfoster deleted the 216-design branch November 23, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant