danielcweeks commented on code in PR #12582:
URL: https://github.com/apache/iceberg/pull/12582#discussion_r2012401918
##########
aws/src/main/java/org/apache/iceberg/aws/RESTSigV4AuthManager.java:
##########
@@ -61,20 +61,29 @@ public RESTSigV4AuthSession catalogSession(
}
@Override
- public AuthSession contextualSession(SessionCatalog.SessionContext context,
AuthSession parent) {
+ public RESTSigV4AuthSession contextualSession(
+ SessionCatalog.SessionContext context, AuthSession parent) {
AwsProperties contextProperties =
- new AwsProperties(RESTUtil.merge(catalogProperties,
context.properties()));
+ new AwsProperties(
+ RESTUtil.merge(
+ catalogProperties,
+ // Use both context properties and credentials to create the
AwsProperties instance
+ RESTUtil.merge(
+
Optional.ofNullable(context.properties()).orElseGet(Map::of),
+
Optional.ofNullable(context.credentials()).orElseGet(Map::of))));
+ RESTSigV4AuthSession sigV4Parent = (RESTSigV4AuthSession) parent;
return new RESTSigV4AuthSession(
- signer, delegate.contextualSession(context, parent),
contextProperties);
+ signer, delegate.contextualSession(context, sigV4Parent.delegate()),
contextProperties);
}
@Override
- public AuthSession tableSession(
+ public RESTSigV4AuthSession tableSession(
TableIdentifier table, Map<String, String> properties, AuthSession
parent) {
AwsProperties tableProperties =
new AwsProperties(RESTUtil.merge(catalogProperties, properties));
+ RESTSigV4AuthSession sigV4Parent = (RESTSigV4AuthSession) parent;
Review Comment:
Same here for precondition check.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]