wolflex888 commented on code in PR #12612: URL: https://github.com/apache/iceberg/pull/12612#discussion_r2019045171
########## aws/src/main/java/org/apache/iceberg/aws/s3/VendedCredentialsProvider.java: ########## @@ -47,17 +49,23 @@ public class VendedCredentialsProvider implements AwsCredentialsProvider, SdkAut private volatile HTTPClient client; private final Map<String, String> properties; private final CachedSupplier<AwsCredentials> credentialCache; + private final String catalogEndpoint; + private final String credentialsEndpoint; private AuthManager authManager; private AuthSession authSession; private VendedCredentialsProvider(Map<String, String> properties) { Preconditions.checkArgument(null != properties, "Invalid properties: null"); - Preconditions.checkArgument(null != properties.get(URI), "Invalid URI: null"); + Preconditions.checkArgument(null != properties.get(URI), "Invalid credentials endpoint: null"); + Preconditions.checkArgument( + null != properties.get(CatalogProperties.URI), "Invalid catalog endpoint: null"); this.properties = properties; this.credentialCache = CachedSupplier.builder(() -> credentialFromProperties().orElseGet(this::refreshCredential)) .cachedValueName(VendedCredentialsProvider.class.getName()) .build(); + this.catalogEndpoint = properties.get(CatalogProperties.URI); + this.credentialsEndpoint = RESTUtil.resolveEndpoint(catalogEndpoint, properties.get(URI)); Review Comment: This is corrected. ########## aws/src/test/java/org/apache/iceberg/aws/s3/TestVendedCredentialsProvider.java: ########## @@ -26,6 +26,7 @@ import java.time.Instant; import java.time.temporal.ChronoUnit; +import org.apache.iceberg.CatalogProperties; Review Comment: Tests are updated. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org