Skip to content

fix(mcp): restore hosted keyless Parse safety boundaries - #334

Merged
hmishra2250 merged 1 commit into
mainfrom
fix/hosted-keyless-parse-zdr
Jul 26, 2026
Merged

fix(mcp): restore hosted keyless Parse safety boundaries#334
hmishra2250 merged 1 commit into
mainfrom
fix/hosted-keyless-parse-zdr

Conversation

@hmishra2250

@hmishra2250 hmishra2250 commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • reject zeroDataRetention: true after anonymous/keyless session resolution and before any Core eligibility, upload, or Parse endpoint call
  • require exactly one syntactically valid source IP from the trusted hosted edge for anonymous keyless traffic (corrected by fix(mcp): preserve trusted proxy keyless identity聽#335: that source may be an internal ingress address)
  • keep redactPII available to anonymous Parse and correct hosted Parse guidance/examples
  • lock keyless two-phase Parse, early rejection, forwarded-IP trust, API-key forwarding, and managed-OAuth delegated-credential forwarding with HTTP smoke coverage

Scope

MCP server only. No Core, DB, Infra, endpoint-routing, or Stage-1/2 contract changes.

Regression lineage

The intended guard and tests existed before the PR #308 train but were omitted during the pre-merge reconciliation. This restores the established contract on current main, without a blind revert.

Verification

Release verification after merge

firecrawl-mcp-server auto-deploys via GHCR/Keel. From a clean eligible network, verify anonymous tools/list still shows exactly Search/Scrape/Parse; verify anonymous ZDR returns a structured error with no upload instructions; then run a small non-sensitive two-phase Parse fixture and an API-key Parse smoke. Do not log credentials, signed URLs, or upload refs.

Follow-up outside this PR

Infra/security should independently audit lifecycle handling for uploaded-but-never-parsed objects before making stronger retention claims.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Restores the hosted keyless Parse ZDR boundary and tightens client IP trust. Anonymous keyless can still use redactPII; zeroDataRetention: true is denied and multi鈥慼op/private X-Forwarded-For is not trusted; authenticated sessions can use ZDR.

  • Bug Fixes
    • Fail fast on zeroDataRetention in anonymous keyless Parse before any upload or backend call; returns KEYLESS_OPTION_NOT_AVAILABLE with guidance.
    • Require exactly one public client IP from X-Forwarded-For; otherwise reject keyless with KEYLESS_ACCESS_NOT_AVAILABLE. Forward the trusted IP to /v2/keyless/eligibility.
    • Keep redactPII for keyless and update firecrawl_parse docs/examples to note ZDR requires an account or API key.
    • Add HTTP smoke tests to lock behavior: keyless two-phase Parse works without credentials and forwards redactPII; early ZDR rejection; reject multi-hop/private XFF; ZDR allowed and forwarded for API key and managed OAuth sessions.

Written for commit f302d83. Summary will update on new commits.

Review in cubic

@hmishra2250
hmishra2250 force-pushed the fix/hosted-keyless-parse-zdr branch from 520d4b7 to c8ace28 Compare July 26, 2026 18:41
@hmishra2250
hmishra2250 force-pushed the fix/hosted-keyless-parse-zdr branch from c8ace28 to f302d83 Compare July 26, 2026 18:42
@hmishra2250 hmishra2250 changed the title fix(mcp): restore keyless Parse ZDR boundary fix(mcp): restore hosted keyless Parse safety boundaries Jul 26, 2026
@hmishra2250
hmishra2250 marked this pull request as ready for review July 26, 2026 18:42
@hmishra2250
hmishra2250 merged commit fb0ac14 into main Jul 26, 2026
2 checks passed
@hmishra2250
hmishra2250 deleted the fix/hosted-keyless-parse-zdr branch July 26, 2026 18:42
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