Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002842TestLinkIntegration with Other Systemspublic2009-09-15 03:192017-01-22 07:57
Reportereds219 
Assigned Tofman 
PrioritynormalSeverityfeature requestReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Fixed in Version1.9.16 (2016 Q4) 
Summary0002842: Mutliple LDAP authentication
DescriptionAfter much searching and trial and error, I've still not been able to access 2 different LDAP (2 different domains). The forums have a solution for multiple OU, but that would not work for what I'm doing. Seems like I will need a dropdown at the login screen to pick which domain, and then an if/else in the custom_config.inc setting the variables based on which domain was selected. I am not a developer but I tried it myself, but the code inside TestLink is overwhelming for me.
TagsNo tags attached.
Database (MySQL,Postgres,etc)
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Fileszip file icon patch-multipleLDAP.zip [^] (47,145 bytes) 2011-02-25 11:10

- Relationships

-  Notes
(0013737)
mehrich (reporter)
2011-02-25 11:08
edited on: 2011-02-25 11:11

I had the same problem that I needed authentification against multiple LDAP servers and created a patch for TestLink 1.9.1.
It should also allow simultaneous authentification methods (LDAP and MD5) but that is not tested by me.

In the code the changes are marked respectively with "CONTRIBUTION <name>" before changed parts.

Patch is uploaded.

The custom_config.inc.php must be adjusted as noted by me in config.inc.php.

(0014751)
narsu (reporter)
2011-04-27 12:17

Hou!

I have been in great hurry :( So I could not test 1.9.1 version..
I will be next focusing with 1.9.2 version. We will do installation on test server tomorrow. What do you think about your changes for 1.9.1 are those still valid? Is it possible to merge changes?

br,
Narsu
(0014754)
mehrich (reporter)
2011-04-27 14:05

I ran a diff between my patch and the 1.9.2 files and found no other differences than those from the patch.

Therefore you should be able to use the patch also for 1.9.2.

Good luck for tomorrow!
(0014847)
narsu (reporter)
2011-05-12 14:13

Hello at last!

I got some problems..

[Thu May 12 17:11:32 2011] [error] [client 172.16.28.86] PHP Fatal error: Cannot redeclare get_server_url() (previously declared in /var/www/ProjectTESTLINK192LDAP2/lib/functions/configCheck.php:41) in /var/www/ProjectTESTLINK192LDAP2/configCheck.php on line 78

I copied your files to directoryes? But I am missing configuration place for those two ldap server addresses? Should them be still on config.inc.php file? and how ?
(0014848)
mehrich (reporter)
2011-05-12 14:38

1. why do you have configCheck.php in testlink root directory? Shouldn't be there, should be only in lib/functions/

2. as I mentioned before in the custom_config.inc.php you have to configure your ldap connections, e.g. for the 2 LDAP Servers ldap1.your.domain and ldap2.second.domain:

// first LDAP Server
$tlCfg->authentication['ldap1']['method'] = 'LDAP';

$tlCfg->authentication['ldap1']['ldap_server'] = 'ldap1.your.domain';
$tlCfg->authentication['ldap1']['ldap_port'] = '389';
$tlCfg->authentication['ldap1']['ldap_version'] = '3'; // could be '2' in some cases
$tlCfg->authentication['ldap1']['ldap_root_dn'] = 'dc=your,dc=domain';
$tlCfg->authentication['ldap1']['ldap_organization'] = ''; // e.g. '(organizationname=*Traffic)'
$tlCfg->authentication['ldap1']['ldap_uid_field'] = 'sAMAccountName'; // Use 'sAMAccountName' for Active Directory / uid
$tlCfg->authentication['ldap1']['ldap_bind_dn'] = ''; // Left empty for anonymous LDAP binding
$tlCfg->authentication['ldap1']['ldap_bind_passwd'] = ''; // Left empty for anonymous LDAP binding
$tlCfg->authentication['ldap1']['ldap_tls'] = false; // true -> use tls


// second LDAP Server
$tlCfg->authentication['ldap2']['method'] = 'LDAP';

$tlCfg->authentication['ldap2']['ldap_server'] = 'ldap2.second.domain';
$tlCfg->authentication['ldap2']['ldap_port'] = '389';
$tlCfg->authentication['ldap2']['ldap_version'] = '3'; // could be '2' in some cases
$tlCfg->authentication['ldap2']['ldap_root_dn'] = 'dc=second,dc=domain';
$tlCfg->authentication['ldap2']['ldap_organization'] = ''; // e.g. '(organizationname=*Traffic)'
$tlCfg->authentication['ldap2']['ldap_uid_field'] = 'sAMAccountName'; // Use 'sAMAccountName' for Active Directory / uid
$tlCfg->authentication['ldap2']['ldap_bind_dn'] = ''; // Left empty for anonymous LDAP binding
$tlCfg->authentication['ldap2']['ldap_bind_passwd'] = ''; // Left empty for anonymous LDAP binding
$tlCfg->authentication['ldap2']['ldap_tls'] = false; // true -> use tls


additional you can enable authentification with MD5:

$tlCfg->authentication['testlinkdb']['method'] = 'MD5';


HTH
(0014958)
narsu (reporter)
2011-05-25 13:55

Hi!

At last I got some time to report :)

Thank you, it work's well. We will continue test instance installation at next friday. Then we put test machine on real stress.
Local authentication was solving difficult problem. Customer could not crete "general" user account because of organization AD rules. That's why this patch solves problem !

I will wote for this feature for main stream branch!

BR,
Narsu
(0022430)
navnith (reporter)
2014-12-30 16:02

Hi Mehrich,

I just installed 1.9.12 version and trying to get this working. I ran a diff of 1.9.1 version patch with 1.9.12 but looks like there are lot of changes to the implementation. Its quite difficult for me to get this working as I am new to test link source.

Do you have any updated version for the patch which I can use on the 1.9.12 version?

Br,
Navnith
(0022911)
wisiemilljungdahl (reporter)
2015-03-17 20:38

I have submitted a patch as a pull request over at github (https://github.com/TestLinkOpenSourceTRMS/testlink-code/pull/1 [^])

@navnith: The changes since 1.9.12 seems to be quite limited in the files I have modified, so I think it should be pretty easy to integrate into 1.9.12. Note however that the configuration format is not the same as in @mehrich's original patch.
(0023003)
navnith (reporter)
2015-03-29 11:22

Thank you so much @wisiemilljungdahl. I really appreciate your help.

I applied that patch and worked well for local DB and LDAP. But I could not figureout how to set multiple LDAP configuration.
Can you please provide an example setting for multiple LDAP configuration.

Thanks in advance.
(0023013)
wisiemilljungdahl (reporter)
2015-03-31 12:06

@navnith: In config.inc.php you should config something like:

$tlCfg->authentication['domain'] = array(
    'DB' => array('method' => 'DB', 'description' => 'Local DB', 'allowPasswordManagement' => true),
    'LDAP' => array('method' => 'LDAP', 'description' => 'LDAP', 'allowPasswordManagement' => false),
    'LDAP2' => array('method' => 'LDAP', 'description' => 'My second LDAP', 'allowPasswordManagement' => false) );

$tlCfg->authentication['domain']['LDAP']['ldap_server'] = 'localhost';
$tlCfg->authentication['domain']['LDAP']['ldap_port'] = '389';
$tlCfg->authentication['domain']['LDAP']['ldap_version'] = '3'
$tlCfg->authentication['domain']['LDAP']['ldap_root_dn'] = 'dc=mycompany,dc=com';
$tlCfg->authentication['domain']['LDAP']['ldap_bind_dn'] = '';
$tlCfg->authentication['domain']['LDAP']['ldap_bind_passwd'] = '';
$tlCfg->authentication['domain']['LDAP']['ldap_tls'] = false;
$tlCfg->authentication['domain']['LDAP']['ldap_organization'] = '';
$tlCfg->authentication['domain']['LDAP']['ldap_uid_field'] = 'uid';
$tlCfg->authentication['domain']['LDAP']['ldap_firstname_field'] = 'givenname';
$tlCfg->authentication['domain']['LDAP']['ldap_surname_field'] = 'sN';
$tlCfg->authentication['domain']['LDAP']['ldap_email_field'] = 'mail';

$tlCfg->authentication['domain']['LDAP2']['ldap_server'] = 'remote.host.org';
$tlCfg->authentication['domain']['LDAP2']['ldap_port'] = '389';
$tlCfg->authentication['domain']['LDAP2']['ldap_version'] = '3'
$tlCfg->authentication['domain']['LDAP2']['ldap_root_dn'] = 'dc=mycompany,dc=com';
$tlCfg->authentication['domain']['LDAP2']['ldap_bind_dn'] = '';
$tlCfg->authentication['domain']['LDAP2']['ldap_bind_passwd'] = '';
$tlCfg->authentication['domain']['LDAP2']['ldap_tls'] = false;
$tlCfg->authentication['domain']['LDAP2']['ldap_organization'] = '';
$tlCfg->authentication['domain']['LDAP2']['ldap_uid_field'] = 'uid';
$tlCfg->authentication['domain']['LDAP2']['ldap_firstname_field'] = 'givenname';
$tlCfg->authentication['domain']['LDAP2']['ldap_surname_field'] = 'sN';
$tlCfg->authentication['domain']['LDAP2']['ldap_email_field'] = 'mail';
(0025862)
fman (administrator)
2017-01-22 07:57

1.9.16 released

- Issue History
Date Modified Username Field Change
2009-09-15 03:19 eds219 New Issue
2011-02-25 11:08 mehrich Note Added: 0013737
2011-02-25 11:10 mehrich File Added: patch-multipleLDAP.zip
2011-02-25 11:11 mehrich Note Edited: 0013737 View Revisions
2011-04-27 12:17 narsu Note Added: 0014751
2011-04-27 14:05 mehrich Note Added: 0014754
2011-05-12 14:13 narsu Note Added: 0014847
2011-05-12 14:38 mehrich Note Added: 0014848
2011-05-25 13:55 narsu Note Added: 0014958
2014-12-30 16:02 navnith Note Added: 0022430
2015-03-17 20:38 wisiemilljungdahl Note Added: 0022911
2015-03-29 11:22 navnith Note Added: 0023003
2015-03-31 12:06 wisiemilljungdahl Note Added: 0023013
2017-01-15 09:16 fman QA Team - Task Workflow Status => READY FOR TESTING
2017-01-15 09:16 fman Status new => resolved
2017-01-15 09:16 fman Fixed in Version => 1.9.16 (2016 Q4)
2017-01-15 09:16 fman Resolution open => fixed
2017-01-15 09:16 fman Assigned To => fman
2017-01-22 07:57 fman Note Added: 0025862
2017-01-22 07:57 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker