blob: a16fa1ea8034c979318bf12e7e6da28daefbbdab [file] [log] [blame]
Chetan Gaonker7f4bf742016-05-04 15:56:08 -07001#
2# The following policies are for the Operator-Name
3# configuration.
4#
5# The policies below can be called as just 'operator-name' (not
6# operator-name.authorize etc..) from the various config sections.
7#
8
9# If you require that the Operator-Name be set
10# for local clients then call the 'operator-name' policy
11# in the authorize section of the virtual-server for your clients in clients.conf
12
13# To inject an Operator-Name whilst proxying, call the
14# 'operator-name' policy in the pre-proxy section of the virtual server
15# No need to call this if you have already enabled this in
16# the authorize section.
17
18#
19# We assume that clients can have the operator-name definition
20# in the client.conf, e.g.
21# client xxxx {
22# ...
23# Operator-Name = 1your.domain
24# }
25# If this parameter is found for a client, then we add
26# an Operator-Name attribute
27#
28operator-name.authorize {
29 if ("%{client:Operator-Name}") {
30 update request {
31 Operator-Name = "%{client:Operator-Name}"
32 }
33 }
34}
35
36#
37# Before proxing the client add an Operator-Name
38# attribute identifying this site if the operator-name is found for this client
39#
40operator-name.pre-proxy {
41 if (("%{request:Packet-Type}" == 'Access-Request') && "%{client:Operator-Name}") {
42 update proxy-request {
43 Operator-Name := "%{client:Operator-Name}"
44 }
45 }
46}