feat: add initial setup wizard, workload insights, and policy audit mode
Add setup wizard with status tracking via SystemSetting model, implement /setup/status and /setup/complete endpoints to create initial admin user and optional cluster configuration, add workload insights endpoint with traffic analysis and policy matching including audit mode detection, implement enforcement_mode property on Policy model with audit/enforced states, add Modal component for dialogs, create SetupWizard page with multi
This commit is contained in:
@@ -19,6 +19,24 @@ class LoginRequest(BaseModel):
|
||||
password: str
|
||||
|
||||
|
||||
class SetupStatus(BaseModel):
|
||||
complete: bool
|
||||
has_users: bool
|
||||
has_clusters: bool
|
||||
|
||||
|
||||
class SetupCompleteRequest(BaseModel):
|
||||
admin_email: str
|
||||
admin_name: str
|
||||
admin_password: str = Field(min_length=12)
|
||||
cluster_name: str | None = None
|
||||
cluster_api_url: str | None = None
|
||||
cluster_api_token: str | None = None
|
||||
cluster_provider: str = "proxmox"
|
||||
cluster_mode: str = "read_only"
|
||||
verify_tls: bool = True
|
||||
|
||||
|
||||
class UserRead(OrmModel):
|
||||
id: str
|
||||
email: str
|
||||
@@ -238,10 +256,19 @@ class PolicyRead(OrmModel):
|
||||
name: str
|
||||
version: int
|
||||
enabled: bool
|
||||
enforcement_mode: str
|
||||
definition: dict[str, Any]
|
||||
last_compiled: dict[str, Any] | None
|
||||
|
||||
|
||||
class WorkloadInsight(BaseModel):
|
||||
workload: WorkloadRead
|
||||
traffic: list[dict[str, Any]]
|
||||
matching_policies: list[PolicyRead]
|
||||
effective_decision: str
|
||||
audit_mode_notes: list[str]
|
||||
|
||||
|
||||
class ServiceCatalogRead(OrmModel):
|
||||
id: str
|
||||
name: str
|
||||
|
||||
Reference in New Issue
Block a user