[#11580] feat(iceberg): Support credential vending in planTableScan endpoint#11610
Closed
laserninja wants to merge 1 commit into
Closed
[#11580] feat(iceberg): Support credential vending in planTableScan endpoint#11610laserninja wants to merge 1 commit into
laserninja wants to merge 1 commit into
Conversation
…nTableScan endpoint Add @HeaderParam(X_ICEBERG_ACCESS_DELEGATION) to planTableScan, derive isCredentialVending via the existing helper, and pass it into the IcebergRequestContext constructor — mirroring loadTable and createTable. Add tests covering vended-credentials, remote-signing rejection, and invalid access delegation value paths. Fixes apache#11580
Code Coverage Report
Files
|
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Add
X-Iceberg-Access-Delegationheader support to theplanTableScanendpoint, mirroring the existing behavior inloadTableandcreateTable:@HeaderParam(X_ICEBERG_ACCESS_DELEGATION) String accessDelegationparameter toplanTableScanisCredentialVendingvia the existingisCredentialVending()helperisCredentialVendinginto theIcebergRequestContext3-arg constructorWhy are the changes needed?
The
planTableScanendpoint does not honor theX-Iceberg-Access-Delegationheader. UnlikeloadTableandcreateTable, which accept the header and construct anIcebergRequestContextwithisCredentialVending=true,planTableScanbuilds the context without it. As a result, scan-planning responses cannot carry vended storage credentials, forcing clients to make a separateloadTablecall to obtain them.Fix: #11580
Does this PR introduce any user-facing change?
The
planTableScanREST endpoint now accepts theX-Iceberg-Access-Delegationheader. Whenvended-credentialsis specified, the response can include vended storage credentials (consistent withloadTable/createTable).How was this patch tested?
Added three new parameterized tests in
TestIcebergTableOperations:testPlanTableScanWithCredentialVending— verifies the vended-credentials path returns 200 OKtestPlanTableScanRemoteSigningNotSupported— verifies remote-signing returns 406testPlanTableScanInvalidAccessDelegation— verifies invalid values return 400All 66 tests in
TestIcebergTableOperationspass (0 failures).