feature/refactor network#17
Merged
Merged
Conversation
Dumbris
commented
Jul 13, 2025
Member
- Implement OAuth configuration and transport handling for upstream connections
- Enhance OAuth handling and transport client creation
- Document OAuth 2.1 authentication implementation and features in DESIGN.md and README.md
…nections - Added OAuthConfig struct to manage OAuth settings in ServerConfig. - Introduced CreateOAuthConfig and related functions for OAuth handling in transport. - Enhanced transport package to support HTTP, SSE, and stdio clients with OAuth integration. - Implemented state management for connection states, improving error handling and notifications. - Added NotificationManager for handling state change notifications across upstream connections.
- Implemented dynamic client registration for OAuth in the transport layer. - Refactored CreateOAuthConfig to support callback server management and dynamic port allocation. - Improved error handling and logging for OAuth flow in client connection methods. - Added support for opening the browser for user authentication during OAuth flow. - Enhanced logging for better traceability of OAuth-related operations.
…GN.md and README.md - Added detailed description of OAuth 2.1 Authorization Code Flow with PKCE in DESIGN.md. - Included key implementation features, OAuth flow sequence, and security considerations. - Updated README.md to highlight OAuth authentication support, key features, and configuration options.
- Added ReadHeaderTimeout to the HTTP server configuration to mitigate Slowloris attacks. - Updated error messages in client tests to reflect OAuth authorization requirements instead of SSE transport support. - Introduced a constant for OS detection to improve code readability in client.go.
…nt tests - Added environment variable check to disable OAuth during tests in config.go. - Updated client tests to set the environment variable, ensuring no network calls are made. - Adjusted error assertions to reflect connection errors instead of OAuth authorization errors when OAuth is disabled.
- Introduced a test HTTP server to simulate SSE endpoint responses in client_test.go. - Updated test cases to utilize the test server, improving error handling assertions for connection failures. - Refactored URL handling in tests to dynamically use the test server's URL for better isolation and reliability.
…andling - Disabled OAuth for end-to-end tests to prevent network calls to mock servers. - Restored original OAuth environment variable after test execution. - Updated test server to simulate connection issues, returning 503 Service Unavailable for better error handling.
- Updated createTestServer function to use a blank identifier for the request parameter. - Changed response writing to handle errors gracefully while simulating connection issues with a 503 Service Unavailable status.
- Added detailed debug logging for server configuration changes, including updates and removals. - Improved logging for configuration reloads and file saves to provide better traceability. - Introduced helper functions for comparing server configurations in the upstream manager.
- Simplified logging messages by removing debug prefixes and enhancing clarity. - Updated log levels for configuration changes and reloads to improve traceability. - Streamlined logging in the upstream manager for better consistency.
rannow
pushed a commit
to rannow/mcpproxy-go
that referenced
this pull request
Sep 23, 2025
* Implement OAuth configuration and transport handling for upstream connections - Added OAuthConfig struct to manage OAuth settings in ServerConfig. - Introduced CreateOAuthConfig and related functions for OAuth handling in transport. - Enhanced transport package to support HTTP, SSE, and stdio clients with OAuth integration. - Implemented state management for connection states, improving error handling and notifications. - Added NotificationManager for handling state change notifications across upstream connections. * Enhance OAuth handling and transport client creation - Implemented dynamic client registration for OAuth in the transport layer. - Refactored CreateOAuthConfig to support callback server management and dynamic port allocation. - Improved error handling and logging for OAuth flow in client connection methods. - Added support for opening the browser for user authentication during OAuth flow. - Enhanced logging for better traceability of OAuth-related operations. * Document OAuth 2.1 authentication implementation and features in DESIGN.md and README.md - Added detailed description of OAuth 2.1 Authorization Code Flow with PKCE in DESIGN.md. - Included key implementation features, OAuth flow sequence, and security considerations. - Updated README.md to highlight OAuth authentication support, key features, and configuration options. * Enhance OAuth error handling and server configuration - Added ReadHeaderTimeout to the HTTP server configuration to mitigate Slowloris attacks. - Updated error messages in client tests to reflect OAuth authorization requirements instead of SSE transport support. - Introduced a constant for OS detection to improve code readability in client.go. * Implement OAuth disabling for tests and update error handling in client tests - Added environment variable check to disable OAuth during tests in config.go. - Updated client tests to set the environment variable, ensuring no network calls are made. - Adjusted error assertions to reflect connection errors instead of OAuth authorization errors when OAuth is disabled. * Add test server for SSE protocol handling in client tests - Introduced a test HTTP server to simulate SSE endpoint responses in client_test.go. - Updated test cases to utilize the test server, improving error handling assertions for connection failures. - Refactored URL handling in tests to dynamically use the test server's URL for better isolation and reliability. * Enhance e2e test environment by disabling OAuth and improving error handling - Disabled OAuth for end-to-end tests to prevent network calls to mock servers. - Restored original OAuth environment variable after test execution. - Updated test server to simulate connection issues, returning 503 Service Unavailable for better error handling. * Refactor test server to improve error handling in client tests - Updated createTestServer function to use a blank identifier for the request parameter. - Changed response writing to handle errors gracefully while simulating connection issues with a 503 Service Unavailable status. * Enhance logging for server configuration changes and file operations - Added detailed debug logging for server configuration changes, including updates and removals. - Improved logging for configuration reloads and file saves to provide better traceability. - Introduced helper functions for comparing server configurations in the upstream manager. * Refactor logging for server configuration and file operations - Simplified logging messages by removing debug prefixes and enhancing clarity. - Updated log levels for configuration changes and reloads to improve traceability. - Streamlined logging in the upstream manager for better consistency.
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.