-
Notifications
You must be signed in to change notification settings - Fork 17
Feat: support oauth #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: support oauth #202
Conversation
There was a problem hiding this 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 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 |
No description provided.