NIFI-5973 Adds ShellUserGroupProvider.#3537
Conversation
Supersedes apache#3495.
|
Reviewing... |
|
Hi Troy. Reviewing this leads me to the same scenario I encountered on PR #3495 -- the authentication with LDAP works successfully, but the user with identity alopresto doesn't have any groups populated and despite being set as the Initial Admin Identity, it does not have the expected (or any) permissions. There are permissions defined in |
| <class>org.apache.nifi.authorization.CompositeConfigurableUserGroupProvider</class> | ||
| <property name="Configurable User Group Provider">file-user-group-provider</property> | ||
| <property name="User Group Provider 1"></property> | ||
| <property name="User Group Provider 1">shell-user-group-provider</property> |
There was a problem hiding this comment.
I don't think this should be populated as this could also be an LDAP user group provider. We should just leave this blank.
| <userGroupProvider> | ||
| <identifier>shell-user-group-provider</identifier> | ||
| <class>org.apache.nifi.authorization.ShellUserGroupProvider</class> | ||
| <property name="Initial Refresh Delay">30 secs</property |
There was a problem hiding this comment.
There is a missing > at the end of this line.
| @@ -198,12 +198,22 @@ | |||
| NOTE: Any identity mapping rules specified in nifi.properties are not applied in this implementation. This behavior | |||
| would need to be applied by the base implementation. | |||
| --> | |||
There was a problem hiding this comment.
The block comment above the commented-out <userGroupProvider> declaration should explain the Shell User Group Provider and its elements. The block comment for CompositeConfigurableUserGroupProvider should be moved below the commented-out Shell UGP.
There was a problem hiding this comment.
Good catch, thank you. Commented.
| <identifier>shell-user-group-provider</identifier> | ||
| <class>org.apache.nifi.authorization.ShellUserGroupProvider</class> | ||
| <property name="Initial Refresh Delay">30 secs</property | ||
| <property name="Refresh Delay">30 secs</property> |
There was a problem hiding this comment.
I think 30 seconds is a bit aggressive considering OS users and groups don't change too frequently, but I understand not wanting to wait too long when they do change during an active debugging/management session.
|
Thanks again for testing again. Can you review/post you ldap mapping, e.g., |
|
I'm hoping I just missed a configuration value (either failed to populate or copied a stale value from an old config). Prerequisites:
|
|
Generic comment before I forget, I think there are more locations in the code when the shell runner runs a command without a description of what's happening and we can clean that up. Grep the DEBUG |
|
Was able to fix a bug where the user and groups object query was expecting the When using LDAP authentication and Shell UGP, if NiFi is started without an existing Ran |
Thank you for submitting a contribution to Apache NiFi.
Please provide a short description of the PR here:
Description of PR
Supersedes #3495.
The code in this change-set provides the functionality discussed in NIFI-5973, specifically:
UserGroupProviderimplementation calledShellUserGroupProviderIn order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically
master)?Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not
squashor use--forcewhen pushing to allow for clean monitoring of changes.For code changes:
mvn -Pcontrib-check clean installat the rootnififolder?LICENSEfile, including the mainLICENSEfile undernifi-assembly?NOTICEfile, including the mainNOTICEfile found undernifi-assembly?.displayNamein addition to .name (programmatic access) for each of the new properties?For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.