| 1 |
= EAP-TLS: Certificate-based authentication |
| 2 |
|
| 3 |
*Goal:* To configure the server to use the EAP-TLS authentication |
| 4 |
protocol and to send and receive test packets. |
| 5 |
|
| 6 |
*Time:* 20-35 minutes. |
| 7 |
|
| 8 |
*Files:* |
| 9 |
|
| 10 |
- `etc/raddb/mods-available/eap` |
| 11 |
- `scripts/certs.sh` |
| 12 |
- `etc/raddb/certs/` |
| 13 |
|
| 14 |
EAP-TLS is an authentication protocol that uses a TLS session, along |
| 15 |
with client and server certificates, to authenticate a user. You |
| 16 |
should now verify that the `rlm_eap_tls` module was built and installed |
| 17 |
by executing: |
| 18 |
|
| 19 |
[source, bash] |
| 20 |
-------------------------------------- |
| 21 |
$ ls -l usr/lib64/freeradius/rlm_eap* |
| 22 |
-------------------------------------- |
| 23 |
|
| 24 |
Use the directory where the FreeRADIUS libraries were installed. |
| 25 |
|
| 26 |
You should see not only files like `rlm_eap.so`, but also |
| 27 |
`rlm_eap_md5.so` and `rlm_eap_tls.so`. If you do not see those files, |
| 28 |
you will have to install them now. If necessary, you may have to |
| 29 |
re-build the server, as follows: |
| 30 |
|
| 31 |
[source, bash] |
| 32 |
--------------------------------------------------------------- |
| 33 |
$ ./configure --prefix=$HOME/freeradius/ \ |
| 34 |
--with-openssl-include-dir=/usr/local/ssl/include \ |
| 35 |
--with-openssl-lib-dir=/usr/local/ssl/lib |
| 36 |
$ make |
| 37 |
$ make install |
| 38 |
--------------------------------------------------------------- |
| 39 |
|
| 40 |
This exercise has insufficient room to describe how to debug any |
| 41 |
configuration, build, or installation problems with the `rlm_eap_tls` |
| 42 |
module. For the remainder of this exercise, we will assume that the |
| 43 |
driver is installed in the appropriate library directory. |
| 44 |
|
| 45 |
By default, the server creates a set of test certificates inside of the |
| 46 |
`raddb` directory, called `certs`. This directory contains sample server |
| 47 |
and client certificates, along with a demonstration certificate |
| 48 |
authority. These certificates may be used for this exercise, but should |
| 49 |
not be used in any live deployment of the server. |
| 50 |
|
| 51 |
You now edit the `etc/raddb/mods-available/eap` file to enable |
| 52 |
the `tls`. You should also set the configuration entry `default_eap_type` |
| 53 |
to `tls`. |
| 54 |
|
| 55 |
Start the server and verify that the `tls` module was loaded and that |
| 56 |
the server is `Ready to process requests`. |
| 57 |
|
| 58 |
This exercise does not cover how to configure EAP-TLS on the wireless |
| 59 |
client, nor how to set up a wireless access point to perform EAP-TLS. We |
| 60 |
suggest that the you consult the documentation for your wireless |
| 61 |
client software for details on this process. |
| 62 |
|
| 63 |
The wireless client will require the client certificate from the |
| 64 |
`raddb/certs` directory. |
| 65 |
|
| 66 |
Once the wireless client has been configured to enable EAP-TLS, |
| 67 |
you should perform a test authentication to the server. If all goes well, |
| 68 |
the server, AP, and wireless client should exchange multiple RADIUS |
| 69 |
`Access-Request` and `Access-Challenge` packets. This process should take |
| 70 |
a few seconds, and you should wait until it is done. If all goes |
| 71 |
well, the final packet from the server should be an `Access-Accept` and |
| 72 |
should contain the `MS-MPPE-Recv-Key` and `MS-MPPE-Send-Key` attributes. |
| 73 |
|
| 74 |
Verify that the authentication succeeded by using the `ping` command to |
| 75 |
see if the wireless client now has network access. |
| 76 |
|
| 77 |
== Further considerations |
| 78 |
|
| 79 |
EAP-TLS is an authentication protocol and nothing more. As such, the |
| 80 |
wireless client will still need to obtain an IP address. This address |
| 81 |
may be configured statically, or it may be obtained through DHCP. |
| 82 |
|
| 83 |
A benefit of EAP-TLS over EAP-MD5 is that it supports the creation of |
| 84 |
dynamic WEP keys. These keys are more secure than statically configured |
| 85 |
WEP keys and do not require administrator interaction to configure |
| 86 |
them. However, they are not perfectly secure, and we recommend that the |
| 87 |
server be configured to send a `Session-Timeout` attribute in the RADIUS |
| 88 |
`Access-Accept` packet in order to force the user to re-authenticate |
| 89 |
periodically, which will create new dynamic WEP keys. |
| 90 |
|
| 91 |
An issue with EAP-TLS is that it requires a client certificate. For |
| 92 |
secure authentication that does not require client certificates, see |
| 93 |
the EAP-TTLS and EAP-PEAP protocols. |
| 94 |
|
| 95 |
Configuring the wireless client (usually a laptop or notebook |
| 96 |
computer) to perform EAP-TLS may be difficult. Windows (since Windows XP) |
| 97 |
ships with an EAP-PEAP client, which may influence any decision about |
| 98 |
which wireless authentication protocol to use. |
| 99 |
|
| 100 |
== Questions |
| 101 |
|
| 102 |
1. What other benefits does EAP-TLS have over EAP-MD5? |
| 103 |
2. What happens to the user's password when they use EAP-TLS? |
| 104 |
3. Would you use EAP-TLS in a large deployment? If so, why? If not, why |
| 105 |
not? |
| 106 |
4. What is the purpose of the `MS-MPPE-Recv-Key` and `MS-MPPE-Send-Key` |
| 107 |
attributes in the final `Access-Accept` packet? |
| 108 |
|
| 109 |
// Copyright (C) 2021 Network RADIUS SAS. Licenced under CC-by-NC 4.0. |
| 110 |
// This documentation was developed by Network RADIUS SAS. |