mcp-security-framework 1.1.0__py3-none-any.whl → 1.1.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.
- mcp_security_framework/__init__.py +26 -15
- mcp_security_framework/cli/__init__.py +1 -1
- mcp_security_framework/cli/cert_cli.py +233 -197
- mcp_security_framework/cli/security_cli.py +324 -234
- mcp_security_framework/constants.py +21 -27
- mcp_security_framework/core/auth_manager.py +41 -22
- mcp_security_framework/core/cert_manager.py +210 -147
- mcp_security_framework/core/permission_manager.py +9 -9
- mcp_security_framework/core/rate_limiter.py +2 -2
- mcp_security_framework/core/security_manager.py +284 -229
- mcp_security_framework/examples/__init__.py +6 -0
- mcp_security_framework/examples/comprehensive_example.py +349 -279
- mcp_security_framework/examples/django_example.py +247 -206
- mcp_security_framework/examples/fastapi_example.py +315 -283
- mcp_security_framework/examples/flask_example.py +274 -203
- mcp_security_framework/examples/gateway_example.py +304 -237
- mcp_security_framework/examples/microservice_example.py +258 -189
- mcp_security_framework/examples/standalone_example.py +255 -230
- mcp_security_framework/examples/test_all_examples.py +151 -135
- mcp_security_framework/middleware/__init__.py +46 -55
- mcp_security_framework/middleware/auth_middleware.py +62 -63
- mcp_security_framework/middleware/fastapi_auth_middleware.py +119 -118
- mcp_security_framework/middleware/fastapi_middleware.py +156 -148
- mcp_security_framework/middleware/flask_auth_middleware.py +160 -147
- mcp_security_framework/middleware/flask_middleware.py +183 -157
- mcp_security_framework/middleware/mtls_middleware.py +106 -117
- mcp_security_framework/middleware/rate_limit_middleware.py +105 -101
- mcp_security_framework/middleware/security_middleware.py +109 -124
- mcp_security_framework/schemas/config.py +2 -1
- mcp_security_framework/schemas/models.py +18 -6
- mcp_security_framework/utils/cert_utils.py +14 -8
- mcp_security_framework/utils/datetime_compat.py +116 -0
- {mcp_security_framework-1.1.0.dist-info → mcp_security_framework-1.1.1.dist-info}/METADATA +2 -1
- mcp_security_framework-1.1.1.dist-info/RECORD +84 -0
- tests/conftest.py +63 -66
- tests/test_cli/test_cert_cli.py +184 -146
- tests/test_cli/test_security_cli.py +274 -247
- tests/test_core/test_cert_manager.py +24 -10
- tests/test_core/test_security_manager.py +2 -2
- tests/test_examples/test_comprehensive_example.py +190 -137
- tests/test_examples/test_fastapi_example.py +124 -101
- tests/test_examples/test_flask_example.py +124 -101
- tests/test_examples/test_standalone_example.py +73 -80
- tests/test_integration/test_auth_flow.py +213 -197
- tests/test_integration/test_certificate_flow.py +180 -149
- tests/test_integration/test_fastapi_integration.py +108 -111
- tests/test_integration/test_flask_integration.py +141 -140
- tests/test_integration/test_standalone_integration.py +290 -259
- tests/test_middleware/test_fastapi_auth_middleware.py +195 -174
- tests/test_middleware/test_fastapi_middleware.py +147 -132
- tests/test_middleware/test_flask_auth_middleware.py +260 -202
- tests/test_middleware/test_flask_middleware.py +201 -179
- tests/test_middleware/test_security_middleware.py +145 -130
- tests/test_utils/test_datetime_compat.py +147 -0
- mcp_security_framework-1.1.0.dist-info/RECORD +0 -82
- {mcp_security_framework-1.1.0.dist-info → mcp_security_framework-1.1.1.dist-info}/WHEEL +0 -0
- {mcp_security_framework-1.1.0.dist-info → mcp_security_framework-1.1.1.dist-info}/entry_points.txt +0 -0
- {mcp_security_framework-1.1.0.dist-info → mcp_security_framework-1.1.1.dist-info}/top_level.txt +0 -0
@@ -18,6 +18,7 @@ License: MIT
|
|
18
18
|
# Import examples conditionally to avoid import errors when dependencies are missing
|
19
19
|
try:
|
20
20
|
from .fastapi_example import FastAPIExample
|
21
|
+
|
21
22
|
_FASTAPI_AVAILABLE = True
|
22
23
|
except ImportError:
|
23
24
|
_FASTAPI_AVAILABLE = False
|
@@ -25,6 +26,7 @@ except ImportError:
|
|
25
26
|
|
26
27
|
try:
|
27
28
|
from .flask_example import FlaskExample
|
29
|
+
|
28
30
|
_FLASK_AVAILABLE = True
|
29
31
|
except ImportError:
|
30
32
|
_FLASK_AVAILABLE = False
|
@@ -32,6 +34,7 @@ except ImportError:
|
|
32
34
|
|
33
35
|
try:
|
34
36
|
from .django_example import DjangoExample
|
37
|
+
|
35
38
|
_DJANGO_AVAILABLE = True
|
36
39
|
except ImportError:
|
37
40
|
_DJANGO_AVAILABLE = False
|
@@ -39,6 +42,7 @@ except ImportError:
|
|
39
42
|
|
40
43
|
try:
|
41
44
|
from .standalone_example import StandaloneExample
|
45
|
+
|
42
46
|
_STANDALONE_AVAILABLE = True
|
43
47
|
except ImportError:
|
44
48
|
_STANDALONE_AVAILABLE = False
|
@@ -46,6 +50,7 @@ except ImportError:
|
|
46
50
|
|
47
51
|
try:
|
48
52
|
from .microservice_example import MicroserviceExample
|
53
|
+
|
49
54
|
_MICROSERVICE_AVAILABLE = True
|
50
55
|
except ImportError:
|
51
56
|
_MICROSERVICE_AVAILABLE = False
|
@@ -53,6 +58,7 @@ except ImportError:
|
|
53
58
|
|
54
59
|
try:
|
55
60
|
from .gateway_example import APIGatewayExample
|
61
|
+
|
56
62
|
_GATEWAY_AVAILABLE = True
|
57
63
|
except ImportError:
|
58
64
|
_GATEWAY_AVAILABLE = False
|