common/signature.rs

fractalbits · crates/s3_gateway/src/handler/common/signature.rs · rust · Apache-2.0
auth

Async signature verification for S3 gateway requests, supporting missing or bad signatures.

// Source: https://github.com/fractalbits-labs/fractalbits | 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.
mod error;
pub use error::SignatureError;
pub mod payload;

// Re-export from common crate
pub use aws_signature::streaming::{
    ChunkSignature, ChunkSignatureContext, parse_chunk_signature, verify_chunk_signature,
};

use crate::{
    AppState,
    handler::common::{request::extract::Authentication, s3_error::S3Error},
};
use actix_web::HttpRequest;
use data_types::{ApiKey, TraceId, Versioned};
use std::sync::Arc;
use tracing::{debug, error, warn};

pub async fn check_signature(
    app: Arc<AppState>,
    request: &HttpRequest,
    auth: Option<&Authentication<'_>>,
    t

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

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

Get a free API key