mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-19 00:01:29 +00:00
fix(proxy): block bulk user creation during the master key lockout
Some checks failed
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
ai-gateway image / ai-gateway release image (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
Some checks failed
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
ai-gateway image / ai-gateway release image (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
0f1a44fb15
commit
12c71ab407
2 changed files with 3 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ class _DeploymentMarker(TypedDict, total=False):
|
|||
|
||||
_DEPLOYMENT_MARKERS: Final = TypeAdapter(list[_DeploymentMarker])
|
||||
|
||||
_VIRTUAL_KEY_MINTING_ROUTES: Final = ("/user/new",)
|
||||
_VIRTUAL_KEY_MINTING_ROUTES: Final = ("/user/new", "/management/v1/users/bulk")
|
||||
|
||||
_ACCESS_CREDENTIAL_ROUTES: Final = (
|
||||
"/credentials",
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ def test_insecure_master_key_warning_survives_redaction():
|
|||
("/key/service-account/generate", "POST", "manage_virtual_keys"),
|
||||
("/key/block", "POST", "manage_virtual_keys"),
|
||||
("/user/new", "POST", "manage_virtual_keys"),
|
||||
("/management/v1/users/bulk", "POST", "manage_virtual_keys"),
|
||||
("/key/info", "GET", None),
|
||||
("/user/info", "GET", None),
|
||||
("/key/list", "GET", None),
|
||||
|
|
@ -143,6 +144,7 @@ def test_master_key_lockout_action_none_when_key_secure(route, method):
|
|||
("/key/generate", "POST"),
|
||||
("/key/abc/regenerate", "POST"),
|
||||
("/user/new", "POST"),
|
||||
("/management/v1/users/bulk", "POST"),
|
||||
],
|
||||
)
|
||||
@pytest.mark.parametrize("reason", ["example_key", "missing"])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue