From e4057b6746b68e04f57ab2e87901ff6bcfaecfeb Mon Sep 17 00:00:00 2001 From: Henry Guo Date: Sat, 7 Nov 2026 08:07:58 +0800 Subject: [PATCH] fix(table-catalog): reject storage credentials for catalog access (#9185) * fix(table-catalog): reject storage credentials for catalog access * fix(table-catalog): avoid growing the s3s error macro footprint Use the existing S3Error constructor for the storage-credential rejection while preserving its AccessDenied code and message. Keep the merged PR within the current s3s footprint baseline without relaxing the guard. Co-Authored-By: heihutu Co-Authored-By: zhi22915 --------- Co-authored-by: Hauser Zhi Co-authored-by: heihutu Co-authored-by: zhi22915 Co-authored-by: Chris An --- docs/architecture/s3-tables-support-matrix.md | 2 +- .../src/admin/handlers/table_catalog/mod.rs | 10 ++ .../src/admin/handlers/table_catalog/tests.rs | 137 ++++++++++++++++++ 3 files changed, 148 insertions(+), 1 deletion(-) diff --git a/docs/architecture/s3-tables-support-matrix.md b/docs/architecture/s3-tables-support-matrix.md index bb3e7391e..b5cd06f1d 100644 --- a/docs/architecture/s3-tables-support-matrix.md +++ b/docs/architecture/s3-tables-support-matrix.md @@ -67,7 +67,7 @@ RustFS S3 Tables is an Iceberg REST Catalog and table-bucket implementation on t | Commit recovery | Supported | Commit log, idempotency lookup, diagnostics, and recovery routes expose and repair finalization gaps without moving the pointer. Object-backed recovery reports a staged request as SUPERSEDED only when a reachable finalized same-base winner proves it lost CAS and its idempotency binding is intact. The original staged receipt is retained; its old request still conflicts. The winning history must be retained with the losing receipt; missing or contradictory history requires manual review. | | Snapshot refs | Supported | List, create/replace, delete via commits; `main` is protected; refs with explicit retention need forced delete. | | Iceberg views | Supported | Create, list, load, replace, exists, drop with view-scoped authorization; only view format version 1. | -| LoadTable and table credentials endpoint | Supported | Vending only on negotiated `vended-credentials`; one temporary session scoped to the warehouse prefix and current metadata location; missing credential permission falls back to metadata-only with an explicit reason; responses carry `Cache-Control: no-store, private`. | +| LoadTable and table credentials endpoint | Supported | Vending only on negotiated `vended-credentials`; one temporary session scoped to the warehouse prefix and current metadata location; missing credential permission falls back to metadata-only with an explicit reason; vended storage sessions cannot authenticate Catalog requests; responses carry `Cache-Control: no-store, private`. | | Catalog diagnostics and export | Supported | Object-backed and durable-strong stores expose recovery state, consistency, backing manifest, WAL state, migration target, single-active-writer policy, and scale validation matrix. Durable-strong responses also identify the snapshot path, ETag, and format version; diagnostics re-check the snapshot observation before returning and use zero-file retention until strong maintenance configuration is persisted. | | Durable catalog backup and restore | Preview / controlled | Durable-strong only. `POST /iceberg/v1/{warehouse}/catalog/backup` seals a table-bucket snapshot behind the publication and migration fences, records catalog/object watermarks, and stores an immutable backup artifact. `POST /iceberg/v1/{warehouse}/catalog/restore` verifies those watermarks, requires an explicit replacement decision for an existing target, applies the catalog snapshot with ETag-CAS, and leaves a recoverable restore intent if maintenance-state finalization fails. It does not copy data files or claim automatic cross-region failover. | | Catalog import and rollback | Supported | Import/register and online rollback go through validation and commit paths. Online rollback accepts only forward-safe targets; restoring an older target that lowers watermarks is an offline disaster-recovery operation with all writers stopped. | diff --git a/rustfs/src/admin/handlers/table_catalog/mod.rs b/rustfs/src/admin/handlers/table_catalog/mod.rs index 8bb617d4a..87fc3e5f1 100644 --- a/rustfs/src/admin/handlers/table_catalog/mod.rs +++ b/rustfs/src/admin/handlers/table_catalog/mod.rs @@ -1326,6 +1326,16 @@ async fn table_catalog_request_principal(req: &S3Request) -> S3Result