Open
Conversation
Add an OPTIMIZED_CREDENTIAL_VENDING feature flag that allows the loadCredentials endpoint to vend storage credentials using location data stored in entity internal properties, bypassing the expensive full table metadata read from object storage. When the flag is enabled, the new loadCredentialsFromEntityProperties path resolves the table's base and data locations directly from the metastore and uses them to scope credentials. If the entity or its location data is missing (e.g. external catalogs or pre-apache#3226 data), it falls back transparently to the standard loadTableWithAccessDelegation path.
ea3d45a to
eb5db50
Compare
- Add authz test for loadCredentialsFromEntityProperties verifying TABLE_READ_DATA and TABLE_WRITE_DATA privileges - Add integration tests for /loadCredentials endpoint with optimized credential vending both enabled and disabled - Add loadCredentials helper method to CatalogApi - Remove Javadoc from private vendCredentials method
eb5db50 to
f802657
Compare
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.
About the change
The
/credentialsendpoint currently performs a full table metadata read from object storage to vend credentials.This is expensive and unnecessary — the table locations needed for credential vending are already available in the
entity's internal properties stored in the metastore.
This PR introduces an optimized credential vending path (loadCredentialsFromEntityProperties) that reads locations
directly from the metastore, avoiding the object storage round-trip. The optimization is gated behind the
OPTIMIZED_CREDENTIAL_VENDINGfeature flag (defaults to false). When disabled, the endpoint falls back to the existingloadTableWithAccessDelegation path. When the entity lacks the required internal properties (e.g. tables created before
the property was stored), it also gracefully falls back.
co-author : @adutra
Checklist
CHANGELOG.md(if needed) --latersite/content/in-dev/unreleased(if needed)