tpalfy commented on a change in pull request #4369:
URL: https://github.com/apache/nifi/pull/4369#discussion_r450917508



##########
File path: 
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/AbstractAzureDataLakeStorageProcessor.java
##########
@@ -158,41 +173,51 @@
     public static Collection<ValidationResult> 
validateCredentialProperties(final ValidationContext validationContext) {
         final List<ValidationResult> results = new ArrayList<>();
 
-        final boolean useManagedIdentity = 
validationContext.getProperty(USE_MANAGED_IDENTITY).asBoolean();
-        final boolean accountKeyIsSet  = 
validationContext.getProperty(ACCOUNT_KEY).isSet();
-        final boolean sasTokenIsSet     = 
validationContext.getProperty(SAS_TOKEN).isSet();
-
-        int credential_config_found = 0;
-        if(useManagedIdentity) credential_config_found++;
-        if(accountKeyIsSet) credential_config_found++;
-        if(sasTokenIsSet) credential_config_found++;
-
-        if(credential_config_found == 0){
-            final String msg = String.format(
-                "At least one of ['%s', '%s', '%s'] should be set",
-                ACCOUNT_KEY.getDisplayName(),
-                SAS_TOKEN.getDisplayName(),
-                USE_MANAGED_IDENTITY.getDisplayName()
-            );
-            results.add(new ValidationResult.Builder().subject("Credentials 
config").valid(false).explanation(msg).build());
-        } else if(credential_config_found > 1) {
-            final String msg = String.format(
-                "Only one of ['%s', '%s', '%s'] should be set",
-                ACCOUNT_KEY.getDisplayName(),
-                SAS_TOKEN.getDisplayName(),
-                USE_MANAGED_IDENTITY.getDisplayName()
-            );
-            results.add(new ValidationResult.Builder().subject("Credentials 
config").valid(false).explanation(msg).build());
+        if 
(!validationContext.getProperty(AzureStorageUtils.STORAGE_CREDENTIALS_SERVICE).isSet())
 {

Review comment:
       Great, thanks, I did the change.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to