SS-369 Support vended credentials for iceberg sinks - #38181
SS-369 Support vended credentials for iceberg sinks#38181patrickwwbutler wants to merge 11 commits into
Conversation
2b32a11 to
b1d2082
Compare
QA LLM Review1. MEDIUM -- Vended storage credentials are captured once, so the sink stalls when they expire
The DetailsWhy they never refresh. The catalog's Only the data-file writes go stale. The commit operator is fine: in the Effect. Once the token expires, S3 returns Fix. Mirror the AssumeRole path: give the REST/vended case a |
This reverts commit 0ed691e.
This reverts commit e41da6c.
Resolving the rebase conflicts left the lockfile missing the dependency tree iceberg 0.10 pulls in. Re-resolved from the merged Cargo.toml with `cargo check`, which adds only what the manifest requires and leaves existing pins alone. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
7d5c174 to
2b52329
Compare
|
I can think of two main approaches to the vended credentials refresh problem.
1 feels wrong because the Storage Factory is for the Catalog, not the Table. But the vended credentials loader needs to know what table it's requesting credentials for. (And how does it work with prefix-specific credentials?) 2 feels wrong because our Sink code has to look inside the Table properties for the vended credentials (expiry). And creating a new writer throws out any state the old writer had--just to replace the FileIO credentials.
Notes from digging through the code: Currently, we get a FileIO instance one time in the life of the sink. materialize/src/storage/src/sink/iceberg.rs Line 1530 in ab9a4d0 The table's FileIO goes into the writer we package alongside each ready batch. materialize/src/storage/src/sink/iceberg.rs Lines 283 to 289 in ab9a4d0 materialize/src/storage/src/sink/iceberg.rs Line 1651 in ab9a4d0 And we write the batch using the writer we built in the previous step. materialize/src/storage/src/sink/iceberg.rs Lines 1830 to 1834 in ab9a4d0 materialize/src/storage/src/sink/iceberg.rs Lines 1705 to 1707 in ab9a4d0 |
Adds MZ-side support for vended creds by adding a syntax option called
ACCESS DELEGATIONto theICEBERG CATALOG CONNECTIONthat controls the header requesting vended credentials. This also points our iceberg crates at a feature branch at https://github.com/MaterializeInc/iceberg-rust/tree/vended-creds, so we will need to merge that to our iceberg release branch (and likely updateCargo.tomlhere) before actually merging this.