View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009706CDashpublic2009-10-13 02:112010-02-21 12:32
ReporterSolomon Matthews 
Assigned ToJulien Jomier 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.4 
Target VersionFixed in Version1.5 
Summary0009706: Non-anonymous LDAP authentication (e.g. for Active Directory) - feature request and example implementation
DescriptionSome directories (e.g. AD) require an authenticated bind to be performed.

My organization requires authentication against AD, to test the feasibility I have implemented the feature in place - see "Additional Information" for the test implementation. The base version is CDash 1.4.2.

The implementation adds control over LDAP_OPT_REFERRALS - this needs to be false for AD 2003 and AD2008.
Additional InformationModifications to login.php:

--- login.php.orig 2009-10-13 12:39:06.000000000 +1100
+++ login.php 2009-10-13 16:42:59.000000000 +1100
@@ -88,6 +88,12 @@

   $ldap = ldap_connect($CDASH_LDAP_HOSTNAME);
   ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION,$CDASH_LDAP_PROTOCOL_VERSION);
+ ldap_set_option($ldap, LDAP_OPT_REFERRALS,$CDASH_LDAP_OPT_REFERRALS);
+ // Bind as the LDAP user if authenticated ldap is enabled
+ if($CDASH_LDAP_AUTHENTICATED)
+ {
+ ldap_bind($ldap, $CDASH_LDAP_BIND_DN, $CDASH_LDAP_BIND_PASSWORD);
+ }
   if(isset($ldap) && $ldap != '')
     {
     /* search for pid dn */

=

Modifications to config.php:

--- cdash/config.php.orig 2009-10-13 17:06:25.000000000 +1100
+++ cdash/config.php 2009-10-13 16:40:26.000000000 +1100
@@ -63,6 +63,11 @@
 $CDASH_LDAP_HOSTNAME='localhost';
 $CDASH_LDAP_BASEDN='ou=people,dc=organization,dc=com';
 $CDASH_LDAP_PROTOCOL_VERSION='3';
+# For authentication against AD, set CDASH_LDAP_AUTHENTICATED to '1' CDASH_LDAP_OPT_REFERRALS to '0', and specify a bind DN and password
+$CDASH_LDAP_OPT_REFERRALS='1';
+$CDASH_LDAP_AUTHENTICATED='0';
+$CDASH_LDAP_BIND_DN='cn=user,ou=people,dc=orgranization,dc=com';
+$CDASH_LDAP_BIND_PASSWORD='password';

 // Set to start the autoremoval on the first build of the day
 $CDASH_AUTOREMOVE_BUILDS='0';
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0018164)
Julien Jomier (manager)
2009-10-22 03:08

Added to version 1.5, to be in the official release 1.6. Thanks for providing the fix.

 Issue History
Date Modified Username Field Change
2009-10-13 02:11 Solomon Matthews New Issue
2009-10-22 03:07 Julien Jomier Status new => assigned
2009-10-22 03:07 Julien Jomier Assigned To => Julien Jomier
2009-10-22 03:08 Julien Jomier Note Added: 0018164
2009-10-22 03:08 Julien Jomier Status assigned => resolved
2009-10-22 03:08 Julien Jomier Fixed in Version => 1.5
2009-10-22 03:08 Julien Jomier Resolution open => fixed
2010-02-21 12:32 Julien Jomier Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team