{"action":"created","comment":{"url":"https://api.github.com/repos/metabase/metabase/pulls/comments/113542995","pull_request_review_id":34941030,"id":113542995,"diff_hunk":"@@ -78,7 +78,8 @@\n                  [ring/ring-json \"0.4.0\"]                             ; Ring middleware for reading/writing JSON automatically\n                  [stencil \"0.5.0\"]                                    ; Mustache templates for Clojure\n                  [toucan \"1.0.2\"                                      ; Model layer, hydration, and DB utilities\n-                  :exclusions [honeysql]]]\n+                  :exclusions [honeysql]]\n+                 [org.clojars.pntblnk/clj-ldap \"0.0.12\"]]             ; LDAP library","path":"project.clj","position":6,"original_position":6,"commit_id":"9304394defb422ec7244198b6c43ad712c9c8dae","original_commit_id":"9304394defb422ec7244198b6c43ad712c9c8dae","user":{"login":"camsaul","id":1455846,"avatar_url":"https://avatars0.githubusercontent.com/u/1455846?v=3","gravatar_id":"","url":"https://api.github.com/users/camsaul","html_url":"https://github.com/camsaul","followers_url":"https://api.github.com/users/camsaul/followers","following_url":"https://api.github.com/users/camsaul/following{/other_user}","gists_url":"https://api.github.com/users/camsaul/gists{/gist_id}","starred_url":"https://api.github.com/users/camsaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camsaul/subscriptions","organizations_url":"https://api.github.com/users/camsaul/orgs","repos_url":"https://api.github.com/users/camsaul/repos","events_url":"https://api.github.com/users/camsaul/events{/privacy}","received_events_url":"https://api.github.com/users/camsaul/received_events","type":"User","site_admin":false},"body":"👍 ","created_at":"2017-04-26T19:35:03Z","updated_at":"2017-04-26T19:35:03Z","html_url":"https://github.com/metabase/metabase/pull/4340#discussion_r113542995","pull_request_url":"https://api.github.com/repos/metabase/metabase/pulls/4340","_links":{"self":{"href":"https://api.github.com/repos/metabase/metabase/pulls/comments/113542995"},"html":{"href":"https://github.com/metabase/metabase/pull/4340#discussion_r113542995"},"pull_request":{"href":"https://api.github.com/repos/metabase/metabase/pulls/4340"}}},"pull_request":{"url":"https://api.github.com/repos/metabase/metabase/pulls/4340","id":105349795,"html_url":"https://github.com/metabase/metabase/pull/4340","diff_url":"https://github.com/metabase/metabase/pull/4340.diff","patch_url":"https://github.com/metabase/metabase/pull/4340.patch","issue_url":"https://api.github.com/repos/metabase/metabase/issues/4340","number":4340,"state":"open","locked":false,"title":"LDAP Auth","user":{"login":"wwwiiilll","id":1878110,"avatar_url":"https://avatars1.githubusercontent.com/u/1878110?v=3","gravatar_id":"","url":"https://api.github.com/users/wwwiiilll","html_url":"https://github.com/wwwiiilll","followers_url":"https://api.github.com/users/wwwiiilll/followers","following_url":"https://api.github.com/users/wwwiiilll/following{/other_user}","gists_url":"https://api.github.com/users/wwwiiilll/gists{/gist_id}","starred_url":"https://api.github.com/users/wwwiiilll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwwiiilll/subscriptions","organizations_url":"https://api.github.com/users/wwwiiilll/orgs","repos_url":"https://api.github.com/users/wwwiiilll/repos","events_url":"https://api.github.com/users/wwwiiilll/events{/privacy}","received_events_url":"https://api.github.com/users/wwwiiilll/received_events","type":"User","site_admin":false},"body":"Resolves #1488 \r\n\r\nAdds LDAP authentication in addition to local.\r\n\r\nSince this is not like the SSO stuff and we need to have a username/password input to make it work, but realistically we need to have both LDAP and local login available at the same time, because the wrong settings would lock the admins out and prevent them from fixing/removing LDAP.\r\n\r\n- [x] Add basic LDAP setup to search for users and validate password\r\n- [x] Wire that up with the `/session` endpoint and with the UI\r\n- [x] Sync passwords upon successful login\r\n- [x] Setup in-memory LDAP for tests and add said tests\r\n- [x] Tests for login logic\r\n- [x] Add a proper settings page with the possibility to test before enabling (similar to the SMTP settings)\r\n- [x] Add group fetching logic\r\n- [x] ~~Add a Metabase to LDAP group mapping table and model~~ replaced with JSON setting\r\n- [x] Change the group admin panel (or the LDAP settings panel) to include LDAP mapping fields\r\n- [x] On login, refresh membership using mapped groups\r\n- [x] Offer an opt-in setting for LDAP managed group membership\r\n\r\nAlso, stuff that I'm not sure how to handle:\r\n- The \"Reset password\" feature makes no sense or is at least confusing with LDAP enabled since the password is managed elsewhere, not sure how to handle this since we have both local and LDAP logon at once.\r\n- ~~In my case my email has uppercase in LDAP, but I did the setup with lowecases and H2 is case-sensitive, so I ended up with two users having the \"same\" email. Normalizing the email to lowercase everywhere would mitigate that.~~ (EDIT: looks like this is tracked by #3047, I won't touch it in that case)\r\n- ~~The user-profile page allows changing the email which would effectively unlink the account from the LDAP user, either we link the two using something else (the DN), prevent changing the value or warn the user.~~ (EDIT: never mind, I saw how Google Auth is handled)\r\n- ~~Groups, should we have LDAP groups match Metabase groups based on the name? Or should we add a mapping to the Matabase groups to match them with LDAP groups?~~ (EDIT: going with mapping tables, using the name is not flexible enough)\r\n\r\nAnd well feedback in general is more than welcome.","created_at":"2017-02-09T02:43:36Z","updated_at":"2017-04-26T19:35:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ceeb973139716ba49de9de06cf855587e141134","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/metabase/metabase/pulls/4340/commits","review_comments_url":"https://api.github.com/repos/metabase/metabase/pulls/4340/comments","review_comment_url":"https://api.github.com/repos/metabase/metabase/pulls/comments{/number}","comments_url":"https://api.github.com/repos/metabase/metabase/issues/4340/comments","statuses_url":"https://api.github.com/repos/metabase/metabase/statuses/9304394defb422ec7244198b6c43ad712c9c8dae","head":{"label":"wwwiiilll:ldap-auth","ref":"ldap-auth","sha":"9304394defb422ec7244198b6c43ad712c9c8dae","user":{"login":"wwwiiilll","id":1878110,"avatar_url":"https://avatars1.githubusercontent.com/u/1878110?v=3","gravatar_id":"","url":"https://api.github.com/users/wwwiiilll","html_url":"https://github.com/wwwiiilll","followers_url":"https://api.github.com/users/wwwiiilll/followers","following_url":"https://api.github.com/users/wwwiiilll/following{/other_user}","gists_url":"https://api.github.com/users/wwwiiilll/gists{/gist_id}","starred_url":"https://api.github.com/users/wwwiiilll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwwiiilll/subscriptions","organizations_url":"https://api.github.com/users/wwwiiilll/orgs","repos_url":"https://api.github.com/users/wwwiiilll/repos","events_url":"https://api.github.com/users/wwwiiilll/events{/privacy}","received_events_url":"https://api.github.com/users/wwwiiilll/received_events","type":"User","site_admin":false},"repo":{"id":70161118,"name":"metabase","full_name":"wwwiiilll/metabase","owner":{"login":"wwwiiilll","id":1878110,"avatar_url":"https://avatars1.githubusercontent.com/u/1878110?v=3","gravatar_id":"","url":"https://api.github.com/users/wwwiiilll","html_url":"https://github.com/wwwiiilll","followers_url":"https://api.github.com/users/wwwiiilll/followers","following_url":"https://api.github.com/users/wwwiiilll/following{/other_user}","gists_url":"https://api.github.com/users/wwwiiilll/gists{/gist_id}","starred_url":"https://api.github.com/users/wwwiiilll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwwiiilll/subscriptions","organizations_url":"https://api.github.com/users/wwwiiilll/orgs","repos_url":"https://api.github.com/users/wwwiiilll/repos","events_url":"https://api.github.com/users/wwwiiilll/events{/privacy}","received_events_url":"https://api.github.com/users/wwwiiilll/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wwwiiilll/metabase","description":"The simplest, fastest way to get business intelligence and analytics  to everyone in your company :yum:","fork":true,"url":"https://api.github.com/repos/wwwiiilll/metabase","forks_url":"https://api.github.com/repos/wwwiiilll/metabase/forks","keys_url":"https://api.github.com/repos/wwwiiilll/metabase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wwwiiilll/metabase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wwwiiilll/metabase/teams","hooks_url":"https://api.github.com/repos/wwwiiilll/metabase/hooks","issue_events_url":"https://api.github.com/repos/wwwiiilll/metabase/issues/events{/number}","events_url":"https://api.github.com/repos/wwwiiilll/metabase/events","assignees_url":"https://api.github.com/repos/wwwiiilll/metabase/assignees{/user}","branches_url":"https://api.github.com/repos/wwwiiilll/metabase/branches{/branch}","tags_url":"https://api.github.com/repos/wwwiiilll/metabase/tags","blobs_url":"https://api.github.com/repos/wwwiiilll/metabase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wwwiiilll/metabase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wwwiiilll/metabase/git/refs{/sha}","trees_url":"https://api.github.com/repos/wwwiiilll/metabase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wwwiiilll/metabase/statuses/{sha}","languages_url":"https://api.github.com/repos/wwwiiilll/metabase/languages","stargazers_url":"https://api.github.com/repos/wwwiiilll/metabase/stargazers","contributors_url":"https://api.github.com/repos/wwwiiilll/metabase/contributors","subscribers_url":"https://api.github.com/repos/wwwiiilll/metabase/subscribers","subscription_url":"https://api.github.com/repos/wwwiiilll/metabase/subscription","commits_url":"https://api.github.com/repos/wwwiiilll/metabase/commits{/sha}","git_commits_url":"https://api.github.com/repos/wwwiiilll/metabase/git/commits{/sha}","comments_url":"https://api.github.com/repos/wwwiiilll/metabase/comments{/number}","issue_comment_url":"https://api.github.com/repos/wwwiiilll/metabase/issues/comments{/number}","contents_url":"https://api.github.com/repos/wwwiiilll/metabase/contents/{+path}","compare_url":"https://api.github.com/repos/wwwiiilll/metabase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wwwiiilll/metabase/merges","archive_url":"https://api.github.com/repos/wwwiiilll/metabase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wwwiiilll/metabase/downloads","issues_url":"https://api.github.com/repos/wwwiiilll/metabase/issues{/number}","pulls_url":"https://api.github.com/repos/wwwiiilll/metabase/pulls{/number}","milestones_url":"https://api.github.com/repos/wwwiiilll/metabase/milestones{/number}","notifications_url":"https://api.github.com/repos/wwwiiilll/metabase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wwwiiilll/metabase/labels{/name}","releases_url":"https://api.github.com/repos/wwwiiilll/metabase/releases{/id}","deployments_url":"https://api.github.com/repos/wwwiiilll/metabase/deployments","created_at":"2016-10-06T14:20:16Z","updated_at":"2016-10-26T22:12:57Z","pushed_at":"2017-04-26T18:20:08Z","git_url":"git://github.com/wwwiiilll/metabase.git","ssh_url":"git@github.com:wwwiiilll/metabase.git","clone_url":"https://github.com/wwwiiilll/metabase.git","svn_url":"https://github.com/wwwiiilll/metabase","homepage":"http://metabase.com","size":41651,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"metabase:master","ref":"master","sha":"0d1b76f8e7b159a66a958be8ca9895bfd8473e09","user":{"login":"metabase","id":10520629,"avatar_url":"https://avatars2.githubusercontent.com/u/10520629?v=3","gravatar_id":"","url":"https://api.github.com/users/metabase","html_url":"https://github.com/metabase","followers_url":"https://api.github.com/users/metabase/followers","following_url":"https://api.github.com/users/metabase/following{/other_user}","gists_url":"https://api.github.com/users/metabase/gists{/gist_id}","starred_url":"https://api.github.com/users/metabase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabase/subscriptions","organizations_url":"https://api.github.com/users/metabase/orgs","repos_url":"https://api.github.com/users/metabase/repos","events_url":"https://api.github.com/users/metabase/events{/privacy}","received_events_url":"https://api.github.com/users/metabase/received_events","type":"Organization","site_admin":false},"repo":{"id":30203935,"name":"metabase","full_name":"metabase/metabase","owner":{"login":"metabase","id":10520629,"avatar_url":"https://avatars2.githubusercontent.com/u/10520629?v=3","gravatar_id":"","url":"https://api.github.com/users/metabase","html_url":"https://github.com/metabase","followers_url":"https://api.github.com/users/metabase/followers","following_url":"https://api.github.com/users/metabase/following{/other_user}","gists_url":"https://api.github.com/users/metabase/gists{/gist_id}","starred_url":"https://api.github.com/users/metabase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabase/subscriptions","organizations_url":"https://api.github.com/users/metabase/orgs","repos_url":"https://api.github.com/users/metabase/repos","events_url":"https://api.github.com/users/metabase/events{/privacy}","received_events_url":"https://api.github.com/users/metabase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metabase/metabase","description":"The simplest, fastest way to get business intelligence and analytics  to everyone in your company :yum:","fork":false,"url":"https://api.github.com/repos/metabase/metabase","forks_url":"https://api.github.com/repos/metabase/metabase/forks","keys_url":"https://api.github.com/repos/metabase/metabase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metabase/metabase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metabase/metabase/teams","hooks_url":"https://api.github.com/repos/metabase/metabase/hooks","issue_events_url":"https://api.github.com/repos/metabase/metabase/issues/events{/number}","events_url":"https://api.github.com/repos/metabase/metabase/events","assignees_url":"https://api.github.com/repos/metabase/metabase/assignees{/user}","branches_url":"https://api.github.com/repos/metabase/metabase/branches{/branch}","tags_url":"https://api.github.com/repos/metabase/metabase/tags","blobs_url":"https://api.github.com/repos/metabase/metabase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metabase/metabase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metabase/metabase/git/refs{/sha}","trees_url":"https://api.github.com/repos/metabase/metabase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metabase/metabase/statuses/{sha}","languages_url":"https://api.github.com/repos/metabase/metabase/languages","stargazers_url":"https://api.github.com/repos/metabase/metabase/stargazers","contributors_url":"https://api.github.com/repos/metabase/metabase/contributors","subscribers_url":"https://api.github.com/repos/metabase/metabase/subscribers","subscription_url":"https://api.github.com/repos/metabase/metabase/subscription","commits_url":"https://api.github.com/repos/metabase/metabase/commits{/sha}","git_commits_url":"https://api.github.com/repos/metabase/metabase/git/commits{/sha}","comments_url":"https://api.github.com/repos/metabase/metabase/comments{/number}","issue_comment_url":"https://api.github.com/repos/metabase/metabase/issues/comments{/number}","contents_url":"https://api.github.com/repos/metabase/metabase/contents/{+path}","compare_url":"https://api.github.com/repos/metabase/metabase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metabase/metabase/merges","archive_url":"https://api.github.com/repos/metabase/metabase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metabase/metabase/downloads","issues_url":"https://api.github.com/repos/metabase/metabase/issues{/number}","pulls_url":"https://api.github.com/repos/metabase/metabase/pulls{/number}","milestones_url":"https://api.github.com/repos/metabase/metabase/milestones{/number}","notifications_url":"https://api.github.com/repos/metabase/metabase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metabase/metabase/labels{/name}","releases_url":"https://api.github.com/repos/metabase/metabase/releases{/id}","deployments_url":"https://api.github.com/repos/metabase/metabase/deployments","created_at":"2015-02-02T19:25:47Z","updated_at":"2017-04-26T19:10:09Z","pushed_at":"2017-04-26T19:26:15Z","git_url":"git://github.com/metabase/metabase.git","ssh_url":"git@github.com:metabase/metabase.git","clone_url":"https://github.com/metabase/metabase.git","svn_url":"https://github.com/metabase/metabase","homepage":"http://metabase.com","size":42944,"stargazers_count":5338,"watchers_count":5338,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":527,"mirror_url":null,"open_issues_count":846,"forks":527,"open_issues":846,"watchers":5338,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metabase/metabase/pulls/4340"},"html":{"href":"https://github.com/metabase/metabase/pull/4340"},"issue":{"href":"https://api.github.com/repos/metabase/metabase/issues/4340"},"comments":{"href":"https://api.github.com/repos/metabase/metabase/issues/4340/comments"},"review_comments":{"href":"https://api.github.com/repos/metabase/metabase/pulls/4340/comments"},"review_comment":{"href":"https://api.github.com/repos/metabase/metabase/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/metabase/metabase/pulls/4340/commits"},"statuses":{"href":"https://api.github.com/repos/metabase/metabase/statuses/9304394defb422ec7244198b6c43ad712c9c8dae"}}}}
{"actor":{"display_login":"camsaul"}}