Puppet Class: freeradius::v3::modules::ldap

Inherits:
freeradius
Defined in:
manifests/v3/modules/ldap.pp

Summary

Set up the LDAP module configuration.

Overview

Parameters:

  • base_dn (String) (defaults to: simplib::lookup('simp_options::ldap::base_dn'))
  • app_pki_key (Stdlib::AbsolutePath) (defaults to: $freeradius::app_pki_key)

    Path and name of the private SSL key file

  • app_pki_cert (Stdlib::AbsolutePath) (defaults to: $freeradius::app_pki_cert)

    Path and name of the public SSL certificate

  • app_pki_ca_dir (Stdlib::AbsolutePath) (defaults to: $freeradius::app_pki_ca_dir)

    Path to the CA.

  • confdir (Stdlib::Absolutepath) (defaults to: $freeradius::confdir)

    Freeradius configuration directory

  • group (String) (defaults to: $freeradius::group)

    Group radiusd is running under.

  • base_filter (String) (defaults to: '(objectclass=radiusprofile)')
  • client_scope (Optional[Freeradius::Scope]) (defaults to: undef)
  • client_filter (String) (defaults to: '(objectClass=frClient)')
  • client_attribute_identifier (String) (defaults to: 'radiusClientIdentifier')
  • client_attribute_secret (String) (defaults to: 'radiusClientSecret')
  • client_attribute_shortname (Optional[String]) (defaults to: undef)
  • client_attribute_nas_type (Optional[String]) (defaults to: undef)
  • client_attribute_virtual_server (Optional[String]) (defaults to: undef)
  • client_attribute_require_message_authenticator (Optional[String]) (defaults to: undef)
  • default_profile (Optional[String]) (defaults to: undef)
  • group_scope (Optional[Freeradius::Scope]) (defaults to: undef)
  • group_filter (String) (defaults to: '(objectClass=posixGroup)')
  • group_name_attribute (String) (defaults to: 'cn')
  • group_membership_filter (String) (defaults to: '(|(&(objectClass=GroupOfNames)(member=%{control:Ldap-UserDn}))(&(objectClass=GroupOfUniqueNames)(uniquemember=%{control:Ldap-UserDn})))')
  • group_membership_attribute (String) (defaults to: 'memberOf')

    If this does not contain a value then Group Membership Checking will not be enabled.

  • group_cacheable_name (Boolean) (defaults to: false)
  • group_cacheable_dn (Boolean) (defaults to: false)
  • identity (String) (defaults to: simplib::lookup('simp_options::ldap::bind_dn', { 'default_value' => "cn=hostAuth,ou=Hosts,%{lookup('simp_options::ldap::base_dn')}", 'value_type' => String }))
  • ldap_connections_number (Integer[1]) (defaults to: 5)
  • ldap_debug (Optional[String]) (defaults to: undef)
  • ldap_timeout (Integer) (defaults to: 4)
  • ldap_timelimit (Integer) (defaults to: 3)
  • options_chase_referrals (Boolean) (defaults to: false)
  • options_dereference (Freeradius::Deref) (defaults to: 'never')
  • options_idle (Integer) (defaults to: 60)
  • options_interval (Integer) (defaults to: 3)
  • options_net_timeout (Integer) (defaults to: 1)
  • options_probes (Integer) (defaults to: 3)
  • options_rebind (Boolean) (defaults to: false)
  • password (String) (defaults to: simplib::lookup('simp_options::ldap::bind_pw'))
  • pool_start (Integer[1]) (defaults to: 5)
  • pool_min (Integer[1]) (defaults to: 4)
  • pool_max (Integer[1]) (defaults to: 10)
  • pool_spare (Integer[1]) (defaults to: 3)
  • pool_uses (Integer[0]) (defaults to: 0)
  • pool_lifetime (Integer[0]) (defaults to: 0)
  • pool_idle_timeout (Integer[1]) (defaults to: 60)
  • port (Simplib::Port) (defaults to: 389)
  • profile_attribute (Optional[String]) (defaults to: undef)
  • random_file (Stdlib::AbsolutePath) (defaults to: '/dev/urandom')
  • require_cert (String) (defaults to: 'demand')
  • retry_delay (Integer[1]) (defaults to: 30)
  • start_tls (Boolean) (defaults to: true)
  • user_filter (String) (defaults to: '(uid=%{%{Stripped-User-Name}:-%{User-Name}})')
  • user_access_attribute (Optional[String]) (defaults to: undef)
  • user_access_positive (Boolean) (defaults to: true)
  • user_scope (Optional[Freeradius::Scope]) (defaults to: undef)
  • server (Array[Simplib::Uri]) (defaults to: simplib::lookup('simp_options::ldap::uri'))
  • post_auth_content (Optional[String]) (defaults to: undef)

    Override the contents of the ‘post-auth` section of the configuration

    • Do NOT include the ‘post-auth` header or beginning or end curly brace

  • accounting_content (Optional[String]) (defaults to: undef)

    Override the contents of the ‘accounting` section of the configuration

    • Do NOT include the ‘accounting` header or beginning or end curly brace

  • content (Optional[String]) (defaults to: undef)

    Specify the entire contents of the configuration file

    • All other options will be ignored



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'manifests/v3/modules/ldap.pp', line 88

class freeradius::v3::modules::ldap (
  String                      $base_dn                                        = simplib::lookup('simp_options::ldap::base_dn'),
  String                      $password                                       = simplib::lookup('simp_options::ldap::bind_pw'),
  String                      $identity                                       = simplib::lookup('simp_options::ldap::bind_dn', { 'default_value' => "cn=hostAuth,ou=Hosts,%{lookup('simp_options::ldap::base_dn')}", 'value_type' => String }),
  Array[Simplib::Uri]         $server                                         = simplib::lookup('simp_options::ldap::uri'),
  Stdlib::AbsolutePath        $app_pki_ca_dir                                 = $freeradius::app_pki_ca_dir,
  Stdlib::AbsolutePath        $app_pki_cert                                   = $freeradius::app_pki_cert,
  Stdlib::AbsolutePath        $app_pki_key                                    = $freeradius::app_pki_key,
  Stdlib::Absolutepath        $confdir                                        = $freeradius::confdir,
  String                      $group                                          = $freeradius::group,
  String                      $base_filter                                    = '(objectclass=radiusprofile)',
  Optional[Freeradius::Scope] $client_scope                                   = undef,
  String                      $client_attribute_identifier                    = 'radiusClientIdentifier',
  String                      $client_attribute_secret                        = 'radiusClientSecret',
  Optional[String]            $client_attribute_shortname                     = undef,
  Optional[String]            $client_attribute_nas_type                      = undef,
  Optional[String]            $client_attribute_virtual_server                = undef,
  Optional[String]            $client_attribute_require_message_authenticator = undef,
  String                      $client_filter                                  = '(objectClass=frClient)',
  Optional[String]            $default_profile                                = undef,
  Optional[Freeradius::Scope] $group_scope                                    = undef,
  String                      $group_filter                                   = '(objectClass=posixGroup)',
  String                      $group_name_attribute                           = 'cn',
  String                      $group_membership_filter                        = '(|(&(objectClass=GroupOfNames)(member=%{control:Ldap-UserDn}))(&(objectClass=GroupOfUniqueNames)(uniquemember=%{control:Ldap-UserDn})))',
  String                      $group_membership_attribute                     = 'memberOf',
  Boolean                     $group_cacheable_name                           = false,
  Boolean                     $group_cacheable_dn                             = false,
  Integer[1]                  $ldap_connections_number                        = 5,
  Optional[String]            $ldap_debug                                     = undef,
  Integer                     $ldap_timeout                                   = 4,
  Integer                     $ldap_timelimit                                 = 3,
  Boolean                     $options_chase_referrals                        = false,
  Freeradius::Deref           $options_dereference                            = 'never',
  Integer                     $options_idle                                   = 60,
  Integer                     $options_interval                               = 3,
  Integer                     $options_net_timeout                            = 1,
  Integer                     $options_probes                                 = 3,
  Boolean                     $options_rebind                                 = false,
  Integer[1]                  $pool_start                                     = 5,
  Integer[1]                  $pool_min                                       = 4,
  Integer[1]                  $pool_max                                       = 10,
  Integer[1]                  $pool_spare                                     = 3,
  Integer[0]                  $pool_uses                                      = 0,
  Integer[0]                  $pool_lifetime                                  = 0,
  Integer[1]                  $pool_idle_timeout                              = 60,
  Simplib::Port               $port                                           = 389,
  Optional[String]            $profile_attribute                              = undef,
  Stdlib::AbsolutePath        $random_file                                    = '/dev/urandom',
  String                      $require_cert                                   = 'demand',
  Integer[1]                  $retry_delay                                    = 30,
  Boolean                     $start_tls                                      = true,
  String                      $user_filter                                    = '(uid=%{%{Stripped-User-Name}:-%{User-Name}})',
  Optional[String]            $user_access_attribute                          = undef,
  Boolean                     $user_access_positive                           = true,
  Optional[Freeradius::Scope] $user_scope                                     = undef,
  Optional[String]            $post_auth_content                              = undef,
  Optional[String]            $accounting_content                             = undef,
  Optional[String]            $content                                        = undef
) inherits freeradius {

  if $content {
    $_content = $content
  }
  else {
    $_content = template('freeradius/3/modules/ldap.erb')
  }

  file { "${confdir}/mods-enabled/ldap":
    owner   => 'root',
    group   => $group,
    mode    => '0640',
    content => $_content,
    require => File["${confdir}/mods-enabled"],
    notify  => Service['radiusd']
  }
}