Mantis Bugtracker 

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008265TestLinkLDAP authenticationpublic2018-05-16 13:342018-10-06 15:39
Assigned Tofman 
StatusclosedResolutionunable to reproduce 
PlatformLinuxOSUbuntuOS Version16.04.3 LTS (Xen
Product Version1.9.16 (2016 Q4) 
Fixed in Version 
Summary0008265: Undefined index's for ldap fields in doAuthorize.php
DescriptionWhen a user is logging into testlink for the first time using LDAP credentials, the user is created as a new user in the testlink database. However only the 'login' field is mapped correctly.

The 'First Name' and 'Last Name' fields contains the value of the 'Login' field and the 'Email' field contains "".

I would expect that testlink would be able to populate all the fields correctly upon first signin with LDAP.
Steps To Reproduce1) Modify (and save) the '' i the testlink install root dir.

    $tlCfg->authentication['method'] = 'LDAP';

    $tlCfg->authentication['ldap'] = array();
    $tlCfg->authentication['ldap'][1]['ldap_server'] = 'MyLDAPSERVER';
    $tlCfg->authentication['ldap'][1]['ldap_port'] = '389';
    $tlCfg->authentication['ldap'][1]['ldap_version'] = '3'; // could be '2' in some cases
    $tlCfg->authentication['ldap'][1]['ldap_root_dn'] = 'dc=MyDOMAIN,dc=MyEXT';
    $tlCfg->authentication['ldap'][1]['ldap_bind_dn'] = 'MyUSER@MyDOMAIN.MyEXT'; // Left empty for anonymous LDAP binding
    $tlCfg->authentication['ldap'][1]['ldap_bind_passwd'] = 'MyPASSWORD'; // Left empty for anonymous LDAP binding
    $tlCfg->authentication['ldap'][1]['ldap_tls'] = false; // true -> use tls

    $tlCfg->authentication['ldap'][1]['ldap_organization'] = ''; // e.g. '(organizationname=*Traffic)'
    $tlCfg->authentication['ldap'][1]['ldap_uid_field'] = 'sAMAccountName'; // Use 'sAMAccountName' for Active Directory

    $tlCfg->authentication['ldap_automatic_user_creation'] = true;

    $tlCfg->authentication['ldap_email_field'] = 'mail';
    $tlCfg->authentication['ldap_firstname_field'] = 'givenname';
    $tlCfg->authentication['ldap_surname_field'] = 'sn';

2) Restart the webserver.

3) Login with a user not already in the testlink MySQL database (but is in the LDAP/AD).
3.1) The login is successfully.

4) From testlink: Open the user management page.
4.1) There are not correct values in "First Name", "Last Name" and "Email" columns even though these are correctly places in the corresponding "givenname", "sn" and "mail" fields within the Active Directory (AD)

5) Open the logfile "/var/testlink/logs/userlog0.log" and see that this file contains three log entries which might explain the behaviour:


[<<][5afbf3a64b071928885910][DEFAULT][/login.php][18/May/16 09:02:30][18/May/16 09:02:30][took 0.004665 secs]
[>>][5afbf3a64c3d1692578767][DEFAULT][/login.php][18/May/16 09:02:30]
    [18/May/16 09:02:30][L18N][<nosession>][GUI]
        string 'mail' is not localized for locale 'en_GB'
[<<][5afbf3a64c3d1692578767][DEFAULT][/login.php][18/May/16 09:02:30][18/May/16 09:02:30][took 0.006844 secs]
[>>][5afbf3b363dd8183877161][DEFAULT][/login.php][18/May/16 09:02:43]
[<<][5afbf3b363dd8183877161][DEFAULT][/login.php][18/May/16 09:02:43][18/May/16 09:02:43][took 0.003973 secs]
[>>][5afbf3b364e2c217378038][DEFAULT][/login.php][18/May/16 09:02:43]
    [18/May/16 09:02:43][WARNING][<nosession>][GUI]
Undefined index: ldap_email_field - in /var/www/testlink/lib/functions/doAuthorize.php - Line 267
    [18/May/16 09:02:43][WARNING][<nosession>][GUI]
Undefined index: ldap_firstname_field - in /var/www/testlink/lib/functions/doAuthorize.php - Line 267
    [18/May/16 09:02:43][WARNING][<nosession>][GUI]
Undefined index: ldap_surname_field - in /var/www/testlink/lib/functions/doAuthorize.php - Line 267
[<<][5afbf3b364e2c217378038][DEFAULT][/login.php][18/May/16 09:02:43][18/May/16 09:02:43][took 0.024073 secs]
[>>][5afbf3b36b2bb221438412][DEFAULT][/login.php][18/May/16 09:02:43]
[>>][5afbf3b373143927168263][DEFAULT][/index.php][18/May/16 09:02:43]
[>>][5afbf3b37c18f993128329][DEFAULT][/lib/general/navBar.php][18/May/16 09:02:43]
[>>][5afbf3b37eac5797959044][DEFAULT][/lib/general/mainPage.php][18/May/16 09:02:43]


Additional InformationUndefined index: ldap_email_field - in /var/www/testlink/lib/functions/doAuthorize.php - Line 267
Undefined index: ldap_firstname_field - in /var/www/testlink/lib/functions/doAuthorize.php - Line 267
Undefined index: ldap_surname_field - in /var/www/testlink/lib/functions/doAuthorize.php - Line 267
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL + LDAP
BrowserGoogle Chrome - Version 66.0.3359.170 (Official Build) (64-bit)
PHP VersionPHP 7.0.28-0ubuntu0.16.04.1 (cli) ( NTS )
QA Team - Task Workflow StatusTBD
Attached Files

- Relationships
related to 0008356closedfman LDAP authentication does not work with version 1.9.17 

-  Notes
gommartin (reporter)
2018-05-16 13:37

The issue is rated at the severity/priority because when users starts using testlink it will be a unmanageable task to correct the data for hundreds of people. (which is why LDAP integration was choosen in the first place)
fman (administrator)
2018-05-21 14:24

please get latest stable release, do fresh install and retest
fman (administrator)
2018-10-06 15:39

no more user feedback

- Issue History
Date Modified Username Field Change
2018-05-16 13:34 gommartin New Issue
2018-05-16 13:37 gommartin Note Added: 0027481
2018-05-21 14:24 fman Note Added: 0027484
2018-05-21 14:24 fman Assigned To => fman
2018-05-21 14:24 fman Status new => feedback
2018-08-21 17:04 fman Relationship added related to 0008356
2018-10-06 15:39 fman QA Team - Task Workflow Status => TBD
2018-10-06 15:39 fman Note Added: 0027964
2018-10-06 15:39 fman Status feedback => closed
2018-10-06 15:39 fman Resolution open => unable to reproduce

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker