feat: add secure UUID-based routing with Bearer token auth (fix #2900)#180
Open
gambletan wants to merge 1 commit into
Open
feat: add secure UUID-based routing with Bearer token auth (fix #2900)#180gambletan wants to merge 1 commit into
gambletan wants to merge 1 commit into
Conversation
- Add extractApiKeyId function to support x-api-key-id header - Add FIRECRAWL_API_KEY_ID env var for UUID-based routing validation - Update authenticate function to validate API key ID when configured - Add documentation for secure authentication with Bearer token This change allows users to: - Use Bearer token in Authorization header instead of API key in URL - Optionally use UUID-based routing with x-api-key-id header - Avoid exposing API keys in URL paths (security best practice)
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
This PR addresses Issue #2900 by adding support for secure authentication to the Firecrawl MCP server.
Changes
Added function - Supports extracting API key ID from headers:
Added environment variable - Enables UUID-based routing validation when set
Updated authentication - When is configured:
Documentation - Added secure authentication section explaining:
Security Improvement
Before (insecure):
After (secure):
This prevents API keys from being logged in URL paths by proxies, load balancers, and web servers.
Testing
The code compiles successfully. Please review and test the authentication flow.