[horde] composite authentication and ldap

Jan Schneider jan at horde.org
Mon May 2 07:46:47 UTC 2011


Zitat von Laurent Foucher <laurent.foucher at iut-tlse3.fr>:

>>
>> Zitat von Laurent Foucher <laurent.foucher at iut-tlse3.fr>:
>>
>>>>
>>>> Zitat von Laurent Foucher <laurent.foucher at iut-tlse3.fr>:
>>>>
>>>>> Hi,
>>>>>
>>>>> I would like to use this configuration using composite authentication :
>>>>>
>>>>> $conf['auth']['driver'] = 'composite';
>>>>> $conf['auth']['params']['admin_driver']['driver'] = 'ldap';
>>>>> $conf['auth']['params']['admin_driver']['params'] = array(
>>>>>     'hostspec' => '10.0.0.1',
>>>>>     'binddn' => 'cn=horde_user,dc=yyyyyy,dc=fr',
>>>>>     'bindpw' => 'xxxxxxx',
>>>>>     'bindas' => 'admin',
>>>>>     'basedn' => 'dc=yyyyyy,dc=fr',
>>>>>     'scope' => 'sub',
>>>>>     'ad' => false,
>>>>>     'uid' => 'uid',
>>>>>     'encryption' => 'md5-hex',
>>>>>     'newuser_objectclass' => array('shadowAccount', 'inetOrgPerson'),
>>>>>     'filter' => '(objectclass=shadowAccount)',
>>>>>     'password_expiration' => 'no',
>>>>>     'driverconfig' => 'custom'
>>>>> );
>>>>> $conf['auth']['params']['auth_driver']['driver'] = 'application';
>>>>> $conf['auth']['params']['auth_driver']['params'] = array(
>>>>>     'app' => 'imp');
>>>>>
>>>>> I have the following error :
>>>>>
>>>>> HORDE Bind failed: Can't contact LDAP server [pid 12279 on line  
>>>>> 243 of "/usr/share/php/Horde/Ldap.php"]
>>>>>
>>>>> When i set the hotspec with 10.0.0.1 in the file  
>>>>> /usr/share/php/Horde/Ldap.php, all works fine.
>>>>
>>>> What *is* the hostspec if you don't set it manually?
>>>>
>>> Here the default configuration in /usr/share/php/Horde/Ldap.php
>>>
>>> class Horde_Ldap
>>> {
>>>   protected $_config = array(
>>>       'hostspec'        => 'localhost',
>>>       'port'            => 389,
>>>       'version'         => 3,
>>>       'tls'             => false,
>>>       'binddn'          => '',
>>>       'bindpw'          => '',
>>>       'basedn'          => '',
>>>       'options'         => array(),
>>>       'filter'          => '(objectClass=*)',
>>>       'scope'           => 'sub',
>>>       'user'            => array(),
>>>       'auto_reconnect'  => false,
>>>       'min_backoff'     => 1,
>>>       'current_backoff' => 1,
>>>       'max_backoff'     => 32,
>>>       'cache'           => false,
>>>       'cachettl'        => 3600);
>>>
>>> I change the hostspec line with
>>>
>>> 'hostspec'        => '10.0.0.1',
>>
>> That wasn't the question, those are just default values. What is  
>> the *actual* value being used in Horde_Ldap?
>>
>> Jan.
>>
> Sorry for this incomplete answer. I was talking about the line  
> changed directly in Horde_Ldap. Here the configuration change in  
> Horde_Ldap (file /usr/share/php/Horde/Ldap.php) :
>
> protected $_config = array(
>         'hostspec'        => '10.0.0.1',
>         'port'            => 389,
>         'version'         => 3,
>         'tls'             => false,
>         'binddn'          => '',
>         'bindpw'          => '',
>         'basedn'          => '',
>         'options'         => array(),
>         'filter'          => '(objectClass=*)',
>         'scope'           => 'sub',
>         'user'            => array(),
>         'auto_reconnect'  => false,
>         'min_backoff'     => 1,
>         'current_backoff' => 1,
>         'max_backoff'     => 32,
>         'cache'           => false,
>         'cachettl'        => 3600);

It's still not the answer to my question. These are just the default  
values that are used if no other configuration values are passed to  
the Horde_Ldap object. That happens in setConfig().

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the horde mailing list