♻️ Require authorization for MCP management API #2799#2801
Open
shaun0927 wants to merge 2 commits intoModelEngine-Group:developfrom
Open
♻️ Require authorization for MCP management API #2799#2801shaun0927 wants to merge 2 commits intoModelEngine-Group:developfrom
shaun0927 wants to merge 2 commits intoModelEngine-Group:developfrom
Conversation
Develop
The management API currently accepts Authorization headers without validating them, and the tool-management call path drops the caller token before refresh and delete operations. This patch hardens the management endpoints and forwards the current request token so the existing MCP management flow keeps working under authentication. Constraint: Keep scope limited to MCP management auth hardening for mergeability Rejected: Broader API-to-MCP trust-boundary changes | needs product and architecture discussion Confidence: medium Scope-risk: narrow Directive: Keep management endpoint auth and caller-token forwarding aligned when adding new MCP management routes Tested: python3 -m py_compile on changed files; stubbed local auth-validation script; stubbed local header-forwarding script Not-tested: Full pytest suite in the current local environment (FastAPI/SDK dependency mismatch during collection)
Author
|
Retargeted this PR to |
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.
♻️ Require authorization for MCP management API #2799
[Specification Details]
[Test Result]
python3 -m py_compile backend/mcp_service.py backend/services/tool_configuration_service.py backend/apps/tool_config_app.py test/backend/services/test_mcp_service.py test/backend/app/test_tool_config_app.py test/backend/services/test_tool_configuration_service.py401, while authorized access still succeeds.Authorizationheader to the MCP management API.