| 1 |
= Attribute Lists |
| 2 |
|
| 3 |
An attribute list contains a set of attributes. The allowed lists |
| 4 |
are: |
| 5 |
|
| 6 |
`request`:: Attributes in the incoming request packet. |
| 7 |
|
| 8 |
`reply`:: Attributes in the outgoing reply packet. |
| 9 |
|
| 10 |
`control`:: Attributes in the internal "control" list that is |
| 11 |
associated with the request. |
| 12 |
+ |
| 13 |
The `control` attributes are used to manage how the request is |
| 14 |
processed. These attributes are never sent in any packet. |
| 15 |
|
| 16 |
`session-state`:: Attributes which are maintained across multi-packet |
| 17 |
exchanges. |
| 18 |
|
| 19 |
`proxy-request`:: Attributes in the proxied request packet to a home server. |
| 20 |
|
| 21 |
`proxy-reply`:: Attributes in the reply packet from the home server. |
| 22 |
|
| 23 |
`coa`:: Attributes in a CoA-Request packet which is sent to a home server. |
| 24 |
|
| 25 |
`disconnect`:: Attributes in a Disconnect-Request packet which is sent to a home server. |
| 26 |
|
| 27 |
There must be a colon `:` after the list name and before the attribute name. |
| 28 |
This syntax helps the server to distinguish between list names and attribute |
| 29 |
names. |
| 30 |
|
| 31 |
With the exception of `session-state`, all of the above lists are |
| 32 |
ephemeral. That is, they exist for one packet exchange, and only one |
| 33 |
packet exchange. When a reply is sent for a request, the above lists |
| 34 |
and all attributes are deleted. There is no way to reference an |
| 35 |
attribute from a previous packet. We recommend using a database to |
| 36 |
track complex state. |
| 37 |
|
| 38 |
The `coa` and `disconnect` lists can only be used when the server |
| 39 |
receives an Access-Request or Accounting-Request. Use `request` and |
| 40 |
`reply` instead of `coa` when the server receives a CoA-Request or |
| 41 |
Disconnect-Request packet. |
| 42 |
|
| 43 |
Adding one or more attributes to either of the `coa` or `disconnect` |
| 44 |
list causes server to originate a CoA-Request or Disconnect-Request |
| 45 |
packet. That packet is sent when the current Access-Request or |
| 46 |
Accounting-Request has been finished, and a reply sent to the NAS. |
| 47 |
See `raddb/sites-available/originate-coa` for additional information. |
| 48 |
|
| 49 |
In some cases, requests are associated a multi-packet exchange. For |
| 50 |
those situations, the `session-state` list is automatically saved when |
| 51 |
a reply is sent, and it is automatically restored when the next packet |
| 52 |
in sequence comes in. Once the packet exchange has been finished, the |
| 53 |
`session-state` list is deleted. |
| 54 |
|
| 55 |
In some cases, there is a parent-child relationship between requests. |
| 56 |
In those situations, it is possible for the policy rules in the child |
| 57 |
to refer to attributes in the parent. This reference can be made by |
| 58 |
prefixing the _<list>_ name with the `parent` qualifier. The key word |
| 59 |
`outer` is also a synonym for `parent`. If there are multiple |
| 60 |
parent-child relationships, the `parent` qualifier can be repeated. |
| 61 |
|
| 62 |
There is, however, no way for the parent to refer to the child. When |
| 63 |
the child is running, the parent is suspended. Once the child |
| 64 |
finishes, it is deleted, and is no longer accessible to the parent. |
| 65 |
|
| 66 |
.Examples |
| 67 |
`&parent.request.User-Name` + |
| 68 |
`&parent.reply.Reply-Message` + |
| 69 |
`&parent.parent.session-state.Filter-Id` |
| 70 |
|
| 71 |
// Copyright (C) 2020 Network RADIUS SAS. Licenced under CC-by-NC 4.0. |
| 72 |
// Development of this documentation was sponsored by Network RADIUS SAS. |