turcsanyip commented on a change in pull request #4348:
URL: https://github.com/apache/nifi/pull/4348#discussion_r444393794
##########
File path:
nifi-nar-bundles/nifi-atlas-bundle/nifi-atlas-reporting-task/src/main/java/org/apache/nifi/atlas/security/Kerberos.java
##########
@@ -49,22 +49,24 @@
final KerberosCredentialsService credentialsService =
context.getProperty(ReportLineageToAtlas.KERBEROS_CREDENTIALS_SERVICE).asControllerService(KerberosCredentialsService.class);
- final String resolvedPrincipal;
- final String resolvedKeytab;
- if (credentialsService == null) {
- resolvedPrincipal = explicitPrincipal;
- resolvedKeytab = explicitKeytab;
- } else {
- resolvedPrincipal = credentialsService.getPrincipal();
- resolvedKeytab = credentialsService.getKeytab();
- }
-
- if (resolvedPrincipal == null || resolvedKeytab == null) {
- problems.add(new ValidationResult.Builder()
- .subject("Kerberos Credentials")
- .valid(false)
- .explanation("Both the Principal and the Keytab must be
specified when using Kerberos authentication, either via the explicit
properties or the Kerberos Credentials Service.")
- .build());
+ if (credentialsService == null ||
context.getControllerServiceLookup().isControllerServiceEnabled(credentialsService))
{
Review comment:
Yes, that would make sense. However, I just wanted to fix the
ControllerServiceDisabledException stacktraces in the log for now. Leaving as
it was.
----------------------------------------------------------------
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]