jtstorck commented on a change in pull request #3446: NIFI-6224 Updated
KerberosProvider to use the "Default Realm" property
URL: https://github.com/apache/nifi/pull/3446#discussion_r278167961
##########
File path:
nifi-nar-bundles/nifi-kerberos-iaa-providers-bundle/nifi-kerberos-iaa-providers/src/main/java/org/apache/nifi/kerberos/KerberosProvider.java
##########
@@ -61,11 +63,16 @@ public final void onConfigured(final
LoginIdentityProviderConfigurationContext c
}
try {
- expiration = FormatUtils.getTimeDuration(rawExpiration,
TimeUnit.MILLISECONDS);
+ expiration =
Double.valueOf(FormatUtils.getPreciseTimeDuration(rawExpiration,
TimeUnit.MILLISECONDS)).longValue();
} catch (final IllegalArgumentException iae) {
throw new ProviderCreationException(String.format("The Expiration
Duration '%s' is not a valid time duration", rawExpiration));
}
+ defaultRealm = configurationContext.getProperty("Default Realm");
+ if (defaultRealm.contains("@")) {
Review comment:
Good catch! I'll update this PR and
https://github.com/apache/nifi-registry/pull/172 and add the check.
----------------------------------------------------------------
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