Skip to main content

admin_router

Function admin_router 

Source
pub fn admin_router() -> Router<Arc<AppState>>
Expand description

Build the admin API sub-router.

All admin routes require admin authentication, which is separate from the EST enrollment authentication.

§Route structure

/admin/
    health           GET   — overall system health
    health/db        GET   — database connectivity
    health/hsm       GET   — HSM connectivity
    health/ca        GET   — CA backend health
    cas              GET   — list configured CAs
    cas/{id}         GET   — CA details
    cas/{id}/health  GET   — CA health check
    otp/generate     POST  — generate new OTP
    otp              GET   — list active OTPs
    otp/{id}         DELETE — revoke OTP
    certs            GET   — list issued certificates
    certs/{serial}   GET   — certificate details
    certs/{serial}/revoke POST — revoke certificate