-
Notifications
You must be signed in to change notification settings - Fork 305
Unify create/loadTable call paths #2589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This will also facilitate implementing #2351 imho, which is nice!
Optional<String> refreshCredentialsEndpoint) { | ||
LoadTableResponse.Builder responseBuilder = | ||
LoadTableResponse.builder().withTableMetadata(tableMetadata); | ||
|
||
if (!delegationModes.contains(VENDED_CREDENTIALS)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably safer when more delegation modes get supported:
if (!delegationModes.contains(VENDED_CREDENTIALS)) { | |
if (delegationModes.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used .isEmpty()
in other cases, but in this method the code below specifically performs credential vending, so I think this check is correct :)
We can certainly refactor when we support remote S3 request signing. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, WFM.
In preparation for implementing sending non-credential config to REST Catalog clients for apache#2207 this PR unifies calls paths for create/load table operations. This change does not have any differences in authorization. This change is not expecte to have any material behaviour differences to the affected code paths. The main idea is to consolidate decision-making for that to include into REST responses and use method parameters like `EnumSet<AccessDelegationMode> delegationModes` for driving those decisions.
dab8b08
to
1a0d7ea
Compare
Rebased and resolved conflicts. @adnanhemani : please take a look to double check that I did not break any of your changes from #2480. |
This change builds on top of apache#2589 and further prepares Polaris code to support non-STS S3 implementations for apache#2589. For S3 implementations that do have STS, this change enables clients to run with local credentials (no credential vending) and still receive endpoint configuration from the catalog. * Call `SupportsCredentialDelegation.getAccessConfig()` on all relevant create/load requests (previously it was called only when `vended-credentials` was requested * Always sent `AccessConfig.extraProperties()` to clients * Expose credentials to clients only when the `vended-credentials` access delegation mode is requested. * There is not client-visible behaviour change for implementations of `PolarisStorageIntegration` that do not produce "extra" `AccessConfig` properties.
In preparation for implementing sending non-credential config to REST Catalog clients for #2207 this PR unifies calls paths for create/load table operations.
This change does not have any differences in authorization.
This change is not expected to have any material behaviour differences to the affected code paths.
The main idea is to consolidate decision-making for what to include into REST responses and use method parameters like
EnumSet<AccessDelegationMode> delegationModes
for driving those decisions.