{"action":"created","comment":{"url":"https://api.github.com/repos/StackStorm/st2/pulls/comments/38117878","id":38117878,"diff_hunk":"@@ -216,14 +259,55 @@ Example ``auth`` section in the |st2| configuration file. ::\n     logging = /path/to/st2auth.logging.conf\n     api_url = http://myhost.example.com:9101/\n \n-After the configuration change, restart all st2 components. ::\n+LDAP backend\n+~~~~~~~~~~~~\n+\n+Repository URL: https://github.com/StackStorm/st2-auth-backend-ldap\n+\n+Backend which reads authentication information from an LDAP server. The backend tries to bind the\n+ldap user with given username and password. If the bind was successful, it tries to find the user\n+in the given group. If the user is in the group, they will be authenticated.\n+\n+**Backend configuration options:**\n+\n+* ``ldap_server`` - URL of the LDAP Server.\n+* ``base_dn`` - Base DN on the LDAP Server.\n+* ``group_dn`` - Group DN on the LDAP Server which contains the user as member.\n+* ``scope`` - Scope search parameter. Can be base, onelevel or subtree (default: subtree)\n+* ``use_tls`` - Boolean parameter to set if tls is required\n+* ``search_filter`` - Should contain the placeholder %(username)s for the username. (Default:\n+  ``uniqueMember=uid=%(username)s,base_dn``)\n+\n+Example ``auth`` section in the |st2| configuration file.\n+\n+.. sourcecode:: ini\n+\n+    [auth]\n+    mode = standalone\n+    backend = ldap_backend\n+    backend_kwargs = {\"ldap_server\": \"ldap://ds.example.com\", \"base_dn\": \"ou=people,dc=example,dc=com\", \"group_dn\": \"cn=sysadmins,ou=groups,dc=example,dc=com\", \"scope\": \"\", \"use_tls\": True}","path":"docs/source/config/authentication.rst","position":241,"original_position":241,"commit_id":"b47c2d39d03ddb56191dd845b1b5899e145b97ff","original_commit_id":"b47c2d39d03ddb56191dd845b1b5899e145b97ff","user":{"login":"lakshmi-kannan","id":1839421,"avatar_url":"https://avatars.githubusercontent.com/u/1839421?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshmi-kannan","html_url":"https://github.com/lakshmi-kannan","followers_url":"https://api.github.com/users/lakshmi-kannan/followers","following_url":"https://api.github.com/users/lakshmi-kannan/following{/other_user}","gists_url":"https://api.github.com/users/lakshmi-kannan/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshmi-kannan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshmi-kannan/subscriptions","organizations_url":"https://api.github.com/users/lakshmi-kannan/orgs","repos_url":"https://api.github.com/users/lakshmi-kannan/repos","events_url":"https://api.github.com/users/lakshmi-kannan/events{/privacy}","received_events_url":"https://api.github.com/users/lakshmi-kannan/received_events","type":"User","site_admin":false},"body":"I am not a big fan. We could have [ldap_auth], [some_backend_auth] sections in config and look for backend_auth section in config. ","created_at":"2015-08-27T16:48:14Z","updated_at":"2015-08-27T16:48:14Z","html_url":"https://github.com/StackStorm/st2/pull/1881#discussion_r38117878","pull_request_url":"https://api.github.com/repos/StackStorm/st2/pulls/1881","_links":{"self":{"href":"https://api.github.com/repos/StackStorm/st2/pulls/comments/38117878"},"html":{"href":"https://github.com/StackStorm/st2/pull/1881#discussion_r38117878"},"pull_request":{"href":"https://api.github.com/repos/StackStorm/st2/pulls/1881"}}},"pull_request":{"url":"https://api.github.com/repos/StackStorm/st2/pulls/1881","id":43315808,"html_url":"https://github.com/StackStorm/st2/pull/1881","diff_url":"https://github.com/StackStorm/st2/pull/1881.diff","patch_url":"https://github.com/StackStorm/st2/pull/1881.patch","issue_url":"https://api.github.com/repos/StackStorm/st2/issues/1881","number":1881,"state":"open","locked":false,"title":"Move auth backends to separate packages and repos","user":{"login":"Kami","id":125088,"avatar_url":"https://avatars.githubusercontent.com/u/125088?v=3","gravatar_id":"","url":"https://api.github.com/users/Kami","html_url":"https://github.com/Kami","followers_url":"https://api.github.com/users/Kami/followers","following_url":"https://api.github.com/users/Kami/following{/other_user}","gists_url":"https://api.github.com/users/Kami/gists{/gist_id}","starred_url":"https://api.github.com/users/Kami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kami/subscriptions","organizations_url":"https://api.github.com/users/Kami/orgs","repos_url":"https://api.github.com/users/Kami/repos","events_url":"https://api.github.com/users/Kami/events{/privacy}","received_events_url":"https://api.github.com/users/Kami/received_events","type":"User","site_admin":false},"body":"This pull request moves authentication backends to \"repo and package per backend\" model.\r\n\r\nBenefit of this approach over the old one is that users can now easily install and enable custom authentication backends (it makes it more modular and pluggable). Previously, they would need to \"hack\" StackStorm core to use a custom backend, now they simple need create a custom package for their authentication backend, register it using entry_points, install it in the same virtualenv as st2auth is running and configure it in the config.\r\n\r\nIn addition to that, backend dependencies are now part of the backend package which means that only dependencies for used backend will be installed (e.g. if user doesn't install LDAP backend, ldap dependency won't be installed).\r\n\r\nInternally, we now also use stevedore to register and load plugins (eventually we should move most of the dynamic discovery and loading code to this approach so we don't reinvent the wheel a bit differentely in every place).\r\n\r\nFor backward compatibility reasons, flat file backend will be installed by default (for now, we will install it directly from git) so this change will have no visible impact for our users.\r\n\r\n## New backend repos\r\n\r\n* https://github.com/StackStorm/st2-auth-backend-flat-file\r\n* https://github.com/StackStorm/st2-auth-backend-mongodb\r\n* https://github.com/StackStorm/st2-auth-backend-keystone\r\n* https://github.com/StackStorm/st2-auth-backend-ldap\r\n\r\n### TODO\r\n\r\n* [x] Update st2_deploy.sh script for older releases to correctly use requirements from downloads server instead of the ones from git master (https://github.com/StackStorm/st2/pull/1880). If we don't do that, this change will break st2_deploy.sh for all the versions which pull requirements.txt directly from master.","created_at":"2015-08-25T17:51:01Z","updated_at":"2015-08-27T16:48:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"109f2a246f630305aeddc2bb7fe27243677ed149","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/StackStorm/st2/pulls/1881/commits","review_comments_url":"https://api.github.com/repos/StackStorm/st2/pulls/1881/comments","review_comment_url":"https://api.github.com/repos/StackStorm/st2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/StackStorm/st2/issues/1881/comments","statuses_url":"https://api.github.com/repos/StackStorm/st2/statuses/b47c2d39d03ddb56191dd845b1b5899e145b97ff","head":{"label":"StackStorm:move_auth_backends_to_separate_packages","ref":"move_auth_backends_to_separate_packages","sha":"b47c2d39d03ddb56191dd845b1b5899e145b97ff","user":{"login":"StackStorm","id":4969009,"avatar_url":"https://avatars.githubusercontent.com/u/4969009?v=3","gravatar_id":"","url":"https://api.github.com/users/StackStorm","html_url":"https://github.com/StackStorm","followers_url":"https://api.github.com/users/StackStorm/followers","following_url":"https://api.github.com/users/StackStorm/following{/other_user}","gists_url":"https://api.github.com/users/StackStorm/gists{/gist_id}","starred_url":"https://api.github.com/users/StackStorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StackStorm/subscriptions","organizations_url":"https://api.github.com/users/StackStorm/orgs","repos_url":"https://api.github.com/users/StackStorm/repos","events_url":"https://api.github.com/users/StackStorm/events{/privacy}","received_events_url":"https://api.github.com/users/StackStorm/received_events","type":"Organization","site_admin":false},"repo":{"id":19051806,"name":"st2","full_name":"StackStorm/st2","owner":{"login":"StackStorm","id":4969009,"avatar_url":"https://avatars.githubusercontent.com/u/4969009?v=3","gravatar_id":"","url":"https://api.github.com/users/StackStorm","html_url":"https://github.com/StackStorm","followers_url":"https://api.github.com/users/StackStorm/followers","following_url":"https://api.github.com/users/StackStorm/following{/other_user}","gists_url":"https://api.github.com/users/StackStorm/gists{/gist_id}","starred_url":"https://api.github.com/users/StackStorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StackStorm/subscriptions","organizations_url":"https://api.github.com/users/StackStorm/orgs","repos_url":"https://api.github.com/users/StackStorm/repos","events_url":"https://api.github.com/users/StackStorm/events{/privacy}","received_events_url":"https://api.github.com/users/StackStorm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/StackStorm/st2","description":"StackStorm event driven automation code.  With workflow, rules engine, many to many integration and more.  Aka IFTTT for Ops (uber orchestration).  Zingy installer w/ dependencies included available at http://docs.stackstorm.com/install/index.html.  Ping us on slack - https://stackstorm-community.slack.com/. ","fork":false,"url":"https://api.github.com/repos/StackStorm/st2","forks_url":"https://api.github.com/repos/StackStorm/st2/forks","keys_url":"https://api.github.com/repos/StackStorm/st2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StackStorm/st2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StackStorm/st2/teams","hooks_url":"https://api.github.com/repos/StackStorm/st2/hooks","issue_events_url":"https://api.github.com/repos/StackStorm/st2/issues/events{/number}","events_url":"https://api.github.com/repos/StackStorm/st2/events","assignees_url":"https://api.github.com/repos/StackStorm/st2/assignees{/user}","branches_url":"https://api.github.com/repos/StackStorm/st2/branches{/branch}","tags_url":"https://api.github.com/repos/StackStorm/st2/tags","blobs_url":"https://api.github.com/repos/StackStorm/st2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StackStorm/st2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StackStorm/st2/git/refs{/sha}","trees_url":"https://api.github.com/repos/StackStorm/st2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StackStorm/st2/statuses/{sha}","languages_url":"https://api.github.com/repos/StackStorm/st2/languages","stargazers_url":"https://api.github.com/repos/StackStorm/st2/stargazers","contributors_url":"https://api.github.com/repos/StackStorm/st2/contributors","subscribers_url":"https://api.github.com/repos/StackStorm/st2/subscribers","subscription_url":"https://api.github.com/repos/StackStorm/st2/subscription","commits_url":"https://api.github.com/repos/StackStorm/st2/commits{/sha}","git_commits_url":"https://api.github.com/repos/StackStorm/st2/git/commits{/sha}","comments_url":"https://api.github.com/repos/StackStorm/st2/comments{/number}","issue_comment_url":"https://api.github.com/repos/StackStorm/st2/issues/comments{/number}","contents_url":"https://api.github.com/repos/StackStorm/st2/contents/{+path}","compare_url":"https://api.github.com/repos/StackStorm/st2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StackStorm/st2/merges","archive_url":"https://api.github.com/repos/StackStorm/st2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StackStorm/st2/downloads","issues_url":"https://api.github.com/repos/StackStorm/st2/issues{/number}","pulls_url":"https://api.github.com/repos/StackStorm/st2/pulls{/number}","milestones_url":"https://api.github.com/repos/StackStorm/st2/milestones{/number}","notifications_url":"https://api.github.com/repos/StackStorm/st2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StackStorm/st2/labels{/name}","releases_url":"https://api.github.com/repos/StackStorm/st2/releases{/id}","created_at":"2014-04-23T00:51:34Z","updated_at":"2015-08-26T20:24:46Z","pushed_at":"2015-08-27T16:35:56Z","git_url":"git://github.com/StackStorm/st2.git","ssh_url":"git@github.com:StackStorm/st2.git","clone_url":"https://github.com/StackStorm/st2.git","svn_url":"https://github.com/StackStorm/st2","homepage":"http://www.stackstorm.com/","size":28266,"stargazers_count":291,"watchers_count":291,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":51,"forks":61,"open_issues":51,"watchers":291,"default_branch":"master"}},"base":{"label":"StackStorm:master","ref":"master","sha":"421a38174692e8347f6ceec031ddd9502bfe4d48","user":{"login":"StackStorm","id":4969009,"avatar_url":"https://avatars.githubusercontent.com/u/4969009?v=3","gravatar_id":"","url":"https://api.github.com/users/StackStorm","html_url":"https://github.com/StackStorm","followers_url":"https://api.github.com/users/StackStorm/followers","following_url":"https://api.github.com/users/StackStorm/following{/other_user}","gists_url":"https://api.github.com/users/StackStorm/gists{/gist_id}","starred_url":"https://api.github.com/users/StackStorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StackStorm/subscriptions","organizations_url":"https://api.github.com/users/StackStorm/orgs","repos_url":"https://api.github.com/users/StackStorm/repos","events_url":"https://api.github.com/users/StackStorm/events{/privacy}","received_events_url":"https://api.github.com/users/StackStorm/received_events","type":"Organization","site_admin":false},"repo":{"id":19051806,"name":"st2","full_name":"StackStorm/st2","owner":{"login":"StackStorm","id":4969009,"avatar_url":"https://avatars.githubusercontent.com/u/4969009?v=3","gravatar_id":"","url":"https://api.github.com/users/StackStorm","html_url":"https://github.com/StackStorm","followers_url":"https://api.github.com/users/StackStorm/followers","following_url":"https://api.github.com/users/StackStorm/following{/other_user}","gists_url":"https://api.github.com/users/StackStorm/gists{/gist_id}","starred_url":"https://api.github.com/users/StackStorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StackStorm/subscriptions","organizations_url":"https://api.github.com/users/StackStorm/orgs","repos_url":"https://api.github.com/users/StackStorm/repos","events_url":"https://api.github.com/users/StackStorm/events{/privacy}","received_events_url":"https://api.github.com/users/StackStorm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/StackStorm/st2","description":"StackStorm event driven automation code.  With workflow, rules engine, many to many integration and more.  Aka IFTTT for Ops (uber orchestration).  Zingy installer w/ dependencies included available at http://docs.stackstorm.com/install/index.html.  Ping us on slack - https://stackstorm-community.slack.com/. ","fork":false,"url":"https://api.github.com/repos/StackStorm/st2","forks_url":"https://api.github.com/repos/StackStorm/st2/forks","keys_url":"https://api.github.com/repos/StackStorm/st2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StackStorm/st2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StackStorm/st2/teams","hooks_url":"https://api.github.com/repos/StackStorm/st2/hooks","issue_events_url":"https://api.github.com/repos/StackStorm/st2/issues/events{/number}","events_url":"https://api.github.com/repos/StackStorm/st2/events","assignees_url":"https://api.github.com/repos/StackStorm/st2/assignees{/user}","branches_url":"https://api.github.com/repos/StackStorm/st2/branches{/branch}","tags_url":"https://api.github.com/repos/StackStorm/st2/tags","blobs_url":"https://api.github.com/repos/StackStorm/st2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StackStorm/st2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StackStorm/st2/git/refs{/sha}","trees_url":"https://api.github.com/repos/StackStorm/st2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StackStorm/st2/statuses/{sha}","languages_url":"https://api.github.com/repos/StackStorm/st2/languages","stargazers_url":"https://api.github.com/repos/StackStorm/st2/stargazers","contributors_url":"https://api.github.com/repos/StackStorm/st2/contributors","subscribers_url":"https://api.github.com/repos/StackStorm/st2/subscribers","subscription_url":"https://api.github.com/repos/StackStorm/st2/subscription","commits_url":"https://api.github.com/repos/StackStorm/st2/commits{/sha}","git_commits_url":"https://api.github.com/repos/StackStorm/st2/git/commits{/sha}","comments_url":"https://api.github.com/repos/StackStorm/st2/comments{/number}","issue_comment_url":"https://api.github.com/repos/StackStorm/st2/issues/comments{/number}","contents_url":"https://api.github.com/repos/StackStorm/st2/contents/{+path}","compare_url":"https://api.github.com/repos/StackStorm/st2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StackStorm/st2/merges","archive_url":"https://api.github.com/repos/StackStorm/st2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StackStorm/st2/downloads","issues_url":"https://api.github.com/repos/StackStorm/st2/issues{/number}","pulls_url":"https://api.github.com/repos/StackStorm/st2/pulls{/number}","milestones_url":"https://api.github.com/repos/StackStorm/st2/milestones{/number}","notifications_url":"https://api.github.com/repos/StackStorm/st2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StackStorm/st2/labels{/name}","releases_url":"https://api.github.com/repos/StackStorm/st2/releases{/id}","created_at":"2014-04-23T00:51:34Z","updated_at":"2015-08-26T20:24:46Z","pushed_at":"2015-08-27T16:35:56Z","git_url":"git://github.com/StackStorm/st2.git","ssh_url":"git@github.com:StackStorm/st2.git","clone_url":"https://github.com/StackStorm/st2.git","svn_url":"https://github.com/StackStorm/st2","homepage":"http://www.stackstorm.com/","size":28266,"stargazers_count":291,"watchers_count":291,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":51,"forks":61,"open_issues":51,"watchers":291,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/StackStorm/st2/pulls/1881"},"html":{"href":"https://github.com/StackStorm/st2/pull/1881"},"issue":{"href":"https://api.github.com/repos/StackStorm/st2/issues/1881"},"comments":{"href":"https://api.github.com/repos/StackStorm/st2/issues/1881/comments"},"review_comments":{"href":"https://api.github.com/repos/StackStorm/st2/pulls/1881/comments"},"review_comment":{"href":"https://api.github.com/repos/StackStorm/st2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/StackStorm/st2/pulls/1881/commits"},"statuses":{"href":"https://api.github.com/repos/StackStorm/st2/statuses/b47c2d39d03ddb56191dd845b1b5899e145b97ff"}}}}