[python-ldap] Setting option OPT_X_SASL_MECH gives ValueError "unknown option 24832"
Pauli Sundberg
pauli.sundberg at iki.fi
Thu Aug 28 12:03:12 CEST 2014
Hi all.
Problem in short:
I tried setting ldap.OPT_X_SASL_MECH with:
> import ldap
> ldap.set_option( ldap.OPT_X_SASL_MECH, "foo")
and that gives me ValueError: "unknown option 24832".
I tried this on Debian 7 (apt-get installed), with Ubuntu 14.04 with pip
installed and apt-get installed python-ldap package.
To be sure, i tried it also with
> import ldap
> l = ldap.initialize("ldap://localhost/")
> l.set_option( ldap.OPT_X_SASL_MECH, "foo")
and that yield same error.
ldap.SASL_AVAIL gives me 1 -- so installation should be ok ?
Any suggestions what am i doing wrong?
I also tried using $HOME/.ldaprc (and checked that strace gives opened ok)
for 'SASL_MECH' but to me it seems like its having no effect (and i get no
error setting it to say 'foo')
Background:
I am trying to use LDAP for authenticating Django site. Without options the
authentication goes plaintext, and that is not acceptable. So i am trying
to use MD5 diggest, that gives some security. I am using the
python-django-ldap [1] . I tried setting MD5 on with setting
AUTH_LDAP_CONNECTION_OPTIONS described in [1] with "A dictionary of options
to pass to each connection to the LDAP server via LDAPObject.set_option()".
[1] (https://pythonhosted.org/django-auth-ldap/)
Thanks,
Pauli Sundberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20140828/8dfad4ac/attachment-0001.html>
More information about the python-ldap
mailing list