You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2019/08/27 14:23:18 UTC
[GitHub] [nifi] natural commented on a change in pull request #3637:
NIFI-6400 Better options, consistent ids for ShellUserGroupProvider.
natural commented on a change in pull request #3637: NIFI-6400 Better options, consistent ids for ShellUserGroupProvider.
URL: https://github.com/apache/nifi/pull/3637#discussion_r318110640
##########
File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-shell-authorizer/src/main/java/org/apache/nifi/authorization/ShellUserGroupProvider.java
##########
@@ -255,11 +256,19 @@ public void onConfigured(AuthorizerConfigurationContext configurationContext) th
throw new AuthorizerCreationException(SYS_CHECK_ERROR, ioexc.getCause());
}
+ // The next step is to add the user and group exclude regexes:
+ try {
+ excludeGroups = Pattern.compile(getProperty(configurationContext, EXCLUDE_GROUP_PROPERTY, ""));
+ excludeUsers = Pattern.compile(getProperty(configurationContext, EXCLUDE_USER_PROPERTY, ""));
+ } catch (final PatternSyntaxException e) {
+ throw new AuthorizerCreationException(e);
+ }
+
// With our command set selected, and our system check passed, we can pull in the users and groups:
refreshUsersAndGroups();
// And finally, our last init step is to fire off the refresh thread:
- scheduler.scheduleWithFixedDelay(this::refreshUsersAndGroups, initialDelay, fixedDelay, TimeUnit.SECONDS);
+ scheduler.scheduleWithFixedDelay(this::refreshUsersAndGroups, fixedDelay, fixedDelay, TimeUnit.SECONDS);
Review comment:
Good catch and TIL. Fixed.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services