These are chat archives for allegro/ralph

28th
Aug 2017
Paweł
@ziompaul
Aug 28 2017 08:02

I am still stuck on LDAP autentification with 2 errors:

ldap.INVALID_CREDENTIALS: {'desc': 'Invalid credentials', 'info': '80090308: LdapErr: DSID-0C09042F, comment: AcceptSecurityContext error, data 52e, v2580'}

or

ldap.INVALID_CREDENTIALS: {'info': '80090308: LdapErr: DSID-0C0903D9, comment: AcceptSecurityContext error, data 52e, v2580', 'desc': 'Invalid credentials'}

(once first, once second error)
Those errors are the same either the credensials are good or not.

The config:

import ldap
from django_auth_ldap.config import LDAPSearch, GroupOfNamesType
AUTH_LDAP_SERVER_URI = "ldap://domain.net:389"
AUTH_LDAP_BIND_DN = "CN=Ralph3 Admins,OU=Groups,OU=Kielce,OU=Poland,DC=domain,DC=net"
AUTH_LDAP_BIND_PASSWORD = "password"
AUTH_LDAP_PROTOCOL_VERSION = 3
AUTH_LDAP_USER_USERNAME_ATTR = "ralph-sync"
AUTH_LDAP_USER_SEARCH_BASE = "DC=domain,DC=net"
AUTH_LDAP_USER_SEARCH_FILTER = '(&(objectClass=*)({0}=%(user)s))'.format(
  AUTH_LDAP_USER_USERNAME_ATTR)
AUTH_LDAP_USER_SEARCH = LDAPSearch(AUTH_LDAP_USER_SEARCH_BASE,
  ldap.SCOPE_SUBTREE, AUTH_LDAP_USER_SEARCH_FILTER)
AUTH_LDAP_USER_ATTR_MAP = {
  "first_name": "givenName",
  "last_name": "sn",
  "email": "mail",
  "company": "company",
  "manager": "manager",
  "department": "department",
  "employee_id": "employeeID",
  "location": "officeName",
  "country": "ISO-country-code",
}

I have no idea. :(
Can I do any test of pyldap and django-auth-ldap t be sure it is worging good?

Paweł
@ziompaul
Aug 28 2017 09:25
there are a few warings too: http://xsnippet.org/362719/