Skip to main content

monitoring_auth_decision

Function monitoring_auth_decision 

Source
pub fn monitoring_auth_decision(
    expected_key: Option<&str>,
    provided_key: Option<&str>,
    allow_unauthenticated: bool,
) -> Result<(), (StatusCode, &'static str)>
Expand description

Pure auth decision for monitoring endpoints.

Fails closed when no admin key is configured, unless the runtime explicitly allows unauthenticated monitoring (development only).