parse_webhook_payload (src/webhook.rs)

clawdstrike · crates/bridges/k8s-audit-bridge/src/webhook.rs · rust · Apache-2.0
infra, Infra / DevOps

! Kubernetes audit event types and axum webhook handler. ! ! The K8s API server can be configured with `--audit-webhook-config-file` ! to POST audit events to an external webhook receiver. Events arrive as ! either a single `Event` or an `EventList` JSON payload. ! ! This module

// Source: https://github.com/backbay-labs/clawdstrike | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
//! Kubernetes audit event types and axum webhook handler.
//!
//! The K8s API server can be configured with `--audit-webhook-config-file`
//! to POST audit events to an external webhook receiver. Events arrive as
//! either a single `Event` or an `EventList` JSON payload.
//!
//! This module defines the serde types and the axum route handler.

use serde::{Deserialize, Serialize};

/// Kubernetes audit event verb (the operation performed).
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum AuditVerb {
    Create,

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key