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§
- Admin
State - Admin server state shared across handlers.
- Apparatus
Actor - Context about the actor (client) associated with a threat report.
- Apparatus
Report - External threat report format from Apparatus/Cutlass sensors.
- Apparatus
Request - HTTP request context associated with a threat report.
- Apparatus
Signal - Details about a threat signal.
- Evaluate
Request - Request payload for dry-run WAF evaluation (Phase 2: Lab View)
- Evaluation
Result - Detection result from WAF evaluation (for admin API)
- Integrations
Config - Integration configuration for external services (Horizon, Tunnel, Apparatus)
- Restart
Result - Restart result.
- Signal
Permissions - Permissions for external sensor signals.
- Test
Result - 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.