auth: validate the Forge Invocation Token as primary, binding control-Worker auth#2
Merged
Conversation
…th (ECOHELP-145889) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UDYKDJBU8KZP9SWMaxNxSp
…(api.fetch egress carries none) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UDYKDJBU8KZP9SWMaxNxSp
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UDYKDJBU8KZP9SWMaxNxSp
MrCoder
marked this pull request as ready for review
July 16, 2026 08:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gateway/authorize.ts, new): a request presenting a bearer token is authorized by FIT verification alone — binding, so a forged FIT is rejected even alongside a valid shared secret. No bearer →x-mini-sites-secretfallback (the CI/E2E/smoke credential, unchanged).verifyForgeTokennow enforcesiss: forge/invocation-tokenandaud(app-ARI allowlist) per Atlassian's FIT requirements, and the remote JWKS resolver is memoized per isolate (it's on the hot path now).invokeRemote()instead ofapi.fetch(url)— Forge attaches the FIT only to invocations routed through a declared remote; plainapi.fetchis external egress and carries no token (observed live on dev:authorizeloggedvia:"shared-secret"until the switch). Remote key derived from the existing per-envCONTROL_BASE_URLvariable.computeoperation (required byinvokeRemote) — module config, not a scope; no admin-consent impact. Noauth:block needed (that only adds OAuth tokens).Closes the ECOHELP-145889 Q2.1 gap ("remote does not validate the FIT").
Test plan
forge install --upgradeon lite-dev): real page render logs{"evt":"authorize","ok":true,"via":"fit","path":"/serve-url"}and the mini-sites serve; forged bearer + valid secret → 401bad-token; no credentials → 401no-credentials.401/UNAUTHORIZED— unaffected; full E2E runs when this PR is marked Ready.Release note: the manifest change means production sites need
forge install --upgradeafter the prod deploy, and the ECOHELP-145889 reply should quote the release version.🤖 Generated with Claude Code
https://claude.ai/code/session_01UDYKDJBU8KZP9SWMaxNxSp