From 144be244508cbdfedb57434efe0676a52bb0416d Mon Sep 17 00:00:00 2001 From: Eric Zounes Date: Mon, 8 Jun 2015 14:39:43 -0700 Subject: [PATCH] Add ldap auth define type. --- manifests/config/authentication_ldap.pp | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 manifests/config/authentication_ldap.pp diff --git a/manifests/config/authentication_ldap.pp b/manifests/config/authentication_ldap.pp new file mode 100644 index 0000000..50b8824 --- /dev/null +++ b/manifests/config/authentication_ldap.pp @@ -0,0 +1,50 @@ +define icingaweb2::config::authentication_ldap ( + $auth_section = undef, + $auth_resource = undef, + $backend = 'ldap', + $user_class = 'inetOrgPerson', + $filter = '', + $user_name_attribute = 'uid', + $base_dn = undef, +){ + + Ini_Setting { + ensure => present, + section => $auth_section, + require => File["${::icingaweb2::config_dir}/authentication.ini"], + path => "${::icingaweb2::config_dir}/authentication.ini", + } + + ini_setting { "icingaweb2 authentication ${title} resource": + setting => 'resource', + value => "\"${auth_resource}\"", + } + + ini_setting { "icingaweb2 authentication ${title} backend": + setting => 'backend', + value => "\"${backend}\"", + } + + ini_setting { "icingaweb2 authentication ${title} user_class": + setting => 'user_class', + value => "\"${user_class}\"", + } + + ini_setting { "icingaweb2 authentication ${title} filter": + setting => 'filter', + value => "\"${filter}\"", + } + + ini_setting { "icingaweb2 authentication ${title} user_name_attribute": + setting => 'user_name_attribute', + value => "\"${user_name_attribute}\"", + } + + ini_setting { "icingaweb2 authentication ${title} base_dn": + setting => 'base_dn', + value => "\"${base_dn}\"", + } + + +} +