laserninja opened a new pull request, #11610:
URL: https://github.com/apache/gravitino/pull/11610

   ### What changes were proposed in this pull request?
   
   Add `X-Iceberg-Access-Delegation` header support to the `planTableScan` 
endpoint, mirroring the existing behavior in `loadTable` and `createTable`:
   
   - Add `@HeaderParam(X_ICEBERG_ACCESS_DELEGATION) String accessDelegation` 
parameter to `planTableScan`
   - Derive `isCredentialVending` via the existing `isCredentialVending()` 
helper
   - Pass `isCredentialVending` into the `IcebergRequestContext` 3-arg 
constructor
   - Update logging to include access delegation info
   
   ### Why are the changes needed?
   
   The `planTableScan` endpoint does not honor the 
`X-Iceberg-Access-Delegation` header. Unlike `loadTable` and `createTable`, 
which accept the header and construct an `IcebergRequestContext` with 
`isCredentialVending=true`, `planTableScan` builds the context without it. As a 
result, scan-planning responses cannot carry vended storage credentials, 
forcing clients to make a separate `loadTable` call to obtain them.
   
   Fix: #11580
   
   ### Does this PR introduce _any_ user-facing change?
   
   The `planTableScan` REST endpoint now accepts the 
`X-Iceberg-Access-Delegation` header. When `vended-credentials` is specified, 
the response can include vended storage credentials (consistent with 
`loadTable` / `createTable`).
   
   ### How was this patch tested?
   
   Added three new parameterized tests in `TestIcebergTableOperations`:
   
   - `testPlanTableScanWithCredentialVending` — verifies the vended-credentials 
path returns 200 OK
   - `testPlanTableScanRemoteSigningNotSupported` — verifies remote-signing 
returns 406
   - `testPlanTableScanInvalidAccessDelegation` — verifies invalid values 
return 400
   
   All 66 tests in `TestIcebergTableOperations` pass (0 failures).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to