LDAPS Authentication Issue

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Syed
Posts: 5
Joined: 02 Mar 2017, 07:19

LDAPS Authentication Issue

Post by Syed »

Hi MantisTeam,

I am using your bug tracking tool. Its good tool for tracking bugs. I am new for this Tool.
I am trying LDAPs to my LDAPS server ,I am not able to login to Mantis via LDAPS(Error message:Your account may be disabled or blocked or the username/password you entered is incorrect.)
but i am able to login to via Database(bugtracker).

System Information :
OS:Windows-7
RAM:8GB

Install Success: xampp-win32-5.6.30-0-VC11-installer,xampp-win32-5.5.37-0-VC11-installer

Not able to install Latest Mantis Installer:
xampp-win32-7.0.8-0-VC14-installer

I have find multiple links from Mantis forum.

http://www.mantisbt.org/forums/viewtopic.php?f=3&t=6192
https://www.mantisbt.org/docs/master-1. ... _guide.pdf
viewtopic.php?f=2&t=23565&p=58697&hilit=ldap#p58697

I have added the following contents to the ending of config_inc.php

$g_login_method=LDAPS;
$g_ldap_server='ldaps://dev.xxxxx.com:636';
$g_ldap_root_dn='DC=dev,DC=xxxxx,DC=com';
$g_ldap_organization='';
$g_ldap_protocol_version=3;
$g_ldap_follow_referrals=OFF;
$g_ldap_bind_dn='CN=%%%%%.gen,OU=Generics,OU=xxxxx Users,DC=dev,DC=xxxxx,DC=com';
$g_ldap_bind_passwd='*****';
$g_ldap_uid_field='$$$$$';
$g_ldap_realname_field='cn';
$g_use_ldap_email=ON;
$g_use_ldap_realname=ON;
$g_ldap_simulation_file_path='';


Another Way also I am trying to fix this issue in Xampp side also(httpd.conf).

<Directory c:/xampp/htdocs/project>
Options ExecCGI
Options Indexes FollowSymLinks MultiViews Includes ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName “ABC”
AuthType Basic
AuthLDAPURL "ldaps://dev.xxxxx.com:636/OU=Employees,OU=xxxxx Users,DC=dev,DC=xxxxx,DC=com?cn?one"
AuthLDAPBindDN "CN=$$$$$.gen,OU=Generics,OU=xxxxx Users,DC=dev,DC=xxxxx,DC=com"
AuthLDAPBindPassword "*****"
Require valid-user
</Directory>


This above configuration working for another xampp project but not in Mantis.Still I am not able to LDAPS Login to the Mantis (
Error Message:
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.).

Could you please guide me how to fix this issue.


Thanks,
Syed
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: LDAPS Authentication Issue

Post by atrol »

I can't help that much as I don't use LDAP integration, but the following line is certainly wrong
Syed wrote: $g_login_method=LDAPS;
LDAPS is not allowed as login method, it should be LDAP
http://www.mantisbt.org/docs/master-1.3 ... uth.global

ldaps should be part of the URL if you need that protocol
http://www.mantisbt.org/docs/master-1.3 ... .auth.ldap
Please use Search before posting and read the Manual
Syed
Posts: 5
Joined: 02 Mar 2017, 07:19

Re: LDAPS Authentication Issue

Post by Syed »

Thanks Atrol for sharing details ,

As per your guidance , I make changes in config file (config_inc.php) .

$g_login_method=LDAP;
$g_ldap_server='ldaps//dev.xxxxx.com:636';
$g_ldap_root_dn='DC=dev,DC=xxxxx,DC=com';
$g_ldap_organization='';
$g_ldap_protocol_version=0;
$g_ldap_follow_referrals=OFF;
$g_ldap_bind_dn='CN=%%%%%%.gen,OU=Generics,OU=xxxxx Users,DC=dev,DC=xxxxx,DC=com';
$g_ldap_bind_passwd='****';


After login I am getting below error:

APPLICATION ERROR #1401
LDAP Server Connection Failed.
Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.


Could you please guide me to fix this issue.

Thanks ,
Syed
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: LDAPS Authentication Issue

Post by atrol »

As I said before, I can't help that much, but now this entry is obviously wrong
Syed wrote: $g_ldap_server='ldaps//dev.xxxxx.com:636';
It should be something like

Code: Select all

$g_ldap_server='ldaps://dev.xxxxx.com:636';
Please use Search before posting and read the Manual
Syed
Posts: 5
Joined: 02 Mar 2017, 07:19

Re: LDAPS Authentication Issue

Post by Syed »

Updating the config_inc.php file(As per your comments) .
After entering my credential, and i am getting the below error.

2017-03-07 07:51 CET LDAP ldap_api.php:326 ldap_authenticate_by_username() Binding to LDAP server
2017-03-07 07:51 CET LDAP ldap_api.php:63 ldap_connect_bind() Attempting connection to LDAP server/URI 'ldaps://dev.****.com:636'.
2017-03-07 07:51 CET LDAP ldap_api.php:66 ldap_connect_bind() Connection accepted by LDAP server
2017-03-07 07:51 CET LDAP ldap_api.php:101 ldap_connect_bind() Attempting bind to ldap server with username and password
2017-03-07 07:51 CET LDAP ldap_api.php:46 ldap_log_error() ERROR #-1: Can't contact LDAP server
2017-03-07 07:51 CET LDAP ldap_api.php:111 ldap_connect_bind() Bind to ldap server failed


Same credential working fine with another Xampp server .If I missed any configuration changes.

Thanks,
Syed
Syed
Posts: 5
Joined: 02 Mar 2017, 07:19

Re: LDAPS Authentication Issue

Post by Syed »

Hi Team ,

I have tried multiple ways , Still i am not able to log in to Mantis bugtracker via LDAP (instead of LDAPS)

config_inc.php:
===========

$g_login_method=LDAP;
$g_ldap_server='ldap://dev.****.com:389';
$g_ldap_root_dn='OU=AAA,OU=BBB,DC=****,DC=com';
$g_ldap_organization = '(objectClass=*)';
$g_ldap_protocol_version=0;
$g_ldap_follow_referrals=OFF;
$g_ldap_bind_dn='CN=Bind_Name,OU=AAA,OU=BBB,DC=****,DC=com';
$g_ldap_bind_passwd='****';


Mantis LOG:
=========
2017-03-12 05:30 CET LDAP ldap_api.php:326 ldap_authenticate_by_username() Binding to LDAP server
2017-03-12 05:30 CET LDAP ldap_api.php:63 ldap_connect_bind() Attempting connection to LDAP server/URI 'ldap://dev.****.com:389'.
2017-03-12 05:30 CET LDAP ldap_api.php:66 ldap_connect_bind() Connection accepted by LDAP server
2017-03-12 05:30 CET LDAP ldap_api.php:101 ldap_connect_bind() Attempting bind to ldap server with username and password
2017-03-12 05:30 CET LDAP ldap_api.php:46 ldap_log_error() ERROR #49: Invalid credentials
2017-03-12 05:30 CET LDAP ldap_api.php:111 ldap_connect_bind() Bind to ldap server failed


Cloud you please help me.

Thanks in Advance ...
Syed
Post Reply