SS-452 Add sql option for iceberg storage provider to iceberg catalog connection - #38732
Conversation
fcb4316 to
b69ed2c
Compare
QA LLM Review1. MEDIUM -- New GCS/ADLS storage factories fall back to clusterd's ambient cloud identitysrc/storage-types/src/connections.rs:1165 DetailsA REST catalog connection can now select an OpenDAL GCS or ADLS backend, and both are built from default config. When the catalog names a table location but hands back no storage credentials for it, OpenDAL does not fail: it walks its own provider chain and signs the requests with whatever ambient identity the clusterd process has. Since the catalog URL is user-supplied, any principal who can create a connection can make Materialize read and write an object store of their choosing under Materialize's own identity.
The GCP-connection branch twenty lines below at Reachable path: Two things to know about the fix. The |
martykulma
left a comment
There was a problem hiding this comment.
need to remove OpenDalStorageFactory::Azdls or set the feature flag for it to be include, as is, this won't compile.
| IcebergStorageProvider::Gcs | ||
| } else { | ||
| self.storage_provider.unwrap_or_default() | ||
| }; |
There was a problem hiding this comment.
Is this needed? It looks like IcebergStorageProvider::Gcs is the provider that could result in auth = IcebergCatalogAuth::Gcp, so this is effectively dead.
Could also collapse with auth decision to avoid having 2 places to update in the future, e.g.
let (auth, storage_provider) = match (credential, gcp_connection) {
...
There was a problem hiding this comment.
technically we could have IcebergCatalogAuth::Gcp and storage_provider = None, so this sets it in case it isn't set, but in the connect_rest function, if it is a GCP connection, the storage provider isn't even checked, just assumed to be GCS, so it's not technically necessary, but the RestIcebergCatalog requires a value, so we might as well set it here
Adds an option to the
CREATE CONNECTION ... TO ICEBERG CATALOGstatement to specify a storage provider for the catalog, and then consumes this option when building the opendal storage interface to create the correct one.Unblocks vended credential support for GCS and ADLS backed iceberg catalogs