Skip to content

Commit

Permalink
Add LDAP integration
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanDeveloper committed Jun 14, 2024
1 parent e8f2874 commit 07becb2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions osvars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ sympa_gettext_package: gettext
sympa_openssldev_package: libssl-dev
sympa_expatdev_package: libexpat1-dev
sympa_xml2dev_package: libxml2-dev
sympa_ldap_package: libnet-ldap-perl
sympa_zlibdev_package: zlib1g-dev

sympa_package_command: /usr/bin/sympa
Expand Down
1 change: 1 addition & 0 deletions osvars/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ sympa_cpanm_package: cpanminus
sympa_openssldev_package: libssl-dev
sympa_expatdev_package: libexpat1-dev
sympa_xml2dev_package: libxml2-dev
sympa_ldap_package: libnet-ldap-perl
sympa_zlibdev_package: zlib1g-dev

sympa_rsyslog_unix_user: syslog
Expand Down
4 changes: 4 additions & 0 deletions tasks/perl-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
package:
name: "{{ sympa_xml2dev_package }}"

- name: Install LDAP library
package:
name: "{{ sympa_ldap_package }}"

- name: Workaround for XML::LibXML installation problem on CentOS 7
package:
name: perl-XML-LibXML
Expand Down
18 changes: 18 additions & 0 deletions templates/auth.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,21 @@
user_table
regexp .*
{% endif %}

# LDAP
{% if sympa_config_ldap is defined %}
ldap
host {{ sympa_config_ldap.host}}
timeout {{ sympa_config_ldap.timeout | default('20') }}
bind_dn {{ sympa_config_ldap.bind_dn }}
bind_password {{ sympa_config_ldap.bind_password }}
suffix {{ sympa_config_ldap.base_dn }}
get_dn_by_uid_filter {{ sympa_config_ldap.get_dn_by_uid_filter }}
get_dn_by_email_filter {{ sympa_config_ldap.get_dn_by_email_filter }}
alternative_email_attribute {{ sympa_config_ldap.alternative_email_attribute | default('mail') }}
email_attribute {{ sympa_config_ldap.email_attribute | default('mail') }}
scope {{ sympa_config_ldap.scope | default('sub') }}
authentication_info_url {{ sympa_config_ldap.authentication_info_url }}
use_tls {{ sympa_config_ldap.use_tls }}
ca_verify {{ sympa_config_ldap.ca_verify | default('none') }}
{% endif %}

0 comments on commit 07becb2

Please sign in to comment.