-
Notifications
You must be signed in to change notification settings - Fork 314
Enforce that S3 credentials are vended when requested #2711
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -804,13 +804,22 @@ private LoadTableResponse.Builder buildLoadTableResponseWithDelegationCredential | |
credentialDelegation.getAccessConfig( | ||
tableIdentifier, tableMetadata, actions, refreshCredentialsEndpoint); | ||
Map<String, String> credentialConfig = accessConfig.credentials(); | ||
if (!credentialConfig.isEmpty() && delegationModes.contains(VENDED_CREDENTIALS)) { | ||
responseBuilder.addAllConfig(credentialConfig); | ||
responseBuilder.addCredential( | ||
ImmutableCredential.builder() | ||
.prefix(tableMetadata.location()) | ||
.config(credentialConfig) | ||
.build()); | ||
if (delegationModes.contains(VENDED_CREDENTIALS)) { | ||
if (!credentialConfig.isEmpty()) { | ||
responseBuilder.addAllConfig(credentialConfig); | ||
responseBuilder.addCredential( | ||
ImmutableCredential.builder() | ||
.prefix(tableMetadata.location()) | ||
.config(credentialConfig) | ||
.build()); | ||
} else { | ||
Boolean skipCredIndirection = | ||
realmConfig.getConfig(FeatureConfiguration.SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION); | ||
Preconditions.checkArgument( | ||
!accessConfig.supportsCredentialVending() || skipCredIndirection, | ||
"Credential vending was requested for table %s, but no credentials are available", | ||
tableIdentifier); | ||
Comment on lines
+818
to
+821
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WDYT of moving this check to But I think that should be in a follow-up and after the 1.2.0 cut to avoid additional noise on the release. If I understand correctly, we do not offer backward compatibility of these inner interface. So we could do this if needed in the next release There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds reasonable to me. TBH, I do not like |
||
} | ||
} | ||
responseBuilder.addAllConfig(accessConfig.extraProperties()); | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.