openinx commented on code in PR #14443:
URL: https://github.com/apache/iceberg/pull/14443#discussion_r2583700517


##########
aliyun/src/main/java/org/apache/iceberg/aliyun/AliyunClientFactories.java:
##########
@@ -81,17 +88,82 @@ private static AliyunClientFactory loadClientFactory(
   }
 
   static class DefaultAliyunClientFactory implements AliyunClientFactory {
+    private static final Logger LOG = 
LoggerFactory.getLogger(DefaultAliyunClientFactory.class);
     private AliyunProperties aliyunProperties;
 
     DefaultAliyunClientFactory() {}
 
+    /**
+     * Check if RRSA environment variables are present. RRSA requires
+     * ALIBABA_CLOUD_OIDC_PROVIDER_ARN, ALIBABA_CLOUD_ROLE_ARN and 
ALIBABA_CLOUD_OIDC_TOKEN_FILE to
+     * be set.
+     */
+    boolean isRrsaEnvironmentAvailable() {
+      String oidcProviderArn = 
System.getenv("ALIBABA_CLOUD_OIDC_PROVIDER_ARN");
+      String roleArn = System.getenv("ALIBABA_CLOUD_ROLE_ARN");
+      String oidcTokenFile = System.getenv("ALIBABA_CLOUD_OIDC_TOKEN_FILE");
+      return oidcProviderArn != null
+          && !oidcProviderArn.isEmpty()

Review Comment:
   Why don't use the `guava`'s `Strings.isNullOrEmpty` directly ? 



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