mcp-proxy-adapter 6.3.4__py3-none-any.whl → 6.3.6__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_proxy_adapter/__init__.py +9 -5
- mcp_proxy_adapter/__main__.py +1 -1
- mcp_proxy_adapter/api/app.py +227 -176
- mcp_proxy_adapter/api/handlers.py +68 -60
- mcp_proxy_adapter/api/middleware/__init__.py +7 -5
- mcp_proxy_adapter/api/middleware/base.py +19 -16
- mcp_proxy_adapter/api/middleware/command_permission_middleware.py +44 -34
- mcp_proxy_adapter/api/middleware/error_handling.py +57 -67
- mcp_proxy_adapter/api/middleware/factory.py +50 -52
- mcp_proxy_adapter/api/middleware/logging.py +46 -30
- mcp_proxy_adapter/api/middleware/performance.py +19 -16
- mcp_proxy_adapter/api/middleware/protocol_middleware.py +80 -50
- mcp_proxy_adapter/api/middleware/transport_middleware.py +26 -24
- mcp_proxy_adapter/api/middleware/unified_security.py +70 -51
- mcp_proxy_adapter/api/middleware/user_info_middleware.py +43 -34
- mcp_proxy_adapter/api/schemas.py +69 -43
- mcp_proxy_adapter/api/tool_integration.py +83 -63
- mcp_proxy_adapter/api/tools.py +60 -50
- mcp_proxy_adapter/commands/__init__.py +15 -6
- mcp_proxy_adapter/commands/auth_validation_command.py +107 -110
- mcp_proxy_adapter/commands/base.py +108 -112
- mcp_proxy_adapter/commands/builtin_commands.py +28 -18
- mcp_proxy_adapter/commands/catalog_manager.py +394 -265
- mcp_proxy_adapter/commands/cert_monitor_command.py +222 -204
- mcp_proxy_adapter/commands/certificate_management_command.py +210 -213
- mcp_proxy_adapter/commands/command_registry.py +275 -226
- mcp_proxy_adapter/commands/config_command.py +48 -33
- mcp_proxy_adapter/commands/dependency_container.py +22 -23
- mcp_proxy_adapter/commands/dependency_manager.py +65 -56
- mcp_proxy_adapter/commands/echo_command.py +15 -15
- mcp_proxy_adapter/commands/health_command.py +31 -29
- mcp_proxy_adapter/commands/help_command.py +97 -61
- mcp_proxy_adapter/commands/hooks.py +65 -49
- mcp_proxy_adapter/commands/key_management_command.py +148 -147
- mcp_proxy_adapter/commands/load_command.py +58 -40
- mcp_proxy_adapter/commands/plugins_command.py +80 -54
- mcp_proxy_adapter/commands/protocol_management_command.py +60 -48
- mcp_proxy_adapter/commands/proxy_registration_command.py +107 -115
- mcp_proxy_adapter/commands/reload_command.py +43 -37
- mcp_proxy_adapter/commands/result.py +26 -33
- mcp_proxy_adapter/commands/role_test_command.py +26 -26
- mcp_proxy_adapter/commands/roles_management_command.py +176 -173
- mcp_proxy_adapter/commands/security_command.py +134 -122
- mcp_proxy_adapter/commands/settings_command.py +47 -56
- mcp_proxy_adapter/commands/ssl_setup_command.py +109 -129
- mcp_proxy_adapter/commands/token_management_command.py +129 -158
- mcp_proxy_adapter/commands/transport_management_command.py +41 -36
- mcp_proxy_adapter/commands/unload_command.py +42 -37
- mcp_proxy_adapter/config.py +36 -35
- mcp_proxy_adapter/core/__init__.py +19 -21
- mcp_proxy_adapter/core/app_factory.py +30 -9
- mcp_proxy_adapter/core/app_runner.py +81 -64
- mcp_proxy_adapter/core/auth_validator.py +176 -182
- mcp_proxy_adapter/core/certificate_utils.py +469 -426
- mcp_proxy_adapter/core/client.py +155 -126
- mcp_proxy_adapter/core/client_manager.py +60 -54
- mcp_proxy_adapter/core/client_security.py +120 -91
- mcp_proxy_adapter/core/config_converter.py +176 -143
- mcp_proxy_adapter/core/config_validator.py +12 -4
- mcp_proxy_adapter/core/crl_utils.py +21 -7
- mcp_proxy_adapter/core/errors.py +64 -20
- mcp_proxy_adapter/core/logging.py +34 -29
- mcp_proxy_adapter/core/mtls_asgi.py +29 -25
- mcp_proxy_adapter/core/mtls_asgi_app.py +66 -54
- mcp_proxy_adapter/core/protocol_manager.py +154 -104
- mcp_proxy_adapter/core/proxy_client.py +202 -144
- mcp_proxy_adapter/core/proxy_registration.py +7 -3
- mcp_proxy_adapter/core/role_utils.py +139 -125
- mcp_proxy_adapter/core/security_adapter.py +88 -77
- mcp_proxy_adapter/core/security_factory.py +50 -44
- mcp_proxy_adapter/core/security_integration.py +72 -24
- mcp_proxy_adapter/core/server_adapter.py +68 -64
- mcp_proxy_adapter/core/server_engine.py +71 -53
- mcp_proxy_adapter/core/settings.py +68 -58
- mcp_proxy_adapter/core/ssl_utils.py +69 -56
- mcp_proxy_adapter/core/transport_manager.py +72 -60
- mcp_proxy_adapter/core/unified_config_adapter.py +201 -150
- mcp_proxy_adapter/core/utils.py +4 -2
- mcp_proxy_adapter/custom_openapi.py +107 -99
- mcp_proxy_adapter/examples/basic_framework/main.py +9 -2
- mcp_proxy_adapter/examples/commands/__init__.py +1 -1
- mcp_proxy_adapter/examples/create_certificates_simple.py +182 -71
- mcp_proxy_adapter/examples/debug_request_state.py +38 -19
- mcp_proxy_adapter/examples/debug_role_chain.py +53 -20
- mcp_proxy_adapter/examples/demo_client.py +48 -36
- mcp_proxy_adapter/examples/examples/basic_framework/main.py +9 -2
- mcp_proxy_adapter/examples/examples/full_application/__init__.py +1 -0
- mcp_proxy_adapter/examples/examples/full_application/commands/custom_echo_command.py +22 -10
- mcp_proxy_adapter/examples/examples/full_application/commands/dynamic_calculator_command.py +24 -17
- mcp_proxy_adapter/examples/examples/full_application/hooks/application_hooks.py +16 -3
- mcp_proxy_adapter/examples/examples/full_application/hooks/builtin_command_hooks.py +13 -3
- mcp_proxy_adapter/examples/examples/full_application/main.py +27 -2
- mcp_proxy_adapter/examples/examples/full_application/proxy_endpoints.py +48 -14
- mcp_proxy_adapter/examples/full_application/__init__.py +1 -0
- mcp_proxy_adapter/examples/full_application/commands/custom_echo_command.py +22 -10
- mcp_proxy_adapter/examples/full_application/commands/dynamic_calculator_command.py +24 -17
- mcp_proxy_adapter/examples/full_application/hooks/application_hooks.py +16 -3
- mcp_proxy_adapter/examples/full_application/hooks/builtin_command_hooks.py +13 -3
- mcp_proxy_adapter/examples/full_application/main.py +27 -2
- mcp_proxy_adapter/examples/full_application/proxy_endpoints.py +48 -14
- mcp_proxy_adapter/examples/generate_all_certificates.py +198 -73
- mcp_proxy_adapter/examples/generate_certificates.py +31 -16
- mcp_proxy_adapter/examples/generate_certificates_and_tokens.py +220 -74
- mcp_proxy_adapter/examples/generate_test_configs.py +68 -91
- mcp_proxy_adapter/examples/proxy_registration_example.py +76 -75
- mcp_proxy_adapter/examples/run_example.py +23 -5
- mcp_proxy_adapter/examples/run_full_test_suite.py +109 -71
- mcp_proxy_adapter/examples/run_proxy_server.py +22 -9
- mcp_proxy_adapter/examples/run_security_tests.py +103 -41
- mcp_proxy_adapter/examples/run_security_tests_fixed.py +72 -36
- mcp_proxy_adapter/examples/scripts/config_generator.py +288 -187
- mcp_proxy_adapter/examples/scripts/create_certificates_simple.py +185 -72
- mcp_proxy_adapter/examples/scripts/generate_certificates_and_tokens.py +220 -74
- mcp_proxy_adapter/examples/security_test_client.py +196 -127
- mcp_proxy_adapter/examples/setup_test_environment.py +17 -29
- mcp_proxy_adapter/examples/test_config.py +19 -4
- mcp_proxy_adapter/examples/test_config_generator.py +23 -7
- mcp_proxy_adapter/examples/test_examples.py +84 -56
- mcp_proxy_adapter/examples/universal_client.py +119 -62
- mcp_proxy_adapter/openapi.py +108 -115
- mcp_proxy_adapter/utils/config_generator.py +429 -274
- mcp_proxy_adapter/version.py +1 -2
- {mcp_proxy_adapter-6.3.4.dist-info → mcp_proxy_adapter-6.3.6.dist-info}/METADATA +1 -1
- mcp_proxy_adapter-6.3.6.dist-info/RECORD +144 -0
- mcp_proxy_adapter-6.3.6.dist-info/top_level.txt +2 -0
- mcp_proxy_adapter_issue_package/demonstrate_issue.py +178 -0
- mcp_proxy_adapter-6.3.4.dist-info/RECORD +0 -143
- mcp_proxy_adapter-6.3.4.dist-info/top_level.txt +0 -1
- {mcp_proxy_adapter-6.3.4.dist-info → mcp_proxy_adapter-6.3.6.dist-info}/WHEEL +0 -0
- {mcp_proxy_adapter-6.3.4.dist-info → mcp_proxy_adapter-6.3.6.dist-info}/entry_points.txt +0 -0
- {mcp_proxy_adapter-6.3.4.dist-info → mcp_proxy_adapter-6.3.6.dist-info}/licenses/LICENSE +0 -0
@@ -23,24 +23,26 @@ from ..core.auth_validator import AuthValidator, AuthValidationResult
|
|
23
23
|
class AuthValidationCommand(Command):
|
24
24
|
"""
|
25
25
|
Authentication validation commands.
|
26
|
-
|
26
|
+
|
27
27
|
Provides commands for validating different types of authentication
|
28
28
|
using the universal AuthValidator.
|
29
29
|
"""
|
30
|
-
|
30
|
+
|
31
31
|
def __init__(self):
|
32
32
|
"""Initialize authentication validation command."""
|
33
33
|
super().__init__()
|
34
34
|
self.validator = AuthValidator()
|
35
35
|
self.logger = logging.getLogger(__name__)
|
36
|
-
|
37
|
-
async def auth_validate(
|
36
|
+
|
37
|
+
async def auth_validate(
|
38
|
+
self, auth_data: Dict[str, Any]
|
39
|
+
) -> Union[SuccessResult, ErrorResult]:
|
38
40
|
"""
|
39
41
|
Universal authentication validation.
|
40
|
-
|
42
|
+
|
41
43
|
Validates authentication data based on the provided type.
|
42
44
|
Supports certificate, token, mTLS, and SSL validation.
|
43
|
-
|
45
|
+
|
44
46
|
Args:
|
45
47
|
auth_data: Authentication data dictionary containing:
|
46
48
|
- auth_type: Type of authentication (auto/certificate/token/mtls/ssl)
|
@@ -51,218 +53,213 @@ class AuthValidationCommand(Command):
|
|
51
53
|
- client_cert: Path to client certificate (for mTLS)
|
52
54
|
- ca_cert: Path to CA certificate (for mTLS)
|
53
55
|
- server_cert: Path to server certificate (for SSL)
|
54
|
-
|
56
|
+
|
55
57
|
Returns:
|
56
58
|
CommandResult with validation status and extracted roles
|
57
59
|
"""
|
58
60
|
try:
|
59
61
|
auth_type = auth_data.get("auth_type", "auto")
|
60
|
-
|
62
|
+
|
61
63
|
# Perform validation
|
62
64
|
result = self.validator.validate_auth(auth_data, auth_type)
|
63
|
-
|
65
|
+
|
64
66
|
if result.is_valid:
|
65
67
|
return SuccessResult(
|
66
|
-
data={
|
67
|
-
"valid": True,
|
68
|
-
"roles": result.roles,
|
69
|
-
"auth_type": auth_type
|
70
|
-
}
|
68
|
+
data={"valid": True, "roles": result.roles, "auth_type": auth_type}
|
71
69
|
)
|
72
70
|
else:
|
73
71
|
error_data = result.to_json_rpc_error()
|
74
72
|
return ErrorResult(
|
75
|
-
message=error_data["message"],
|
76
|
-
code=error_data["code"]
|
73
|
+
message=error_data["message"], code=error_data["code"]
|
77
74
|
)
|
78
|
-
|
75
|
+
|
79
76
|
except Exception as e:
|
80
77
|
self.logger.error(f"Authentication validation error: {e}")
|
81
78
|
return ErrorResult(
|
82
79
|
message=f"Internal authentication validation error: {str(e)}",
|
83
|
-
code=-32603
|
80
|
+
code=-32603,
|
84
81
|
)
|
85
|
-
|
86
|
-
async def auth_validate_cert(
|
82
|
+
|
83
|
+
async def auth_validate_cert(
|
84
|
+
self, cert_path: str, cert_type: str = "server"
|
85
|
+
) -> Union[SuccessResult, ErrorResult]:
|
87
86
|
"""
|
88
87
|
Validate certificate.
|
89
|
-
|
88
|
+
|
90
89
|
Validates a certificate file and extracts roles if present.
|
91
|
-
|
90
|
+
|
92
91
|
Args:
|
93
92
|
cert_path: Path to certificate file
|
94
93
|
cert_type: Type of certificate (server/client/ca)
|
95
|
-
|
94
|
+
|
96
95
|
Returns:
|
97
96
|
CommandResult with certificate validation status and roles
|
98
97
|
"""
|
99
98
|
try:
|
100
99
|
# Perform certificate validation
|
101
100
|
result = self.validator.validate_certificate(cert_path, cert_type)
|
102
|
-
|
101
|
+
|
103
102
|
if result.is_valid:
|
104
103
|
return SuccessResult(
|
105
104
|
data={
|
106
105
|
"valid": True,
|
107
106
|
"cert_path": cert_path,
|
108
107
|
"cert_type": cert_type,
|
109
|
-
"roles": result.roles
|
108
|
+
"roles": result.roles,
|
110
109
|
}
|
111
110
|
)
|
112
111
|
else:
|
113
112
|
error_data = result.to_json_rpc_error()
|
114
113
|
return ErrorResult(
|
115
|
-
message=error_data["message"],
|
116
|
-
code=error_data["code"]
|
114
|
+
message=error_data["message"], code=error_data["code"]
|
117
115
|
)
|
118
|
-
|
116
|
+
|
119
117
|
except Exception as e:
|
120
118
|
self.logger.error(f"Certificate validation error: {e}")
|
121
119
|
return ErrorResult(
|
122
|
-
message=f"Internal certificate validation error: {str(e)}",
|
123
|
-
code=-32603
|
120
|
+
message=f"Internal certificate validation error: {str(e)}", code=-32603
|
124
121
|
)
|
125
|
-
|
126
|
-
async def auth_validate_token(
|
122
|
+
|
123
|
+
async def auth_validate_token(
|
124
|
+
self, token: str, token_type: str = "jwt"
|
125
|
+
) -> Union[SuccessResult, ErrorResult]:
|
127
126
|
"""
|
128
127
|
Validate token.
|
129
|
-
|
128
|
+
|
130
129
|
Validates a token and extracts roles if present.
|
131
|
-
|
130
|
+
|
132
131
|
Args:
|
133
132
|
token: Token string to validate
|
134
133
|
token_type: Type of token (jwt/api)
|
135
|
-
|
134
|
+
|
136
135
|
Returns:
|
137
136
|
CommandResult with token validation status and roles
|
138
137
|
"""
|
139
138
|
try:
|
140
139
|
# Perform token validation
|
141
140
|
result = self.validator.validate_token(token, token_type)
|
142
|
-
|
141
|
+
|
143
142
|
if result.is_valid:
|
144
143
|
return SuccessResult(
|
145
144
|
data={
|
146
145
|
"valid": True,
|
147
146
|
"token_type": token_type,
|
148
|
-
"roles": result.roles
|
147
|
+
"roles": result.roles,
|
149
148
|
}
|
150
149
|
)
|
151
150
|
else:
|
152
151
|
error_data = result.to_json_rpc_error()
|
153
152
|
return ErrorResult(
|
154
|
-
message=error_data["message"],
|
155
|
-
code=error_data["code"]
|
153
|
+
message=error_data["message"], code=error_data["code"]
|
156
154
|
)
|
157
|
-
|
155
|
+
|
158
156
|
except Exception as e:
|
159
157
|
self.logger.error(f"Token validation error: {e}")
|
160
158
|
return ErrorResult(
|
161
|
-
message=f"Internal token validation error: {str(e)}",
|
162
|
-
code=-32603
|
159
|
+
message=f"Internal token validation error: {str(e)}", code=-32603
|
163
160
|
)
|
164
|
-
|
165
|
-
async def auth_validate_mtls(
|
161
|
+
|
162
|
+
async def auth_validate_mtls(
|
163
|
+
self, client_cert: str, ca_cert: str
|
164
|
+
) -> Union[SuccessResult, ErrorResult]:
|
166
165
|
"""
|
167
166
|
Validate mTLS connection.
|
168
|
-
|
167
|
+
|
169
168
|
Validates client certificate against CA certificate and extracts roles.
|
170
|
-
|
169
|
+
|
171
170
|
Args:
|
172
171
|
client_cert: Path to client certificate
|
173
172
|
ca_cert: Path to CA certificate
|
174
|
-
|
173
|
+
|
175
174
|
Returns:
|
176
175
|
CommandResult with mTLS validation status and roles
|
177
176
|
"""
|
178
177
|
try:
|
179
178
|
# Perform mTLS validation
|
180
179
|
result = self.validator.validate_mtls(client_cert, ca_cert)
|
181
|
-
|
180
|
+
|
182
181
|
if result.is_valid:
|
183
182
|
return SuccessResult(
|
184
183
|
data={
|
185
184
|
"valid": True,
|
186
185
|
"client_cert": client_cert,
|
187
186
|
"ca_cert": ca_cert,
|
188
|
-
"roles": result.roles
|
187
|
+
"roles": result.roles,
|
189
188
|
}
|
190
189
|
)
|
191
190
|
else:
|
192
191
|
error_data = result.to_json_rpc_error()
|
193
192
|
return ErrorResult(
|
194
|
-
message=error_data["message"],
|
195
|
-
code=error_data["code"]
|
193
|
+
message=error_data["message"], code=error_data["code"]
|
196
194
|
)
|
197
|
-
|
195
|
+
|
198
196
|
except Exception as e:
|
199
197
|
self.logger.error(f"mTLS validation error: {e}")
|
200
198
|
return ErrorResult(
|
201
|
-
message=f"Internal mTLS validation error: {str(e)}",
|
202
|
-
code=-32603
|
199
|
+
message=f"Internal mTLS validation error: {str(e)}", code=-32603
|
203
200
|
)
|
204
|
-
|
205
|
-
async def auth_validate_ssl(
|
201
|
+
|
202
|
+
async def auth_validate_ssl(
|
203
|
+
self, server_cert: str
|
204
|
+
) -> Union[SuccessResult, ErrorResult]:
|
206
205
|
"""
|
207
206
|
Validate SSL connection.
|
208
|
-
|
207
|
+
|
209
208
|
Validates server certificate and extracts roles if present.
|
210
|
-
|
209
|
+
|
211
210
|
Args:
|
212
211
|
server_cert: Path to server certificate
|
213
|
-
|
212
|
+
|
214
213
|
Returns:
|
215
214
|
CommandResult with SSL validation status and roles
|
216
215
|
"""
|
217
216
|
try:
|
218
217
|
# Perform SSL validation
|
219
218
|
result = self.validator.validate_ssl(server_cert)
|
220
|
-
|
219
|
+
|
221
220
|
if result.is_valid:
|
222
221
|
return SuccessResult(
|
223
222
|
data={
|
224
223
|
"valid": True,
|
225
224
|
"server_cert": server_cert,
|
226
|
-
"roles": result.roles
|
225
|
+
"roles": result.roles,
|
227
226
|
}
|
228
227
|
)
|
229
228
|
else:
|
230
229
|
error_data = result.to_json_rpc_error()
|
231
230
|
return ErrorResult(
|
232
|
-
message=error_data["message"],
|
233
|
-
code=error_data["code"]
|
231
|
+
message=error_data["message"], code=error_data["code"]
|
234
232
|
)
|
235
|
-
|
233
|
+
|
236
234
|
except Exception as e:
|
237
235
|
self.logger.error(f"SSL validation error: {e}")
|
238
236
|
return ErrorResult(
|
239
|
-
message=f"Internal SSL validation error: {str(e)}",
|
240
|
-
code=-32603
|
237
|
+
message=f"Internal SSL validation error: {str(e)}", code=-32603
|
241
238
|
)
|
242
|
-
|
239
|
+
|
243
240
|
async def execute(self, **kwargs) -> Union[SuccessResult, ErrorResult]:
|
244
241
|
"""
|
245
242
|
Execute authentication validation command.
|
246
|
-
|
243
|
+
|
247
244
|
This is a placeholder method to satisfy the abstract base class.
|
248
245
|
Individual validation methods should be called directly.
|
249
|
-
|
246
|
+
|
250
247
|
Args:
|
251
248
|
**kwargs: Command parameters
|
252
|
-
|
249
|
+
|
253
250
|
Returns:
|
254
251
|
Command result
|
255
252
|
"""
|
256
253
|
return ErrorResult(
|
257
254
|
message="Method not found. Use specific validation methods instead.",
|
258
|
-
code=-32601
|
255
|
+
code=-32601,
|
259
256
|
)
|
260
|
-
|
257
|
+
|
261
258
|
@classmethod
|
262
259
|
def get_schema(cls) -> Dict[str, Any]:
|
263
260
|
"""
|
264
261
|
Get command schema for documentation.
|
265
|
-
|
262
|
+
|
266
263
|
Returns:
|
267
264
|
Dictionary containing command schema
|
268
265
|
"""
|
@@ -277,39 +274,39 @@ class AuthValidationCommand(Command):
|
|
277
274
|
"auth_type": {
|
278
275
|
"type": "string",
|
279
276
|
"enum": ["auto", "certificate", "token", "mtls", "ssl"],
|
280
|
-
"description": "Type of authentication to validate"
|
277
|
+
"description": "Type of authentication to validate",
|
281
278
|
},
|
282
279
|
"cert_path": {
|
283
280
|
"type": "string",
|
284
|
-
"description": "Path to certificate file"
|
281
|
+
"description": "Path to certificate file",
|
285
282
|
},
|
286
283
|
"cert_type": {
|
287
284
|
"type": "string",
|
288
285
|
"enum": ["server", "client", "ca"],
|
289
|
-
"description": "Type of certificate"
|
286
|
+
"description": "Type of certificate",
|
290
287
|
},
|
291
288
|
"token": {
|
292
289
|
"type": "string",
|
293
|
-
"description": "Token string to validate"
|
290
|
+
"description": "Token string to validate",
|
294
291
|
},
|
295
292
|
"token_type": {
|
296
293
|
"type": "string",
|
297
294
|
"enum": ["jwt", "api"],
|
298
|
-
"description": "Type of token"
|
295
|
+
"description": "Type of token",
|
299
296
|
},
|
300
297
|
"client_cert": {
|
301
298
|
"type": "string",
|
302
|
-
"description": "Path to client certificate (for mTLS)"
|
299
|
+
"description": "Path to client certificate (for mTLS)",
|
303
300
|
},
|
304
301
|
"ca_cert": {
|
305
302
|
"type": "string",
|
306
|
-
"description": "Path to CA certificate (for mTLS)"
|
303
|
+
"description": "Path to CA certificate (for mTLS)",
|
307
304
|
},
|
308
305
|
"server_cert": {
|
309
306
|
"type": "string",
|
310
|
-
"description": "Path to server certificate (for SSL)"
|
311
|
-
}
|
312
|
-
}
|
307
|
+
"description": "Path to server certificate (for SSL)",
|
308
|
+
},
|
309
|
+
},
|
313
310
|
}
|
314
311
|
},
|
315
312
|
"returns": {
|
@@ -317,22 +314,22 @@ class AuthValidationCommand(Command):
|
|
317
314
|
"properties": {
|
318
315
|
"valid": {"type": "boolean"},
|
319
316
|
"roles": {"type": "array", "items": {"type": "string"}},
|
320
|
-
"auth_type": {"type": "string"}
|
321
|
-
}
|
322
|
-
}
|
317
|
+
"auth_type": {"type": "string"},
|
318
|
+
},
|
319
|
+
},
|
323
320
|
},
|
324
321
|
"auth_validate_cert": {
|
325
322
|
"description": "Validate certificate",
|
326
323
|
"parameters": {
|
327
324
|
"cert_path": {
|
328
325
|
"type": "string",
|
329
|
-
"description": "Path to certificate file"
|
326
|
+
"description": "Path to certificate file",
|
330
327
|
},
|
331
328
|
"cert_type": {
|
332
329
|
"type": "string",
|
333
330
|
"enum": ["server", "client", "ca"],
|
334
|
-
"description": "Type of certificate"
|
335
|
-
}
|
331
|
+
"description": "Type of certificate",
|
332
|
+
},
|
336
333
|
},
|
337
334
|
"returns": {
|
338
335
|
"type": "object",
|
@@ -340,43 +337,43 @@ class AuthValidationCommand(Command):
|
|
340
337
|
"valid": {"type": "boolean"},
|
341
338
|
"cert_path": {"type": "string"},
|
342
339
|
"cert_type": {"type": "string"},
|
343
|
-
"roles": {"type": "array", "items": {"type": "string"}}
|
344
|
-
}
|
345
|
-
}
|
340
|
+
"roles": {"type": "array", "items": {"type": "string"}},
|
341
|
+
},
|
342
|
+
},
|
346
343
|
},
|
347
344
|
"auth_validate_token": {
|
348
345
|
"description": "Validate token",
|
349
346
|
"parameters": {
|
350
347
|
"token": {
|
351
348
|
"type": "string",
|
352
|
-
"description": "Token string to validate"
|
349
|
+
"description": "Token string to validate",
|
353
350
|
},
|
354
351
|
"token_type": {
|
355
352
|
"type": "string",
|
356
353
|
"enum": ["jwt", "api"],
|
357
|
-
"description": "Type of token"
|
358
|
-
}
|
354
|
+
"description": "Type of token",
|
355
|
+
},
|
359
356
|
},
|
360
357
|
"returns": {
|
361
358
|
"type": "object",
|
362
359
|
"properties": {
|
363
360
|
"valid": {"type": "boolean"},
|
364
361
|
"token_type": {"type": "string"},
|
365
|
-
"roles": {"type": "array", "items": {"type": "string"}}
|
366
|
-
}
|
367
|
-
}
|
362
|
+
"roles": {"type": "array", "items": {"type": "string"}},
|
363
|
+
},
|
364
|
+
},
|
368
365
|
},
|
369
366
|
"auth_validate_mtls": {
|
370
367
|
"description": "Validate mTLS connection",
|
371
368
|
"parameters": {
|
372
369
|
"client_cert": {
|
373
370
|
"type": "string",
|
374
|
-
"description": "Path to client certificate"
|
371
|
+
"description": "Path to client certificate",
|
375
372
|
},
|
376
373
|
"ca_cert": {
|
377
374
|
"type": "string",
|
378
|
-
"description": "Path to CA certificate"
|
379
|
-
}
|
375
|
+
"description": "Path to CA certificate",
|
376
|
+
},
|
380
377
|
},
|
381
378
|
"returns": {
|
382
379
|
"type": "object",
|
@@ -384,16 +381,16 @@ class AuthValidationCommand(Command):
|
|
384
381
|
"valid": {"type": "boolean"},
|
385
382
|
"client_cert": {"type": "string"},
|
386
383
|
"ca_cert": {"type": "string"},
|
387
|
-
"roles": {"type": "array", "items": {"type": "string"}}
|
388
|
-
}
|
389
|
-
}
|
384
|
+
"roles": {"type": "array", "items": {"type": "string"}},
|
385
|
+
},
|
386
|
+
},
|
390
387
|
},
|
391
388
|
"auth_validate_ssl": {
|
392
389
|
"description": "Validate SSL connection",
|
393
390
|
"parameters": {
|
394
391
|
"server_cert": {
|
395
392
|
"type": "string",
|
396
|
-
"description": "Path to server certificate"
|
393
|
+
"description": "Path to server certificate",
|
397
394
|
}
|
398
395
|
},
|
399
396
|
"returns": {
|
@@ -401,8 +398,8 @@ class AuthValidationCommand(Command):
|
|
401
398
|
"properties": {
|
402
399
|
"valid": {"type": "boolean"},
|
403
400
|
"server_cert": {"type": "string"},
|
404
|
-
"roles": {"type": "array", "items": {"type": "string"}}
|
405
|
-
}
|
406
|
-
}
|
407
|
-
}
|
408
|
-
}
|
401
|
+
"roles": {"type": "array", "items": {"type": "string"}},
|
402
|
+
},
|
403
|
+
},
|
404
|
+
},
|
405
|
+
}
|