Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b3e291e
feat(rest): add a SigV4 request signer
plusplusjiajia Aug 27, 2026
1ad8e0e
fix(rest): mute aws-sigv4 tracing and tighten payload hashing
plusplusjiajia Aug 27, 2026
53e5c90
refactor(rest): take credentials per call, as Java's signer does
plusplusjiajia Aug 28, 2026
3e252bd
docs(rest): trim the SigV4 signer comments
plusplusjiajia Aug 28, 2026
fc32f42
refactor(rest): break sign_at into named steps
plusplusjiajia Aug 28, 2026
89d8f3f
docs(rest): state the redirect and log-always limits of the signer
plusplusjiajia Sep 20, 2026
26bf79d
fix(rest): keep relocation headers out of the signature, and the trac…
plusplusjiajia Sep 20, 2026
8edf544
docs(rest): name the log bridge that stays unmuted
plusplusjiajia Sep 22, 2026
df66c94
docs(rest): log-always also bypasses the muted subscriber
plusplusjiajia Sep 28, 2026
b9fa6cb
fix(rest): return an error instead of unwrapping the content hash header
plusplusjiajia Oct 2, 2026
5d6b772
refactor(rest): make PayloadHashMode non_exhaustive and SigV4Signer::…
plusplusjiajia Oct 2, 2026
f147293
docs(rest): note the base64 header quirk and credential freshness
plusplusjiajia Oct 2, 2026
b205a40
docs(rest): keep the plus note next to the rewrite it explains
plusplusjiajia Oct 2, 2026
14e0f05
fix(rest): spell out the headers Java leaves unsigned
plusplusjiajia Oct 2, 2026
44033c9
test(rest): check signatures against Iceberg Java
plusplusjiajia Oct 2, 2026
0f02a72
test(rest): pin the signing tests to a fixed time
plusplusjiajia Oct 2, 2026
5aab197
test(rest): check standard mode against the AWS test suite
plusplusjiajia Oct 2, 2026
22af036
test(rest): drop the helper-only AWS vector and the hmac dev-dependency
plusplusjiajia Oct 2, 2026
9e9ff82
fix(rest): decide the tracing mute with public tracing API
plusplusjiajia Oct 2, 2026
c36c457
docs(rest): tighten the payload hash and credential notes
plusplusjiajia Oct 2, 2026
2e6f507
test(rest): bound the live-clock stamp by readings around the call
plusplusjiajia Oct 2, 2026
7824a3b
chore(rest): update the public API for the signer changes
plusplusjiajia Oct 2, 2026
aba93f6
docs(rest): simplify the SigV4 signer comments
plusplusjiajia Oct 2, 2026
e241d07
refactor(rest): build SigV4Signer with a typed builder
plusplusjiajia Oct 8, 2026
ee1a9fc
fix(rest): propagate a failed userinfo strip instead of signing the U…
plusplusjiajia Oct 8, 2026
7a79bfc
docs(rest): name the flag the tracing mute is gated to avoid
plusplusjiajia Oct 8, 2026
edc9d36
docs(rest): say that as_bytes merges an absent body with an empty one
plusplusjiajia Oct 8, 2026
b367eb3
chore(rest): update the public API for the signer builder
plusplusjiajia Oct 8, 2026
0dab39c
fix(rest): validate requests before signing
plusplusjiajia Oct 9, 2026
693de9d
fix(rest): address SigV4 review findings
plusplusjiajia Oct 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ arrow-string = "59.2"
as-any = "0.3.2"
async-trait = "0.1.89"
aws-config = "1.8.7"
aws-credential-types = "1.2"
aws-sdk-glue = { version = "1.85", default-features = false, features = [
"default-https-client",
"rt-tokio",
Expand All @@ -68,6 +69,10 @@ aws-sdk-s3tables = { version = "1.28", default-features = false, features = [
"default-https-client",
"rt-tokio",
] }
aws-sigv4 = { version = "1.4", default-features = false, features = [
"sign-http",
"http1",
] }
backon = "1.5.1"
base64 = "0.22.1"
bimap = "0.6"
Expand Down Expand Up @@ -124,6 +129,7 @@ serde_derive = "1.0.219"
serde_json = "1.0.142"
serde_repr = "0.1.16"
serde_with = "3.4"
sha2 = "0.10"
sqlx = { version = "0.8.1", default-features = false }
strum = "0.27.2"
syn = "2"
Expand Down
9 changes: 9 additions & 0 deletions crates/catalog/rest/Cargo.toml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think AWS-specific dependencies are worth to hide behind a feature flag like we already do for different FileIO deps with OpenDAL

[features]
default = ["opendal-memory", "opendal-fs", "opendal-s3"]
opendal-all = [
"opendal-memory",
"opendal-fs",
"opendal-s3",
"opendal-gcs",
"opendal-oss",
"opendal-azdls",
"opendal-hf",
]
opendal-azdls = ["opendal/services-azdls"]
opendal-fs = ["opendal/services-fs"]
opendal-gcs = ["opendal/services-gcs"]
opendal-hf = ["opendal/services-hf"]
opendal-memory = ["opendal/services-memory"]
opendal-oss = ["opendal/services-oss"]
opendal-s3 = ["opendal/services-s3", "reqsign-aws-v4", "reqsign-core"]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DerGut Good point, this wasn't on my radar. Added — sigv4, off by default, gating aws-sigv4, aws-credential-types, base64 and sha2.

Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,16 @@ keywords = ["iceberg", "rest", "catalog"]
license = { workspace = true }
repository = { workspace = true }

[features]
default = []
# SigV4 request signing. Off by default to keep the AWS crates out.
sigv4 = ["dep:aws-credential-types", "dep:aws-sigv4", "dep:base64", "dep:sha2"]

[dependencies]
async-trait = { workspace = true }
aws-credential-types = { workspace = true, optional = true }
aws-sigv4 = { workspace = true, optional = true }
base64 = { workspace = true, optional = true }
chrono = { workspace = true }
http = { workspace = true }
iceberg = { workspace = true }
Expand All @@ -39,6 +47,7 @@ reqwest = { workspace = true }
serde = { workspace = true }
serde_derive = { workspace = true }
serde_json = { workspace = true }
sha2 = { workspace = true, optional = true }
tokio = { workspace = true }
tracing = { workspace = true }
typed-builder = { workspace = true }
Expand Down
22 changes: 22 additions & 0 deletions crates/catalog/rest/public-api.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub mod iceberg_catalog_rest
pub use iceberg_catalog_rest::Credentials
pub enum iceberg_catalog_rest::HttpRequestBody<'a>
pub iceberg_catalog_rest::HttpRequestBody::Buffered(&'a [u8])
pub iceberg_catalog_rest::HttpRequestBody::Empty
Expand All @@ -14,6 +15,18 @@ impl<'a> core::fmt::Debug for iceberg_catalog_rest::HttpRequestBody<'a>
pub fn iceberg_catalog_rest::HttpRequestBody<'a>::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl<'a> core::marker::Copy for iceberg_catalog_rest::HttpRequestBody<'a>
impl<'a> core::marker::StructuralPartialEq for iceberg_catalog_rest::HttpRequestBody<'a>
#[non_exhaustive] pub enum iceberg_catalog_rest::PayloadHashMode
pub iceberg_catalog_rest::PayloadHashMode::IcebergRest
pub iceberg_catalog_rest::PayloadHashMode::StandardAws
impl core::clone::Clone for iceberg_catalog_rest::PayloadHashMode
pub fn iceberg_catalog_rest::PayloadHashMode::clone(&self) -> iceberg_catalog_rest::PayloadHashMode
impl core::cmp::Eq for iceberg_catalog_rest::PayloadHashMode
impl core::cmp::PartialEq for iceberg_catalog_rest::PayloadHashMode
pub fn iceberg_catalog_rest::PayloadHashMode::eq(&self, other: &iceberg_catalog_rest::PayloadHashMode) -> bool
impl core::fmt::Debug for iceberg_catalog_rest::PayloadHashMode
pub fn iceberg_catalog_rest::PayloadHashMode::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::Copy for iceberg_catalog_rest::PayloadHashMode
impl core::marker::StructuralPartialEq for iceberg_catalog_rest::PayloadHashMode
pub struct iceberg_catalog_rest::CommitTableRequest
pub iceberg_catalog_rest::CommitTableRequest::identifier: core::option::Option<iceberg::catalog::TableIdent>
pub iceberg_catalog_rest::CommitTableRequest::requirements: alloc::vec::Vec<iceberg::catalog::TableRequirement>
Expand Down Expand Up @@ -331,6 +344,15 @@ impl core::default::Default for iceberg_catalog_rest::RestSessionCatalogBuilder
pub fn iceberg_catalog_rest::RestSessionCatalogBuilder::default() -> Self
impl core::fmt::Debug for iceberg_catalog_rest::RestSessionCatalogBuilder
pub fn iceberg_catalog_rest::RestSessionCatalogBuilder::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
pub struct iceberg_catalog_rest::SigV4Signer
impl iceberg_catalog_rest::SigV4Signer
pub fn iceberg_catalog_rest::SigV4Signer::sign(&self, request: &mut iceberg_catalog_rest::HttpRequest, credentials: &aws_credential_types::credentials_impl::Credentials) -> iceberg::error::Result<()>
impl core::clone::Clone for iceberg_catalog_rest::SigV4Signer
pub fn iceberg_catalog_rest::SigV4Signer::clone(&self) -> iceberg_catalog_rest::SigV4Signer
impl core::fmt::Debug for iceberg_catalog_rest::SigV4Signer
pub fn iceberg_catalog_rest::SigV4Signer::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl iceberg_catalog_rest::SigV4Signer
pub fn iceberg_catalog_rest::SigV4Signer::builder() -> SigV4SignerBuilder<((), (), ())>
pub struct iceberg_catalog_rest::StorageCredential
pub iceberg_catalog_rest::StorageCredential::config: std::collections::hash::map::HashMap<alloc::string::String, alloc::string::String>
pub iceberg_catalog_rest::StorageCredential::prefix: alloc::string::String
Expand Down
6 changes: 6 additions & 0 deletions crates/catalog/rest/src/auth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@
//! `AuthManager`/`AuthSession` API.

mod oauth2;
#[cfg(feature = "sigv4")]
mod sigv4;

use std::collections::HashMap;
use std::fmt::Debug;
use std::sync::Arc;

use async_trait::async_trait;
#[cfg(feature = "sigv4")]
pub use aws_credential_types::Credentials;
use iceberg::{Result, SessionContext};
pub use oauth2::OAuth2Manager;
#[cfg(feature = "sigv4")]
pub use sigv4::{PayloadHashMode, SigV4Signer};

use crate::client::HttpClient;
use crate::request::HttpRequest;
Expand Down
Loading
Loading