feat(pool): add bulk key configuration management

This commit is contained in:
MMEXA
2026-07-14 04:57:05 +08:00
parent 7f61bb43c7
commit a25fab371a
37 changed files with 2510 additions and 379 deletions
@@ -288,6 +288,18 @@ pub(super) fn classify_admin_observability_family_route(
"admin:pool",
false,
))
} else if method == http::Method::PATCH
&& normalized_path_no_trailing.starts_with("/api/admin/pool/")
&& normalized_path_no_trailing.ends_with("/keys/batch-update")
&& normalized_path_no_trailing.matches('/').count() == 6
{
Some(classified(
"admin_proxy",
"pool_manage",
"batch_update_keys",
"admin:pool",
false,
))
} else if method == http::Method::POST
&& normalized_path_no_trailing.starts_with("/api/admin/pool/")
&& normalized_path_no_trailing.ends_with("/keys/resolve-selection")
@@ -82,6 +82,17 @@ fn classifies_admin_pool_provider_key_routes_as_admin_proxy_route() {
Some("batch_action_keys")
);
let batch_update_uri: Uri = "/api/admin/pool/provider-1/keys/batch-update"
.parse()
.expect("uri should parse");
let batch_update = classify_control_route(&http::Method::PATCH, &batch_update_uri, &headers)
.expect("route should classify");
assert_eq!(batch_update.route_family.as_deref(), Some("pool_manage"));
assert_eq!(
batch_update.route_kind.as_deref(),
Some("batch_update_keys")
);
let resolve_selection_uri: Uri = "/api/admin/pool/provider-1/keys/resolve-selection"
.parse()
.expect("uri should parse");