Hi,
I needed to access from an LDAP client (Outlook or Thunderbird) some data stored in several locations (an OpenLDAP server with back-hdb, and a PostgreSQL database).
I wrote a perl script used with back-perl, and everything works fine. The client queries that back-ldap server, wich in turn retrieves data both from the back-hdb server and the PostgreSQL server, does some formatting on it, and returns it to the client
It works fine, except that I have to use a standard bindDN/password from the perl script to access the back-hdb server, because I don't know how to retrieve in that perl script the initial bindDN/password (the credentials provided initially by the client).
I guess there is a way to do it, because I found some links like http://osdir.com/ml/network.openldap.general/2002-09/msg00021.html where people seem to have been able to get the bindDN and password provided by the client, but they didn't say how and I couldn't figure it out.
Does anybody know if it's possible to get, within the perl script, the bindDN/password provided by the client ?
Thanks Ben
Hi,
I needed to access from an LDAP client (Outlook or Thunderbird) some data stored in several locations (an OpenLDAP server with back-hdb, and a PostgreSQL database).
I wrote a perl script used with back-perl, and everything works fine. The client queries that back-perl server, wich in turn retrieves data both from the back-hdb server and the PostgreSQL server, does some formatting on it, and returns it to the client
It works fine, except that I have to use a standard bindDN/password from the perl script to access the back-hdb server, because I don't know how to retrieve in that perl script the initial bindDN/password (the credentials provided initially by the client).
I guess there is a way to do it, because I found some links like http://osdir.com/ml/network.openldap.general/2002-09/msg00021.html where people seem to have been able to get the bindDN and password provided by the client, but they didn't say how and I couldn't figure it out.
Does anybody know if it's possible to get, within the perl script, the bindDN/password provided by the client ? Thanks Ben
--On Wednesday, May 15, 2013 9:29 AM +0100 Benin Technologies benintechnologies@yahoo.fr wrote:
Hi,
I will tell you that ceaselessly spamming the list with the same question is a good way to get yourself banned. If/when someone has an answer for you, they will answer your question.
--Quanah
--
Quanah Gibson-Mount Sr. Member of Technical Staff Zimbra, Inc A Division of VMware, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
Benin Technologies wrote:
Hi,
I needed to access from an LDAP client (Outlook or Thunderbird) some data stored in several locations (an OpenLDAP server with back-hdb, and a PostgreSQL database).
I wrote a perl script used with back-perl, and everything works fine. The client queries that back-ldap server, wich in turn retrieves data both from the back-hdb server and the PostgreSQL server, does some formatting on it, and returns it to the client
It works fine, except that I have to use a standard bindDN/password from the perl script to access the back-hdb server, because I don't know how to retrieve in that perl script the initial bindDN/password (the credentials provided initially by the client).
I guess there is a way to do it, because I found some links like http://osdir.com/ml/network.openldap.general/2002-09/msg00021.html where people seem to have been able to get the bindDN and password provided by the client, but they didn't say how and I couldn't figure it out.
Does anybody know if it's possible to get, within the perl script, the bindDN/password provided by the client ?
The DN is the same as for all the other operations - it's the first parameter. The password is the 2nd parameter. How else would you expect it to be passed?
thanks, but I'm surprised, I don't see the bindDN and password in the parameter list of the perl subs
for example, in SampleLDAP.pm, if I do
sub search { print "@_"; .....
I get : 1st parameter : SampleLDAP=HASH(0x8657f80) 2nd : the base DN 3rd : the search scope 4th : deref and so on...
no sign of the bindDN and password
what did I miss ?
Le 15/05/2013 14:46, Howard Chu a écrit :
Benin Technologies wrote:
Hi,
I needed to access from an LDAP client (Outlook or Thunderbird) some data stored in several locations (an OpenLDAP server with back-hdb, and a PostgreSQL database).
I wrote a perl script used with back-perl, and everything works fine. The client queries that back-perl server, wich in turn retrieves data both from the back-hdb server and the PostgreSQL server, does some formatting on it, and returns it to the client
It works fine, except that I have to use a standard bindDN/password from the perl script to access the back-hdb server, because I don't know how to retrieve in that perl script the initial bindDN/password (the credentials provided initially by the client).
I guess there is a way to do it, because I found some links like http://osdir.com/ml/network.openldap.general/2002-09/msg00021.html where people seem to have been able to get the bindDN and password provided by the client, but they didn't say how and I couldn't figure it out.
Does anybody know if it's possible to get, within the perl script, the bindDN/password provided by the client ?
The DN is the same as for all the other operations - it's the first parameter. The password is the 2nd parameter. How else would you expect it to be passed?
On Wed, May 15, 2013 at 03:42:44PM +0100, Benin Technologies wrote:
thanks, but I'm surprised, I don't see the bindDN and password in the parameter list of the perl subs
This has nothing to to with OpenLDAP.
From perl, you fird get an LDAP object:
my $ldap = Net::LDAP->new($uri->as_string);
then bind:
my $mesg = $ldap->bind($bindDN, password=> $passwd);
then search:
$mesg = $ldap->search( @search_args );
once the bind has completed, nothing retains that information; it was only needed to bind.
I have no idea what the architecture of your project is, but you'd be better off asking on one of the perl lists to work this stuff out.
--On Wednesday, May 15, 2013 12:14 PM -0400 Brian Reichert reichert@numachi.com wrote:
On Wed, May 15, 2013 at 03:42:44PM +0100, Benin Technologies wrote:
thanks, but I'm surprised, I don't see the bindDN and password in the parameter list of the perl subs
This has nothing to to with OpenLDAP.
Sadly, wrong. They are using and talking about the back-perl backend to OpenLDAP, not how to set up an LDAP client using net::ldap.
--Quanah
--
Quanah Gibson-Mount Sr. Member of Technical Staff Zimbra, Inc A Division of VMware, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
On Wed, May 15, 2013 at 09:57:29AM -0700, Quanah Gibson-Mount wrote:
--On Wednesday, May 15, 2013 12:14 PM -0400 Brian Reichert
This has nothing to to with OpenLDAP.
Sadly, wrong. They are using and talking about the back-perl backend to OpenLDAP, not how to set up an LDAP client using net::ldap.
Darn, I wasn't paying attention enough. :/ Thanks for clarifying.
--Quanah
openldap-technical@openldap.org