Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds OAuth 2.1 authentication support to AKS-MCP, enabling secure authentication for MCP endpoints using Azure Active Directory as the authorization server. The implementation includes JWT token validation, OAuth metadata endpoints, dynamic client registration, and token introspection capabilities.
Key changes include:
- Integration of OAuth authentication with Azure AD
- Support for both SSE and HTTP Streamable transports
- Comprehensive OAuth endpoint implementation (metadata, token exchange, callback handling)
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/server/server.go | Integrates OAuth components into the main server initialization and endpoint registration |
| internal/config/config.go | Adds OAuth configuration parsing with environment variable support |
| internal/config/validator.go | Adds OAuth configuration validation to prevent incompatible settings |
| internal/auth/types.go | Defines OAuth configuration types and validation logic |
| internal/auth/oauth/provider.go | Implements Azure AD OAuth provider with JWT validation and metadata handling |
| internal/auth/oauth/middleware.go | Provides authentication middleware for protecting MCP endpoints |
| internal/auth/oauth/endpoints.go | Implements OAuth 2.0 endpoints including authorization, token exchange, and callbacks |
| docs/oauth-authentication.md | Comprehensive documentation for OAuth setup and usage |
| Test files | Unit tests for OAuth components covering validation, endpoints, and middleware |
feiskyer
reviewed
Sep 9, 2025
feiskyer
reviewed
Sep 9, 2025
feiskyer
reviewed
Sep 9, 2025
feiskyer
reviewed
Sep 9, 2025
feiskyer
reviewed
Sep 9, 2025
feiskyer
reviewed
Sep 9, 2025
feiskyer
approved these changes
Sep 9, 2025
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.
No description provided.