mcp-security-framework 1.2.2__py3-none-any.whl → 1.2.3__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.
- mcp_security_framework/__init__.py +1 -1
- mcp_security_framework/core/cert_manager.py +5 -0
- {mcp_security_framework-1.2.2.dist-info → mcp_security_framework-1.2.3.dist-info}/METADATA +1 -1
- {mcp_security_framework-1.2.2.dist-info → mcp_security_framework-1.2.3.dist-info}/RECORD +8 -8
- tests/test_core/test_cert_manager.py +44 -0
- {mcp_security_framework-1.2.2.dist-info → mcp_security_framework-1.2.3.dist-info}/WHEEL +0 -0
- {mcp_security_framework-1.2.2.dist-info → mcp_security_framework-1.2.3.dist-info}/entry_points.txt +0 -0
- {mcp_security_framework-1.2.2.dist-info → mcp_security_framework-1.2.3.dist-info}/top_level.txt +0 -0
@@ -1953,6 +1953,11 @@ WvWwM6xqxW0Sf6s5AxJmTn3amZ0G+aP4Y2AEojlbQR7g5aigKbFQqGDFW07egp6
|
|
1953
1953
|
if not self.config.enabled:
|
1954
1954
|
return
|
1955
1955
|
|
1956
|
+
# BUGFIX: Skip CA path validation if in CA creation mode
|
1957
|
+
if self.config.ca_creation_mode:
|
1958
|
+
self.logger.info("CA creation mode enabled, skipping CA path validation")
|
1959
|
+
return
|
1960
|
+
|
1956
1961
|
if not self.config.ca_cert_path:
|
1957
1962
|
raise CertificateConfigurationError("CA certificate path is required")
|
1958
1963
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mcp-security-framework
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.3
|
4
4
|
Summary: Universal security framework for microservices with SSL/TLS, authentication, authorization, and rate limiting. Requires cryptography>=42.0.0 for certificate operations.
|
5
5
|
Author-email: Vasiliy Zdanovskiy <vasilyvz@gmail.com>
|
6
6
|
Maintainer-email: Vasiliy Zdanovskiy <vasilyvz@gmail.com>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
mcp_security_framework/__init__.py,sha256=
|
1
|
+
mcp_security_framework/__init__.py,sha256=ljFr1tiyy5JeHkk8a77Z3YuC6usyvIwlS01XuL1bsp8,3172
|
2
2
|
mcp_security_framework/constants.py,sha256=k7NMSrgc83Cci8aoilybQxdC7jir7J-mVFE_EpqVrDk,5307
|
3
3
|
mcp_security_framework/cli/__init__.py,sha256=plpWdiWMp2dcLvUuGwXynRg5CDjz8YKnNTBn7lcta08,369
|
4
4
|
mcp_security_framework/cli/cert_cli.py,sha256=LdZ3SYKM3e3dP5LsVR5Y0OENtlG0ENu64aHefHjuiN8,23818
|
5
5
|
mcp_security_framework/cli/security_cli.py,sha256=Thine_Zzfesz7j29y2k_XZFYUK5YSrhCc6w2FilgEiE,28486
|
6
6
|
mcp_security_framework/core/__init__.py,sha256=LiX8_M5qWiTXccJFjSLxup9emhklp-poq57SvznsKEg,1729
|
7
7
|
mcp_security_framework/core/auth_manager.py,sha256=GqGAW83Qg1_z2HJ0-FEVTmlli_DBSOPOap2jJMEU1_k,39882
|
8
|
-
mcp_security_framework/core/cert_manager.py,sha256=
|
8
|
+
mcp_security_framework/core/cert_manager.py,sha256=F3rWpqi-YZtaCt3g-KpoqJ1WY22TGaVLEkacKKTrHxw,89094
|
9
9
|
mcp_security_framework/core/permission_manager.py,sha256=SADS_oXpwp9MhXHKJMCsvjEq8KWcz7vPYL05Yr-zfio,26478
|
10
10
|
mcp_security_framework/core/rate_limiter.py,sha256=6qjVBxK2YHouSxQuCcbr0PBpRqA5toQss_Ce178RElY,20682
|
11
11
|
mcp_security_framework/core/security_manager.py,sha256=mAF-5znqxin-MSSgXISB7t1kTkqHltEqGzzmlLAhRGs,37766
|
@@ -45,7 +45,7 @@ tests/test_cli/test_cert_cli.py,sha256=Rm7z-20VAvnmYKY3sgxS-qVNks1vbniQJSpSxjsx_
|
|
45
45
|
tests/test_cli/test_security_cli.py,sha256=Bpd31IPJSUl_V1Xzy74ZCOvQpwlbj8Da83C46T8Jewg,25569
|
46
46
|
tests/test_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
47
47
|
tests/test_core/test_auth_manager.py,sha256=7Z2DLfJLqKtiwX5Q-lR85hN6NxHbE2Q_FT7IsoyKPQk,22568
|
48
|
-
tests/test_core/test_cert_manager.py,sha256=
|
48
|
+
tests/test_core/test_cert_manager.py,sha256=AVaJlWrWTFMO4MqxzVx39QAwB5zbYhVHQwdYUgNNplk,38091
|
49
49
|
tests/test_core/test_permission_manager.py,sha256=0XeghWXZqVpKyyRuhuDu1dkLUSwuZaFWkRQxQhkkFVI,14966
|
50
50
|
tests/test_core/test_rate_limiter.py,sha256=YzzlhlxZm-A7YGMiIV8LXDA0zmb_6uRF9GRx9s21Q0U,22544
|
51
51
|
tests/test_core/test_security_manager.py,sha256=C5uPFALAkitmHbi-L8xF1OyfOmVHQSq1g-PLkwl_LDU,35007
|
@@ -78,8 +78,8 @@ tests/test_utils/test_crypto_utils.py,sha256=yEb4hzG6-irj2DPoXY0DUboJfbeR87ussgT
|
|
78
78
|
tests/test_utils/test_datetime_compat.py,sha256=n8S4X5HN-_ejSNpgymDXRyZkmxhnyxwwjxFPdX23I40,5656
|
79
79
|
tests/test_utils/test_unitid_compat.py,sha256=MWh03A4FwzQyZa20PKHEWz4W03YtARwBOd_1JbABznQ,25544
|
80
80
|
tests/test_utils/test_validation_utils.py,sha256=lus_wHJ2WyVnBGQ28S7dSv78uWcCIuLhn5uflJw-uGw,18569
|
81
|
-
mcp_security_framework-1.2.
|
82
|
-
mcp_security_framework-1.2.
|
83
|
-
mcp_security_framework-1.2.
|
84
|
-
mcp_security_framework-1.2.
|
85
|
-
mcp_security_framework-1.2.
|
81
|
+
mcp_security_framework-1.2.3.dist-info/METADATA,sha256=4v-tLjiCOSD0yJE-WcvjV4Ryds0OVQBwlIrECAfzUZ0,11771
|
82
|
+
mcp_security_framework-1.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
83
|
+
mcp_security_framework-1.2.3.dist-info/entry_points.txt,sha256=qBh92fVDmd1m2f3xeW0hTu3Ksg8QfGJyV8UEkdA2itg,142
|
84
|
+
mcp_security_framework-1.2.3.dist-info/top_level.txt,sha256=ifUiGrTDcD574MXSOoAN2rp2wpUvWlb4jD9LTUgDWCA,29
|
85
|
+
mcp_security_framework-1.2.3.dist-info/RECORD,,
|
@@ -676,6 +676,50 @@ class TestCertificateManager:
|
|
676
676
|
|
677
677
|
assert "CA certificate and key paths are required" in str(exc_info.value)
|
678
678
|
|
679
|
+
def test_ca_creation_mode_bypasses_validation(self):
|
680
|
+
"""Test that CA creation mode bypasses CA path validation in CertificateManager."""
|
681
|
+
config = CertificateConfig(
|
682
|
+
enabled=True,
|
683
|
+
ca_creation_mode=True,
|
684
|
+
cert_storage_path=self.temp_dir,
|
685
|
+
key_storage_path=self.temp_dir
|
686
|
+
)
|
687
|
+
|
688
|
+
# This should not raise an exception
|
689
|
+
cert_manager = CertificateManager(config)
|
690
|
+
assert cert_manager is not None
|
691
|
+
assert cert_manager.config.ca_creation_mode is True
|
692
|
+
|
693
|
+
def test_ca_creation_mode_with_ca_paths(self):
|
694
|
+
"""Test that CA creation mode works even with CA paths provided."""
|
695
|
+
config = CertificateConfig(
|
696
|
+
enabled=True,
|
697
|
+
ca_creation_mode=True,
|
698
|
+
ca_cert_path=self.ca_cert_path,
|
699
|
+
ca_key_path=self.ca_key_path,
|
700
|
+
cert_storage_path=self.temp_dir,
|
701
|
+
key_storage_path=self.temp_dir
|
702
|
+
)
|
703
|
+
|
704
|
+
# This should not raise an exception
|
705
|
+
cert_manager = CertificateManager(config)
|
706
|
+
assert cert_manager is not None
|
707
|
+
assert cert_manager.config.ca_creation_mode is True
|
708
|
+
assert cert_manager.config.ca_cert_path == self.ca_cert_path
|
709
|
+
assert cert_manager.config.ca_key_path == self.ca_key_path
|
710
|
+
|
711
|
+
def test_normal_mode_requires_ca_paths(self):
|
712
|
+
"""Test that normal mode requires CA paths."""
|
713
|
+
with pytest.raises(ValidationError) as exc_info:
|
714
|
+
CertificateConfig(
|
715
|
+
enabled=True,
|
716
|
+
ca_creation_mode=False,
|
717
|
+
cert_storage_path=self.temp_dir,
|
718
|
+
key_storage_path=self.temp_dir
|
719
|
+
)
|
720
|
+
|
721
|
+
assert "ca_creation_mode=True" in str(exc_info.value)
|
722
|
+
|
679
723
|
def test_create_output_directory(self):
|
680
724
|
"""Test automatic output directory creation."""
|
681
725
|
# Create new temp directory
|
File without changes
|
{mcp_security_framework-1.2.2.dist-info → mcp_security_framework-1.2.3.dist-info}/entry_points.txt
RENAMED
File without changes
|
{mcp_security_framework-1.2.2.dist-info → mcp_security_framework-1.2.3.dist-info}/top_level.txt
RENAMED
File without changes
|