Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #46051

Re: authentication with python-ldap

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <dieter@handshake.de>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'configure': 0.05; 'encoding': 0.05; 'correct.': 0.07; 'encoded': 0.07; 'variables': 0.07; 'ascii': 0.09; 'encode': 0.09; 'subject:skip:a 10': 0.09; 'thus,': 0.09; 'received:localhost.localdomain': 0.10; 'received:localdomain': 0.11; 'cc:addr:python-list': 0.11; 'python': 0.11; 'wrote': 0.14; 'clues': 0.16; 'encoding.': 0.16; 'java.': 0.16; 'sees': 0.16; 'subject:python': 0.16; 'normally': 0.19; 'server,': 0.19; '(the': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; 'comparing': 0.24; 'passes': 0.24; 'text.': 0.24; 'typical': 0.24; 'unicode': 0.24; 'java': 0.24; 'non': 0.24; 'server.': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'compare': 0.26; 'logging': 0.26; 'values': 0.27; 'header:In- Reply-To:1': 0.27; 'tried': 0.27; 'testing': 0.29; 'correct': 0.29; '(this': 0.29; 'characters': 0.30; 'requests': 0.31; 'towards': 0.31; 'convince': 0.31; 'correctly.': 0.31; 'credentials': 0.31; 'allows': 0.31; 'text': 0.33; 'could': 0.34; 'subject:with': 0.35; 'connection': 0.35; 'problem.': 0.35; 'case,': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'doing': 0.36; 'should': 0.36; 'two': 0.37; 'expected': 0.38; 'server': 0.38; 'problems': 0.38; 'expect': 0.39; 'does': 0.39; 'easy': 0.60; 'problems.': 0.60; 'information': 0.63; 'valuable': 0.63; 'provide': 0.64; 'different': 0.65; 'bridge': 0.65; 'between': 0.67; 'connection.': 0.74; 'message- id:@localhost.localdomain': 0.74; 'alberto': 0.84; 'maybe,': 0.84; 'hand,': 0.93; 'directly.': 0.95
MIME-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Transfer-Encoding 8bit
Date Sun, 26 May 2013 08:00:36 +0200
From "Dieter Maurer" <dieter@handshake.de>
To Jorge Alberto Diaz Orozco <jaorozco@estudiantes.uci.cu>
Subject Re: authentication with python-ldap
In-Reply-To <36e9845b-4b22-406d-b38c-056341454fd2@ucimail4.uci.cu>
References <87vc67ppia.fsf@handshake.de> <36e9845b-4b22-406d-b38c-056341454fd2@ucimail4.uci.cu>
X-Mailer VM 8.0.12-devo-585 under 21.4 (patch 22) "Instant Classic" XEmacs Lucid (i686-linux-gnu)
X-SA-Exim-Connect-IP <locally generated>
X-SA-Exim-Mail-From dieter@handshake.de
X-SA-Exim-Scanned No (on srv6.handshake.de); SAEximRunCond expanded to false
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2168.1369548056.3114.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1369548056 news.xs4all.nl 15873 [2001:888:2000:d::a6]:44586
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:46051

Show key headers only | View raw


Jorge Alberto Diaz Orozco wrote at 2013-5-25 14:00 -0400:
>I have been doing the same thing and I tried to use java for testing the credentials and they are correct. It works perfectly with java.
>I really don´t know what we´re doing wrong.

Neither do I.

But the error message definitely originates from the LDAP server.
This means that the server sees different things for the
(successful) Java connection and the (unsuccessful) Python connection.
Maybe, you can convince your LDAP server administrator to configure
a form of logging that allows you to compare the two requests
(this may not be easy - because sensitive information is involved).
Comparing the requests may provide valuable clues towards the cause
of the problem.

One may also try some guesswork: There is an important difference
between Java and Python 2. Java uses unicode as the typical type
for text variables while in Python 2, you use normally the type "str"
for text. "str" means no unicode but encoded text.
When the Java-LDAP bridge passes text to the LDAP server, it must
encode the text - and maybe, it uses the correct encoding
(the one the LDAP server expects). The Python-LDAP bridge, on the other
hand, does not get unicode but "str" and likely passes the "str"
values directly. Thus, if your "str" values do not use the correct
encoding (the one expected by the LDAP server), things will not
work out correctly.

I expect the LDAP server to expect the "utf-8" encoding.
In this case, problems could be expected when the data
passed on to the LDAP server contains non ascii characters
while all ascii data should not see problems.



--
Dieter

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: authentication with python-ldap "Dieter Maurer" <dieter@handshake.de> - 2013-05-26 08:00 +0200

csiph-web