LDAP bind option

php.internals

Nathaniel David Gallaher

23 years ago
Currently the call to ldap_bind only supports the method LDAP_AUTH_SIMPLE (as it is hardcoded in the php function definition). Can we put the method parameter (as see in the call to ldap_bind_s) back into the PHP function? I have an application that obtains x509 certs (securely) and I want to use them to bind to the LDAP server. ~Nathan

Jon Parise

23 years ago
On Mon, May 19, 2003 at 06:26:43PM -0400, Nathaniel David Gallaher wrote:
> Currently the call to ldap_bind only supports the method LDAP_AUTH_SIMPLE > (as it is hardcoded in the php function definition). Can we put the > method parameter (as see in the call to ldap_bind_s) back into the PHP > function? I have an application that obtains x509 certs (securely) and I > want to use them to bind to the LDAP server.
I'll try and have a look at this soon. I just need to find the time to get my local LDAP server up and running again for testing.
-- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

Stig Venaas

23 years ago
On Wed, Jun 04, 2003 at 02:59:41AM -0400, Jon Parise wrote:
> On Mon, May 19, 2003 at 06:26:43PM -0400, Nathaniel David Gallaher wrote: > > > Currently the call to ldap_bind only supports the method LDAP_AUTH_SIMPLE > > (as it is hardcoded in the php function definition). Can we put the > > method parameter (as see in the call to ldap_bind_s) back into the PHP > > function? I have an application that obtains x509 certs (securely) and I > > want to use them to bind to the LDAP server. > > I'll try and have a look at this soon. I just need to find the time > to get my local LDAP server up and running again for testing.
There are also things like SASL that should be supported. That should perhaps be done with a separate bind function though. It's great if you look into this, I have sort of had it on my todo list for a couple of years... Stig

Jon Parise

23 years ago
On Wed, Jun 04, 2003 at 09:10:15AM +0200, Stig Venaas wrote:
> > > Currently the call to ldap_bind only supports the method LDAP_AUTH_SIMPLE > > > (as it is hardcoded in the php function definition). Can we put the > > > method parameter (as see in the call to ldap_bind_s) back into the PHP > > > function? I have an application that obtains x509 certs (securely) and I > > > want to use them to bind to the LDAP server. > > > > I'll try and have a look at this soon. I just need to find the time > > to get my local LDAP server up and running again for testing. > > There are also things like SASL that should be supported. That should > perhaps be done with a separate bind function though.
Yes, I noticed. It looks like the Microsoft implementation has its own set, as well: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netdir/ldap/ldap_bind_s.asp For now, I'll work from the OpenLDAP implementation. That will probably benefit the largest percentage of PHP users.
> It's great if you look into this, I have sort of had it on my todo list > for a couple of years...
Hopefully it won't remain on mine for that long. =)
-- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

Nathan Gallaher

23 years ago
On Wed, 4 Jun 2003, Stig Venaas wrote:
> On Wed, Jun 04, 2003 at 02:59:41AM -0400, Jon Parise wrote: > > On Mon, May 19, 2003 at 06:26:43PM -0400, Nathaniel David Gallaher wrote: > > > > > Currently the call to ldap_bind only supports the method LDAP_AUTH_SIMPLE > > > (as it is hardcoded in the php function definition). Can we put the > > > method parameter (as see in the call to ldap_bind_s) back into the PHP > > > function? I have an application that obtains x509 certs (securely) and I > > > want to use them to bind to the LDAP server. > > > > I'll try and have a look at this soon. I just need to find the time > > to get my local LDAP server up and running again for testing. > > There are also things like SASL that should be supported. That should > perhaps be done with a separate bind function though. > > It's great if you look into this, I have sort of had it on my todo list > for a couple of years... > > Stig >
I worked on this for a couple of weeks and got a function written (just extracted the ldap_sasl_bind_s() and supporting bits from the ldapsearch program supplied with openldap) but I had one heck of a time getting all the neccessary libraries to work together. (I was using the GSI_GSSAPI mechanism which requires its own set of libs that are a little "special" and conflict with the normal libs) If anyone finds an easy soln, let me know. ~Nathan