mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
Add Pydantic models for Hashicorp Vault config override
This commit is contained in:
parent
0f4771fe19
commit
20b579ff9f
1 changed files with 60 additions and 0 deletions
60
litellm/types/proxy/management_endpoints/config_overrides.py
Normal file
60
litellm/types/proxy/management_endpoints/config_overrides.py
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
from typing import Any, Dict, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class HashicorpVaultConfig(BaseModel):
|
||||
"""Configuration for Hashicorp Vault secret manager integration."""
|
||||
|
||||
vault_addr: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The address of the Vault server (e.g., https://vault.example.com:8200)",
|
||||
)
|
||||
vault_token: Optional[str] = Field(
|
||||
default=None,
|
||||
description="Token for Vault token-based authentication",
|
||||
)
|
||||
approle_role_id: Optional[str] = Field(
|
||||
default=None,
|
||||
description="Role ID for Vault AppRole authentication",
|
||||
)
|
||||
approle_secret_id: Optional[str] = Field(
|
||||
default=None,
|
||||
description="Secret ID for Vault AppRole authentication",
|
||||
)
|
||||
approle_mount_path: Optional[str] = Field(
|
||||
default=None,
|
||||
description="Mount path for the AppRole auth method (default: approle)",
|
||||
)
|
||||
client_cert: Optional[str] = Field(
|
||||
default=None,
|
||||
description="Path to the client TLS certificate for Vault",
|
||||
)
|
||||
client_key: Optional[str] = Field(
|
||||
default=None,
|
||||
description="Path to the client TLS private key for Vault",
|
||||
)
|
||||
vault_namespace: Optional[str] = Field(
|
||||
default=None,
|
||||
description="Vault namespace (for multi-tenant Vault, sent as X-Vault-Namespace header)",
|
||||
)
|
||||
vault_mount_name: Optional[str] = Field(
|
||||
default=None,
|
||||
description="KV engine mount name (default: secret)",
|
||||
)
|
||||
vault_path_prefix: Optional[str] = Field(
|
||||
default=None,
|
||||
description="Optional path prefix for secrets (e.g., myapp -> secret/data/myapp/{secret_name})",
|
||||
)
|
||||
|
||||
|
||||
class ConfigOverrideSettingsResponse(BaseModel):
|
||||
"""Response model for config override settings GET endpoints."""
|
||||
|
||||
config_type: str = Field(description="The type of config override")
|
||||
values: Dict[str, Any] = Field(
|
||||
description="Current configuration values (sensitive fields decrypted)"
|
||||
)
|
||||
field_schema: Dict[str, Any] = Field(
|
||||
description="Schema information for UI rendering"
|
||||
)
|
||||
Loading…
Add table
Reference in a new issue