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


##########
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:
   i am not sure if i fully follow what this noAuth is ... is it saying we 
don't need any creds to talk to gcp service in that way, how does the 
authentication happens ? 
   
   do you have some examples 



##########
gcp/src/main/java/org/apache/iceberg/gcp/GCPProperties.java:
##########
@@ -50,6 +50,14 @@ public class GCPProperties implements Serializable {
    */
   public static final String GCS_KMS_KEY_NAME = "gcs.kms-key-name";
 
+  /**
+   * Configure an alternative endpoint of the KMS service for 
GcpKeyManagementClient to access.
+   *
+   * <p>This could be used to use KMS key management with any KMS-compatible 
service that has a
+   * different endpoint

Review Comment:
   do we know such KMS compat services in practice ?



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