Skip to main content

Module admin_server

Module admin_server 

Source
Expand description

Admin HTTP server for Pingora configuration management.

Provides HTTP endpoints for the dashboard to manage Pingora. SECURITY: All admin API endpoints require the X-Admin-Key header.

  • GET /health - Service health and WAF statistics
  • GET /metrics - Prometheus metrics
  • POST /reload - Reload configuration (requires auth)
  • POST /test - Test configuration (dry-run, requires auth)
  • POST /restart - Restart service (requires auth)
  • GET /sites - List configured sites
  • GET /stats - Runtime statistics
  • GET /waf/stats - WAF statistics

Modules§

scopes
Admin API scopes for fine-grained permission control

Structs§

AdminState
Admin server state shared across handlers.
ApparatusActor
Context about the actor (client) associated with a threat report.
ApparatusReport
External threat report format from Apparatus/Cutlass sensors.
ApparatusRequest
HTTP request context associated with a threat report.
ApparatusSignal
Details about a threat signal.
EvaluateRequest
Request payload for dry-run WAF evaluation (Phase 2: Lab View)
EvaluationResult
Detection result from WAF evaluation (for admin API)
IntegrationsConfig
Integration configuration for external services (Horizon, Tunnel, Apparatus)
RestartResult
Restart result.
SignalPermissions
Permissions for external sensor signals.
TestResult
Test configuration result.

Enums§

LogSource
Log sources

Functions§

enable_demo_mode
Enable demo mode with pre-populated sample data
enable_dev_mode
Enable dev mode for live reloading of admin console
is_demo_mode
Check if demo mode is enabled
is_dev_mode
Check if dev mode is enabled
record_log
Record a log entry (defaults to system source)
record_log_with_source
Record a log entry with source
register_evaluate_callback
Register a callback for WAF evaluation (dry-run detection). Called by the binary (main.rs) during startup.
register_integrations_callbacks
Register integration configuration callbacks. Called by the binary (main.rs) during startup.
register_profiles_getter
Register a callback to get endpoint profiles from the detection engine. Called by the binary (main.rs) during startup.
register_schemas_getter
Register a callback to get endpoint schemas from the schema learner. Called by the binary (main.rs) during startup.
start_admin_server
Starts the admin HTTP server.