Skip to content

feat(host-cloudflare): ExecutorInternal service-binding entrypoint - #12

Merged
fforres merged 1 commit into
skywardfrom
feat/executor-internal-entrypoint
Oct 9, 2026
Merged

fforres merged 1 commit into
skywardfrom
feat/executor-internal-entrypoint

Conversation

@fforres

@fforres fforres commented Oct 9, 2026

Copy link
Copy Markdown

Adds a second door to the Cloudflare host: an ExecutorInternal WorkerEntrypoint that a worker in the same account binds with entrypoint: "ExecutorInternal".

  • The service binding is the trust boundary, so a request carries no Access credentials.
  • Without delegation headers it acts as the service (keyed on ACCESS_DELEGATION_COMMON_NAME, the same rows that service token reaches through Access).
  • With X-Executor-Subject / X-Executor-Subject-Email it acts for that person, same mapping as applyDelegatedSubject. An email with no subject is rejected.
  • The trusted mode is a flag on a config only the entrypoint builds (loadConfig(env, { internal: true })). Nothing in env or a request can put the public fetch in that mode.

Tests: internalPrincipal cases, and both doors through the real makeAccessVerifier (public rejects a delegation header with no assertion, internal accepts it). Mutation-checked: disabling the internal branch fails the door test.

Deploy this before any caller declares the entrypoint binding.

Export a WorkerEntrypoint whose fetch serves the same app and MCP routes as the
public fetch for workers in the same account that reach it over a service
binding. The binding is the trust boundary, so a request carries no Access
credentials: it acts as the configured delegator service, or as the subject
named in X-Executor-Subject. The trusted mode lives on a config only the
entrypoint builds, never on env or a request, so the public fetch cannot enter
it.
@fforres
fforres merged commit 1063e52 into skyward Oct 9, 2026
4 of 40 checks passed
@fforres
fforres deleted the feat/executor-internal-entrypoint branch October 9, 2026 01:03
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