zeppelin icon indicating copy to clipboard operation
zeppelin copied to clipboard

ZEPPELIN-3664: ActiveDirectoryGroupRealm returns "cn" instead of "userPrincipalName" for note permission auto completion

Open florian-trimble opened this issue 6 years ago • 4 comments

  • Return "userPrincipalName" from ActiveDirectoryGroupRealm when searching for users.
  • Added unit test for search functionality.

What is this PR for?

Fix for https://issues.apache.org/jira/browse/ZEPPELIN-3664 Return the "userPrincipalName" instead of the "cn" (common name) from ActiveDirectoryGroupRealm when searching users to set note permissions.

What type of PR is it?

[Bug Fix]

Todos

What is the Jira issue?

  • https://issues.apache.org/jira/browse/ZEPPELIN-3664

How should this be tested?

Steps to reproduce

  1. Configure connection to AD with org.apache.zeppelin.realm.ActiveDirectoryGroupRealm
  2. Login to Zeppelin
  3. Create new notebook
  4. Edit the permissions and start typing the name of a AD user to one of the permission fields
  5. Select one of the suggestions and save
  6. Check the content of "notebook-authorization.json"

Expected result

  • The "userPrincipalName" of the user is shown in the suggestion box and written to "notebook-authorization.json" (see screenshot attached).

Actual result

  • The "cn" (common name) of the user is shown in the suggestion box and written to "notebook-authorization.json".

Screenshots

notepermission

Questions:

  • Does the licenses files need update? - No
  • Is there breaking changes for older versions? - No
  • Does this needs documentation? - No

florian-trimble avatar Jul 26 '18 14:07 florian-trimble

@fsteinle our team use authorization with parameter activeDirectoryRealm.principalSuffix = @company.com Thus email is not necessary. Could it possible to use mailNickName, for example?

BTW, userPrincipalName is good.

mebelousov avatar Jul 27 '18 14:07 mebelousov

@mebelousov: Basically this is not related to emails but to the userPrincipalName. The principalSuffix parameter makes sense, but doesn't address this issue. In our case we wanna keep the suffix to be sure it's really unique. Not all users of the organization are in the same AD branch.

florian-trimble avatar Jul 30 '18 07:07 florian-trimble

\cc @prabhjyotsingh

zjffdu avatar Aug 01 '18 00:08 zjffdu

@fsteinle Could you update the PR title ?

zjffdu avatar Aug 02 '18 04:08 zjffdu