Skip to content

Conversation

@EricGustin
Copy link
Member

No description provided.

@EricGustin EricGustin requested a review from Copilot November 25, 2025 03:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements "Front-Door Authentication" for the Arcade MCP server, adding OAuth 2.1-compliant server-level authentication for HTTP transport. The implementation validates Bearer tokens on every HTTP request before processing MCP protocol messages, enabling secure HTTP transport with tool-level authorization and OAuth discovery support.

Key Changes:

  • Added JWT-based token verification with JWKS support for validating Bearer tokens
  • Implemented OAuth 2.0 Protected Resource Metadata (RFC 9728) for client discovery
  • Added support for multiple authorization servers with flexible configuration via environment variables or code

Reviewed changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
libs/tests/arcade_mcp_server/test_server_auth.py Comprehensive test suite for JWT verification, RemoteOAuthProvider, middleware, and multi-authorization server scenarios
libs/tests/arcade_mcp_server/test_server.py Added authenticated user context to HTTP transport tests
libs/tests/arcade_mcp_server/test_mcp_app.py Updated tests to include server_auth_provider parameter
libs/arcade-mcp-server/pyproject.toml Added python-jose and httpx dependencies
libs/arcade-mcp-server/arcade_mcp_server/worker.py Integrated auth middleware and OAuth discovery routes
libs/arcade-mcp-server/arcade_mcp_server/types.py Extended SessionMessage to carry authenticated user info
libs/arcade-mcp-server/arcade_mcp_server/transports/http_streamable.py Modified to extract and pass authenticated user from scope
libs/arcade-mcp-server/arcade_mcp_server/settings.py Added ServerAuthSettings for environment-based configuration
libs/arcade-mcp-server/arcade_mcp_server/session.py Updated to handle authenticated user context per request
libs/arcade-mcp-server/arcade_mcp_server/server_auth/ New module with base classes, JWT verifier, RemoteOAuthProvider, and ASGI middleware
libs/arcade-mcp-server/arcade_mcp_server/server.py Enhanced to use authenticated user from front-door auth for tool context
libs/arcade-mcp-server/arcade_mcp_server/mcp_app.py Added auth parameter and removed duplicate .env loading
libs/arcade-mcp-server/arcade_mcp_server/fastapi/auth_routes.py OAuth discovery endpoint implementation
libs/arcade-mcp-server/arcade_mcp_server/context.py Added authenticated_user to Context initialization
examples/mcp_servers/authorization/ Complete example server demonstrating front-door auth with Docker setup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants