Skip to Content.
Sympa Menu

en - Re: [sympa-users] auth ldap

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Antonio Casado <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-users] auth ldap
  • Date: Mon, 22 Jul 2019 12:35:37 +0200

Hi,

I'm trying to debug the code in "lib/Sympa/WWW/Auth.pm" (ldap_authentication sub)

    my $do_canonicalize =
        Conf::get_robot_conf($robot, 'ldap_force_canonical_email')
        || !Sympa::Tools::Text::valid_email($auth);
$log->syslog('notice', 'ldap_force_canonical_email (%s)', $do_canonicalize);
$log->syslog('notice', 'email_attribute (%s)', $ldap->{email_attribute});
    if ($do_canonicalize and $ldap->{email_attribute}) {
        my $values =
            $entry->get_value($ldap->{email_attribute}, alloptions => 1);
$log->syslog('notice', 'values (%s)', $values);
        ($auth) =
            grep { Sympa::Tools::Text::valid_email($_) }
            map { @{$values->{$_}} } sort keys %{$values || {}};
    }

and these are the results in sympa.log:

Jul 22 12:20:33  wwsympa[18155]: info main::do_login(pepe) [robot lista.ual.es] [session 56400] [client 192.168.x.x]
Jul 22 12:20:33  wwsympa[18155]: notice Sympa::WWW::Auth::ldap_authentication() ldap_force_canonical_email (1)
Jul 22 12:20:33  wwsympa[18155]: notice Sympa::WWW::Auth::ldap_authentication() email_attribute (irismailmainaddress)
Jul 22 12:20:33  wwsympa[18155]: notice Sympa::WWW::Auth::ldap_authentication() values (HASH)

Can someone help me print the value of var $values?

Thanks you


El lun., 1 jul. 2019 a las 12:18, Antonio Casado (<address@concealed>) escribió:
Hi,

I use LDAP to auth my users and I have a little problem in /etc/sympa/auth.conf

ldap
         regexp                          ual\.es
         host                            ...
         bind_dn                         ...
         bind_password                   ...
         timeout                         20
         suffix                          cn=Users,dc=ual,dc=es
         get_dn_by_uid_filter            (uid=[sender])
         get_dn_by_email_filter          (|(mail=[sender])(irismailalternateaddress=[sender]))
         email_attribute                 irismailmainaddress
         scope                           sub


And my user in LDAP is:

uid: pepe
irisMailMainAddress: address@concealed
irisMailAlternateAddress: address@concealed

Since the mail field is multi-valued, wwsympa takes the first mail field as the user. Can I tell wwsympa to take irismailmainaddress or the value of [sender] as a user?

Thanks you.

--
Antonio Casado Rodríguez



--
Antonio Casado Rodríguez
Administrador de Servicios de Red y Seguridad TIC
Área de Comunicaciones
STIC (Servicio de las Tecnologías de la Información y las Comunicaciones)
UNIVERSIDAD DE ALMERÍA

Puede consultar la información adicional sobre confidencialidad de este email y protección de datos en nuestra página web http://www.ual.es/lopd-email
 - Responsable del Tratamiento: Universidad de Almería
 - Finalidad: Atender y dar respuesta a su petición o consulta y mantener los contactos y relaciones que se produzcan como consecuencia de la misma.
 - Derechos: Para el ejercicio de derechos de protección de datos diríjase a: http://www.ual.es/lopd-derechos



Archive powered by MHonArc 2.6.19+.

Top of Page