Skip to main content

firehose_auth_middleware

Function firehose_auth_middleware 

Source
pub async fn firehose_auth_middleware(
    provider: Arc<dyn AuthProvider>,
    req: Request,
    next: Next,
) -> Response
Expand description

Firehose-specific auth: read X-Amz-Firehose-Access-Key, synthesize an Authorization: Bearer <key> header, and validate via the same AuthProvider the rest of the ingestion service uses (reuses the constant-time keyring check verbatim). On failure, return the Firehose error shape (non-200 JSON) so Firehose retries/spills rather than dropping data.