mcp-proxy-adapter 6.4.48__tar.gz → 6.6.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/PKG-INFO +1 -1
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/middleware/unified_security.py +8 -12
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/config.py +76 -117
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/protocol_manager.py +25 -42
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/security_integration.py +60 -97
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/server_adapter.py +4 -0
- mcp_proxy_adapter-6.6.1/mcp_proxy_adapter/examples/check_config.py +415 -0
- mcp_proxy_adapter-6.6.1/mcp_proxy_adapter/examples/config_builder.py +288 -0
- mcp_proxy_adapter-6.6.1/mcp_proxy_adapter/examples/config_builder_simple.py +271 -0
- mcp_proxy_adapter-6.6.1/mcp_proxy_adapter/examples/generate_config.py +343 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/run_security_tests_fixed.py +186 -23
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/security_test_client.py +21 -7
- mcp_proxy_adapter-6.6.1/mcp_proxy_adapter/examples/test_chk_hostname_automated.py +214 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/test_config_builder.py +40 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/main.py +54 -27
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/version.py +1 -1
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter.egg-info/PKG-INFO +1 -1
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter.egg-info/SOURCES.txt +8 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/pyproject.toml +1 -1
- mcp_proxy_adapter-6.4.48/mcp_proxy_adapter/examples/config_builder.py +0 -574
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/README.md +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/__init__.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/__main__.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/__init__.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/app.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/handlers.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/middleware/__init__.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/middleware/base.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/middleware/command_permission_middleware.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/middleware/error_handling.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/middleware/factory.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/middleware/logging.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/middleware/performance.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/middleware/protocol_middleware.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/middleware/transport_middleware.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/middleware/user_info_middleware.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/schemas.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/tool_integration.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/api/tools.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/__init__.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/auth_validation_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/base.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/builtin_commands.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/catalog_manager.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/cert_monitor_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/certificate_management_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/command_registry.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/config_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/dependency_container.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/dependency_manager.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/echo_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/health_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/help_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/hooks.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/key_management_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/load_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/plugins_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/protocol_management_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/proxy_registration_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/reload_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/result.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/role_test_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/roles_management_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/security_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/settings_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/ssl_setup_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/token_management_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/transport_management_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/commands/unload_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/__init__.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/app_factory.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/app_runner.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/auth_validator.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/certificate_utils.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/client.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/client_manager.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/client_security.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/config_converter.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/config_validator.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/crl_utils.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/errors.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/logging.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/mtls_asgi.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/mtls_asgi_app.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/mtls_server.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/proxy_client.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/proxy_registration.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/role_utils.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/security_adapter.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/security_factory.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/server_engine.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/settings.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/ssl_utils.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/transport_manager.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/unified_config_adapter.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/utils.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/custom_openapi.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/__init__.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/basic_framework/__init__.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/basic_framework/commands/__init__.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/basic_framework/hooks/__init__.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/basic_framework/main.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/bugfix_certificate_config.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/cert_manager_bugfix.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/commands/__init__.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/config_cli.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/create_test_configs.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/debug_request_state.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/debug_role_chain.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/demo_client.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/full_application/__init__.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/full_application/commands/__init__.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/full_application/commands/custom_echo_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/full_application/commands/dynamic_calculator_command.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/full_application/hooks/__init__.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/full_application/hooks/application_hooks.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/full_application/hooks/builtin_command_hooks.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/full_application/main.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/full_application/proxy_endpoints.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/generate_all_certificates.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/generate_certificates_bugfix.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/generate_certificates_cli.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/generate_certificates_fixed.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/generate_certificates_framework.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/generate_certificates_openssl.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/proxy_registration_example.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/required_certificates.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/run_example.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/run_full_test_suite.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/run_proxy_server.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/setup_test_environment.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/simple_protocol_test.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/test_config.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/test_examples.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/test_protocol_examples.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/universal_client.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/examples/update_config_certificates.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/openapi.py +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/schemas/base_schema.json +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/schemas/openapi_schema.json +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/schemas/roles.json +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/schemas/roles_schema.json +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter.egg-info/dependency_links.txt +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter.egg-info/entry_points.txt +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter.egg-info/not-zip-safe +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter.egg-info/requires.txt +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter.egg-info/top_level.txt +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/setup.cfg +0 -0
- {mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mcp-proxy-adapter
|
3
|
-
Version: 6.
|
3
|
+
Version: 6.6.1
|
4
4
|
Summary: Powerful JSON-RPC microservices framework with built-in security, authentication, and proxy registration
|
5
5
|
Home-page: https://github.com/maverikod/mcp-proxy-adapter
|
6
6
|
Author: Vasiliy Zdanovskiy
|
@@ -65,11 +65,10 @@ class UnifiedSecurityMiddleware(BaseHTTPMiddleware):
|
|
65
65
|
try:
|
66
66
|
security_config = config.get("security", {})
|
67
67
|
|
68
|
-
# Check if
|
69
|
-
|
70
|
-
permissions_enabled = permissions_config.get("enabled", False)
|
68
|
+
# Check if security is enabled - use mcp_security_framework if needed
|
69
|
+
security_enabled = security_config.get("enabled", False)
|
71
70
|
|
72
|
-
if
|
71
|
+
if security_enabled:
|
73
72
|
self.security_integration = create_security_integration(security_config)
|
74
73
|
# Use framework's FastAPI middleware
|
75
74
|
self.framework_middleware = (
|
@@ -80,7 +79,7 @@ class UnifiedSecurityMiddleware(BaseHTTPMiddleware):
|
|
80
79
|
# Instead, store the framework middleware for use in dispatch method.
|
81
80
|
logger.info("Framework middleware will be used in dispatch method")
|
82
81
|
else:
|
83
|
-
logger.info("
|
82
|
+
logger.info("Security disabled, skipping mcp_security_framework integration")
|
84
83
|
self.security_integration = None
|
85
84
|
self.framework_middleware = None
|
86
85
|
except Exception as e:
|
@@ -114,16 +113,13 @@ class UnifiedSecurityMiddleware(BaseHTTPMiddleware):
|
|
114
113
|
security_cfg = (
|
115
114
|
self.config.get("security", {}) if isinstance(self.config, dict) else {}
|
116
115
|
)
|
117
|
-
|
118
|
-
|
119
|
-
public_paths = set(
|
120
|
-
auth_cfg.get("public_paths", ["/health", "/docs", "/openapi.json"])
|
121
|
-
)
|
116
|
+
# Use new simplified structure
|
117
|
+
public_paths = set(["/health", "/docs", "/openapi.json"])
|
122
118
|
# JSON-RPC endpoint must not be public when API key is required
|
123
119
|
public_paths.discard("/api/jsonrpc")
|
124
120
|
path = request.url.path
|
125
|
-
methods = set(
|
126
|
-
api_keys: Dict[str, str] =
|
121
|
+
methods = set(["api_key"]) # Use token-based authentication
|
122
|
+
api_keys: Dict[str, str] = security_cfg.get("tokens", {}) or {}
|
127
123
|
|
128
124
|
# Enforce only for non-public paths when api_key method configured
|
129
125
|
if (
|
@@ -6,9 +6,12 @@ email: vasilyvz@gmail.com
|
|
6
6
|
"""
|
7
7
|
|
8
8
|
import json
|
9
|
+
import logging
|
9
10
|
import os
|
10
11
|
from typing import Any, Dict, Optional, List
|
11
12
|
|
13
|
+
logger = logging.getLogger(__name__)
|
14
|
+
|
12
15
|
|
13
16
|
class Config:
|
14
17
|
"""
|
@@ -38,6 +41,7 @@ class Config:
|
|
38
41
|
"server": {
|
39
42
|
"host": "0.0.0.0",
|
40
43
|
"port": 8000,
|
44
|
+
"protocol": "http",
|
41
45
|
"debug": False,
|
42
46
|
"log_level": "INFO",
|
43
47
|
},
|
@@ -65,30 +69,6 @@ class Config:
|
|
65
69
|
"disabled_commands": [],
|
66
70
|
"custom_commands_path": "./commands",
|
67
71
|
},
|
68
|
-
"ssl": {
|
69
|
-
"enabled": False,
|
70
|
-
"mode": "https_only",
|
71
|
-
"cert_file": None,
|
72
|
-
"key_file": None,
|
73
|
-
"ca_cert": None,
|
74
|
-
"verify_client": False,
|
75
|
-
"client_cert_required": False,
|
76
|
-
"cipher_suites": [
|
77
|
-
"TLS_AES_256_GCM_SHA384",
|
78
|
-
"TLS_CHACHA20_POLY1305_SHA256",
|
79
|
-
],
|
80
|
-
"min_tls_version": "TLSv1.2",
|
81
|
-
"max_tls_version": "1.3",
|
82
|
-
"token_auth": {
|
83
|
-
"enabled": False,
|
84
|
-
"header_name": "Authorization",
|
85
|
-
"token_prefix": "Bearer",
|
86
|
-
"tokens_file": "tokens.json",
|
87
|
-
"token_expiry": 3600,
|
88
|
-
"jwt_secret": "",
|
89
|
-
"jwt_algorithm": "HS256",
|
90
|
-
},
|
91
|
-
},
|
92
72
|
"roles": {
|
93
73
|
"enabled": False,
|
94
74
|
"config_file": None,
|
@@ -111,6 +91,7 @@ class Config:
|
|
111
91
|
"ca_cert": None,
|
112
92
|
"verify_client": False,
|
113
93
|
"client_cert_required": False,
|
94
|
+
"chk_hostname": False, # Default to False when SSL is disabled
|
114
95
|
},
|
115
96
|
},
|
116
97
|
"proxy_registration": {
|
@@ -128,102 +109,18 @@ class Config:
|
|
128
109
|
},
|
129
110
|
"debug": {"enabled": False, "level": "WARNING"},
|
130
111
|
"security": {
|
131
|
-
"framework": "mcp_security_framework",
|
132
112
|
"enabled": False,
|
133
|
-
"
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
"enabled": False,
|
138
|
-
"methods": ["api_key"],
|
139
|
-
"api_keys": {},
|
140
|
-
"user_roles": {},
|
141
|
-
"jwt_secret": "",
|
142
|
-
"jwt_algorithm": "HS256",
|
143
|
-
"jwt_expiry_hours": 24,
|
144
|
-
"certificate_auth": False,
|
145
|
-
"certificate_roles_oid": "1.3.6.1.4.1.99999.1.1",
|
146
|
-
"certificate_permissions_oid": "1.3.6.1.4.1.99999.1.2",
|
147
|
-
"basic_auth": False,
|
148
|
-
"oauth2_config": None,
|
149
|
-
"public_paths": ["/health", "/docs", "/openapi.json"],
|
150
|
-
"security_headers": None,
|
113
|
+
"tokens": {
|
114
|
+
"admin": "admin-secret-key",
|
115
|
+
"user": "user-secret-key",
|
116
|
+
"readonly": "readonly-secret-key"
|
151
117
|
},
|
152
|
-
"
|
153
|
-
"
|
154
|
-
"
|
155
|
-
"
|
156
|
-
"ca_cert_file": None,
|
157
|
-
"client_cert_file": None,
|
158
|
-
"client_key_file": None,
|
159
|
-
"verify_mode": "CERT_NONE",
|
160
|
-
"min_tls_version": "TLSv1.2",
|
161
|
-
"max_tls_version": None,
|
162
|
-
"cipher_suite": None,
|
163
|
-
"check_hostname": True,
|
164
|
-
"check_expiry": True,
|
165
|
-
"expiry_warning_days": 30,
|
166
|
-
},
|
167
|
-
"certificates": {
|
168
|
-
"enabled": False,
|
169
|
-
"ca_cert_path": None,
|
170
|
-
"ca_key_path": None,
|
171
|
-
"cert_storage_path": "./certs",
|
172
|
-
"key_storage_path": "./keys",
|
173
|
-
"default_validity_days": 365,
|
174
|
-
"key_size": 2048,
|
175
|
-
"hash_algorithm": "sha256",
|
176
|
-
"crl_enabled": False,
|
177
|
-
"crl_path": None,
|
178
|
-
"crl_url": None,
|
179
|
-
"crl_validity_days": 30,
|
180
|
-
"auto_renewal": False,
|
181
|
-
"renewal_threshold_days": 30,
|
118
|
+
"roles": {
|
119
|
+
"admin": ["read", "write", "delete", "admin"],
|
120
|
+
"user": ["read", "write"],
|
121
|
+
"readonly": ["read"]
|
182
122
|
},
|
183
|
-
"
|
184
|
-
"enabled": False,
|
185
|
-
"roles_file": None,
|
186
|
-
"default_role": "guest",
|
187
|
-
"admin_role": "admin",
|
188
|
-
"role_hierarchy": {},
|
189
|
-
"permission_cache_enabled": False,
|
190
|
-
"permission_cache_ttl": 300,
|
191
|
-
"wildcard_permissions": False,
|
192
|
-
"strict_mode": False,
|
193
|
-
"roles": None,
|
194
|
-
},
|
195
|
-
"rate_limit": {
|
196
|
-
"enabled": False,
|
197
|
-
"default_requests_per_minute": 60,
|
198
|
-
"default_requests_per_hour": 1000,
|
199
|
-
"burst_limit": 2,
|
200
|
-
"window_size_seconds": 60,
|
201
|
-
"storage_backend": "memory",
|
202
|
-
"redis_config": None,
|
203
|
-
"cleanup_interval": 300,
|
204
|
-
"exempt_paths": ["/health", "/docs", "/openapi.json"],
|
205
|
-
"exempt_roles": ["admin"],
|
206
|
-
},
|
207
|
-
"logging": {
|
208
|
-
"enabled": True,
|
209
|
-
"level": "INFO",
|
210
|
-
"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
211
|
-
"date_format": "%Y-%m-%d %H:%M:%S",
|
212
|
-
"file_path": None,
|
213
|
-
"max_file_size": 10,
|
214
|
-
"backup_count": 5,
|
215
|
-
"console_output": True,
|
216
|
-
"json_format": False,
|
217
|
-
"include_timestamp": True,
|
218
|
-
"include_level": True,
|
219
|
-
"include_module": True,
|
220
|
-
},
|
221
|
-
},
|
222
|
-
"protocols": {
|
223
|
-
"enabled": True,
|
224
|
-
"allowed_protocols": ["http", "jsonrpc"],
|
225
|
-
"default_protocol": "http",
|
226
|
-
"auto_discovery": True,
|
123
|
+
"roles_file": None
|
227
124
|
},
|
228
125
|
}
|
229
126
|
|
@@ -238,6 +135,10 @@ class Config:
|
|
238
135
|
|
239
136
|
# Load configuration from environment variables
|
240
137
|
self._load_env_variables()
|
138
|
+
|
139
|
+
# Apply hostname check logic based on SSL configuration
|
140
|
+
self._validate_security_config()
|
141
|
+
self._apply_hostname_check_logic()
|
241
142
|
|
242
143
|
def load_from_file(self, config_path: str) -> None:
|
243
144
|
"""
|
@@ -344,6 +245,12 @@ class Config:
|
|
344
245
|
current = current[part]
|
345
246
|
|
346
247
|
current[parts[-1]] = value
|
248
|
+
|
249
|
+
# Special handling for chk_hostname - mark it as user-set
|
250
|
+
if key == "transport.ssl.chk_hostname":
|
251
|
+
if "ssl" not in self.config_data.get("transport", {}):
|
252
|
+
self.config_data["transport"]["ssl"] = {}
|
253
|
+
self.config_data["transport"]["ssl"]["_chk_hostname_user_set"] = True
|
347
254
|
|
348
255
|
def save(self, path: Optional[str] = None) -> None:
|
349
256
|
"""
|
@@ -588,6 +495,58 @@ class Config:
|
|
588
495
|
|
589
496
|
return secure_config
|
590
497
|
|
498
|
+
def _validate_security_config(self) -> None:
|
499
|
+
"""
|
500
|
+
Validate security configuration and log warnings for incomplete setup.
|
501
|
+
"""
|
502
|
+
if not self.get("security.enabled", False):
|
503
|
+
return
|
504
|
+
|
505
|
+
# Check if security is enabled but no authentication methods are configured
|
506
|
+
tokens = self.get("security.tokens", {})
|
507
|
+
roles = self.get("security.roles", {})
|
508
|
+
roles_file = self.get("security.roles_file")
|
509
|
+
|
510
|
+
has_tokens = bool(tokens and any(tokens.values()))
|
511
|
+
has_roles = bool(roles and any(roles.values()))
|
512
|
+
has_roles_file = bool(roles_file and os.path.exists(roles_file))
|
513
|
+
|
514
|
+
if not (has_tokens or has_roles or has_roles_file):
|
515
|
+
logger.warning(
|
516
|
+
"Security is enabled but no authentication methods are configured. "
|
517
|
+
"Please configure tokens, roles, or roles_file in the security section."
|
518
|
+
)
|
519
|
+
|
520
|
+
def _apply_hostname_check_logic(self) -> None:
|
521
|
+
"""
|
522
|
+
Apply hostname check logic based on protocol configuration.
|
523
|
+
chk_hostname should be True for HTTPS/mTLS protocols, False for HTTP.
|
524
|
+
Only set default values if chk_hostname is not explicitly configured.
|
525
|
+
"""
|
526
|
+
protocol = self.get("server.protocol", "http")
|
527
|
+
ssl_enabled = self.get("transport.ssl.enabled", False)
|
528
|
+
|
529
|
+
# Check if chk_hostname is explicitly set by the user
|
530
|
+
# We check if it was set by looking for a special flag
|
531
|
+
transport_section = self.config_data.get("transport", {})
|
532
|
+
ssl_section = transport_section.get("ssl", {})
|
533
|
+
chk_hostname_explicitly_set = ssl_section.get("_chk_hostname_user_set", False)
|
534
|
+
|
535
|
+
# Set chk_hostname based on protocol only if not explicitly set
|
536
|
+
if not chk_hostname_explicitly_set:
|
537
|
+
if protocol in ["https", "mtls"]:
|
538
|
+
# For HTTPS/mTLS, enable hostname checking by default
|
539
|
+
self.set("transport.ssl.chk_hostname", True)
|
540
|
+
logger.debug(f"Set chk_hostname=True for protocol {protocol} (default)")
|
541
|
+
else:
|
542
|
+
# For HTTP, disable hostname checking
|
543
|
+
self.set("transport.ssl.chk_hostname", False)
|
544
|
+
logger.debug(f"Set chk_hostname=False for protocol {protocol} (default)")
|
545
|
+
else:
|
546
|
+
# Log the explicitly set value
|
547
|
+
chk_hostname_value = self.get("transport.ssl.chk_hostname")
|
548
|
+
logger.debug(f"Using explicitly set chk_hostname={chk_hostname_value} for protocol {protocol}")
|
549
|
+
|
591
550
|
|
592
551
|
# Singleton instance
|
593
552
|
config = Config()
|
{mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/protocol_manager.py
RENAMED
@@ -56,54 +56,37 @@ class ProtocolManager:
|
|
56
56
|
f"ProtocolManager._load_config - current_config keys: {list(current_config.keys()) if hasattr(current_config, 'keys') else 'no keys'}"
|
57
57
|
)
|
58
58
|
|
59
|
-
# Get
|
60
|
-
logger.debug(f"ProtocolManager._load_config - before getting
|
59
|
+
# Get server protocol configuration (new simplified structure)
|
60
|
+
logger.debug(f"ProtocolManager._load_config - before getting server protocol")
|
61
61
|
try:
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
62
|
+
server_config = current_config.get("server", {})
|
63
|
+
server_protocol = server_config.get("protocol", "http")
|
64
|
+
logger.debug(f"ProtocolManager._load_config - server protocol: {server_protocol}")
|
65
|
+
|
66
|
+
# Set allowed protocols based on server protocol
|
67
|
+
if server_protocol == "http":
|
68
|
+
self.allowed_protocols = ["http"]
|
69
|
+
elif server_protocol == "https":
|
70
|
+
self.allowed_protocols = ["https"]
|
71
|
+
elif server_protocol == "mtls":
|
72
|
+
self.allowed_protocols = ["mtls", "https"] # mTLS also supports HTTPS
|
70
73
|
else:
|
71
|
-
|
72
|
-
|
73
|
-
)
|
74
|
+
# Fallback to HTTP
|
75
|
+
self.allowed_protocols = ["http"]
|
76
|
+
logger.warning(f"Unknown server protocol '{server_protocol}', defaulting to HTTP")
|
77
|
+
|
78
|
+
logger.debug(f"ProtocolManager._load_config - allowed protocols: {self.allowed_protocols}")
|
79
|
+
|
74
80
|
except Exception as e:
|
75
|
-
logger.debug(f"ProtocolManager._load_config - ERROR getting
|
76
|
-
|
81
|
+
logger.debug(f"ProtocolManager._load_config - ERROR getting server protocol: {e}")
|
82
|
+
# Fallback to HTTP
|
83
|
+
self.allowed_protocols = ["http"]
|
77
84
|
|
78
|
-
|
79
|
-
|
80
|
-
if hasattr(self.protocols_config, "get")
|
81
|
-
else True
|
82
|
-
)
|
83
|
-
|
84
|
-
# Get SSL configuration to determine allowed protocols
|
85
|
-
ssl_enabled = self._is_ssl_enabled(current_config)
|
86
|
-
|
87
|
-
# Set allowed protocols based on SSL configuration
|
88
|
-
if ssl_enabled:
|
89
|
-
# If SSL is enabled, allow both HTTP and HTTPS
|
90
|
-
self.allowed_protocols = self.protocols_config.get(
|
91
|
-
"allowed_protocols", ["http", "https"]
|
92
|
-
)
|
93
|
-
# Ensure HTTPS is in allowed protocols if SSL is enabled
|
94
|
-
if "https" not in self.allowed_protocols:
|
95
|
-
self.allowed_protocols.append("https")
|
96
|
-
else:
|
97
|
-
# If SSL is disabled, only allow HTTP
|
98
|
-
self.allowed_protocols = self.protocols_config.get(
|
99
|
-
"allowed_protocols", ["http"]
|
100
|
-
)
|
101
|
-
# Remove HTTPS from allowed protocols if SSL is disabled
|
102
|
-
if "https" in self.allowed_protocols:
|
103
|
-
self.allowed_protocols.remove("https")
|
85
|
+
# Protocol management is always enabled in new structure
|
86
|
+
self.enabled = True
|
104
87
|
|
105
88
|
logger.debug(
|
106
|
-
f"Protocol manager loaded config: enabled={self.enabled}, allowed_protocols={self.allowed_protocols}
|
89
|
+
f"Protocol manager loaded config: enabled={self.enabled}, allowed_protocols={self.allowed_protocols}"
|
107
90
|
)
|
108
91
|
|
109
92
|
def _is_ssl_enabled(self, current_config: Dict) -> bool:
|
{mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/security_integration.py
RENAMED
@@ -88,53 +88,42 @@ class SecurityIntegration:
|
|
88
88
|
# self.config is already the security section passed from unified_security.py
|
89
89
|
security_section = self.config
|
90
90
|
|
91
|
-
# Create SSL config
|
91
|
+
# Create SSL config - SSL is handled by server protocol, not security config
|
92
92
|
ssl_config = SSLConfig(
|
93
|
-
enabled=
|
94
|
-
cert_file=
|
95
|
-
key_file=
|
96
|
-
ca_cert_file=
|
97
|
-
client_cert_file=
|
98
|
-
client_key_file=
|
99
|
-
verify_mode=
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
),
|
105
|
-
check_hostname=security_section.get("ssl", {}).get("check_hostname", True),
|
106
|
-
check_expiry=security_section.get("ssl", {}).get("check_expiry", True),
|
107
|
-
expiry_warning_days=security_section.get("ssl", {}).get(
|
108
|
-
"expiry_warning_days", 30
|
109
|
-
),
|
93
|
+
enabled=False, # SSL is handled by server protocol
|
94
|
+
cert_file=None,
|
95
|
+
key_file=None,
|
96
|
+
ca_cert_file=None,
|
97
|
+
client_cert_file=None,
|
98
|
+
client_key_file=None,
|
99
|
+
verify_mode="CERT_REQUIRED",
|
100
|
+
min_tls_version="TLSv1.2",
|
101
|
+
check_hostname=True,
|
102
|
+
check_expiry=True,
|
103
|
+
expiry_warning_days=30,
|
110
104
|
)
|
111
105
|
|
112
|
-
# Create auth config
|
106
|
+
# Create auth config - use new simplified structure
|
113
107
|
auth_config = AuthConfig(
|
114
|
-
enabled=security_section.get("
|
115
|
-
methods=
|
116
|
-
api_keys=security_section.get("
|
117
|
-
user_roles=
|
118
|
-
jwt_secret=
|
119
|
-
jwt_algorithm=
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
"jwt_expiry_hours", 24
|
124
|
-
),
|
125
|
-
certificate_auth=security_section.get("auth", {}).get(
|
126
|
-
"certificate_auth", False
|
127
|
-
),
|
128
|
-
public_paths=security_section.get("auth", {}).get("public_paths", []),
|
108
|
+
enabled=security_section.get("enabled", True),
|
109
|
+
methods=["api_key"], # Use token-based authentication
|
110
|
+
api_keys=security_section.get("tokens", {}),
|
111
|
+
user_roles={}, # Will be handled by permissions
|
112
|
+
jwt_secret=None,
|
113
|
+
jwt_algorithm="HS256",
|
114
|
+
jwt_expiry_hours=24,
|
115
|
+
certificate_auth=False,
|
116
|
+
public_paths=[],
|
129
117
|
)
|
130
118
|
|
131
|
-
# Create permission config -
|
132
|
-
|
133
|
-
|
119
|
+
# Create permission config - use new simplified structure
|
120
|
+
roles = security_section.get("roles", {})
|
121
|
+
roles_file = security_section.get("roles_file")
|
122
|
+
|
123
|
+
# Enable permissions if we have roles or roles_file
|
124
|
+
permissions_enabled = bool(roles or roles_file)
|
134
125
|
|
135
126
|
if permissions_enabled:
|
136
|
-
roles_file = permissions_section.get("roles_file")
|
137
|
-
|
138
127
|
# If roles_file is None or empty string, don't pass it to avoid framework errors
|
139
128
|
if roles_file is None or roles_file == "":
|
140
129
|
logger.warning(
|
@@ -145,20 +134,14 @@ class SecurityIntegration:
|
|
145
134
|
permission_config = PermissionConfig(
|
146
135
|
enabled=True,
|
147
136
|
roles_file=roles_file,
|
148
|
-
default_role=
|
149
|
-
admin_role=
|
150
|
-
role_hierarchy=
|
151
|
-
permission_cache_enabled=
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
),
|
157
|
-
wildcard_permissions=permissions_section.get(
|
158
|
-
"wildcard_permissions", False
|
159
|
-
),
|
160
|
-
strict_mode=permissions_section.get("strict_mode", True),
|
161
|
-
roles=permissions_section.get("roles"),
|
137
|
+
default_role="guest",
|
138
|
+
admin_role="admin",
|
139
|
+
role_hierarchy={},
|
140
|
+
permission_cache_enabled=True,
|
141
|
+
permission_cache_ttl=300,
|
142
|
+
wildcard_permissions=False,
|
143
|
+
strict_mode=True,
|
144
|
+
roles=roles,
|
162
145
|
)
|
163
146
|
else:
|
164
147
|
# Create minimal permission config when permissions are disabled
|
@@ -175,57 +158,37 @@ class SecurityIntegration:
|
|
175
158
|
roles={},
|
176
159
|
)
|
177
160
|
|
178
|
-
# Create rate limit config
|
161
|
+
# Create rate limit config - use defaults since rate_limit section doesn't exist in new structure
|
179
162
|
rate_limit_config = RateLimitConfig(
|
180
|
-
enabled=
|
181
|
-
default_requests_per_minute=
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
window_size_seconds=security_section.get("rate_limit", {}).get(
|
189
|
-
"window_size_seconds", 60
|
190
|
-
),
|
191
|
-
storage_backend=security_section.get("rate_limit", {}).get(
|
192
|
-
"storage_backend", "memory"
|
193
|
-
),
|
194
|
-
exempt_paths=security_section.get("rate_limit", {}).get("exempt_paths", []),
|
195
|
-
exempt_roles=security_section.get("rate_limit", {}).get("exempt_roles", []),
|
163
|
+
enabled=True,
|
164
|
+
default_requests_per_minute=60,
|
165
|
+
default_requests_per_hour=1000,
|
166
|
+
burst_limit=2,
|
167
|
+
window_size_seconds=60,
|
168
|
+
storage_backend="memory",
|
169
|
+
exempt_paths=[],
|
170
|
+
exempt_roles=[],
|
196
171
|
)
|
197
172
|
|
198
|
-
# Create certificate config
|
173
|
+
# Create certificate config - certificates are handled by server protocol
|
199
174
|
certificate_config = CertificateConfig(
|
200
|
-
enabled=
|
201
|
-
ca_cert_path=
|
202
|
-
ca_key_path=
|
203
|
-
cert_storage_path=
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
),
|
209
|
-
default_validity_days=security_section.get("certificates", {}).get(
|
210
|
-
"default_validity_days", 365
|
211
|
-
),
|
212
|
-
key_size=security_section.get("certificates", {}).get("key_size", 2048),
|
213
|
-
hash_algorithm=security_section.get("certificates", {}).get(
|
214
|
-
"hash_algorithm", "sha256"
|
215
|
-
),
|
175
|
+
enabled=False, # Certificates are handled by server protocol
|
176
|
+
ca_cert_path=None,
|
177
|
+
ca_key_path=None,
|
178
|
+
cert_storage_path="./certs",
|
179
|
+
key_storage_path="./keys",
|
180
|
+
default_validity_days=365,
|
181
|
+
key_size=2048,
|
182
|
+
hash_algorithm="sha256",
|
216
183
|
)
|
217
184
|
|
218
|
-
# Create logging config
|
185
|
+
# Create logging config - use defaults since logging section doesn't exist in new structure
|
219
186
|
logging_config = LoggingConfig(
|
220
|
-
enabled=
|
221
|
-
level=
|
222
|
-
format=
|
223
|
-
|
224
|
-
|
225
|
-
console_output=security_section.get("logging", {}).get(
|
226
|
-
"console_output", True
|
227
|
-
),
|
228
|
-
file_path=security_section.get("logging", {}).get("file_path"),
|
187
|
+
enabled=True,
|
188
|
+
level="INFO",
|
189
|
+
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
190
|
+
console_output=True,
|
191
|
+
file_path=None,
|
229
192
|
)
|
230
193
|
|
231
194
|
# Create main security config
|
{mcp_proxy_adapter-6.4.48 → mcp_proxy_adapter-6.6.1}/mcp_proxy_adapter/core/server_adapter.py
RENAMED
@@ -67,6 +67,10 @@ class ServerConfigAdapter:
|
|
67
67
|
if ssl_config.get("verify_client", False):
|
68
68
|
hypercorn_ssl["verify_mode"] = "CERT_REQUIRED"
|
69
69
|
|
70
|
+
# Map hostname checking
|
71
|
+
if "chk_hostname" in ssl_config:
|
72
|
+
hypercorn_ssl["check_hostname"] = ssl_config["chk_hostname"]
|
73
|
+
|
70
74
|
logger.debug(f"Converted SSL config to hypercorn: {hypercorn_ssl}")
|
71
75
|
return hypercorn_ssl
|
72
76
|
|