Policy for injecting operator-name
[freeradius.git] / raddb / policy.d / operator-name
1 #       
2 #  The following policies are for the Operator-Name
3 #  configuration.
4 #
5 #  The policies below can be called as just 'oprator-name' (not
6 #  oprator-name.authorize etc..)  from the various config sections.
7 #
8
9 #
10 #  We assume that clients can have the operator-name definition 
11 #  in the client.conf, e.g.
12 #  client xxxx {
13 #    ...
14 #    operator-name = 1your.domain
15 #  }
16 #  If this parameter is found for a client, then we add 
17 #  an Operator-Name attribute 
18 #
19 operator-name.authorize {
20         if ( "%{client:operator-name}" ) {
21                 update request {
22                         Operator-Name = "%{client:operator-name}"
23                 }
24         }
25 }
26
27 #
28 # Before proxing the client add an Operator-Name
29 # attribute identifying this site if the operator-name is found for this client
30 #
31 operator-name.pre-proxy {
32         if (Packet-Type == Access-Request && "%{client:operator-name}") {
33                 update proxy-request {
34                         Operator-Name := "%{client:operator-name}"
35                 }
36         }
37 }