LDAP Access

General discussion of Mantis.

Moderators: Developer, Contributor

Phroobar
Posts: 37
Joined: 13 Dec 2022, 16:14

Re: LDAP Access

Post by Phroobar »

Just bumping this up. If I'm running this with IIS, do I need to somekind of cURL thing or just installing it like a normal windows certificate good enough for PHP? We still have the problem of LDAP secured not working with MantisBT.
cas
Posts: 1622
Joined: 11 Mar 2006, 16:08
Contact:

Re: LDAP Access

Post by cas »

I have a small plugin which enables automated access based upon ad credentials for those that run mantis on IIS.
I have made this available on Github: https://github.com/mantisbt-plugins/adLogin
Phroobar
Posts: 37
Joined: 13 Dec 2022, 16:14

Re: LDAP Access

Post by Phroobar »

I found the answer to using LDAPS with PHP.

I was able to connect to my server using ldaps on PHP using the following method.

$connect = ldap_connect('ldaps://'. $ldap_host. ':'. $ldap_port)
I also had to create these folders C:\openldap\sysconf and then put a text document named ldap.conf into it.
I then edited ldap.conf and put in TLS_REQCERT never
This worked for connecting through LDAPS.
The correct way to do it, is to download cacert.pem from here:
https://curl.haxx.se/docs/caextract.html Then add your server hash onto the bottom of this cert.
Lastly edit ldap.conf to say TLS_CACERT \path\to\cert\cacert.pem and comment out the TLS_REQCERT comment from above.
Then restart apache/nginx/etc and you should be able to connect using LDAPS.
Post Reply