28c2debf3e
This ADR addresses the critical token passthrough vulnerability identified in Issue #261 by proposing a unified token verifier that eliminates the security issue while maintaining flexibility. Key changes: - Consolidates two non-compliant verifiers into single UnifiedTokenVerifier - Implements two-layer architecture (verification + exchange) - Supports multi-audience mode (default) and token exchange mode (opt-in) - Removes all token passthrough paths to comply with MCP security spec - Works within python-sdk constraints using proper separation of concerns The solution provides: - Single source of truth for token validation - MCP specification compliance - Minimal performance impact (1-2% of LLM request time) - Clear migration path for existing deployments BREAKING CHANGE: All OAuth deployments must be reconfigured to specify resource URIs (NEXTCLOUD_MCP_SERVER_URL and NEXTCLOUD_RESOURCE_URI) and choose between multi-audience or token exchange mode. Related: #261 Supersedes: Token passthrough mode in ADR-004 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>