Добрый день.
Подскажите пожалуйста как правильно настроить авторизацию через LDAP
Делаю по инструкции : https://www.nginx.com/blog/nginx-plus-authenticate-users/
Подключаюсь к AD на Windows Server 2008 R2. При правильно логине и пароле получаю следующую ошибку:
localhost - testnginx [24/Mar/2017 10:06:32] "GET /auth-proxy HTTP/1.0" 401 -
localhost - - [24/Mar/2017 10:06:32] using username/password from cookie nginxauth
localhost - testnginx [24/Mar/2017 10:06:32] Error while binding as search user: {'info': '80090308: LdapErr: DSID-0C0903A8, comment: AcceptSecurityContext error, data 52e, v1db1', 'desc': 'Invalid credentials'}, server="ldap://172.16.1.9:389", login="testnginx"
localhost - testnginx [24/Mar/2017 10:06:32] "GET /auth-proxy HTTP/1.0" 401 -
Если закомментирую строчки proxy_set_header X-Ldap-BindDN и proxy_set_header X-Ldap-BindPass получаю:
localhost - testnginx [24/Mar/2017 10:04:54] "GET /auth-proxy HTTP/1.0" 401 -
localhost - - [24/Mar/2017 10:04:54] using username/password from cookie nginxauth
localhost - testnginx [24/Mar/2017 10:04:54] searching on server "ldap://172.16.1.9:389" with base dn "DC=cstest,DC=local" with filter "(SAMAccountName=testnginx )"
localhost - testnginx [24/Mar/2017 10:04:54] Error while running search query: {'info': '000004DC: LdapErr: DSID-0C0906E8, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v1db1', 'desc': 'Operations error'}, server="ldap://172.16.1.9:389", login="testnginx "
localhost - testnginx [24/Mar/2017 10:04:54] "GET /auth-proxy HTTP/1.0" 401 -
Логины правильные, смущает может я не правильно указал X-Ldap-BaseDN и X-Ldap-BindDN
И ещё, а какой метонд аутентификации использует модуль? Не Simple Authentication and Security Layer?