Skip to main content

Module admin

Module admin 

Source
Expand description

Admin diagnostic endpoints (status, auth keys metadata, counters, RBAC). Admin diagnostic endpoints.

When enabled, the server exposes a small /admin/* surface that returns read-only diagnostic JSON: uptime, active auth configuration (no secrets), auth counters, and an RBAC policy summary.

The admin router is always wrapped in the existing auth + RBAC stack and additionally requires the caller’s role to match the role field on crate::admin::AdminConfig. Configuration validation refuses to enable admin without auth.

Structs§

AdminConfig
Admin endpoint configuration.
AdminStatus
/admin/status response body.

Functions§

require_admin_role
Role-check middleware for admin routes.