Skip to content

Bind MPP credentials to the challenged destination - #319

Draft
bensandler-stripe wants to merge 3 commits into
mainfrom
bensandler/fix-mpp-credential-redirects
Draft

Bind MPP credentials to the challenged destination#319
bensandler-stripe wants to merge 3 commits into
mainfrom
bensandler/fix-mpp-credential-redirects

Conversation

@bensandler-stripe

@bensandler-stripe bensandler-stripe commented Sep 11, 2026

Copy link
Copy Markdown
Contributor
  • Bind each MPP payment credential to the destination that returned its 402 challenge.
  • Allow redirects while discovering the challenge, then reject destination changes after approval or after attaching the credential.
  • Require HTTPS for remote MPP endpoints while retaining loopback HTTP for local development.

bensandler-stripe and others added 2 commits September 10, 2026 21:51
- Follow unauthenticated redirects explicitly and bind the authenticated retry to the exact request that returned the 402 challenge, preventing a redirecting origin from receiving and replaying another server's Payment credential.
- Preserve Fetch redirect method, body, and header rewrites while stripping sensitive headers across origins, and reject every redirect after credentials are attached.
- Pin interactive challenge refreshes and agent continuations to the effective destination, and require HTTPS for remote MPP endpoints while retaining exact loopback HTTP for local development.
- Cover five focused redirect/payment unit cases and 17 targeted built-CLI integration cases, including two new cross-origin credential-leak regressions.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
- Deferred agent continuations re-probed the pinned challenge URL while following redirects, allowing that destination to move after approval.
- Route every approved spend request through one no-redirect challenge refresh and reject redirects before attaching the payment credential.
- Add focused regression coverage for the pinned refresh and remove the obsolete expectation that approved requests may follow redirects.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@bensandler-stripe
bensandler-stripe force-pushed the bensandler/fix-mpp-credential-redirects branch from c084b79 to 3bba1f9 Compare September 11, 2026 02:29
- Collapse the approved redirect assertion to Biome’s single-line form.
- Leave behavior unchanged; CI build and typechecks passed.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
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