jtstorck commented on a change in pull request #4095: NIFI-7018: Initial commit 
of processors extending AbstractHadoopProce…
URL: https://github.com/apache/nifi/pull/4095#discussion_r385456587
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-extension-utils/nifi-hadoop-utils/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java
 ##########
 @@ -216,21 +230,22 @@ protected KerberosProperties getKerberosProperties(File 
kerberosConfigFile) {
                     .build());
         }
 
-        if (credentialsService != null && (explicitPrincipal != null || 
explicitKeytab != null)) {
+        if (credentialsService != null && (explicitPrincipal != null || 
explicitKeytab != null || explicitPassword != null)) {
             results.add(new ValidationResult.Builder()
                 .subject("Kerberos Credentials")
                 .valid(false)
-                .explanation("Cannot specify both a Kerberos Credentials 
Service and a principal/keytab")
+                .explanation("Cannot specify a Kerberos Credentials Service 
while also specifying a Kerberos Principal, Kerberos Keytab, or Kerberos 
Password")
                 .build());
         }
 
         final String allowExplicitKeytabVariable = 
System.getenv(ALLOW_EXPLICIT_KEYTAB);
-        if ("false".equalsIgnoreCase(allowExplicitKeytabVariable) && 
(explicitPrincipal != null || explicitKeytab != null)) {
+        if ("false".equalsIgnoreCase(allowExplicitKeytabVariable) && 
(explicitPrincipal != null || explicitKeytab != null || explicitPassword != 
null)) {
 
 Review comment:
   Updated the code to allow that scenario, and added a unit test to verify the 
validation logic in AbstractHadoopProcessor.  This works in conjunction with 
the added test cases in TestKerberosProperties  to validate 
principal/keytab/password combinations.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to