The cert "bootstrap" code now checks certs for validity
[freeradius.git] / raddb / eap.conf
1 # -*- text -*-
2 ##
3 ##  eap.conf -- Configuration for EAP types (PEAP, TTLS, etc.)
4 ##
5 ##      $Id$
6
7 #######################################################################
8 #
9 #  Whatever you do, do NOT set 'Auth-Type := EAP'.  The server
10 #  is smart enough to figure this out on its own.  The most
11 #  common side effect of setting 'Auth-Type := EAP' is that the
12 #  users then cannot use ANY other authentication method.
13 #
14 #  EAP types NOT listed here may be supported via the "eap2" module.
15 #  See experimental.conf for documentation.
16 #
17         eap {
18                 #  Invoke the default supported EAP type when
19                 #  EAP-Identity response is received.
20                 #
21                 #  The incoming EAP messages DO NOT specify which EAP
22                 #  type they will be using, so it MUST be set here.
23                 #
24                 #  For now, only one default EAP type may be used at a time.
25                 #
26                 #  If the EAP-Type attribute is set by another module,
27                 #  then that EAP type takes precedence over the
28                 #  default type configured here.
29                 #
30                 default_eap_type = md5
31
32                 #  A list is maintained to correlate EAP-Response
33                 #  packets with EAP-Request packets.  After a
34                 #  configurable length of time, entries in the list
35                 #  expire, and are deleted.
36                 #
37                 timer_expire     = 60
38
39                 #  There are many EAP types, but the server has support
40                 #  for only a limited subset.  If the server receives
41                 #  a request for an EAP type it does not support, then
42                 #  it normally rejects the request.  By setting this
43                 #  configuration to "yes", you can tell the server to
44                 #  instead keep processing the request.  Another module
45                 #  MUST then be configured to proxy the request to
46                 #  another RADIUS server which supports that EAP type.
47                 #
48                 #  If another module is NOT configured to handle the
49                 #  request, then the request will still end up being
50                 #  rejected.
51                 ignore_unknown_eap_types = no
52
53                 # Cisco AP1230B firmware 12.2(13)JA1 has a bug.  When given
54                 # a User-Name attribute in an Access-Accept, it copies one
55                 # more byte than it should.
56                 #
57                 # We can work around it by configurably adding an extra
58                 # zero byte.
59                 cisco_accounting_username_bug = no
60
61                 #
62                 #  Help prevent DoS attacks by limiting the number of
63                 #  sessions that the server is tracking.  Most systems
64                 #  can handle ~30 EAP sessions/s, so the default limit
65                 #  of 4096 should be OK.
66                 max_sessions = 4096
67
68                 # Supported EAP-types
69
70                 #
71                 #  We do NOT recommend using EAP-MD5 authentication
72                 #  for wireless connections.  It is insecure, and does
73                 #  not provide for dynamic WEP keys.
74                 #
75                 md5 {
76                 }
77
78                 # Cisco LEAP
79                 #
80                 #  We do not recommend using LEAP in new deployments.  See:
81                 #  http://www.securiteam.com/tools/5TP012ACKE.html
82                 #
83                 #  Cisco LEAP uses the MS-CHAP algorithm (but not
84                 #  the MS-CHAP attributes) to perform it's authentication.
85                 #
86                 #  As a result, LEAP *requires* access to the plain-text
87                 #  User-Password, or the NT-Password attributes.
88                 #  'System' authentication is impossible with LEAP.
89                 #
90                 leap {
91                 }
92
93                 #  Generic Token Card.
94                 #
95                 #  Currently, this is only permitted inside of EAP-TTLS,
96                 #  or EAP-PEAP.  The module "challenges" the user with
97                 #  text, and the response from the user is taken to be
98                 #  the User-Password.
99                 #
100                 #  Proxying the tunneled EAP-GTC session is a bad idea,
101                 #  the users password will go over the wire in plain-text,
102                 #  for anyone to see.
103                 #
104                 gtc {
105                         #  The default challenge, which many clients
106                         #  ignore..
107                         #challenge = "Password: "
108
109                         #  The plain-text response which comes back
110                         #  is put into a User-Password attribute,
111                         #  and passed to another module for
112                         #  authentication.  This allows the EAP-GTC
113                         #  response to be checked against plain-text,
114                         #  or crypt'd passwords.
115                         #
116                         #  If you say "Local" instead of "PAP", then
117                         #  the module will look for a User-Password
118                         #  configured for the request, and do the
119                         #  authentication itself.
120                         #
121                         auth_type = PAP
122                 }
123
124                 ## EAP-TLS
125                 #
126                 #  See raddb/certs/README for additional comments
127                 #  on certificates.
128                 #
129                 #  If OpenSSL was not found at the time the server was
130                 #  built, the "tls", "ttls", and "peap" sections will
131                 #  be ignored.
132                 #
133                 #  Otherwise, when the server first starts in debugging
134                 #  mode, test certificates will be created.  See the
135                 #  "make_cert_command" below for details, and the README
136                 #  file in raddb/certs
137                 #
138                 #  These test certificates SHOULD NOT be used in a normal
139                 #  deployment.  They are created only to make it easier
140                 #  to install the server, and to perform some simple
141                 #  tests with EAP-TLS, TTLS, or PEAP.
142                 #
143                 #  See also:
144                 #
145                 #  http://www.dslreports.com/forum/remark,9286052~mode=flat
146                 #
147                 #  Note that you should NOT use a globally known CA here!
148                 #  e.g. using a Verisign cert as a "known CA" means that
149                 #  ANYONE who has a certificate signed by them can
150                 #  authenticate via EAP-TLS!  This is likey not what you want.
151                 tls {
152                         #
153                         #  These is used to simplify later configurations.
154                         #
155                         certdir = ${confdir}/certs
156                         cadir = ${confdir}/certs
157
158                         private_key_password = whatever
159                         private_key_file = ${certdir}/server.pem
160
161                         #  If Private key & Certificate are located in
162                         #  the same file, then private_key_file &
163                         #  certificate_file must contain the same file
164                         #  name.
165                         #
166                         #  If CA_file (below) is not used, then the
167                         #  certificate_file below MUST include not
168                         #  only the server certificate, but ALSO all
169                         #  of the CA certificates used to sign the
170                         #  server certificate.
171                         certificate_file = ${certdir}/server.pem
172
173                         #  Trusted Root CA list
174                         #
175                         #  ALL of the CA's in this list will be trusted
176                         #  to issue client certificates for authentication.
177                         #
178                         #  In general, you should use self-signed
179                         #  certificates for 802.1x (EAP) authentication.
180                         #  In that case, this CA file should contain
181                         #  *one* CA certificate.
182                         #
183                         #  This parameter is used only for EAP-TLS,
184                         #  when you issue client certificates.  If you do
185                         #  not use client certificates, and you do not want
186                         #  to permit EAP-TLS authentication, then delete
187                         #  this configuration item.
188                         CA_file = ${cadir}/ca.pem
189
190                         #
191                         #  For DH cipher suites to work, you have to
192                         #  run OpenSSL to create the DH file first:
193                         #
194                         #       openssl dhparam -out certs/dh 1024
195                         #
196                         dh_file = ${certdir}/dh
197                         random_file = ${certdir}/random
198
199                         #
200                         #  This can never exceed the size of a RADIUS
201                         #  packet (4096 bytes), and is preferably half
202                         #  that, to accomodate other attributes in
203                         #  RADIUS packet.  On most APs the MAX packet
204                         #  length is configured between 1500 - 1600
205                         #  In these cases, fragment size should be
206                         #  1024 or less.
207                         #
208                 #       fragment_size = 1024
209
210                         #  include_length is a flag which is
211                         #  by default set to yes If set to
212                         #  yes, Total Length of the message is
213                         #  included in EVERY packet we send.
214                         #  If set to no, Total Length of the
215                         #  message is included ONLY in the
216                         #  First packet of a fragment series.
217                         #
218                 #       include_length = yes
219
220                         #  Check the Certificate Revocation List
221                         #
222                         #  1) Copy CA certificates and CRLs to same directory.
223                         #  2) Execute 'c_rehash <CA certs&CRLs Directory>'.
224                         #    'c_rehash' is OpenSSL's command.
225                         #  3) uncomment the line below.
226                         #  5) Restart radiusd
227                 #       check_crl = yes
228                         CA_path = ${cadir}
229
230                        #
231                        #  If check_cert_issuer is set, the value will
232                        #  be checked against the DN of the issuer in
233                        #  the client certificate.  If the values do not
234                        #  match, the cerficate verification will fail,
235                        #  rejecting the user.
236                        #
237                        #  In 2.1.10 and later, this check can be done
238                        #  more generally by checking the value of the
239                        #  TLS-Client-Cert-Issuer attribute.  This check
240                        #  can be done via any mechanism you choose.
241                        #
242                 #       check_cert_issuer = "/C=GB/ST=Berkshire/L=Newbury/O=My Company Ltd"
243
244                        #
245                        #  If check_cert_cn is set, the value will
246                        #  be xlat'ed and checked against the CN
247                        #  in the client certificate.  If the values
248                        #  do not match, the certificate verification
249                        #  will fail rejecting the user.
250                        #
251                        #  This check is done only if the previous
252                        #  "check_cert_issuer" is not set, or if
253                        #  the check succeeds.
254                        #
255                        #  In 2.1.10 and later, this check can be done
256                        #  more generally by checking the value of the
257                        #  TLS-Client-Cert-CN attribute.  This check
258                        #  can be done via any mechanism you choose.
259                        #
260                 #       check_cert_cn = %{User-Name}
261                 #
262                         # Set this option to specify the allowed
263                         # TLS cipher suites.  The format is listed
264                         # in "man 1 ciphers".
265                         cipher_list = "DEFAULT"
266
267                         #
268
269                         # This command creates the initial "snake oil"
270                         # certificates when the server is run as root,
271                         # and via "radiusd -X".
272                         #
273                         # As of 2.1.11, it *also* checks the server
274                         # certificate for validity, including expiration.
275                         # This means that radiusd will refuse to start
276                         # when the certificate has expired.  The alternative
277                         # is to have the 802.1X clients refuse to connect
278                         # when they discover the certificate has expired.
279                         #
280                         # Debugging client issues is hard, so it's better
281                         # for the server to print out an error message,
282                         # and refuse to start.
283                         #
284                         make_cert_command = "${certdir}/bootstrap"
285
286                         #
287                         #  Session resumption / fast reauthentication
288                         #  cache.
289                         #
290                         #  The cache contains the following information:
291                         #
292                         #  session Id - unique identifier, managed by SSL
293                         #  User-Name  - from the Access-Accept
294                         #  Stripped-User-Name - from the Access-Request
295                         #  Cached-Session-Policy - from the Access-Accept
296                         #
297                         #  The "Cached-Session-Policy" is the name of a
298                         #  policy which should be applied to the cached
299                         #  session.  This policy can be used to assign
300                         #  VLANs, IP addresses, etc.  It serves as a useful
301                         #  way to re-apply the policy from the original
302                         #  Access-Accept to the subsequent Access-Accept
303                         #  for the cached session.
304                         #
305                         #  On session resumption, these attributes are
306                         #  copied from the cache, and placed into the
307                         #  reply list.
308                         #
309                         #  You probably also want "use_tunneled_reply = yes"
310                         #  when using fast session resumption.
311                         #
312                         cache {
313                               #
314                               #  Enable it.  The default is "no".
315                               #  Deleting the entire "cache" subsection
316                               #  Also disables caching.
317                               #
318                               #  You can disallow resumption for a
319                               #  particular user by adding the following
320                               #  attribute to the control item list:
321                               #
322                               #         Allow-Session-Resumption = No
323                               #
324                               #  If "enable = no" below, you CANNOT
325                               #  enable resumption for just one user
326                               #  by setting the above attribute to "yes".
327                               #
328                               enable = no
329
330                               #
331                               #  Lifetime of the cached entries, in hours.
332                               #  The sessions will be deleted after this
333                               #  time.
334                               #
335                               lifetime = 24 # hours
336
337                               #
338                               #  The maximum number of entries in the
339                               #  cache.  Set to "0" for "infinite".
340                               #
341                               #  This could be set to the number of users
342                               #  who are logged in... which can be a LOT.
343                               #
344                               max_entries = 255
345                         }
346
347                         #
348                         #  As of version 2.1.10, client certificates can be
349                         #  validated via an external command.  This allows
350                         #  dynamic CRLs or OCSP to be used.
351                         #
352                         #  This configuration is commented out in the
353                         #  default configuration.  Uncomment it, and configure
354                         #  the correct paths below to enable it.
355                         #
356                         verify {
357                                 #  A temporary directory where the client
358                                 #  certificates are stored.  This directory
359                                 #  MUST be owned by the UID of the server,
360                                 #  and MUST not be accessible by any other
361                                 #  users.  When the server starts, it will do
362                                 #  "chmod go-rwx" on the directory, for
363                                 #  security reasons.  The directory MUST
364                                 #  exist when the server starts.
365                                 #
366                                 #  You should also delete all of the files
367                                 #  in the directory when the server starts.
368                 #               tmpdir = /tmp/radiusd
369
370                                 #  The command used to verify the client cert.
371                                 #  We recommend using the OpenSSL command-line
372                                 #  tool.
373                                 #
374                                 #  The ${..CA_path} text is a reference to
375                                 #  the CA_path variable defined above.
376                                 #
377                                 #  The %{TLS-Client-Cert-Filename} is the name
378                                 #  of the temporary file containing the cert
379                                 #  in PEM format.  This file is automatically
380                                 #  deleted by the server when the command
381                                 #  returns.
382                 #               client = "/path/to/openssl verify -CApath ${..CA_path} %{TLS-Client-Cert-Filename}"
383                         }
384                 }
385
386                 #  The TTLS module implements the EAP-TTLS protocol,
387                 #  which can be described as EAP inside of Diameter,
388                 #  inside of TLS, inside of EAP, inside of RADIUS...
389                 #
390                 #  Surprisingly, it works quite well.
391                 #
392                 #  The TTLS module needs the TLS module to be installed
393                 #  and configured, in order to use the TLS tunnel
394                 #  inside of the EAP packet.  You will still need to
395                 #  configure the TLS module, even if you do not want
396                 #  to deploy EAP-TLS in your network.  Users will not
397                 #  be able to request EAP-TLS, as it requires them to
398                 #  have a client certificate.  EAP-TTLS does not
399                 #  require a client certificate.
400                 #
401                 #  You can make TTLS require a client cert by setting
402                 #
403                 #       EAP-TLS-Require-Client-Cert = Yes
404                 #
405                 #  in the control items for a request.
406                 #
407                 ttls {
408                         #  The tunneled EAP session needs a default
409                         #  EAP type which is separate from the one for
410                         #  the non-tunneled EAP module.  Inside of the
411                         #  TTLS tunnel, we recommend using EAP-MD5.
412                         #  If the request does not contain an EAP
413                         #  conversation, then this configuration entry
414                         #  is ignored.
415                         default_eap_type = md5
416
417                         #  The tunneled authentication request does
418                         #  not usually contain useful attributes
419                         #  like 'Calling-Station-Id', etc.  These
420                         #  attributes are outside of the tunnel,
421                         #  and normally unavailable to the tunneled
422                         #  authentication request.
423                         #
424                         #  By setting this configuration entry to
425                         #  'yes', any attribute which NOT in the
426                         #  tunneled authentication request, but
427                         #  which IS available outside of the tunnel,
428                         #  is copied to the tunneled request.
429                         #
430                         # allowed values: {no, yes}
431                         copy_request_to_tunnel = no
432
433                         #  The reply attributes sent to the NAS are
434                         #  usually based on the name of the user
435                         #  'outside' of the tunnel (usually
436                         #  'anonymous').  If you want to send the
437                         #  reply attributes based on the user name
438                         #  inside of the tunnel, then set this
439                         #  configuration entry to 'yes', and the reply
440                         #  to the NAS will be taken from the reply to
441                         #  the tunneled request.
442                         #
443                         # allowed values: {no, yes}
444                         use_tunneled_reply = no
445
446                         #
447                         #  The inner tunneled request can be sent
448                         #  through a virtual server constructed
449                         #  specifically for this purpose.
450                         #
451                         #  If this entry is commented out, the inner
452                         #  tunneled request will be sent through
453                         #  the virtual server that processed the
454                         #  outer requests.
455                         #
456                         virtual_server = "inner-tunnel"
457
458                         #  This has the same meaning as the
459                         #  same field in the "tls" module, above.
460                         #  The default value here is "yes".
461                 #       include_length = yes
462                 }
463
464                 ##################################################
465                 #
466                 #  !!!!! WARNINGS for Windows compatibility  !!!!!
467                 #
468                 ##################################################
469                 #
470                 #  If you see the server send an Access-Challenge,
471                 #  and the client never sends another Access-Request,
472                 #  then
473                 #
474                 #               STOP!
475                 #
476                 #  The server certificate has to have special OID's
477                 #  in it, or else the Microsoft clients will silently
478                 #  fail.  See the "scripts/xpextensions" file for
479                 #  details, and the following page:
480                 #
481                 #       http://support.microsoft.com/kb/814394/en-us
482                 #
483                 #  For additional Windows XP SP2 issues, see:
484                 #
485                 #       http://support.microsoft.com/kb/885453/en-us
486                 #
487                 #
488                 #  If is still doesn't work, and you're using Samba,
489                 #  you may be encountering a Samba bug.  See:
490                 #
491                 #       https://bugzilla.samba.org/show_bug.cgi?id=6563
492                 #
493                 #  Note that we do not necessarily agree with their
494                 #  explanation... but the fix does appear to work.
495                 #
496                 ##################################################
497
498                 #
499                 #  The tunneled EAP session needs a default EAP type
500                 #  which is separate from the one for the non-tunneled
501                 #  EAP module.  Inside of the TLS/PEAP tunnel, we
502                 #  recommend using EAP-MS-CHAPv2.
503                 #
504                 #  The PEAP module needs the TLS module to be installed
505                 #  and configured, in order to use the TLS tunnel
506                 #  inside of the EAP packet.  You will still need to
507                 #  configure the TLS module, even if you do not want
508                 #  to deploy EAP-TLS in your network.  Users will not
509                 #  be able to request EAP-TLS, as it requires them to
510                 #  have a client certificate.  EAP-PEAP does not
511                 #  require a client certificate.
512                 #
513                 #
514                 #  You can make PEAP require a client cert by setting
515                 #
516                 #       EAP-TLS-Require-Client-Cert = Yes
517                 #
518                 #  in the control items for a request.
519                 #
520                 peap {
521                         #  The tunneled EAP session needs a default
522                         #  EAP type which is separate from the one for
523                         #  the non-tunneled EAP module.  Inside of the
524                         #  PEAP tunnel, we recommend using MS-CHAPv2,
525                         #  as that is the default type supported by
526                         #  Windows clients.
527                         default_eap_type = mschapv2
528
529                         #  the PEAP module also has these configuration
530                         #  items, which are the same as for TTLS.
531                         copy_request_to_tunnel = no
532                         use_tunneled_reply = no
533
534                         #  When the tunneled session is proxied, the
535                         #  home server may not understand EAP-MSCHAP-V2.
536                         #  Set this entry to "no" to proxy the tunneled
537                         #  EAP-MSCHAP-V2 as normal MSCHAPv2.
538                 #       proxy_tunneled_request_as_eap = yes
539
540                         #
541                         #  The inner tunneled request can be sent
542                         #  through a virtual server constructed
543                         #  specifically for this purpose.
544                         #
545                         #  If this entry is commented out, the inner
546                         #  tunneled request will be sent through
547                         #  the virtual server that processed the
548                         #  outer requests.
549                         #
550                         virtual_server = "inner-tunnel"
551
552                         # This option enables support for MS-SoH
553                         # see doc/SoH.txt for more info.
554                         # It is disabled by default.
555                         #
556 #                       soh = yes
557
558                         #
559                         # The SoH reply will be turned into a request which
560                         # can be sent to a specific virtual server:
561                         #
562 #                       soh_virtual_server = "soh-server"
563                 }
564
565                 #
566                 #  This takes no configuration.
567                 #
568                 #  Note that it is the EAP MS-CHAPv2 sub-module, not
569                 #  the main 'mschap' module.
570                 #
571                 #  Note also that in order for this sub-module to work,
572                 #  the main 'mschap' module MUST ALSO be configured.
573                 #
574                 #  This module is the *Microsoft* implementation of MS-CHAPv2
575                 #  in EAP.  There is another (incompatible) implementation
576                 #  of MS-CHAPv2 in EAP by Cisco, which FreeRADIUS does not
577                 #  currently support.
578                 #
579                 mschapv2 {
580                 }
581         }