turcsanyip commented on code in PR #6055:
URL: https://github.com/apache/nifi/pull/6055#discussion_r883753572
##########
nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-service/src/main/java/org/apache/nifi/schemaregistry/hortonworks/HortonworksSchemaRegistry.java:
##########
@@ -158,30 +175,39 @@ protected Collection<ValidationResult>
customValidate(final ValidationContext va
final String kerberosPassword =
validationContext.getProperty(KERBEROS_PASSWORD).getValue();
final KerberosCredentialsService kerberosCredentialsService =
validationContext.getProperty(KERBEROS_CREDENTIALS_SERVICE)
- .asControllerService(KerberosCredentialsService.class);
+ .asControllerService(KerberosCredentialsService.class);
if (kerberosCredentialsService != null &&
!StringUtils.isBlank(kerberosPrincipal) &&
!StringUtils.isBlank(kerberosPassword)) {
results.add(new ValidationResult.Builder()
- .subject(KERBEROS_CREDENTIALS_SERVICE.getDisplayName())
- .valid(false)
- .explanation("kerberos principal/password and kerberos
credential service cannot be configured at the same time")
- .build());
+ .subject(KERBEROS_CREDENTIALS_SERVICE.getDisplayName())
+ .valid(false)
+ .explanation("kerberos principal/password and kerberos
credential service cannot be configured at the same time")
+ .build());
}
if (!StringUtils.isBlank(kerberosPrincipal) &&
StringUtils.isBlank(kerberosPassword)) {
results.add(new ValidationResult.Builder()
- .subject(KERBEROS_PASSWORD.getDisplayName())
- .valid(false)
- .explanation("kerberos password is required when
specifying a kerberos principal")
- .build());
+ .subject(KERBEROS_PASSWORD.getDisplayName())
+ .valid(false)
+ .explanation("kerberos password is required when specifying a
kerberos principal")
+ .build());
}
if (StringUtils.isBlank(kerberosPrincipal) &&
!StringUtils.isBlank(kerberosPassword)) {
results.add(new ValidationResult.Builder()
- .subject(KERBEROS_PRINCIPAL.getDisplayName())
- .valid(false)
- .explanation("kerberos principal is required when
specifying a kerberos password")
- .build());
+ .subject(KERBEROS_PRINCIPAL.getDisplayName())
+ .valid(false)
+ .explanation("kerberos principal is required when specifying a
kerberos password")
+ .build());
+ }
+
+ if ((validationContext.getProperty(BASIC_AUTH_USERNAME).isSet() ||
validationContext.getProperty(BASIC_AUTH_PASSWORD).isSet())
Review Comment:
Please also add validators for checking that
- the username and the password must be configured together
- basic auth and kerberos cannot be configured at the same time
--
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]