Move OpenSSL init out of version check
[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.  For simplicity,
64                 #  this is taken from the "max_requests" directive in
65                 #  radiusd.conf.
66                 max_sessions = ${max_requests}
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 likely 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
198                         #
199                         #  If your system doesn't have /dev/urandom,
200                         #  you will need to create this file, and
201                         #  periodically change its contents.
202                         #
203                         #  For security reasons, FreeRADIUS doesn't
204                         #  write to files in its configuration
205                         #  directory.
206                         #
207 #                       random_file = ${certdir}/random
208
209                         #
210                         #  This can never exceed the size of a RADIUS
211                         #  packet (4096 bytes), and is preferably half
212                         #  that, to accomodate other attributes in
213                         #  RADIUS packet.  On most APs the MAX packet
214                         #  length is configured between 1500 - 1600
215                         #  In these cases, fragment size should be
216                         #  1024 or less.
217                         #
218                 #       fragment_size = 1024
219
220                         #  include_length is a flag which is
221                         #  by default set to yes If set to
222                         #  yes, Total Length of the message is
223                         #  included in EVERY packet we send.
224                         #  If set to no, Total Length of the
225                         #  message is included ONLY in the
226                         #  First packet of a fragment series.
227                         #
228                 #       include_length = yes
229
230                         #  Check the Certificate Revocation List
231                         #
232                         #  1) Copy CA certificates and CRLs to same directory.
233                         #  2) Execute 'c_rehash <CA certs&CRLs Directory>'.
234                         #    'c_rehash' is OpenSSL's command.
235                         #  3) uncomment the line below.
236                         #  5) Restart radiusd
237                 #       check_crl = yes
238                         CA_path = ${cadir}
239
240                        #
241                        #  If check_cert_issuer is set, the value will
242                        #  be checked against the DN of the issuer in
243                        #  the client certificate.  If the values do not
244                        #  match, the cerficate verification will fail,
245                        #  rejecting the user.
246                        #
247                        #  In 2.1.10 and later, this check can be done
248                        #  more generally by checking the value of the
249                        #  TLS-Client-Cert-Issuer attribute.  This check
250                        #  can be done via any mechanism you choose.
251                        #
252                 #       check_cert_issuer = "/C=GB/ST=Berkshire/L=Newbury/O=My Company Ltd"
253
254                        #
255                        #  If check_cert_cn is set, the value will
256                        #  be xlat'ed and checked against the CN
257                        #  in the client certificate.  If the values
258                        #  do not match, the certificate verification
259                        #  will fail rejecting the user.
260                        #
261                        #  This check is done only if the previous
262                        #  "check_cert_issuer" is not set, or if
263                        #  the check succeeds.
264                        #
265                        #  In 2.1.10 and later, this check can be done
266                        #  more generally by checking the value of the
267                        #  TLS-Client-Cert-CN attribute.  This check
268                        #  can be done via any mechanism you choose.
269                        #
270                 #       check_cert_cn = %{User-Name}
271                 #
272                         # Set this option to specify the allowed
273                         # TLS cipher suites.  The format is listed
274                         # in "man 1 ciphers".
275                         cipher_list = "DEFAULT"
276
277                         #
278                         # As part of checking a client certificate, the EAP-TLS
279                         # sets some attributes such as TLS-Client-Cert-CN. This
280                         # virtual server has access to these attributes, and can
281                         # be used to accept or reject the request.
282                         #
283                 #       virtual_server = check-eap-tls
284
285                         # This command creates the initial "snake oil"
286                         # certificates when the server is run as root,
287                         # and via "radiusd -X".
288                         #
289                         # As of 2.1.11, it *also* checks the server
290                         # certificate for validity, including expiration.
291                         # This means that radiusd will refuse to start
292                         # when the certificate has expired.  The alternative
293                         # is to have the 802.1X clients refuse to connect
294                         # when they discover the certificate has expired.
295                         #
296                         # Debugging client issues is hard, so it's better
297                         # for the server to print out an error message,
298                         # and refuse to start.
299                         #
300                         make_cert_command = "${certdir}/bootstrap"
301
302                         #
303                         #  Elliptical cryptography configuration
304                         #
305                         #  Only for OpenSSL >= 0.9.8.f
306                         #
307                         ecdh_curve = "prime256v1"
308
309                         #
310                         #  Session resumption / fast reauthentication
311                         #  cache.
312                         #
313                         #  The cache contains the following information:
314                         #
315                         #  session Id - unique identifier, managed by SSL
316                         #  User-Name  - from the Access-Accept
317                         #  Stripped-User-Name - from the Access-Request
318                         #  Cached-Session-Policy - from the Access-Accept
319                         #
320                         #  The "Cached-Session-Policy" is the name of a
321                         #  policy which should be applied to the cached
322                         #  session.  This policy can be used to assign
323                         #  VLANs, IP addresses, etc.  It serves as a useful
324                         #  way to re-apply the policy from the original
325                         #  Access-Accept to the subsequent Access-Accept
326                         #  for the cached session.
327                         #
328                         #  On session resumption, these attributes are
329                         #  copied from the cache, and placed into the
330                         #  reply list.
331                         #
332                         #  You probably also want "use_tunneled_reply = yes"
333                         #  when using fast session resumption.
334                         #
335                         cache {
336                               #
337                               #  Enable it.  The default is "no".
338                               #  Deleting the entire "cache" subsection
339                               #  Also disables caching.
340                               #
341                               #  You can disallow resumption for a
342                               #  particular user by adding the following
343                               #  attribute to the control item list:
344                               #
345                               #         Allow-Session-Resumption = No
346                               #
347                               #  If "enable = no" below, you CANNOT
348                               #  enable resumption for just one user
349                               #  by setting the above attribute to "yes".
350                               #
351                               enable = no
352
353                               #
354                               #  Lifetime of the cached entries, in hours.
355                               #  The sessions will be deleted after this
356                               #  time.
357                               #
358                               lifetime = 24 # hours
359
360                               #
361                               #  The maximum number of entries in the
362                               #  cache.  Set to "0" for "infinite".
363                               #
364                               #  This could be set to the number of users
365                               #  who are logged in... which can be a LOT.
366                               #
367                               max_entries = 255
368                         }
369
370                         #
371                         #  As of version 2.1.10, client certificates can be
372                         #  validated via an external command.  This allows
373                         #  dynamic CRLs or OCSP to be used.
374                         #
375                         #  This configuration is commented out in the
376                         #  default configuration.  Uncomment it, and configure
377                         #  the correct paths below to enable it.
378                         #
379                         verify {
380                                 #  A temporary directory where the client
381                                 #  certificates are stored.  This directory
382                                 #  MUST be owned by the UID of the server,
383                                 #  and MUST not be accessible by any other
384                                 #  users.  When the server starts, it will do
385                                 #  "chmod go-rwx" on the directory, for
386                                 #  security reasons.  The directory MUST
387                                 #  exist when the server starts.
388                                 #
389                                 #  You should also delete all of the files
390                                 #  in the directory when the server starts.
391                 #               tmpdir = /tmp/radiusd
392
393                                 #  The command used to verify the client cert.
394                                 #  We recommend using the OpenSSL command-line
395                                 #  tool.
396                                 #
397                                 #  The ${..CA_path} text is a reference to
398                                 #  the CA_path variable defined above.
399                                 #
400                                 #  The %{TLS-Client-Cert-Filename} is the name
401                                 #  of the temporary file containing the cert
402                                 #  in PEM format.  This file is automatically
403                                 #  deleted by the server when the command
404                                 #  returns.
405                 #               client = "/path/to/openssl verify -CApath ${..CA_path} %{TLS-Client-Cert-Filename}"
406                         }
407
408                         #
409                         #  OCSP Configuration
410                         #  Certificates can be verified against an OCSP
411                         #  Responder. This makes it possible to immediately
412                         #  revoke certificates without the distribution of
413                         #  new Certificate Revokation Lists (CRLs).
414                         #
415                         ocsp {
416                               #
417                               #  Enable it.  The default is "no".
418                               #  Deleting the entire "ocsp" subsection
419                               #  Also disables ocsp checking
420                               #
421                               enable = no
422
423                               #
424                               #  The OCSP Responder URL can be automatically
425                               #  extracted from the certificate in question.
426                               #  To override the OCSP Responder URL set
427                               #  "override_cert_url = yes". 
428                               #
429                               override_cert_url = yes
430
431                               #
432                               #  If the OCSP Responder address is not
433                               #  extracted from the certificate, the
434                               #  URL can be defined here.
435
436                               #
437                               #  Limitation: Currently the HTTP
438                               #  Request is not sending the "Host: "
439                               #  information to the web-server.  This
440                               #  can be a problem if the OCSP
441                               #  Responder is running as a vhost.
442                               #
443                               url = "http://127.0.0.1/ocsp/"
444
445                               #
446                               # If the OCSP Responder can not cope with nonce
447                               # in the request, then it can be disabled here.
448                               #
449                               # For security reasons, disabling this option
450                               # is not recommended as nonce protects against
451                               # replay attacks.
452                               #
453                               # Note that Microsoft AD Certificate Services OCSP
454                               # Responder does not enable nonce by default. It is
455                               # more secure to enable nonce on the responder than
456                               # to disable it in the query here.
457                               # See http://technet.microsoft.com/en-us/library/cc770413%28WS.10%29.aspx
458                               #
459                               # use_nonce = yes
460
461                               #
462                               # Number of seconds before giving up waiting
463                               # for OCSP response. 0 uses system default.
464                               #
465                               # timeout = 0
466
467                               #
468                               # Normally an error in querying the OCSP
469                               # responder (no response from server, server did
470                               # not understand the request, etc) will result in
471                               # a validation failure.
472                               #
473                               # To treat these errors as 'soft' failures and
474                               # still accept the certificate, enable this
475                               # option.
476                               # 
477                               # Warning: this may enable clients with revoked
478                               # certificates to connect if the OCSP responder
479                               # is not available. Use with caution.
480                               #
481                               # softfail = no
482                         }
483                 }
484
485                 #  The TTLS module implements the EAP-TTLS protocol,
486                 #  which can be described as EAP inside of Diameter,
487                 #  inside of TLS, inside of EAP, inside of RADIUS...
488                 #
489                 #  Surprisingly, it works quite well.
490                 #
491                 #  The TTLS module needs the TLS module to be installed
492                 #  and configured, in order to use the TLS tunnel
493                 #  inside of the EAP packet.  You will still need to
494                 #  configure the TLS module, even if you do not want
495                 #  to deploy EAP-TLS in your network.  Users will not
496                 #  be able to request EAP-TLS, as it requires them to
497                 #  have a client certificate.  EAP-TTLS does not
498                 #  require a client certificate.
499                 #
500                 #  You can make TTLS require a client cert by setting
501                 #
502                 #       EAP-TLS-Require-Client-Cert = Yes
503                 #
504                 #  in the control items for a request.
505                 #
506                 ttls {
507                         #  The tunneled EAP session needs a default
508                         #  EAP type which is separate from the one for
509                         #  the non-tunneled EAP module.  Inside of the
510                         #  TTLS tunnel, we recommend using EAP-MD5.
511                         #  If the request does not contain an EAP
512                         #  conversation, then this configuration entry
513                         #  is ignored.
514                         default_eap_type = md5
515
516                         #  The tunneled authentication request does
517                         #  not usually contain useful attributes
518                         #  like 'Calling-Station-Id', etc.  These
519                         #  attributes are outside of the tunnel,
520                         #  and normally unavailable to the tunneled
521                         #  authentication request.
522                         #
523                         #  By setting this configuration entry to
524                         #  'yes', any attribute which NOT in the
525                         #  tunneled authentication request, but
526                         #  which IS available outside of the tunnel,
527                         #  is copied to the tunneled request.
528                         #
529                         # allowed values: {no, yes}
530                         copy_request_to_tunnel = no
531
532                         #  The reply attributes sent to the NAS are
533                         #  usually based on the name of the user
534                         #  'outside' of the tunnel (usually
535                         #  'anonymous').  If you want to send the
536                         #  reply attributes based on the user name
537                         #  inside of the tunnel, then set this
538                         #  configuration entry to 'yes', and the reply
539                         #  to the NAS will be taken from the reply to
540                         #  the tunneled request.
541                         #
542                         # allowed values: {no, yes}
543                         use_tunneled_reply = no
544
545                         #
546                         #  The inner tunneled request can be sent
547                         #  through a virtual server constructed
548                         #  specifically for this purpose.
549                         #
550                         #  If this entry is commented out, the inner
551                         #  tunneled request will be sent through
552                         #  the virtual server that processed the
553                         #  outer requests.
554                         #
555                         virtual_server = "inner-tunnel"
556
557                         #  This has the same meaning as the
558                         #  same field in the "tls" module, above.
559                         #  The default value here is "yes".
560                 #       include_length = yes
561                 }
562
563                 ##################################################
564                 #
565                 #  !!!!! WARNINGS for Windows compatibility  !!!!!
566                 #
567                 ##################################################
568                 #
569                 #  If you see the server send an Access-Challenge,
570                 #  and the client never sends another Access-Request,
571                 #  then
572                 #
573                 #               STOP!
574                 #
575                 #  The server certificate has to have special OID's
576                 #  in it, or else the Microsoft clients will silently
577                 #  fail.  See the "scripts/xpextensions" file for
578                 #  details, and the following page:
579                 #
580                 #       http://support.microsoft.com/kb/814394/en-us
581                 #
582                 #  For additional Windows XP SP2 issues, see:
583                 #
584                 #       http://support.microsoft.com/kb/885453/en-us
585                 #
586                 #
587                 #  If is still doesn't work, and you're using Samba,
588                 #  you may be encountering a Samba bug.  See:
589                 #
590                 #       https://bugzilla.samba.org/show_bug.cgi?id=6563
591                 #
592                 #  Note that we do not necessarily agree with their
593                 #  explanation... but the fix does appear to work.
594                 #
595                 ##################################################
596
597                 #
598                 #  The tunneled EAP session needs a default EAP type
599                 #  which is separate from the one for the non-tunneled
600                 #  EAP module.  Inside of the TLS/PEAP tunnel, we
601                 #  recommend using EAP-MS-CHAPv2.
602                 #
603                 #  The PEAP module needs the TLS module to be installed
604                 #  and configured, in order to use the TLS tunnel
605                 #  inside of the EAP packet.  You will still need to
606                 #  configure the TLS module, even if you do not want
607                 #  to deploy EAP-TLS in your network.  Users will not
608                 #  be able to request EAP-TLS, as it requires them to
609                 #  have a client certificate.  EAP-PEAP does not
610                 #  require a client certificate.
611                 #
612                 #
613                 #  You can make PEAP require a client cert by setting
614                 #
615                 #       EAP-TLS-Require-Client-Cert = Yes
616                 #
617                 #  in the control items for a request.
618                 #
619                 peap {
620                         #  The tunneled EAP session needs a default
621                         #  EAP type which is separate from the one for
622                         #  the non-tunneled EAP module.  Inside of the
623                         #  PEAP tunnel, we recommend using MS-CHAPv2,
624                         #  as that is the default type supported by
625                         #  Windows clients.
626                         default_eap_type = mschapv2
627
628                         #  the PEAP module also has these configuration
629                         #  items, which are the same as for TTLS.
630                         copy_request_to_tunnel = no
631                         use_tunneled_reply = no
632
633                         #  When the tunneled session is proxied, the
634                         #  home server may not understand EAP-MSCHAP-V2.
635                         #  Set this entry to "no" to proxy the tunneled
636                         #  EAP-MSCHAP-V2 as normal MSCHAPv2.
637                 #       proxy_tunneled_request_as_eap = yes
638
639                         #
640                         #  The inner tunneled request can be sent
641                         #  through a virtual server constructed
642                         #  specifically for this purpose.
643                         #
644                         #  If this entry is commented out, the inner
645                         #  tunneled request will be sent through
646                         #  the virtual server that processed the
647                         #  outer requests.
648                         #
649                         virtual_server = "inner-tunnel"
650
651                         # This option enables support for MS-SoH
652                         # see doc/SoH.txt for more info.
653                         # It is disabled by default.
654                         #
655 #                       soh = yes
656
657                         #
658                         # The SoH reply will be turned into a request which
659                         # can be sent to a specific virtual server:
660                         #
661 #                       soh_virtual_server = "soh-server"
662                 }
663
664                 #
665                 #  This takes no configuration.
666                 #
667                 #  Note that it is the EAP MS-CHAPv2 sub-module, not
668                 #  the main 'mschap' module.
669                 #
670                 #  Note also that in order for this sub-module to work,
671                 #  the main 'mschap' module MUST ALSO be configured.
672                 #
673                 #  This module is the *Microsoft* implementation of MS-CHAPv2
674                 #  in EAP.  There is another (incompatible) implementation
675                 #  of MS-CHAPv2 in EAP by Cisco, which FreeRADIUS does not
676                 #  currently support.
677                 #
678                 mschapv2 {
679                         #  Prior to version 2.1.11, the module never
680                         #  sent the MS-CHAP-Error message to the
681                         #  client.  This worked, but it had issues
682                         #  when the cached password was wrong.  The
683                         #  server *should* send "E=691 R=0" to the
684                         #  client, which tells it to prompt the user
685                         #  for a new password.
686                         #
687                         #  The default is to behave as in 2.1.10 and
688                         #  earlier, which is known to work.  If you
689                         #  set "send_error = yes", then the error
690                         #  message will be sent back to the client.
691                         #  This *may* help some clients work better,
692                         #  but *may* also cause other clients to stop
693                         #  working.
694                         #
695 #                       send_error = no
696                 }
697         }