| 1 |
= AAA |
| 2 |
|
| 3 |
== Authorization, Authentication, and Accounting request handling |
| 4 |
|
| 5 |
There are a lot of questions about misconfigured FreeRADIUS servers |
| 6 |
because of misunderstanding of FreeRADIUS operations. This document |
| 7 |
explains how the server operates. |
| 8 |
|
| 9 |
Normally there are two steps in processing an authentication request |
| 10 |
coming from a NAS in FreeRADIUS: authorization and authentication. |
| 11 |
If we use FreeRADIUS as a proxy to re-send the request to another |
| 12 |
RADIUS server there will be additional steps. |
| 13 |
|
| 14 |
=== Authorization |
| 15 |
|
| 16 |
Authorization is the process of finding and returning information |
| 17 |
about what the user is allowed to do. For example, finding out what |
| 18 |
kind of authentication methods they are allowed to run, and what VLAN |
| 19 |
the user should be placed into. |
| 20 |
|
| 21 |
Authorization modules generally "get data" from somewhere, |
| 22 |
e.g. `ldap`, `sql`, `files`, etc. |
| 23 |
|
| 24 |
The authentication method is usually determined when the server gets |
| 25 |
the users credentials from a database. Once the credentials are |
| 26 |
available, the server can authenticate the user. |
| 27 |
|
| 28 |
=== Authentication |
| 29 |
|
| 30 |
Authentication is simply a process of comparing user’s credentials in |
| 31 |
request with the "known good" credentials retrieved from a |
| 32 |
database. Authentication usually deals with password |
| 33 |
encryption. The modules `pap`, `chap`, `mschap`, etc. do authentication. |
| 34 |
|
| 35 |
Some modules do both authentication and limited authorization. For |
| 36 |
example, the `mschap` module authenticates MS-CHAP credentials, but it |
| 37 |
may also be used as an authorization module, which verifies that |
| 38 |
request contains `MS-CHAP` related attribute. If so, the module |
| 39 |
instructs the server to use `mschap` for authentication, too |
| 40 |
|
| 41 |
These dual modules are usually related to protocol-specific |
| 42 |
attributes, such as the `pap` module for the `User-Password` |
| 43 |
attribute, `chap` for `CHAP-Password`, `mschap` for `MS-CHAP-*`, etc. |
| 44 |
|
| 45 |
=== Request Processing |
| 46 |
|
| 47 |
When the server processes requests, it manages four |
| 48 |
xref:unlang:list.adoc[attribute lists]: |
| 49 |
|
| 50 |
`request`:: attributes taken from the received packet |
| 51 |
|
| 52 |
`reply`:: attributes which will be sent in the reply |
| 53 |
|
| 54 |
`control`:: attributes used to control how the server operates. These are never sent in a packet |
| 55 |
|
| 56 |
`session-state`:: attributes which are saved and restroed across multiple request / reply exchanges. |
| 57 |
|
| 58 |
All of these lists are available to all modules. All of these |
| 59 |
lists are available in xref:unlang:index.adoc[Unlang]. |
| 60 |
|