mcp-proxy-adapter 6.1.1__py3-none-any.whl → 6.2.1__py3-none-any.whl

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.
Files changed (146) hide show
  1. mcp_proxy_adapter/__main__.py +27 -7
  2. mcp_proxy_adapter/api/app.py +18 -7
  3. mcp_proxy_adapter/commands/ssl_setup_command.py +234 -351
  4. mcp_proxy_adapter/core/app_factory.py +87 -3
  5. mcp_proxy_adapter/core/app_runner.py +272 -0
  6. mcp_proxy_adapter/core/certificate_utils.py +291 -73
  7. mcp_proxy_adapter/core/client.py +574 -0
  8. mcp_proxy_adapter/core/client_manager.py +284 -0
  9. mcp_proxy_adapter/core/server_adapter.py +17 -80
  10. mcp_proxy_adapter/core/server_engine.py +5 -99
  11. mcp_proxy_adapter/core/ssl_utils.py +13 -12
  12. mcp_proxy_adapter/core/transport_manager.py +5 -5
  13. mcp_proxy_adapter/examples/__init__.py +16 -0
  14. mcp_proxy_adapter/examples/basic_framework/__init__.py +7 -0
  15. mcp_proxy_adapter/examples/basic_framework/commands/__init__.py +4 -0
  16. mcp_proxy_adapter/examples/basic_framework/hooks/__init__.py +4 -0
  17. mcp_proxy_adapter/examples/basic_framework/main.py +21 -40
  18. mcp_proxy_adapter/examples/commands/__init__.py +5 -1
  19. mcp_proxy_adapter/examples/create_certificates_simple.py +260 -75
  20. mcp_proxy_adapter/examples/debug_request_state.py +4 -36
  21. mcp_proxy_adapter/examples/debug_role_chain.py +2 -49
  22. mcp_proxy_adapter/examples/demo_client.py +0 -66
  23. mcp_proxy_adapter/examples/full_application/__init__.py +11 -0
  24. mcp_proxy_adapter/examples/full_application/commands/__init__.py +7 -0
  25. mcp_proxy_adapter/examples/full_application/commands/custom_echo_command.py +0 -19
  26. mcp_proxy_adapter/examples/full_application/commands/dynamic_calculator_command.py +0 -16
  27. mcp_proxy_adapter/examples/full_application/hooks/__init__.py +7 -0
  28. mcp_proxy_adapter/examples/full_application/hooks/application_hooks.py +0 -22
  29. mcp_proxy_adapter/examples/full_application/hooks/builtin_command_hooks.py +0 -24
  30. mcp_proxy_adapter/examples/full_application/main.py +65 -44
  31. mcp_proxy_adapter/examples/full_application/proxy_endpoints.py +154 -0
  32. mcp_proxy_adapter/examples/generate_all_certificates.py +0 -67
  33. mcp_proxy_adapter/examples/generate_certificates.py +0 -15
  34. mcp_proxy_adapter/examples/generate_certificates_and_tokens.py +369 -0
  35. mcp_proxy_adapter/examples/generate_test_configs.py +204 -0
  36. mcp_proxy_adapter/examples/proxy_registration_example.py +3 -70
  37. mcp_proxy_adapter/examples/run_example.py +1 -23
  38. mcp_proxy_adapter/examples/run_security_tests.py +2 -60
  39. mcp_proxy_adapter/examples/run_security_tests_fixed.py +0 -53
  40. mcp_proxy_adapter/examples/security_test_client.py +18 -123
  41. mcp_proxy_adapter/examples/setup_test_environment.py +179 -0
  42. mcp_proxy_adapter/examples/test_config.py +148 -0
  43. mcp_proxy_adapter/examples/test_config_generator.py +1 -25
  44. mcp_proxy_adapter/examples/test_examples.py +4 -67
  45. mcp_proxy_adapter/examples/universal_client.py +154 -162
  46. mcp_proxy_adapter/main.py +51 -161
  47. mcp_proxy_adapter/version.py +1 -1
  48. mcp_proxy_adapter-6.2.1.dist-info/METADATA +676 -0
  49. mcp_proxy_adapter-6.2.1.dist-info/RECORD +119 -0
  50. mcp_proxy_adapter/docs/EN/TROUBLESHOOTING.md +0 -285
  51. mcp_proxy_adapter/docs/RU/TROUBLESHOOTING.md +0 -285
  52. mcp_proxy_adapter/examples/README.md +0 -257
  53. mcp_proxy_adapter/examples/README_EN.md +0 -258
  54. mcp_proxy_adapter/examples/SECURITY_TESTING.md +0 -455
  55. mcp_proxy_adapter/examples/basic_framework/configs/http_auth.json +0 -37
  56. mcp_proxy_adapter/examples/basic_framework/configs/http_simple.json +0 -23
  57. mcp_proxy_adapter/examples/basic_framework/configs/https_auth.json +0 -43
  58. mcp_proxy_adapter/examples/basic_framework/configs/https_no_protocol_middleware.json +0 -36
  59. mcp_proxy_adapter/examples/basic_framework/configs/https_simple.json +0 -29
  60. mcp_proxy_adapter/examples/basic_framework/configs/mtls_no_protocol_middleware.json +0 -34
  61. mcp_proxy_adapter/examples/basic_framework/configs/mtls_no_roles.json +0 -39
  62. mcp_proxy_adapter/examples/basic_framework/configs/mtls_simple.json +0 -35
  63. mcp_proxy_adapter/examples/basic_framework/configs/mtls_with_roles.json +0 -45
  64. mcp_proxy_adapter/examples/basic_framework/roles.json +0 -21
  65. mcp_proxy_adapter/examples/cert_config.json +0 -9
  66. mcp_proxy_adapter/examples/certs/admin.crt +0 -32
  67. mcp_proxy_adapter/examples/certs/admin.key +0 -52
  68. mcp_proxy_adapter/examples/certs/admin_cert.pem +0 -21
  69. mcp_proxy_adapter/examples/certs/admin_key.pem +0 -28
  70. mcp_proxy_adapter/examples/certs/ca_cert.pem +0 -23
  71. mcp_proxy_adapter/examples/certs/ca_cert.srl +0 -1
  72. mcp_proxy_adapter/examples/certs/ca_key.pem +0 -28
  73. mcp_proxy_adapter/examples/certs/cert_config.json +0 -9
  74. mcp_proxy_adapter/examples/certs/client.crt +0 -32
  75. mcp_proxy_adapter/examples/certs/client.key +0 -52
  76. mcp_proxy_adapter/examples/certs/client_admin.crt +0 -32
  77. mcp_proxy_adapter/examples/certs/client_admin.key +0 -52
  78. mcp_proxy_adapter/examples/certs/client_user.crt +0 -32
  79. mcp_proxy_adapter/examples/certs/client_user.key +0 -52
  80. mcp_proxy_adapter/examples/certs/guest_cert.pem +0 -21
  81. mcp_proxy_adapter/examples/certs/guest_key.pem +0 -28
  82. mcp_proxy_adapter/examples/certs/mcp_proxy_adapter_ca_ca.crt +0 -23
  83. mcp_proxy_adapter/examples/certs/proxy_cert.pem +0 -21
  84. mcp_proxy_adapter/examples/certs/proxy_key.pem +0 -28
  85. mcp_proxy_adapter/examples/certs/readonly.crt +0 -32
  86. mcp_proxy_adapter/examples/certs/readonly.key +0 -52
  87. mcp_proxy_adapter/examples/certs/readonly_cert.pem +0 -21
  88. mcp_proxy_adapter/examples/certs/readonly_key.pem +0 -28
  89. mcp_proxy_adapter/examples/certs/server.crt +0 -32
  90. mcp_proxy_adapter/examples/certs/server.key +0 -52
  91. mcp_proxy_adapter/examples/certs/server_cert.pem +0 -32
  92. mcp_proxy_adapter/examples/certs/server_key.pem +0 -52
  93. mcp_proxy_adapter/examples/certs/test_ca_ca.crt +0 -20
  94. mcp_proxy_adapter/examples/certs/user.crt +0 -32
  95. mcp_proxy_adapter/examples/certs/user.key +0 -52
  96. mcp_proxy_adapter/examples/certs/user_cert.pem +0 -21
  97. mcp_proxy_adapter/examples/certs/user_key.pem +0 -28
  98. mcp_proxy_adapter/examples/client_configs/api_key_client.json +0 -13
  99. mcp_proxy_adapter/examples/client_configs/basic_auth_client.json +0 -13
  100. mcp_proxy_adapter/examples/client_configs/certificate_client.json +0 -22
  101. mcp_proxy_adapter/examples/client_configs/jwt_client.json +0 -15
  102. mcp_proxy_adapter/examples/client_configs/no_auth_client.json +0 -9
  103. mcp_proxy_adapter/examples/full_application/configs/http_auth.json +0 -37
  104. mcp_proxy_adapter/examples/full_application/configs/http_simple.json +0 -23
  105. mcp_proxy_adapter/examples/full_application/configs/https_auth.json +0 -39
  106. mcp_proxy_adapter/examples/full_application/configs/https_simple.json +0 -25
  107. mcp_proxy_adapter/examples/full_application/configs/mtls_no_roles.json +0 -39
  108. mcp_proxy_adapter/examples/full_application/configs/mtls_with_roles.json +0 -45
  109. mcp_proxy_adapter/examples/full_application/roles.json +0 -21
  110. mcp_proxy_adapter/examples/keys/ca_key.pem +0 -28
  111. mcp_proxy_adapter/examples/keys/mcp_proxy_adapter_ca_ca.key +0 -28
  112. mcp_proxy_adapter/examples/keys/test_ca_ca.key +0 -28
  113. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log +0 -220
  114. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.1 +0 -1
  115. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.2 +0 -1
  116. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.3 +0 -1
  117. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.4 +0 -1
  118. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.5 +0 -1
  119. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log +0 -220
  120. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.1 +0 -1
  121. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.2 +0 -1
  122. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.3 +0 -1
  123. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.4 +0 -1
  124. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.5 +0 -1
  125. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log +0 -2
  126. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.1 +0 -1
  127. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.2 +0 -1
  128. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.3 +0 -1
  129. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.4 +0 -1
  130. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.5 +0 -1
  131. mcp_proxy_adapter/examples/roles.json +0 -38
  132. mcp_proxy_adapter/examples/server_configs/config_basic_http.json +0 -204
  133. mcp_proxy_adapter/examples/server_configs/config_http_token.json +0 -238
  134. mcp_proxy_adapter/examples/server_configs/config_https.json +0 -215
  135. mcp_proxy_adapter/examples/server_configs/config_https_token.json +0 -231
  136. mcp_proxy_adapter/examples/server_configs/config_mtls.json +0 -215
  137. mcp_proxy_adapter/examples/server_configs/config_proxy_registration.json +0 -250
  138. mcp_proxy_adapter/examples/server_configs/config_simple.json +0 -46
  139. mcp_proxy_adapter/examples/server_configs/roles.json +0 -38
  140. mcp_proxy_adapter/utils/config_generator.py +0 -727
  141. mcp_proxy_adapter-6.1.1.dist-info/METADATA +0 -205
  142. mcp_proxy_adapter-6.1.1.dist-info/RECORD +0 -197
  143. mcp_proxy_adapter-6.1.1.dist-info/entry_points.txt +0 -2
  144. mcp_proxy_adapter-6.1.1.dist-info/licenses/LICENSE +0 -21
  145. {mcp_proxy_adapter-6.1.1.dist-info → mcp_proxy_adapter-6.2.1.dist-info}/WHEEL +0 -0
  146. {mcp_proxy_adapter-6.1.1.dist-info → mcp_proxy_adapter-6.2.1.dist-info}/top_level.txt +0 -0
@@ -1,204 +0,0 @@
1
- {
2
- "server": {
3
- "host": "0.0.0.0",
4
- "port": 8000,
5
- "debug": false,
6
- "log_level": "INFO",
7
- "workers": 1,
8
- "reload": false
9
- },
10
- "security": {
11
- "framework": "mcp_security_framework",
12
- "enabled": false,
13
- "debug": false,
14
- "environment": "test",
15
- "version": "1.0.0",
16
-
17
- "ssl": {
18
- "enabled": false,
19
- "cert_file": null,
20
- "key_file": null,
21
- "ca_cert_file": null,
22
- "client_cert_file": null,
23
- "client_key_file": null,
24
- "verify_mode": "CERT_NONE",
25
- "min_tls_version": "TLSv1.2",
26
- "max_tls_version": null,
27
- "cipher_suite": null,
28
- "check_hostname": false,
29
- "check_expiry": false,
30
- "expiry_warning_days": 30
31
- },
32
-
33
- "auth": {
34
- "enabled": false,
35
- "methods": [],
36
- "api_keys": {},
37
- "user_roles": {},
38
- "jwt_secret": null,
39
- "jwt_algorithm": "HS256",
40
- "jwt_expiry_hours": 24,
41
- "certificate_auth": false,
42
- "certificate_roles_oid": "1.3.6.1.4.1.99999.1.1",
43
- "certificate_permissions_oid": "1.3.6.1.4.1.99999.1.2",
44
- "basic_auth": false,
45
- "oauth2_config": null,
46
- "public_paths": ["/health", "/docs", "/openapi.json"],
47
- "security_headers": null
48
- },
49
-
50
- "certificates": {
51
- "enabled": false,
52
- "ca_cert_path": null,
53
- "ca_key_path": null,
54
- "cert_storage_path": "./certs",
55
- "key_storage_path": "./keys",
56
- "default_validity_days": 365,
57
- "key_size": 2048,
58
- "hash_algorithm": "sha256",
59
- "crl_enabled": false,
60
- "crl_path": null,
61
- "crl_validity_days": 30,
62
- "auto_renewal": false,
63
- "renewal_threshold_days": 30
64
- },
65
-
66
- "permissions": {
67
- "enabled": false,
68
- "roles_file": null,
69
- "default_role": "guest",
70
- "admin_role": "admin",
71
- "role_hierarchy": {},
72
- "permission_cache_enabled": false,
73
- "permission_cache_ttl": 300,
74
- "wildcard_permissions": false,
75
- "strict_mode": false,
76
- "roles": {}
77
- },
78
-
79
- "rate_limit": {
80
- "enabled": false,
81
- "default_requests_per_minute": 60,
82
- "default_requests_per_hour": 1000,
83
- "burst_limit": 2,
84
- "window_size_seconds": 60,
85
- "storage_backend": "memory",
86
- "redis_config": null,
87
- "cleanup_interval": 300,
88
- "exempt_paths": ["/health", "/docs", "/openapi.json"],
89
- "exempt_roles": ["admin"]
90
- },
91
-
92
- "logging": {
93
- "enabled": true,
94
- "level": "INFO",
95
- "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s",
96
- "date_format": "%Y-%m-%d %H:%M:%S",
97
- "file_path": null,
98
- "max_file_size": 10,
99
- "backup_count": 5,
100
- "console_output": true,
101
- "json_format": false,
102
- "include_timestamp": true,
103
- "include_level": true,
104
- "include_module": true
105
- }
106
- },
107
-
108
- "registration": {
109
- "enabled": false,
110
- "server_url": null,
111
- "auth_method": "none",
112
- "certificate": {
113
- "enabled": false,
114
- "cert_file": null,
115
- "key_file": null,
116
- "ca_cert_file": null,
117
- "verify_server": false
118
- },
119
- "token": {
120
- "enabled": false,
121
- "token": null,
122
- "token_type": "bearer",
123
- "refresh_interval": 3600
124
- },
125
- "api_key": {
126
- "enabled": false,
127
- "key": null,
128
- "key_header": "X-Proxy-API-Key"
129
- },
130
- "proxy_info": {
131
- "name": "mcp_proxy_adapter",
132
- "version": "1.0.0",
133
- "description": "MCP Proxy Adapter - Basic HTTP",
134
- "capabilities": ["jsonrpc", "rest"],
135
- "endpoints": {
136
- "jsonrpc": "/api/jsonrpc",
137
- "rest": "/cmd",
138
- "health": "/health"
139
- }
140
- },
141
- "heartbeat": {
142
- "enabled": false,
143
- "interval": 300,
144
- "timeout": 30,
145
- "retry_attempts": 3,
146
- "retry_delay": 60
147
- },
148
- "auto_discovery": {
149
- "enabled": false,
150
- "discovery_urls": [],
151
- "discovery_interval": 3600,
152
- "register_on_discovery": false
153
- }
154
- },
155
-
156
- "logging": {
157
- "level": "INFO",
158
- "console_output": true,
159
- "file_output": false,
160
- "file_path": null,
161
- "max_file_size": 10,
162
- "backup_count": 5,
163
- "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
164
- },
165
-
166
- "commands": {
167
- "auto_discovery": true,
168
- "commands_directory": "./commands",
169
- "builtin_commands": ["echo", "health", "config"],
170
- "custom_commands": [],
171
- "command_timeout": 30
172
- },
173
-
174
- "hooks": {
175
- "enabled": true,
176
- "application_hooks": {
177
- "on_startup": [],
178
- "on_shutdown": [],
179
- "before_request": [],
180
- "after_request": [],
181
- "on_error": []
182
- },
183
- "command_hooks": {
184
- "before_echo_command": [],
185
- "after_echo_command": [],
186
- "before_health_command": [],
187
- "after_health_command": [],
188
- "before_config_command": [],
189
- "after_config_command": []
190
- }
191
- },
192
-
193
- "protocol": {
194
- "jsonrpc": {
195
- "enabled": true,
196
- "version": "2.0",
197
- "endpoint": "/api/jsonrpc"
198
- },
199
- "rest": {
200
- "enabled": true,
201
- "endpoint": "/cmd"
202
- }
203
- }
204
- }
@@ -1,238 +0,0 @@
1
- {
2
- "server": {
3
- "host": "0.0.0.0",
4
- "port": 8001,
5
- "debug": false,
6
- "log_level": "INFO",
7
- "workers": 1,
8
- "reload": false
9
- },
10
- "security": {
11
- "framework": "mcp_security_framework",
12
- "enabled": true,
13
- "debug": false,
14
- "environment": "test",
15
- "version": "1.0.0",
16
-
17
- "ssl": {
18
- "enabled": false,
19
- "cert_file": null,
20
- "key_file": null,
21
- "ca_cert_file": null,
22
- "client_cert_file": null,
23
- "client_key_file": null,
24
- "verify_mode": "CERT_NONE",
25
- "min_tls_version": "TLSv1.2",
26
- "max_tls_version": null,
27
- "cipher_suite": null,
28
- "check_hostname": false,
29
- "check_expiry": false,
30
- "expiry_warning_days": 30
31
- },
32
-
33
- "auth": {
34
- "enabled": true,
35
- "methods": ["api_key"],
36
- "api_keys": {
37
- "test-token-123": {
38
- "roles": ["admin"],
39
- "permissions": ["*"],
40
- "expires": null
41
- },
42
- "user-token-456": {
43
- "roles": ["user"],
44
- "permissions": ["read", "execute"],
45
- "expires": null
46
- },
47
- "readonly-token-123": {
48
- "roles": ["readonly"],
49
- "permissions": ["read"],
50
- "expires": null
51
- }
52
- },
53
- "user_roles": {
54
- "admin": ["admin"],
55
- "user": ["user"],
56
- "readonly": ["readonly"],
57
- "test": ["user"]
58
- },
59
- "jwt_secret": "test-jwt-secret-key-change-in-production",
60
- "jwt_algorithm": "HS256",
61
- "jwt_expiry_hours": 24,
62
- "certificate_auth": false,
63
- "certificate_roles_oid": "1.3.6.1.4.1.99999.1.1",
64
- "certificate_permissions_oid": "1.3.6.1.4.1.99999.1.2",
65
- "basic_auth": false,
66
- "oauth2_config": null,
67
- "public_paths": ["/health", "/docs", "/openapi.json"],
68
- "security_headers": {
69
- "X-Content-Type-Options": "nosniff",
70
- "X-Frame-Options": "DENY",
71
- "X-XSS-Protection": "1; mode=block"
72
- }
73
- },
74
-
75
- "certificates": {
76
- "enabled": false,
77
- "ca_cert_path": null,
78
- "ca_key_path": null,
79
- "cert_storage_path": "./certs",
80
- "key_storage_path": "./keys",
81
- "default_validity_days": 365,
82
- "key_size": 2048,
83
- "hash_algorithm": "sha256",
84
- "crl_enabled": false,
85
- "crl_path": null,
86
- "crl_validity_days": 30,
87
- "auto_renewal": false,
88
- "renewal_threshold_days": 30
89
- },
90
-
91
- "permissions": {
92
- "enabled": true,
93
- "roles_file": "./server_configs/roles.json",
94
- "default_role": "guest",
95
- "admin_role": "admin",
96
- "role_hierarchy": {
97
- "admin": ["user", "readonly", "guest"],
98
- "user": ["readonly", "guest"],
99
- "readonly": ["guest"]
100
- },
101
- "permission_cache_enabled": true,
102
- "permission_cache_ttl": 300,
103
- "wildcard_permissions": false,
104
- "strict_mode": true,
105
- "roles": {
106
- "admin": ["*"],
107
- "user": ["read", "write"],
108
- "readonly": ["read"],
109
- "guest": ["read"]
110
- }
111
- },
112
-
113
- "rate_limit": {
114
- "enabled": true,
115
- "default_requests_per_minute": 60,
116
- "default_requests_per_hour": 1000,
117
- "burst_limit": 2,
118
- "window_size_seconds": 60,
119
- "storage_backend": "memory",
120
- "redis_config": null,
121
- "cleanup_interval": 300,
122
- "exempt_paths": ["/health", "/docs", "/openapi.json"],
123
- "exempt_roles": ["admin"]
124
- },
125
-
126
- "logging": {
127
- "enabled": true,
128
- "level": "INFO",
129
- "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s",
130
- "date_format": "%Y-%m-%d %H:%M:%S",
131
- "file_path": "./logs/security.log",
132
- "max_file_size": 10,
133
- "backup_count": 5,
134
- "console_output": true,
135
- "json_format": false,
136
- "include_timestamp": true,
137
- "include_level": true,
138
- "include_module": true
139
- }
140
- },
141
-
142
- "registration": {
143
- "enabled": false,
144
- "server_url": null,
145
- "auth_method": "none",
146
- "certificate": {
147
- "enabled": false,
148
- "cert_file": null,
149
- "key_file": null,
150
- "ca_cert_file": null,
151
- "verify_server": false
152
- },
153
- "token": {
154
- "enabled": false,
155
- "token": null,
156
- "token_type": "bearer",
157
- "refresh_interval": 3600
158
- },
159
- "api_key": {
160
- "enabled": false,
161
- "key": null,
162
- "key_header": "X-Proxy-API-Key"
163
- },
164
- "proxy_info": {
165
- "name": "mcp_proxy_adapter",
166
- "version": "1.0.0",
167
- "description": "MCP Proxy Adapter - HTTP with Token Auth",
168
- "capabilities": ["jsonrpc", "rest", "security"],
169
- "endpoints": {
170
- "jsonrpc": "/api/jsonrpc",
171
- "rest": "/cmd",
172
- "health": "/health"
173
- }
174
- },
175
- "heartbeat": {
176
- "enabled": false,
177
- "interval": 300,
178
- "timeout": 30,
179
- "retry_attempts": 3,
180
- "retry_delay": 60
181
- },
182
- "auto_discovery": {
183
- "enabled": false,
184
- "discovery_urls": [],
185
- "discovery_interval": 3600,
186
- "register_on_discovery": false
187
- }
188
- },
189
-
190
- "logging": {
191
- "level": "INFO",
192
- "console_output": true,
193
- "file_output": true,
194
- "file_path": "./logs/server.log",
195
- "max_file_size": 10,
196
- "backup_count": 5,
197
- "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
198
- },
199
-
200
- "commands": {
201
- "auto_discovery": true,
202
- "commands_directory": "./commands",
203
- "builtin_commands": ["echo", "health", "config"],
204
- "custom_commands": [],
205
- "command_timeout": 30
206
- },
207
-
208
- "hooks": {
209
- "enabled": true,
210
- "application_hooks": {
211
- "on_startup": [],
212
- "on_shutdown": [],
213
- "before_request": [],
214
- "after_request": [],
215
- "on_error": []
216
- },
217
- "command_hooks": {
218
- "before_echo_command": [],
219
- "after_echo_command": [],
220
- "before_health_command": [],
221
- "after_health_command": [],
222
- "before_config_command": [],
223
- "after_config_command": []
224
- }
225
- },
226
-
227
- "protocol": {
228
- "jsonrpc": {
229
- "enabled": true,
230
- "version": "2.0",
231
- "endpoint": "/api/jsonrpc"
232
- },
233
- "rest": {
234
- "enabled": true,
235
- "endpoint": "/cmd"
236
- }
237
- }
238
- }
@@ -1,215 +0,0 @@
1
- {
2
- "server": {
3
- "host": "0.0.0.0",
4
- "port": 8443,
5
- "debug": false,
6
- "log_level": "INFO",
7
- "workers": 1,
8
- "reload": false
9
- },
10
- "ssl": {
11
- "enabled": true,
12
- "cert_file": "./mcp_proxy_adapter/examples/certs/server_cert.pem",
13
- "key_file": "./mcp_proxy_adapter/examples/certs/server_key.pem",
14
- "ca_cert": "./mcp_proxy_adapter/examples/certs/ca_cert.pem",
15
- "verify_client": false,
16
- "client_cert_required": false,
17
- "cipher_suites": ["TLS_AES_256_GCM_SHA384", "TLS_CHACHA20_POLY1305_SHA256"],
18
- "min_tls_version": "TLSv1.2",
19
- "max_tls_version": "1.3"
20
- },
21
- "security": {
22
- "framework": "mcp_security_framework",
23
- "enabled": true,
24
- "debug": false,
25
- "environment": "test",
26
- "version": "1.0.0",
27
-
28
- "ssl": {
29
- "enabled": true,
30
- "cert_file": "./mcp_proxy_adapter/examples/certs/server_cert.pem",
31
- "key_file": "./mcp_proxy_adapter/examples/certs/server_key.pem",
32
- "ca_cert_file": "./mcp_proxy_adapter/examples/certs/ca_cert.pem",
33
- "client_cert_file": null,
34
- "client_key_file": null,
35
- "verify_mode": "CERT_NONE",
36
- "min_tls_version": "TLSv1.2",
37
- "max_tls_version": null,
38
- "cipher_suite": null,
39
- "check_hostname": false,
40
- "check_expiry": true,
41
- "expiry_warning_days": 30
42
- },
43
-
44
- "auth": {
45
- "enabled": false,
46
- "methods": [],
47
- "api_keys": {},
48
- "user_roles": {},
49
- "jwt_secret": null,
50
- "jwt_algorithm": "HS256",
51
- "jwt_expiry_hours": 24,
52
- "certificate_auth": false,
53
- "certificate_roles_oid": "1.3.6.1.4.1.99999.1.1",
54
- "certificate_permissions_oid": "1.3.6.1.4.1.99999.1.2",
55
- "basic_auth": false,
56
- "oauth2_config": null,
57
- "public_paths": ["/health", "/docs", "/openapi.json"],
58
- "security_headers": {
59
- "X-Content-Type-Options": "nosniff",
60
- "X-Frame-Options": "DENY",
61
- "X-XSS-Protection": "1; mode=block",
62
- "Strict-Transport-Security": "max-age=31536000; includeSubDomains"
63
- }
64
- },
65
-
66
- "certificates": {
67
- "enabled": true,
68
- "ca_cert_path": "./mcp_proxy_adapter/examples/certs/ca_cert.pem",
69
- "ca_key_path": "./mcp_proxy_adapter/examples/keys/mcp_proxy_adapter_ca_ca.key",
70
- "cert_storage_path": "./mcp_proxy_adapter/examples/certs",
71
- "key_storage_path": "./mcp_proxy_adapter/examples/keys",
72
- "default_validity_days": 365,
73
- "key_size": 2048,
74
- "hash_algorithm": "sha256",
75
- "crl_enabled": false,
76
- "crl_path": null,
77
- "crl_validity_days": 30,
78
- "auto_renewal": false,
79
- "renewal_threshold_days": 30
80
- },
81
-
82
- "permissions": {
83
- "enabled": false,
84
- "roles_file": null,
85
- "default_role": "guest",
86
- "admin_role": "admin",
87
- "role_hierarchy": {},
88
- "permission_cache_enabled": false,
89
- "permission_cache_ttl": 300,
90
- "wildcard_permissions": false,
91
- "strict_mode": false,
92
- "roles": {}
93
- },
94
-
95
- "rate_limit": {
96
- "enabled": false,
97
- "default_requests_per_minute": 60,
98
- "default_requests_per_hour": 1000,
99
- "burst_limit": 2,
100
- "window_size_seconds": 60,
101
- "storage_backend": "memory",
102
- "redis_config": null,
103
- "cleanup_interval": 300,
104
- "exempt_paths": ["/health", "/docs", "/openapi.json"],
105
- "exempt_roles": ["admin"]
106
- },
107
-
108
- "logging": {
109
- "enabled": true,
110
- "level": "INFO",
111
- "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s",
112
- "date_format": "%Y-%m-%d %H:%M:%S",
113
- "file_path": "./logs/security.log",
114
- "max_file_size": 10,
115
- "backup_count": 5,
116
- "console_output": true,
117
- "json_format": false,
118
- "include_timestamp": true,
119
- "include_level": true,
120
- "include_module": true
121
- }
122
- },
123
-
124
- "registration": {
125
- "enabled": false,
126
- "server_url": null,
127
- "auth_method": "none",
128
- "certificate": {
129
- "enabled": false,
130
- "cert_file": null,
131
- "key_file": null,
132
- "ca_cert_file": null,
133
- "verify_server": false
134
- },
135
- "token": {
136
- "enabled": false,
137
- "token": null,
138
- "token_type": "bearer",
139
- "refresh_interval": 3600
140
- },
141
- "api_key": {
142
- "enabled": false,
143
- "key": null,
144
- "key_header": "X-Proxy-API-Key"
145
- },
146
- "proxy_info": {
147
- "name": "mcp_proxy_adapter",
148
- "version": "1.0.0",
149
- "description": "MCP Proxy Adapter - HTTPS",
150
- "capabilities": ["jsonrpc", "rest", "ssl"],
151
- "endpoints": {
152
- "jsonrpc": "/api/jsonrpc",
153
- "rest": "/cmd",
154
- "health": "/health"
155
- }
156
- },
157
- "heartbeat": {
158
- "enabled": false,
159
- "interval": 300,
160
- "timeout": 30,
161
- "retry_attempts": 3,
162
- "retry_delay": 60
163
- },
164
- "auto_discovery": {
165
- "enabled": false,
166
- "discovery_urls": [],
167
- "discovery_interval": 3600,
168
- "register_on_discovery": false
169
- }
170
- },
171
-
172
- "logging": {
173
- "level": "INFO",
174
- "console_output": true,
175
- "file_output": true,
176
- "file_path": "./logs/server.log",
177
- "max_file_size": 10,
178
- "backup_count": 5,
179
- "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
180
- },
181
-
182
- "commands": {
183
- "auto_discovery": true,
184
- "commands_directory": "./commands",
185
- "builtin_commands": ["echo", "health", "config"],
186
- "custom_commands": [],
187
- "command_timeout": 30
188
- },
189
-
190
- "hooks": {
191
- "enabled": true,
192
- "application_hooks": {
193
- "on_startup": [],
194
- "on_shutdown": [],
195
- "before_request": [],
196
- "after_request": [],
197
- "on_error": []
198
- },
199
- "command_hooks": {
200
- "before_echo_command": [],
201
- "after_echo_command": [],
202
- "before_health_command": [],
203
- "after_health_command": [],
204
- "before_config_command": [],
205
- "after_config_command": []
206
- }
207
- },
208
-
209
- "protocols": {
210
- "enabled": true,
211
- "allowed_protocols": ["http", "https"],
212
- "default_protocol": "https",
213
- "strict_mode": false
214
- }
215
- }