ebyhr commented on code in PR #17111:
URL: https://github.com/apache/iceberg/pull/17111#discussion_r4279256399


##########
gcp/src/main/java/org/apache/iceberg/gcp/GcpKeyManagementClient.java:
##########
@@ -101,21 +103,25 @@ public void close() {
     }
   }
 
-  private KeyManagementServiceClient kmsClient() {
+  @VisibleForTesting
+  KeyManagementServiceClient kmsClient() {
     if (kmsClient == null) {
       synchronized (this) {
         if (kmsClient == null) {
           GCPProperties gcpProperties = new GCPProperties(allProperties);
           try {
             KeyManagementServiceSettings.Builder kmsBuilder =
                 KeyManagementServiceSettings.newBuilder();
+            gcpProperties.kmsEndpoint().ifPresent(kmsBuilder::setEndpoint);
             if (gcpProperties.oauth2Token().isPresent()) {
               OAuth2Credentials oAuth2Credentials =
                   
GCPAuthUtils.oauth2CredentialsFromGcpProperties(gcpProperties, closeableGroup);
               
kmsBuilder.setCredentialsProvider(FixedCredentialsProvider.create(oAuth2Credentials));
+            } else if (gcpProperties.noAuth()) {
+              
kmsBuilder.setCredentialsProvider(NoCredentialsProvider.create());

Review Comment:
   `noAuth` makes the client send no credentials, which is only meant for local 
emulators like floci-gcp described above. 



-- 
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]

Reply via email to