mcp-proxy-adapter 6.9.10__py3-none-any.whl → 6.9.12__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.
@@ -851,7 +851,7 @@ class ConfigValidator:
851
851
 
852
852
  # Check certificate expiration
853
853
  now = datetime.now(timezone.utc)
854
- not_after = cert.not_valid_after.replace(tzinfo=timezone.utc)
854
+ not_after = cert.not_valid_after_utc
855
855
 
856
856
  if now > not_after:
857
857
  self.validation_results.append(ValidationResult(
@@ -1113,7 +1113,7 @@ class ConfigValidator:
1113
1113
  level="error",
1114
1114
  message=f"Error validating certificate-key pair: {e}",
1115
1115
  section=section,
1116
- key=key
1116
+ key="cert_file"
1117
1117
  ))
1118
1118
 
1119
1119
  def _validate_certificate_chain(self, cert_file: str, ca_cert_file: str, section: str) -> None:
@@ -140,9 +140,9 @@ class mTLSServer:
140
140
  self,
141
141
  host: str = "127.0.0.1",
142
142
  port: int = 8443,
143
- cert_file: str = "certs/localhost_server.crt",
144
- key_file: str = "keys/localhost_server.key",
145
- ca_cert_file: str = "certs/test_ca_ca.crt",
143
+ cert_file: str = None,
144
+ key_file: str = None,
145
+ ca_cert_file: str = None,
146
146
  main_app=None,
147
147
  ):
148
148
  """
@@ -292,10 +292,16 @@ def start_mtls_server_thread(
292
292
  from mcp_proxy_adapter.core.utils import find_port_for_internal_server
293
293
  port = find_port_for_internal_server(host, preferred_port)
294
294
 
295
- # Get certificate paths
296
- cert_file = ssl_config.get("cert_file", "certs/localhost_server.crt")
297
- key_file = ssl_config.get("key_file", "keys/localhost_server.key")
298
- ca_cert_file = ssl_config.get("ca_cert", "certs/test_ca_ca.crt")
295
+ # Get certificate paths - all required for mTLS
296
+ cert_file = ssl_config.get("cert_file")
297
+ key_file = ssl_config.get("key_file")
298
+ ca_cert_file = ssl_config.get("ca_cert")
299
+
300
+ if not cert_file or not key_file:
301
+ raise ValueError(
302
+ "mTLS server requires SSL certificate configuration. "
303
+ "Please configure 'ssl.cert_file' and 'ssl.key_file' in your configuration file."
304
+ )
299
305
 
300
306
  # Create and start mTLS server
301
307
  mtls_server = mTLSServer(
@@ -49,7 +49,7 @@ class ProxyClient:
49
49
 
50
50
  Usage:
51
51
  async with ProxyClient(
52
- base_url="https://127.0.0.1:3004",
52
+ base_url="https://your-proxy-host:3004",
53
53
  ca_cert_path="/path/to/ca.crt",
54
54
  client_cert_path="/path/to/client.crt",
55
55
  client_key_path="/path/to/client.key",
@@ -265,15 +265,6 @@ class ProxyRegistrationManager:
265
265
 
266
266
  if not self.client_security:
267
267
  logger.debug("SSL context creation failed: client_security is None")
268
- # Try best-effort default CA if available
269
- try:
270
- default_ca = "/home/vasilyvz/projects/mcp_proxy_adapter/mtls_certificates/ca/ca.crt"
271
- if Path(default_ca).exists():
272
- ctx = ssl.create_default_context(cafile=default_ca)
273
- logger.debug("Using default CA bundle for SSL verification")
274
- return ctx
275
- except Exception:
276
- pass
277
268
  return None
278
269
 
279
270
  try:
@@ -302,20 +293,13 @@ class ProxyRegistrationManager:
302
293
  cert_config = mapped_cert
303
294
  ssl_config = mapped_ssl
304
295
 
305
- # If still no client certificate specified, try default client certs from project
296
+ # If still no client certificate specified, raise clear error
306
297
  if not cert_config or not cert_config.get("cert_file") or not cert_config.get("key_file"):
307
- try:
308
- base_dir = "/home/vasilyvz/projects/mcp_proxy_adapter/mtls_certificates/client"
309
- if os.path.isdir(base_dir):
310
- crt_candidates = sorted(glob.glob(os.path.join(base_dir, "*.crt")))
311
- key_candidates = sorted(glob.glob(os.path.join(base_dir, "*.key")))
312
- if crt_candidates and key_candidates:
313
- cert_config = {
314
- "cert_file": crt_candidates[0],
315
- "key_file": key_candidates[0],
316
- }
317
- except Exception:
318
- pass
298
+ raise ValueError(
299
+ "Client certificate configuration is required for mTLS proxy registration. "
300
+ "Please configure 'proxy_registration.certificate.cert_file' and 'proxy_registration.certificate.key_file' "
301
+ "in your configuration file."
302
+ )
319
303
 
320
304
  logger.debug(
321
305
  f"SSL context creation: cert_config={cert_config}, ssl_config={ssl_config}"
@@ -328,9 +312,13 @@ class ProxyRegistrationManager:
328
312
  if ca_file and Path(ca_file).exists():
329
313
  context = ssl.create_default_context(cafile=ca_file)
330
314
  else:
331
- # Try default project CA
332
- default_ca = "/home/vasilyvz/projects/mcp_proxy_adapter/mtls_certificates/ca/ca.crt"
333
- context = ssl.create_default_context(cafile=default_ca) if Path(default_ca).exists() else ssl.create_default_context()
315
+ # No CA certificate configured - use system default
316
+ context = ssl.create_default_context()
317
+ logger.warning(
318
+ "No CA certificate configured for proxy registration. "
319
+ "This may cause SSL verification failures if the proxy uses self-signed certificates. "
320
+ "Consider configuring 'proxy_registration.ssl.ca_cert' in your configuration file."
321
+ )
334
322
 
335
323
  # Load client certificates if provided
336
324
  if cert_config:
@@ -2,4 +2,4 @@
2
2
  Version information for MCP Proxy Adapter.
3
3
  """
4
4
 
5
- __version__ = "6.9.10"
5
+ __version__ = "6.9.12"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-proxy-adapter
3
- Version: 6.9.10
3
+ Version: 6.9.12
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
@@ -4,7 +4,7 @@ mcp_proxy_adapter/config.py,sha256=1Ngxri2IPGoytYdCF5pXzbLUXsWcf6qYENkaDkAppg0,2
4
4
  mcp_proxy_adapter/custom_openapi.py,sha256=XRviX-C-ZkSKdBhORhDTdeN_1FWyEfXZADiASft3t9I,28149
5
5
  mcp_proxy_adapter/main.py,sha256=NFcSW7WaEnimRWe5zj28D0CH9otHlRZ92d2Um6XiGjE,10399
6
6
  mcp_proxy_adapter/openapi.py,sha256=2UZOI09ZDRJuBYBjKbMyb2U4uASszoCMD5o_4ktRpvg,13480
7
- mcp_proxy_adapter/version.py,sha256=sjeaOBDaenC5mbWV1ZBeLLxJEySM3gA0p4Tc6DWCGzU,75
7
+ mcp_proxy_adapter/version.py,sha256=-ib2qPGRpcqxjhDnAw7fWZIN9saMqv86oGu8JxcPnS8,75
8
8
  mcp_proxy_adapter/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  mcp_proxy_adapter/api/app.py,sha256=La7xt02j4Zbg4sSc1iL72DM3UNFVddPlN4_xpaRauVo,37214
10
10
  mcp_proxy_adapter/api/handlers.py,sha256=X-hcMNVeTAu4yVkKJEChEsj2bFptUS6sLNN-Wysjkow,10011
@@ -62,17 +62,17 @@ mcp_proxy_adapter/core/client.py,sha256=qIbPl8prEwK2U65kl-vGJW2_imo1E4i6HxG_VpPe
62
62
  mcp_proxy_adapter/core/client_manager.py,sha256=yD8HZJlOwmDbVU49YfzSbh1XZ-Vib8qfcLVAaH03Jdg,8832
63
63
  mcp_proxy_adapter/core/client_security.py,sha256=siUaYorcDbpZsEIKgLfg-jBKkp7z_Er8wsO63mDD3Is,13127
64
64
  mcp_proxy_adapter/core/config_converter.py,sha256=Wnnsrbw7DxtgDfLG-IyyzK-hkKu0_1yp7-7dW87tu_4,17422
65
- mcp_proxy_adapter/core/config_validator.py,sha256=GmzXu7HfPerIwRHuTuELyavAwqUFD2ws_Km2Z2oNOfs,54875
65
+ mcp_proxy_adapter/core/config_validator.py,sha256=B5Tu8nE_iSvB1jFJ6qseOZrUpd0QoK7phU9Sznv1HDI,54858
66
66
  mcp_proxy_adapter/core/crl_utils.py,sha256=Jnwq2UN52IoCDZCwByRP3XNMOJexftb-mVaH6zes6Fc,11706
67
67
  mcp_proxy_adapter/core/errors.py,sha256=CyhQgvMt0ooQjONa65XRBJ44y-l-E5_ES4KOuRvIpBk,8557
68
68
  mcp_proxy_adapter/core/logging.py,sha256=VIpiC6QTGLukRjiJoVpq3VEoLKhUeLNl8IdfljpW6ZU,9654
69
69
  mcp_proxy_adapter/core/mtls_asgi.py,sha256=tvk0P9024s18dcCHY9AaQIecT4ojOTv21EuQWXwooU0,5200
70
70
  mcp_proxy_adapter/core/mtls_asgi_app.py,sha256=DT_fTUH1RkvBa3ThbyCyNb-XUHyCb4DqaKA1gcZC6z4,6538
71
71
  mcp_proxy_adapter/core/mtls_proxy.py,sha256=5APlWs0ImiHGEC65W_7F-PbVO3NZ2BVSj9r14AcUtTE,6011
72
- mcp_proxy_adapter/core/mtls_server.py,sha256=GBNhLezDYSXFP1xcNaThEhBqZlxXUGp0q0OT2Ibb2M0,10366
72
+ mcp_proxy_adapter/core/mtls_server.py,sha256=y34wFnzE8TYoQKw0tEkqthEIQAv6XntASK16w7Tt4Gw,10506
73
73
  mcp_proxy_adapter/core/protocol_manager.py,sha256=iaXWsfm1XSfemz5QQBesMluc4cwf-LtuZVi9bm1uj28,14680
74
- mcp_proxy_adapter/core/proxy_client.py,sha256=CB6KBhV3vH2GU5nZ27VZ_xlNbYTAU_tnYFrkuK5He58,6094
75
- mcp_proxy_adapter/core/proxy_registration.py,sha256=QlQFHnjIN8ETWcasPDUXNMfMsU_-KdrvLTYJiDua_wI,41237
74
+ mcp_proxy_adapter/core/proxy_client.py,sha256=T9rqITYNijAw-yE4wvBe7ABN-LhJjkbIEeK6Rv1iUeA,6100
75
+ mcp_proxy_adapter/core/proxy_registration.py,sha256=foA1eLmVRhh6tWVb2gWL7ytWk9oGi1mf4vAFajrEvWg,40617
76
76
  mcp_proxy_adapter/core/role_utils.py,sha256=YwRenGoXI5YrHVbFjKFAH2DJs2miyqhcr9LWF7mxieg,12284
77
77
  mcp_proxy_adapter/core/security_adapter.py,sha256=MAtNthsp7Qj4-oLFzSi7Pr3vWQbWS_uelqa5LGgrXIE,12957
78
78
  mcp_proxy_adapter/core/security_factory.py,sha256=M-1McwUOmuV7Eo-m_P2undtJVNK_KIjDx8o_uRY8rLo,8005
@@ -135,8 +135,8 @@ mcp_proxy_adapter/schemas/base_schema.json,sha256=v9G9cGMd4dRhCZsOQ_FMqOi5VFyVbI
135
135
  mcp_proxy_adapter/schemas/openapi_schema.json,sha256=C3yLkwmDsvnLW9B5gnKKdBGl4zxkeU-rEmjTrNVsQU0,8405
136
136
  mcp_proxy_adapter/schemas/roles.json,sha256=pgf_ZyqKyXbfGUxvobpiLiSJz9zzxrMuoVWEkEpz3N8,764
137
137
  mcp_proxy_adapter/schemas/roles_schema.json,sha256=deHgI7L6GwfBXacOlNtDgDJelDThppClC3Ti4Eh8rJY,5659
138
- mcp_proxy_adapter-6.9.10.dist-info/METADATA,sha256=h4we7LJB-fUzy2mHfbzo0uJz0Ihc0O10dmVrmYcCxYQ,8511
139
- mcp_proxy_adapter-6.9.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
140
- mcp_proxy_adapter-6.9.10.dist-info/entry_points.txt,sha256=Bf-O5Aq80n22Ayu9fI9BgidzWqwzIVaqextAddTuHZw,563
141
- mcp_proxy_adapter-6.9.10.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
142
- mcp_proxy_adapter-6.9.10.dist-info/RECORD,,
138
+ mcp_proxy_adapter-6.9.12.dist-info/METADATA,sha256=6TqJW150DKE4ixti-i5QytQGR5T7Zvhx1VLCyXnK0qE,8511
139
+ mcp_proxy_adapter-6.9.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
140
+ mcp_proxy_adapter-6.9.12.dist-info/entry_points.txt,sha256=Bf-O5Aq80n22Ayu9fI9BgidzWqwzIVaqextAddTuHZw,563
141
+ mcp_proxy_adapter-6.9.12.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
142
+ mcp_proxy_adapter-6.9.12.dist-info/RECORD,,