Skip to content

Conversation

@Hugo-Pare
Copy link
Collaborator

What is the purpose of this change?

Allows MCP OAuth callback endpoint to receive redirects from external OAuth providers without requiring authentication (fixes "Not authenticated" errors during OAuth flow).

How was this change implemented?

Single Line Change:

  • src/solace_agent_mesh/shared/auth/middleware.py: Added /api/v1/platform/mcp/oauth/callback to skip_paths list

Key Design Decisions

OAuth providers redirect to callback URLs without authentication credentials. The callback endpoint must be publicly accessible to complete the OAuth flow, then validates the OAuth state parameter for CSRF protection.

How was this change tested?

  • Manual testing: Successfully completed OAuth flow with Miro MCP server
  • Unit tests: No middleware tests exist
  • Integration tests: Existing MCP OAuth integration tests should pass
  • Known limitations: Only tested with MCP OAuth flows

Is there anything the reviewers should focus on/be aware of?

Security: The endpoint is protected by OAuth state parameter validation - no user authentication needed at callback time since the external provider redirects without our session context.

@Hugo-Pare Hugo-Pare self-assigned this Jan 7, 2026
@sonarqube-solacecloud
Copy link

@Hugo-Pare Hugo-Pare merged commit 5b7b886 into main Jan 7, 2026
20 of 22 checks passed
@Hugo-Pare Hugo-Pare deleted the hugo/test-connectivity-env branch January 7, 2026 15:23
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.

3 participants