Skip to main content

Module admin_api

Module admin_api 

Source
Expand description

HTTP surface of the admin UI: the bootstrap claim, credential rotation, and read-only status, plus the router that serves them on the dedicated admin port.

Everything under /api/admin except the three bootstrap routes requires the admin credential. The bootstrap routes carry their own rules — see crate::admin for the two-phase claim protocol.

Structs§

ConfirmRequest
Body of POST /api/admin/bootstrap/confirm.
TtlRequest
Optional body carrying an administrator-chosen credential lifetime.

Functions§

admin_handle
Convenience accessor used by main when starting the admin listener.
admin_status
GET /api/admin/status — is admin claimed, and may bootstrap run?
admin_summary
GET /api/admin/summarydoctor-style read-only view of what the router is wired to. Requires the admin credential.
bootstrap
POST /api/admin/bootstrap — phase 1 of the claim.
bootstrap_confirm
POST /api/admin/bootstrap/confirm — phase 2 of the claim.
rotate_credential
POST /api/admin/rotate — issue a replacement admin credential and retire the current one. Requires the current credential.
router
Build the admin-port router: the bootstrap/status API, the admin-only management API, and the embedded React UI.