Added tunnel attributes
[freeradius.git] / raddb / experimental.conf
1 #
2 #  This file contains the configuration for experimental modules.
3 #
4 #  By default, it is NOT included in the build.
5 #
6 #  $Id$
7 #
8
9         # Configuration for the Python module.
10         #
11         # Where radiusd is a Python module, radiusd.py, and the
12         # function 'authorize' is called.  Here is a dummy piece
13         # of code:
14         # 
15         #       def authorize(params):
16         #           print params
17         #           return (5, ('Reply-Message', 'banned'))
18         #
19         # The RADIUS value-pairs are passed as a tuple of tuple
20         # pairs as the first argument, e.g. (('attribute1',
21         # 'value1'), ('attribute2', 'value2'))
22         #
23         # The function return is a tuple with the first element
24         # being the return value of the function.
25         # The 5 corresponds to RLM_MODULE_USERLOCK. I plan to
26         # write the return values as Python symbols to avoid
27         # confusion.
28         #
29         # The remaining tuple members are the string form of
30         # value-pairs which are passed on to pairmake().
31         #
32         python {
33                 mod_instantiate = radiusd_test
34                 func_instantiate = instantiate
35
36                 mod_authorize = radiusd_test
37                 func_authorize = authorize
38
39                 mod_accounting = radiusd_test
40                 func_accounting = accounting
41
42                 mod_preproxy = radiusd_test
43                 func_preproxy = preproxy
44
45                 mod_postproxy = radiusd_test
46                 func_postproxy = postproxy
47
48                 mod_postauth = radiusd_test
49                 func_postauth = postauth
50
51                 mod_detach = radiusd_test
52                 func_detach = detach
53         }
54
55         
56         # Configuration for the example module.  Uncommenting it will cause it
57         # to get loaded and initialized, but should have no real effect as long
58         # it is not referencened in one of the autz/auth/preacct/acct sections
59         example {
60                 #  Boolean variable.
61                 # allowed values: {no, yes}
62                 boolean = yes
63
64                 #  An integer, of any value.
65                 integer = 16
66
67                 #  A string.
68                 string = "This is an example configuration string"
69
70                 # An IP address, either in dotted quad (1.2.3.4) or hostname
71                 # (example.com)
72                 ipaddr = 127.0.0.1
73
74                 # A subsection
75                 mysubsection {
76                         anotherinteger = 1000
77                         # They nest
78                         deeply nested {
79                                 string = "This is a different string"
80                         }
81                 }
82         }
83
84         #
85         #  To create a dbm users file, do:
86         #
87         #   cat test.users | rlm_dbm_parser -f /etc/raddb/users_db
88         #
89         #  Then add 'dbm' in 'authorize' section.
90         #
91         #  Note that even if the file has a ".db" or ".dbm" extension,
92         #  you may have to specify it here without that extension.  This
93         #  is because the DBM libraries "helpfully" add a ".db" to the
94         #  filename, but don't check if it's already there.
95         #
96         dbm {
97                 usersfile = ${confdir}/users_db
98         }
99
100         #
101         #  Perform NT-Domain authentication.  This only works
102         #  with PAP authentication.  That is, Authentication-Request
103         #  packets containing a User-Password attribute.
104         #
105         #  To use it, add 'smb' into the 'authenticate' section,
106         #  and then in another module (usually the 'users' file),
107         #  set 'Auth-Type := SMB'
108         #
109         #  WARNING: this module is not only experimental, it's also
110         #  a security threat. It's not recommended to use it until
111         #  it gets fixed.
112         #
113         smb {
114                 server = ntdomain.server.example.com
115                 backup = backup.server.example.com
116                 domain = NTDOMAIN
117         }
118
119         # See doc/rlm_fastusers before using this
120         # module or changing these values.
121         #
122         fastusers {
123                 usersfile = ${confdir}/users_fast
124                 hashsize = 1000
125                 compat = no
126                 # Reload the hash every 600 seconds (10mins)
127                 hash_reload = 600
128         }
129
130         # Caching module
131         #
132         # Should be added in the post-auth section (after all other modules)
133         # and in the authorize section (before any other modules)
134         #
135         # authorize {
136         #       caching {
137         #               ok = return
138         #       }
139         #       [... other modules ...]
140         # }
141         # post-auth {
142         #       [... other modules ...]
143         #       caching
144         # }
145         #
146         # The caching module will cache the Auth-Type and reply items
147         # and send them back on any subsequent requests for the same key
148         #
149         # Configuration:
150         #
151         # filename: The gdbm file to use for the cache database
152         #               (can be memory mapped for more speed)
153         #
154         # key: A string to xlat and use as a key. For instance,
155         #       "%{Acct-Unique-Session-Id}"
156         #
157         # post-auth: If we find a cached entry, set the post-auth to that value
158         #
159         # cache-ttl: The time to cache the entry. The same time format
160         #               as the counter module apply here.
161         #         num[hdwm] where:
162         #       h: hours, d: days, w: weeks, m: months
163         #       If the letter is ommited days will be assumed.
164         #       e.g. 1d == one day
165         #
166         # cache-size: The gdbm cache size to request (default 1000)
167         #
168         # hit-ratio: If set to non-zero we print out statistical
169         #       information after so many cache requests
170         #
171         # cache-rejects: Do we also cache rejects, or not? (default 'yes')
172         #
173         caching {
174                 filename = ${db_dir}/db.cache
175                 cache-ttl = 1d
176                 hit-ratio = 1000
177                 key = "%{Acct-Unique-Session-Id}"
178                 #post-auth = ""
179                 # cache-size = 2000
180                 # cache-rejects = yes
181         }
182
183
184         # Simple module for logging of Account packets to radiusd.log
185         # You need to declare it in the accounting section for it to work
186         acctlog {
187                 acctlog_update = ""
188                 acctlog_start = "Connect: [%{User-Name}] (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} ip %{Framed-IP-Address})"
189                 acctlog_stop = "Disconnect: [%{User-Name}] (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} ip %{Framed-IP-Address}) %{Acct-Session-Time} seconds"
190                 acctlog_on = "NAS %C (%{NAS-IP-Address}) just came online"
191                 acctlog_off = "NAS %C (%{NAS-IP-Address}) just went offline"
192         }
193
194         # Another implementation of the EAP module.
195         #
196         #  This module requires the libeap.so file from the hostap
197         #  software (http://hostap.epitest.fi/hostapd/).  It has been
198         #  tested on the development version of hostapd (0.6.1) ONLY.
199         #
200         #  In order to use it, you MUST build a "libeap.so" in hostapd,
201         #  which is not done by default.
202         #
203         #  You MUST also edit the file: src/modules/rlm_eap2/Makefile
204         #  to point to the location of the hostap include files.
205         #
206         #  This module CANNOT be used in the same way as the current
207         #  FreeRADIUS "eap" module.  There is NO way to look inside of
208         #  a tunneled request.  There is NO way to proxy a tunneled
209         #  request.  There is NO way to even look at the user name inside
210         #  of the tunneled request.  There is NO way to control the
211         #  choice of EAP types inside of the tunnel.  You MUST force
212         #  the server to choose "eap2" for authentication, because this
213         #  module has no "authorize" section.
214         #
215         #  If you want to use this module for experimentation, please
216         #  post your comments to the freeradius-devel list:
217         #
218         #    http://lists.freeradius.org/mailman/listinfo/freeradius-devel
219         #
220         #  If you want to use this module in a production (i.e. real-world)
221         #  environment:
222         #
223         #       !!! DO NOT USE IT IN A PRODUCTION ENVIRONMENT !!!
224         #
225         #  The module needs additional work to make it ready for
226         #  production use..  Please supply patches, or sponsor the
227         #  work by hiring a developer.  Do NOT ask when the work will
228         #  be done, because there is no plan to finish this module
229         #  unless there is demand for it.
230         #
231         eap2 {
232                 #  EAP types are chosen in the order that they are
233                 #  listed in this section.  There is no "default_eap_type"
234                 #  as with rlm_eap.  Instead, the *first* EAP type is
235                 #  used as the default type.
236                 #
237                 peap {
238                 }
239
240                 ttls {
241                 }
242
243                 #  This is the ONLY EAP type that has any configuration.
244                 #  All other EAP types have no configuration.
245                 #
246                 tls {
247                         ca_cert = ${confdir}/certs/ca.pem
248                         server_cert = ${confdir}/certs/server.pem
249                         private_key_file = ${confdir}/certs/server.pem
250                         private_key_password = whatever
251                 }
252
253                 #
254                 #  These next two methods do not supply keying material.
255                 #
256                 md5 {
257                 }
258
259                 mschapv2 {
260                 }
261
262                 #  LEAP is NOT supported by this module.
263                 #  Use the "eap" module instead.
264
265                 #  For other methods that MIGHT work, see the
266                 #  configuration of hostap.  The methods are statically
267                 #  linked in at compile time, and cannot be controlled
268                 #  here.
269         }
270
271         #  Configuration for experimental EAP types.  The sub-sections
272         #  can be copied into eap.conf.
273         eap {
274                 ikev2 {
275
276                 # Server auth type 
277                 # Allowed values are:
278                 #  cert   - for certificate based server authentication,
279                 #           other required settings for this type are
280                 #           'private_key_file' and 'certificate_file'
281                 #  secret - for shared secret based server authentication, 
282                 #           other required settings for this type is 'id'
283                 # Default value of this option is 'secret'
284         #     server_authtype=cert
285
286                 # Allowed default client auth types
287                 # Allowed values are:
288                 #   secret - for shared secret based client     authentication
289                 #   cert   - for certificate based client authentication
290                 #   both   - shared secret and certificate is allowed
291                 #   none   - authentication will always fail
292                 # Default value for this option is 'both'. This option could
293                 #  be overwritten within 'usersfile' file by EAP-IKEv2-Auth
294                 #  option. 
295         #   default_authtype = both
296
297                 # path to trusted CA certificate file
298                 CA_file="/path/to/CA/cacert.pem"
299
300                 # path to CRL file, if not set, then there will be no
301                 #  checks against CRL
302         #   crl_file="/path/to/crl.pem"
303
304                 # path to file with user settings 
305                 #
306                 #  Note that this file is read ONLY on module initialization!
307                 #
308                 # default ${confdir}/eap_ikev2_users
309         #   usersfile=${confdir}/eap_ikev2_users
310
311 #
312 #  Sample "eap_ikev2_users" file entry:
313 #
314 #username  EAP-IKEv2-IDType := KEY_ID,  EAP-IKEv2-Secret := "tajne"
315
316 ## where:
317 ## username           - client user name from IKE-AUTH (IDr)  or CommonName
318 ##                      from x509 certificate
319 ## EAP-IKEv2-IDType   - ID Type - same as in expected IDType payload
320 ##                      allowable attributes for EAP-IKEv2-IDType:
321 ##                      IPV4_ADDR FQDN RFC822_ADDR IPV6_ADDR DER_ASN1_DN
322 ##                      DER_ASN1_GN KEY_ID
323 ## EAP-IKEv2-Secret   - shared secret
324 ## EAP-IKEv2-AuthType - optional parameter which defines expected client auth
325 ##                      type. Allowed values are: secret,cert,both,none.
326 ##                      For the meaning of this values, please see the
327 ##                      description of 'default_authtype'.
328 ##                      This attribute can overwrite 'default_authtype' value.
329
330
331
332                 # path to  file with server private key
333                 private_key_file="/path/to/srv-private-key.pem"
334
335                 # password to private key file
336                 private_key_password="passwd"
337
338                 # path to file with server certificate
339                 certificate_file="/path/to/srv-cert.pem"
340
341                 # server identity string
342                 id="deMaio"
343
344                 # Server identity type. Allowed values are:
345                 # IPV4_ADDR, FQDN, RFC822_ADDR, IPV6_ADDR, ASN1_DN, ASN1_GN,
346                 #  KEY_ID
347                 # Default value is:     KEY_ID
348         #   id_type = KEY_ID
349
350
351                 # MTU (default: 1398)
352         #   fragment_size = 1398
353     
354                 # maximal allowed number of resends SA_INIT after receiving
355                 # 'invalid KEY' notification (default 3)
356         #   DH_counter_max = 3
357
358                 # option which is used to control whenever send CERT REQ
359                 #  payload or not.
360                 # Allowed values for this option are "yes" or "no".
361                 #Default value is "no".
362         #   certreq = "yes"
363
364                 # option which cotrols fast reconnect capability.
365                 # Allowed valuse for this option are "yes" or "no".
366                 # Default value is "yes".
367         #   enable_fast_reauth = "no"
368     
369                 # option which is used to control performing of DH exchange
370                 #  during fast rekeying protocol run.
371                 # Allowed values for this option are "yes" or "no".
372                 # Default value is "no"
373         #   fast_DH_exchange = "yes"
374
375                 # Option which is used to set up expiration time of inactive
376                 #  IKEv2 session.
377                 # After selected period of time (in seconds), inactive
378                 # session data will be deleted.
379                 # Default value of this option is set to 900 seconds
380         #   fast_timer_expire = 900
381
382                 # list of server proposals of available cryptographic
383                 # suites
384                 proposals {
385                         # proposal number #1 
386                         proposal {
387
388                                 # Supported transforms types: encryption,
389                                 # prf, integrity, dhgroup. For multiple
390                                 # transforms just simple repeat key (i.e.
391                                 # integity).
392
393                                 # encryption algorithm
394                                 # supported algorithms:
395                                 # null,3des,aes_128_cbc,aes_192_cbc,
396                                 # aes_256_cbc,idea
397                                 # blowfish:n, where n range from 8 to 448 bits,
398                                 #  step 8 bits
399                                 # cast:n, where n range from 40 to 128 bits,
400                                 #  step 8 bits 
401                                 encryption = 3des
402
403                                 # pseudo random function. Supported prf's:
404                                 # hmac_md5, hmac_sha1, hmac_tiger
405                                 prf = hmac_sha1
406
407                                 # integrity algorithm. Supported algorithms:
408                                 # hmac_md5_96, hmac_sha1_96,des_mac
409                                 integrity = hmac_sha1_96
410                                 integrity = hmac_md5_96
411
412                                 # Diffie-Hellman groups:
413                                 # modp768, modp1024, modp1536, modp2048, 
414                                 # modp3072, modp4096, modp6144, modp8192
415                                 dhgroup = modp2048 
416                         }
417                 
418                         # proposal number #2 
419                         proposal {
420                                 encryption = 3des
421                                 prf = hmac_md5
422                                 integrity = hmac_md5_96
423                                 dhgroup = modp1024
424                         }       
425
426                         # proposal number #3 
427                         proposal {
428                                 encryption=3des
429                                 prf=hmac_md5
430                                 integrity=hmac_md5_96
431                                 dhgroup=modp2048
432                         } 
433                 }
434                 }
435         }