Skip to content

Withhold operator credential headers from guest code - #55

Merged
jimhoyd merged 2 commits into
mainfrom
codex/auth-extension-foundation
Sep 17, 2026
Merged

jimhoyd merged 2 commits into
mainfrom
codex/auth-extension-foundation

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Problem and change

PR #54 proposes keeping authentication credentials out of guest code, but the runtime forwards incoming headers to guest requests and header-derived parameters. Add an operator-only Plugin.credentialHeaders declaration that snapshots a case-insensitive union at activation and withholds those headers from all application contexts, function arguments, guest requests and native redirect mappings. Host plugins and policies retain the original headers.

Document the implementation sequence for auth, admin and UI extensions, incorporating the review's security and consistency corrections. Live provider deployment testing remains deferred and non-blocking.

Verification

  • Six focused regression tests cover guest functions, public routes, middleware, parameter/default handling, required-input refusal, activation snapshots, backwards compatibility, declaration validation and original host cache keys.
  • npm run verify: 329 passed, 0 failed, 1 existing HTTPS fixture skipped (no trusted local certificate). Initial sandbox run could not bind localhost; the rerun with local networking passed.
  • npm run test:package: passed packed installation, starter/cookbook, persistent live-link and TypeScript declaration checks.
  • git diff --check: passed.

Compatibility and security

No YAML or default behavior changes. Selecting Cookie withholds the entire header. This provides credential withholding, not authentication or cache protection; sessions, auth policies and extension routes remain pending. Cloudflare still does not support host plugins. Starter routes are unchanged because this is an optional operator API.

  • Changes match the documented portable contract; docs/examples are updated where needed.

  • No credentials, customer data or private project material are included.

  • Runtime/starter changes remain aligned where applicable.

  • Relevant tests and package checks pass; limitations are explained above.

Resolve conflicts with the merged behavior and ecosystem phases: keep
the signal-emitting finishResponse from main alongside the credential-free
guest header projection, and keep both new documentation rows.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AQ3ZGqNtWviSYfUMsxU54E
@jimhoyd
jimhoyd merged commit 6a28820 into main Sep 17, 2026
12 checks passed
@jimhoyd
jimhoyd deleted the codex/auth-extension-foundation branch September 17, 2026 21:10
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.

2 participants