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']
}
}
|