pvillard31 commented on code in PR #10482:
URL: https://github.com/apache/nifi/pull/10482#discussion_r2571634178


##########
nifi-extension-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/ConsumeAzureEventHub.java:
##########
@@ -527,9 +539,42 @@ protected Collection<ValidationResult> 
customValidate(ValidationContext validati
                             .valid(false)
                             .build());
                 }
+                if (blobIdentityFederationProviderSet) {
+                    results.add(new ValidationResult.Builder()
+                            
.subject(BLOB_STORAGE_IDENTITY_FEDERATION_TOKEN_PROVIDER.getDisplayName())
+                            .explanation("%s must not be set when %s is %s."
+                                    
.formatted(BLOB_STORAGE_IDENTITY_FEDERATION_TOKEN_PROVIDER.getDisplayName(),
+                                            
BLOB_STORAGE_AUTHENTICATION_STRATEGY.getDisplayName(),
+                                            
BlobStorageAuthenticationStrategy.OAUTH2.getDisplayName()))
+                            .valid(false)
+                            .build());
+                }
+            } else if (blobStorageAuthenticationStrategy == 
BlobStorageAuthenticationStrategy.IDENTITY_FEDERATION) {
+                if (StringUtils.isNotBlank(storageAccountKey)) {
+                    results.add(new ValidationResult.Builder()
+                            .subject(STORAGE_ACCOUNT_KEY.getDisplayName())
+                            .explanation("%s must not be set when %s is %s."
+                                    
.formatted(STORAGE_ACCOUNT_KEY.getDisplayName(),
+                                            
BLOB_STORAGE_AUTHENTICATION_STRATEGY.getDisplayName(),
+                                            
BlobStorageAuthenticationStrategy.IDENTITY_FEDERATION.getDisplayName()))
+                            .valid(false)
+                            .build());
+                }

Review Comment:
   No you're absolutely right that it's better to provide a good UX experience 
and rely on dependsOn/required. I pushed a commit to simplify all of this.



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

Reply via email to