{"action":"created","issue":{"url":"https://api.github.com/repos/zendesk/samson/issues/3001","repository_url":"https://api.github.com/repos/zendesk/samson","labels_url":"https://api.github.com/repos/zendesk/samson/issues/3001/labels{/name}","comments_url":"https://api.github.com/repos/zendesk/samson/issues/3001/comments","events_url":"https://api.github.com/repos/zendesk/samson/issues/3001/events","html_url":"https://github.com/zendesk/samson/pull/3001","id":369994821,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNzc4MjYz","number":3001,"title":"extract auth to plugins, starting with ldap","user":{"login":"grosser","id":11367,"node_id":"MDQ6VXNlcjExMzY3","avatar_url":"https://avatars3.githubusercontent.com/u/11367?v=4","gravatar_id":"","url":"https://api.github.com/users/grosser","html_url":"https://github.com/grosser","followers_url":"https://api.github.com/users/grosser/followers","following_url":"https://api.github.com/users/grosser/following{/other_user}","gists_url":"https://api.github.com/users/grosser/gists{/gist_id}","starred_url":"https://api.github.com/users/grosser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grosser/subscriptions","organizations_url":"https://api.github.com/users/grosser/orgs","repos_url":"https://api.github.com/users/grosser/repos","events_url":"https://api.github.com/users/grosser/events{/privacy}","received_events_url":"https://api.github.com/users/grosser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-15T04:29:48Z","updated_at":"2018-10-15T23:51:07Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/zendesk/samson/pulls/3001","html_url":"https://github.com/zendesk/samson/pull/3001","diff_url":"https://github.com/zendesk/samson/pull/3001.diff","patch_url":"https://github.com/zendesk/samson/pull/3001.patch"},"body":"not everyone should have to include all the various gems for auth,\r\nso let's move them into plugins and also make it possible to write a new auth method as plugin\r\n\r\nWIP feedback welcome, still need to move tests around, but basics seem to work / code did not get too ugly\r\n\r\n@samson/bre \r\n\r\n@duduribeiro @jgoerz I need someone to test this so I don't break stuff ... I don't have ldap ... ideally comment on how to get a test setup going ...\r\n\r\n### Risks\r\n- Medium: LDAP not working\r\n\r\n<img width=\"466\" alt=\"screen shot 2018-10-14 at 9 26 00 pm\" src=\"https://user-images.githubusercontent.com/11367/46930246-6bf7ac00-cff9-11e8-94d8-2f4a8386d040.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/zendesk/samson/issues/comments/430053087","html_url":"https://github.com/zendesk/samson/pull/3001#issuecomment-430053087","issue_url":"https://api.github.com/repos/zendesk/samson/issues/3001","id":430053087,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDA1MzA4Nw==","user":{"login":"duduribeiro","id":771411,"node_id":"MDQ6VXNlcjc3MTQxMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/771411?v=4","gravatar_id":"","url":"https://api.github.com/users/duduribeiro","html_url":"https://github.com/duduribeiro","followers_url":"https://api.github.com/users/duduribeiro/followers","following_url":"https://api.github.com/users/duduribeiro/following{/other_user}","gists_url":"https://api.github.com/users/duduribeiro/gists{/gist_id}","starred_url":"https://api.github.com/users/duduribeiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duduribeiro/subscriptions","organizations_url":"https://api.github.com/users/duduribeiro/orgs","repos_url":"https://api.github.com/users/duduribeiro/repos","events_url":"https://api.github.com/users/duduribeiro/events{/privacy}","received_events_url":"https://api.github.com/users/duduribeiro/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T23:51:07Z","updated_at":"2018-10-15T23:51:07Z","author_association":"CONTRIBUTOR","body":"Hey @grosser 👋 \r\n\r\nI tested it and it is returning `No route matches [GET] \"/auth/ldap\"`\r\n\r\nAnd I don't know why 😄 ..  I need to investigate it better.\r\n\r\nTo easily setup LDAP locally, you can use a docker image from OpenLDAP.\r\n\r\nmake these changes:\r\n```\r\ndiff --git a/docker-compose.yml b/docker-compose.yml\r\nindex a1cbd5708..d6ad08390 100644\r\n--- a/docker-compose.yml\r\n+++ b/docker-compose.yml\r\n@@ -1,12 +1,34 @@\r\n version: \"2\"\r\n services:\r\n   samson:\r\n-    image: zendesk/samson:latest\r\n+    build: .\r\n     ports:\r\n       - \"3000:9080\"\r\n     volumes:\r\n       - .:/app/\r\n     environment:\r\n       DATABASE_URL: \"sqlite3:///app/db/development.sqlite3\"\r\n+      LDAP_HOST: ldap\r\n       RAILS_LOG_TO_STDOUT: 1\r\n+    links:\r\n+      - ldap\r\n     command: [\"./script/docker_dev_server\"]\r\n+\r\n+  ldap:\r\n+    image: osixia/openldap\r\n+    ports:\r\n+      - \"389\"\r\n+      - \"636\"\r\n+    volumes:\r\n+      - ./tmp/ldap_data:/var/lib/ldap\r\n+      - ./tmp/slapd_data:/etc/ldap/slapd.d\r\n+\r\n+  phpldapadmin:\r\n+    image: osixia/phpldapadmin\r\n+    links:\r\n+      - ldap\r\n+    ports:\r\n+      - \"8080:80\"\r\n+      - \"8043:443\"\r\n+    environment:\r\n+      PHPLDAPADMIN_LDAP_HOSTS: ldap\r\n\r\n```\r\n\r\nand do a \r\n```\r\ndocker-compose up\r\n```\r\n\r\nyou can manage your LDAP at: https://localhost:8043\r\n\r\nusing these login info:\r\n\r\nLogin DN: cn=admin,dc=example,dc=org\r\nPassword: admin\r\n\r\nAfter authenticating, you should create a Generic: Posix Group and after a Generic: User Account.\r\n\r\nI will try to investigate it more. If you have more doubts, please ping me."}}
{"actor":{"display_login":"duduribeiro"}}