{"action":"created","issue":{"url":"https://api.github.com/repos/ampache/ampache/issues/1201","repository_url":"https://api.github.com/repos/ampache/ampache","labels_url":"https://api.github.com/repos/ampache/ampache/issues/1201/labels{/name}","comments_url":"https://api.github.com/repos/ampache/ampache/issues/1201/comments","events_url":"https://api.github.com/repos/ampache/ampache/issues/1201/events","html_url":"https://github.com/ampache/ampache/issues/1201","id":147419776,"number":1201,"title":"LDAP authentication broken","user":{"login":"Rouzax","id":4103090,"avatar_url":"https://avatars.githubusercontent.com/u/4103090?v=3","gravatar_id":"","url":"https://api.github.com/users/Rouzax","html_url":"https://github.com/Rouzax","followers_url":"https://api.github.com/users/Rouzax/followers","following_url":"https://api.github.com/users/Rouzax/following{/other_user}","gists_url":"https://api.github.com/users/Rouzax/gists{/gist_id}","starred_url":"https://api.github.com/users/Rouzax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rouzax/subscriptions","organizations_url":"https://api.github.com/users/Rouzax/orgs","repos_url":"https://api.github.com/users/Rouzax/repos","events_url":"https://api.github.com/users/Rouzax/events{/privacy}","received_events_url":"https://api.github.com/users/Rouzax/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-04-11T13:01:16Z","updated_at":"2016-04-29T12:00:18Z","closed_at":null,"body":"# Environment\r\n \r\n * Ampache version: Latest Develop Branch b1c7cf9ef680d12a55fbb772541d839713f6fb05\r\n * Web server + version: IIS 8.5 with PHP 7.0.5 or PHP 5.6.20 (both have the issue)\r\n * Server operating system: Windows 2012 R2\r\n * Client operating system: Windows\r\n * Client type:\r\n   - [x] Web\r\n   - [ ] Ampache\r\n   - [ ] SubSonic\r\n   - [ ] Plex\r\n   - [ ] DAAP\r\n   - [ ] UPnP\r\n   - [ ] WebDAV\r\n * Client application + version: \r\n \r\n# Settings\r\n```\r\n;#########################################################\r\n; LDAP login info (optional)                             #\r\n;#########################################################\r\n\r\n; LDAP server URL (required)\r\n; DEFAULT: none\r\nldap_url = \"ldap://dc1/\"\r\n;ldap_url = \"ldaps://localhost/\"\r\n\r\n; LDAP credentials (optional)\r\n; DEFAULT: none\r\nldap_username = \"USER\"\r\nldap_password = \"PASSWORD\"\r\n\r\n; LDAP Base DN for the search (required)\r\n; DEFAULT: none\r\nldap_search_dn = \"OU=Local,OU=Users,OU=Home,DC=home,DC=lan\"\r\n\r\n; LDAP objectClass (required)\r\n; DEFAULT: none\r\n;ldap_objectclass = \"posixAccount\"          ; OpenLDAP\r\nldap_objectclass = \"organizationalPerson\"  ; Microsoft Active Directory\r\n\r\n; LDAP filter for search (required)\r\n; DEFAULT: none\r\n;ldap_filter = \"(uid=%v)\"                   ; OpenLDAP\r\nldap_filter = \"(sAMAccountName=%v)\"        ; Microsoft Active Directory\r\n\r\n; Require that the user is in a specific group (optional)\r\n; DEFAULT: none\r\nldap_require_group = \"CN=Ampache Access Group,OU=Groups,OU=Home,DC=home,DC=lan\"\r\n\r\n; LDAP name field\r\n; DEFAULT = \"cn\"\r\nldap_name_field = \"cn\"\r\n;ldap_name_field = \"givenName sn\"\r\n\r\n; LDAP email field\r\n; DEFAULT = \"mail\"\r\nldap_email_field = \"mail\"\r\n\r\n; LDAP protocol version to use\r\n; DEFAULT: 3\r\n;ldap_protocol_version = 3\r\n\r\n; LDAP StartTLS\r\n; DEFAULT: false\r\n;ldap_start_tls = \"false\"\r\n\r\n; LDAP member attribute name.\r\n; That's the name of the attribute of the group that will contain\r\n; the usernames.\r\n; DEFAULT: member\r\n;ldap_member_attribute = \"member\"\r\n;ldap_member_attribute = \"memberuid\"\r\n```\r\n\r\n# Description\r\nSomewhere along the commits my LDAP (Microsoft AD) authentication is broken.\r\n\r\n# Logs\r\n```\r\n2016-04-11 14:55:17 [ampache] (session) -> Unable to read session from key kp96hevknlo4m2aec9l4qbtfh4 no data found \r\n2016-04-11 14:55:17 [ampache] (LDAP) -> search: (&(objectclass=organizationalPerson)(sAMAccountName=Test)) \r\n2016-04-11 14:55:17 [ampache] (LDAP) -> Error during authentication: `Test` is not member of the group `CN=Ampache Access Group,OU=Groups,OU=Home,DC=home,DC=lan` \r\n2016-04-11 14:55:17 [ampache] (Login) -> Test From xxx.xxx.xxx.xxx attempted to login and failed \r\n```\r\nThe user is in the AD group that is cheched for;\r\n![image](https://cloud.githubusercontent.com/assets/4103090/14427711/3c4643ac-fff6-11e5-8026-10c90ebee714.png)\r\n\r\nThe big logs including the trace logging from SQL etc can be found at pastbin: http://pastebin.com/gXP4Ncb6"},"comment":{"url":"https://api.github.com/repos/ampache/ampache/issues/comments/215693425","html_url":"https://github.com/ampache/ampache/issues/1201#issuecomment-215693425","issue_url":"https://api.github.com/repos/ampache/ampache/issues/1201","id":215693425,"user":{"login":"Niols","id":5920602,"avatar_url":"https://avatars.githubusercontent.com/u/5920602?v=3","gravatar_id":"","url":"https://api.github.com/users/Niols","html_url":"https://github.com/Niols","followers_url":"https://api.github.com/users/Niols/followers","following_url":"https://api.github.com/users/Niols/following{/other_user}","gists_url":"https://api.github.com/users/Niols/gists{/gist_id}","starred_url":"https://api.github.com/users/Niols/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Niols/subscriptions","organizations_url":"https://api.github.com/users/Niols/orgs","repos_url":"https://api.github.com/users/Niols/repos","events_url":"https://api.github.com/users/Niols/events{/privacy}","received_events_url":"https://api.github.com/users/Niols/received_events","type":"User","site_admin":false},"created_at":"2016-04-29T12:00:18Z","updated_at":"2016-04-29T12:00:18Z","body":"Hello,\r\n\r\nI've done what I could do. We now need @Afterster to merge my pull request #1208.\r\nHe's quite busy at the moment, but I believe he will find the time to check it out soon.\r\n\r\nIf you want to be informed as soon as more information is available, you could *subscribe* to the PR.\r\n\r\nRegards,\r\nNiols"}}