{"action":"created","comment":{"url":"https://api.github.com/repos/apache/zeppelin/pulls/comments/206768121","pull_request_review_id":142243066,"id":206768121,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjc2ODEyMQ==","diff_hunk":"@@ -265,7 +265,7 @@ protected AuthorizationInfo buildAuthorizationInfo(Set<String> roleNames) {\n         NamingEnumeration ae = attrs.getAll();\n         while (ae.hasMore()) {\n           Attribute attr = (Attribute) ae.next();\n-          if (attr.getID().toLowerCase().equals(\"cn\")) {\n+          if (attr.getID().toLowerCase().equals(\"userprincipalname\")) {","path":"zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java","position":5,"original_position":5,"commit_id":"e909e8876ee15c8863ca753bf54f40aa387d7a79","original_commit_id":"e909e8876ee15c8863ca753bf54f40aa387d7a79","user":{"login":"prabhjyotsingh","id":674497,"node_id":"MDQ6VXNlcjY3NDQ5Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/674497?v=4","gravatar_id":"","url":"https://api.github.com/users/prabhjyotsingh","html_url":"https://github.com/prabhjyotsingh","followers_url":"https://api.github.com/users/prabhjyotsingh/followers","following_url":"https://api.github.com/users/prabhjyotsingh/following{/other_user}","gists_url":"https://api.github.com/users/prabhjyotsingh/gists{/gist_id}","starred_url":"https://api.github.com/users/prabhjyotsingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prabhjyotsingh/subscriptions","organizations_url":"https://api.github.com/users/prabhjyotsingh/orgs","repos_url":"https://api.github.com/users/prabhjyotsingh/repos","events_url":"https://api.github.com/users/prabhjyotsingh/events{/privacy}","received_events_url":"https://api.github.com/users/prabhjyotsingh/received_events","type":"User","site_admin":false},"body":"Should we make this (cn/userprincipalname/or any other parameter) configurable?","created_at":"2018-08-01T06:36:03Z","updated_at":"2018-08-01T06:36:03Z","html_url":"https://github.com/apache/zeppelin/pull/3098#discussion_r206768121","pull_request_url":"https://api.github.com/repos/apache/zeppelin/pulls/3098","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/zeppelin/pulls/comments/206768121"},"html":{"href":"https://github.com/apache/zeppelin/pull/3098#discussion_r206768121"},"pull_request":{"href":"https://api.github.com/repos/apache/zeppelin/pulls/3098"}}},"pull_request":{"url":"https://api.github.com/repos/apache/zeppelin/pulls/3098","id":204161770,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MTYxNzcw","html_url":"https://github.com/apache/zeppelin/pull/3098","diff_url":"https://github.com/apache/zeppelin/pull/3098.diff","patch_url":"https://github.com/apache/zeppelin/pull/3098.patch","issue_url":"https://api.github.com/repos/apache/zeppelin/issues/3098","number":3098,"state":"open","locked":false,"title":"ZEPPELIN-3664","user":{"login":"fsteinle","id":41739962,"node_id":"MDQ6VXNlcjQxNzM5OTYy","avatar_url":"https://avatars2.githubusercontent.com/u/41739962?v=4","gravatar_id":"","url":"https://api.github.com/users/fsteinle","html_url":"https://github.com/fsteinle","followers_url":"https://api.github.com/users/fsteinle/followers","following_url":"https://api.github.com/users/fsteinle/following{/other_user}","gists_url":"https://api.github.com/users/fsteinle/gists{/gist_id}","starred_url":"https://api.github.com/users/fsteinle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsteinle/subscriptions","organizations_url":"https://api.github.com/users/fsteinle/orgs","repos_url":"https://api.github.com/users/fsteinle/repos","events_url":"https://api.github.com/users/fsteinle/events{/privacy}","received_events_url":"https://api.github.com/users/fsteinle/received_events","type":"User","site_admin":false},"body":"* Return \"userPrincipalName\" from ActiveDirectoryGroupRealm when searching for users.\r\n* Added unit test for search functionality.\r\n\r\n### What is this PR for?\r\nFix for https://issues.apache.org/jira/browse/ZEPPELIN-3664\r\nReturn the \"userPrincipalName\" instead of the \"cn\" (common name) from ActiveDirectoryGroupRealm when searching users to set note permissions.\r\n\r\n### What type of PR is it?\r\n[Bug Fix]\r\n\r\n### Todos\r\n* -\r\n\r\n### What is the Jira issue?\r\n* https://issues.apache.org/jira/browse/ZEPPELIN-3664\r\n\r\n### How should this be tested?\r\nSteps to reproduce\r\n1. Configure connection to AD with org.apache.zeppelin.realm.ActiveDirectoryGroupRealm\r\n2. Login to Zeppelin\r\n3. Create new notebook\r\n4. Edit the permissions and start typing the name of a AD user to one of the permission fields\r\n5. Select one of the suggestions and save\r\n6. Check the content of \"notebook-authorization.json\"\r\n\r\nExpected result\r\n* The \"userPrincipalName\" of the user is shown in the suggestion box and written to \"notebook-authorization.json\" (see screenshot attached).\r\n\r\nActual result\r\n* The \"cn\" (common name) of the user is shown in the suggestion box and written to \"notebook-authorization.json\".\r\n\r\n### Screenshots\r\n![notepermission](https://user-images.githubusercontent.com/41739962/43268484-13c09516-90f1-11e8-9967-4513c668b4e5.png)\r\n\r\n### Questions:\r\n* Does the licenses files need update? - No\r\n* Is there breaking changes for older versions? - No\r\n* Does this needs documentation? - No\r\n","created_at":"2018-07-26T14:29:50Z","updated_at":"2018-08-01T06:36:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9936c70100f970d137f460b2061e88d9f6006fbb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/zeppelin/pulls/3098/commits","review_comments_url":"https://api.github.com/repos/apache/zeppelin/pulls/3098/comments","review_comment_url":"https://api.github.com/repos/apache/zeppelin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/zeppelin/issues/3098/comments","statuses_url":"https://api.github.com/repos/apache/zeppelin/statuses/e909e8876ee15c8863ca753bf54f40aa387d7a79","head":{"label":"fsteinle:master","ref":"master","sha":"e909e8876ee15c8863ca753bf54f40aa387d7a79","user":{"login":"fsteinle","id":41739962,"node_id":"MDQ6VXNlcjQxNzM5OTYy","avatar_url":"https://avatars2.githubusercontent.com/u/41739962?v=4","gravatar_id":"","url":"https://api.github.com/users/fsteinle","html_url":"https://github.com/fsteinle","followers_url":"https://api.github.com/users/fsteinle/followers","following_url":"https://api.github.com/users/fsteinle/following{/other_user}","gists_url":"https://api.github.com/users/fsteinle/gists{/gist_id}","starred_url":"https://api.github.com/users/fsteinle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsteinle/subscriptions","organizations_url":"https://api.github.com/users/fsteinle/orgs","repos_url":"https://api.github.com/users/fsteinle/repos","events_url":"https://api.github.com/users/fsteinle/events{/privacy}","received_events_url":"https://api.github.com/users/fsteinle/received_events","type":"User","site_admin":false},"repo":{"id":142449921,"node_id":"MDEwOlJlcG9zaXRvcnkxNDI0NDk5MjE=","name":"zeppelin","full_name":"fsteinle/zeppelin","owner":{"login":"fsteinle","id":41739962,"node_id":"MDQ6VXNlcjQxNzM5OTYy","avatar_url":"https://avatars2.githubusercontent.com/u/41739962?v=4","gravatar_id":"","url":"https://api.github.com/users/fsteinle","html_url":"https://github.com/fsteinle","followers_url":"https://api.github.com/users/fsteinle/followers","following_url":"https://api.github.com/users/fsteinle/following{/other_user}","gists_url":"https://api.github.com/users/fsteinle/gists{/gist_id}","starred_url":"https://api.github.com/users/fsteinle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsteinle/subscriptions","organizations_url":"https://api.github.com/users/fsteinle/orgs","repos_url":"https://api.github.com/users/fsteinle/repos","events_url":"https://api.github.com/users/fsteinle/events{/privacy}","received_events_url":"https://api.github.com/users/fsteinle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fsteinle/zeppelin","description":"Mirror of Apache Zeppelin","fork":true,"url":"https://api.github.com/repos/fsteinle/zeppelin","forks_url":"https://api.github.com/repos/fsteinle/zeppelin/forks","keys_url":"https://api.github.com/repos/fsteinle/zeppelin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fsteinle/zeppelin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fsteinle/zeppelin/teams","hooks_url":"https://api.github.com/repos/fsteinle/zeppelin/hooks","issue_events_url":"https://api.github.com/repos/fsteinle/zeppelin/issues/events{/number}","events_url":"https://api.github.com/repos/fsteinle/zeppelin/events","assignees_url":"https://api.github.com/repos/fsteinle/zeppelin/assignees{/user}","branches_url":"https://api.github.com/repos/fsteinle/zeppelin/branches{/branch}","tags_url":"https://api.github.com/repos/fsteinle/zeppelin/tags","blobs_url":"https://api.github.com/repos/fsteinle/zeppelin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fsteinle/zeppelin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fsteinle/zeppelin/git/refs{/sha}","trees_url":"https://api.github.com/repos/fsteinle/zeppelin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fsteinle/zeppelin/statuses/{sha}","languages_url":"https://api.github.com/repos/fsteinle/zeppelin/languages","stargazers_url":"https://api.github.com/repos/fsteinle/zeppelin/stargazers","contributors_url":"https://api.github.com/repos/fsteinle/zeppelin/contributors","subscribers_url":"https://api.github.com/repos/fsteinle/zeppelin/subscribers","subscription_url":"https://api.github.com/repos/fsteinle/zeppelin/subscription","commits_url":"https://api.github.com/repos/fsteinle/zeppelin/commits{/sha}","git_commits_url":"https://api.github.com/repos/fsteinle/zeppelin/git/commits{/sha}","comments_url":"https://api.github.com/repos/fsteinle/zeppelin/comments{/number}","issue_comment_url":"https://api.github.com/repos/fsteinle/zeppelin/issues/comments{/number}","contents_url":"https://api.github.com/repos/fsteinle/zeppelin/contents/{+path}","compare_url":"https://api.github.com/repos/fsteinle/zeppelin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fsteinle/zeppelin/merges","archive_url":"https://api.github.com/repos/fsteinle/zeppelin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fsteinle/zeppelin/downloads","issues_url":"https://api.github.com/repos/fsteinle/zeppelin/issues{/number}","pulls_url":"https://api.github.com/repos/fsteinle/zeppelin/pulls{/number}","milestones_url":"https://api.github.com/repos/fsteinle/zeppelin/milestones{/number}","notifications_url":"https://api.github.com/repos/fsteinle/zeppelin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fsteinle/zeppelin/labels{/name}","releases_url":"https://api.github.com/repos/fsteinle/zeppelin/releases{/id}","deployments_url":"https://api.github.com/repos/fsteinle/zeppelin/deployments","created_at":"2018-07-26T14:09:16Z","updated_at":"2018-07-26T15:19:13Z","pushed_at":"2018-07-26T15:19:11Z","git_url":"git://github.com/fsteinle/zeppelin.git","ssh_url":"git@github.com:fsteinle/zeppelin.git","clone_url":"https://github.com/fsteinle/zeppelin.git","svn_url":"https://github.com/fsteinle/zeppelin","homepage":"","size":67541,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"8d2af02fc4ee57ad7a30f91d1a2fd999194406f0","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":32848140,"node_id":"MDEwOlJlcG9zaXRvcnkzMjg0ODE0MA==","name":"zeppelin","full_name":"apache/zeppelin","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/zeppelin","description":"Mirror of Apache Zeppelin","fork":false,"url":"https://api.github.com/repos/apache/zeppelin","forks_url":"https://api.github.com/repos/apache/zeppelin/forks","keys_url":"https://api.github.com/repos/apache/zeppelin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/zeppelin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/zeppelin/teams","hooks_url":"https://api.github.com/repos/apache/zeppelin/hooks","issue_events_url":"https://api.github.com/repos/apache/zeppelin/issues/events{/number}","events_url":"https://api.github.com/repos/apache/zeppelin/events","assignees_url":"https://api.github.com/repos/apache/zeppelin/assignees{/user}","branches_url":"https://api.github.com/repos/apache/zeppelin/branches{/branch}","tags_url":"https://api.github.com/repos/apache/zeppelin/tags","blobs_url":"https://api.github.com/repos/apache/zeppelin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/zeppelin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/zeppelin/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/zeppelin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/zeppelin/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/zeppelin/languages","stargazers_url":"https://api.github.com/repos/apache/zeppelin/stargazers","contributors_url":"https://api.github.com/repos/apache/zeppelin/contributors","subscribers_url":"https://api.github.com/repos/apache/zeppelin/subscribers","subscription_url":"https://api.github.com/repos/apache/zeppelin/subscription","commits_url":"https://api.github.com/repos/apache/zeppelin/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/zeppelin/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/zeppelin/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/zeppelin/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/zeppelin/contents/{+path}","compare_url":"https://api.github.com/repos/apache/zeppelin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/zeppelin/merges","archive_url":"https://api.github.com/repos/apache/zeppelin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/zeppelin/downloads","issues_url":"https://api.github.com/repos/apache/zeppelin/issues{/number}","pulls_url":"https://api.github.com/repos/apache/zeppelin/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/zeppelin/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/zeppelin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/zeppelin/labels{/name}","releases_url":"https://api.github.com/repos/apache/zeppelin/releases{/id}","deployments_url":"https://api.github.com/repos/apache/zeppelin/deployments","created_at":"2015-03-25T07:00:06Z","updated_at":"2018-08-01T06:26:30Z","pushed_at":"2018-08-01T06:27:00Z","git_url":"git://github.com/apache/zeppelin.git","ssh_url":"git@github.com:apache/zeppelin.git","clone_url":"https://github.com/apache/zeppelin.git","svn_url":"https://github.com/apache/zeppelin","homepage":"","size":67598,"stargazers_count":3697,"watchers_count":3697,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1873,"mirror_url":null,"archived":false,"open_issues_count":48,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1873,"open_issues":48,"watchers":3697,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/zeppelin/pulls/3098"},"html":{"href":"https://github.com/apache/zeppelin/pull/3098"},"issue":{"href":"https://api.github.com/repos/apache/zeppelin/issues/3098"},"comments":{"href":"https://api.github.com/repos/apache/zeppelin/issues/3098/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/zeppelin/pulls/3098/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/zeppelin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/zeppelin/pulls/3098/commits"},"statuses":{"href":"https://api.github.com/repos/apache/zeppelin/statuses/e909e8876ee15c8863ca753bf54f40aa387d7a79"}},"author_association":"NONE"}}
{"actor":{"display_login":"prabhjyotsingh"}}