updated man pages, generated from docbook
[libradsec.git] / radsecproxy.conf.5
1 '\" -*- coding: us-ascii -*-
2 .if \n(.g .ds T< \\FC
3 .if \n(.g .ds T> \\F[\n[.fam]]
4 .de URL
5 \\$2 \(la\\$1\(ra\\$3
6 ..
7 .if \n(.g .mso www.tmac
8 .TH "radsecproxy.conf " 5 2008-10-06 "radsecproxy devel 2008-10-06" ""
9 .SH NAME
10 radsecproxy.conf
11 \- Radsec proxy configuration file 
12 .SH DESCRIPTION
13 When the proxy server starts, it will first check the command line arguments,
14 and then read the configuration file. Normally radsecproxy will read the
15 configuration file \*(T<\fI/etc/radsecproxy.conf\fR\*(T>. The command
16 line \*(T<\fB\-c\fR\*(T> option can be used to instead read an alternate
17 file (see
18 \fBradsecproxy\fR(1)
19 for details).
20 .PP
21 If the configuration file can not be found, the proxy will exit with an
22 error message. Note that there is also an include facility so that any
23 configuration file may include other configuration files. The proxy will
24 also exit on configuration errors.
25 .SH "CONFIGURATION SYNTAX"
26 When the configuration file is processed, whitespace (spaces and tabs) are
27 generally ignored. For each line, leading and trailing whitespace are ignored.
28 A line is ignored if it is empty, only consists of whitespace, or if the first 
29 non-whitespace character is a \*(T<#\*(T>. The configuration is
30 generally case insensitive, but in some cases the option values (see below)
31 are not.
32 .PP
33 There are two types of configuration structures than can be used. The first
34 and simplest are lines of the format \fIoption value\fR. That
35 is, an option name, see below for a list of valid options, followed by
36 whitespace (at least one space or tab character), followed by a value. Note
37 that if the value contains whitespace, then it must be quoted using
38 \*(T<""\*(T> or \*(T<''\*(T>. Any whitespace
39 in front of the option or after the value will be ignored.
40 .PP
41 The other type of structure is a block. A block spans at least two lines, and
42 has the format:
43 .RS 
44 .nf
45
46 blocktype name {
47     option value
48     option value
49     ...
50 }
51 .fi
52 .RE
53
54 That is, some blocktype, see below for a list of the different block types, and
55 then enclosed in braces you have zero or more lines that each have the
56 previously described \fIoption value\fR format. Different block
57 types have different rules for which options can be specified, they are listed
58 below. The rules regarding white space, comments and quotes are as above. Hence
59 you may do things like:
60 .RS 
61 .nf
62
63 blocktype name {
64 #    option value
65     option "value with space"
66     ...
67 }
68 .fi
69 .RE
70 .PP
71 Option value characters can also be written in hex. This is done by writing the
72 character \*(T<%\*(T> followed by two hexadecimal digits. If a
73 \*(T<%\*(T> is used without two following hexadecimal digits, the
74 \*(T<%\*(T> and the following characters are used as written. If you
75 want to write a \*(T<%\*(T> and not use this decoding, you may of
76 course write \*(T<%\*(T> in hex; i.e., \*(T<%25\*(T>.
77 .PP
78 There is one special option that can be used both as a basic option and inside
79 all blocks. That is the option \*(T<include\*(T> where the value
80 specifies files to be included. The value can be a single file, or it can use
81 normal shell globbing to specify multiple files, e.g.:
82 .RS 
83 include /etc/radsecproxy.conf.d/*.conf
84 .RE
85
86 The files are sorted alphabetically. Included files are read in the order they
87 are specified, when reaching the end of a file, the next file is read. When
88 reaching the end of the last included file, the proxy returns to read the next
89 line following the \*(T<include\*(T> option. Included files may again
90 include other files.
91 .SH "BASIC OPTIONS"
92 The following basic options may be specified in the configuration file. Note
93 that blocktypes and options inside blocks are discussed later. Note that none
94 of these options are required, and indeed in many cases they are not needed.
95 Note that you should specify each at most once. The behaviour with multiple
96 occurences is undefined.
97 .TP 
98 \*(T<logLevel\*(T>
99 This option specifies the debug level. It must be set to 1, 2, 3 or 4, where 1
100 logs only serious errors, and 4 logs everything. The default is 3 which logs
101 errors, warnings and some informational messages. Note that the command line
102 option \*(T<\fB\-d\fR\*(T> overrides this.
103 .TP 
104 \*(T<logDestination\*(T>
105 This specifies where the log messages should go. By default the messages go to
106 syslog with facility \*(T<LOG_DAEMON\*(T>. Using this option you can
107 specify another syslog facility, or you may specify that logging should be to
108 a particular file, not using syslog. The value must be either a file or
109 syslog URL. The file URL is the standard one, specifying a local file that
110 should be used. For syslog, you must use the syntax:
111 \*(T<x\-syslog:///FACILITY\*(T> where \*(T<FACILITY\*(T> must
112 be one of \*(T<LOG_DAEMON\*(T>, \*(T<LOG_MAIL\*(T>,
113 \*(T<LOG_USER\*(T>, \*(T<LOG_LOCAL0\*(T>,
114 \*(T<LOG_LOCAL1\*(T>, \*(T<LOG_LOCAL2\*(T>,
115 \*(T<LOG_LOCAL3\*(T>, \*(T<LOG_LOCAL4\*(T>,
116 \*(T<LOG_LOCAL5\*(T>, \*(T<LOG_LOCAL6\*(T> or
117 \*(T<LOG_LOCAL7\*(T>. You may omit the facility from the URL to
118 specify logging to the default facility, but this is not very useful since
119 this is the default log destination. Note that this option is ignored if
120 \*(T<\fB\-f\fR\*(T> is specified on the command line.
121 .TP 
122 \*(T<listenUDP\*(T>
123 Normally the proxy will listen to the standard RADIUS UDP port
124 \*(T<1812\*(T> if configured to handle UDP clients. On most systems it
125 will do this for all of the system's IP addresses (both IPv4 and IPv6). On some
126 systems however, it may respond to only IPv4 or only IPv6. To specify an
127 alternate port you may use a value of the form \*(T<*:port\*(T> where
128 port is any valid port number. If you also want to specify a specific address
129 you can do e.g. \*(T<192.168.1.1:1812\*(T> or
130 \*(T<[2001:db8::1]:1812\*(T>. The port may be omitted if you want the
131 default one (like in these examples). These examples are equivalent to
132 \*(T<192.168.1.1\*(T> and \*(T<2001:db8::1\*(T>. Note that
133 you must use brackets around the IPv6 address if you specify port number.
134 This option may be specified multiple times to listen to multiple addresses
135 and/or ports.
136 .TP 
137 \*(T<listenTCP\*(T>
138 This option is similar to the \*(T<listenUDP\*(T> option, except
139 that it is used for receiving connections from TCP clients. The default port
140 number is \*(T<1812\*(T>.
141 .TP 
142 \*(T<listenTLS\*(T>
143 This is similar to the \*(T<listenUDP\*(T> option, except that it is
144 used for receiving connections from TLS clients. The default port number is
145 \*(T<2083\*(T>. Note that this option was previously called
146 \*(T<listenTCP\*(T>.
147 .TP 
148 \*(T<listenDTLS\*(T>
149 This is similar to the \*(T<listenUDP\*(T> option, except that it is
150 used for receiving connections from DTLS clients. The default port number is 
151 \*(T<2083\*(T>.
152 .TP 
153 \*(T<listenAccountingUDP\*(T>
154 This is similar to the \*(T<listenUDP\*(T> option, except that it is
155 used for specifying port and optionally the address to receive UDP Accounting
156 messages on. 
157 .TP 
158 \*(T<sourceUDP\*(T>
159 This can be used to specify source address and/or source port that the proxy
160 will use for sending UDP client messages (e.g. Access Request).
161 .TP 
162 \*(T<sourceTCP\*(T>
163 This can be used to specify source address and/or source port that the proxy
164 will use for TCP connections.
165 .TP 
166 \*(T<sourceTLS\*(T>
167 This can be used to specify source address and/or source port that the proxy
168 will use for TLS connections.
169 .TP 
170 \*(T<sourceDTLS\*(T>
171 This can be used to specify source address and/or source port that the proxy
172 will use for DTLS connections.
173 .TP 
174 \*(T<loopPrevention\*(T>
175 This can be set to \*(T<on\*(T> or \*(T<off\*(T> with
176 \*(T<off\*(T> being the default. When this is enabled, a request
177 will never be sent to a server named the same as the client it was received
178 from. I.e., the names of the client block and the server block are compared.
179 Note that this only gives limited protection against loops.
180 .TP 
181 \*(T<include\*(T>
182 This is not a normal configuration option; it can be specified multiple times.
183 It can both be used as a basic option and inside blocks. For the full
184 description, see the configuration syntax section above.
185 .SH BLOCKS
186 There are five types of blocks, they are \*(T<client\*(T>,
187 \*(T<server\*(T>, \*(T<realm\*(T>, \*(T<Btls\*(T>
188 and \*(T<rewrite\*(T>. At least one instance of each of
189 \*(T<client\*(T> and \*(T<realm\*(T> is required. This is
190 necessary for the proxy to do anything useful, and it will exit if not. The
191 \*(T<tls\*(T> block is required if at least one TLS/DTLS client or
192 server is configured. Note that there can be multiple blocks for each type.
193 For each type, the block names should be unique. The behaviour with multiple
194 occurences of the same name for the same block type is undefined. Also note
195 that some block option values may reference a block by name, in which case
196 the block name must be previously defined. Hence the order of the blocks may
197 be significant.
198 .SH "CLIENT BLOCK"
199 The client block is used to configure a client. That is, tell the proxy about a
200 client, and what parameters should be used for that client. The name of the
201 client block must (with one exception, see below) be either the IP address
202 (IPv4 or IPv6) of the client, an IP prefix (IPv4 or IPv6) of the form
203 IpAddress/PrefixLength, or a domain name (FQDN).
204 .PP
205 If a domain name is specified, then this will be resolved immediately to all
206 the addresses associated with the name, and the proxy will not care about any
207 possible DNS changes that might occur later. Hence there is no dependency on
208 DNS after startup.
209 .PP
210 When some client later sends a request to the proxy, the proxy will look at the
211 IP address the request comes from, and then go through all the addresses of
212 each of the configured clients (in the order they are defined), to determine
213 which (if any) of the clients this is.
214 .PP
215 In the case of TLS/DTLS, the name of the client must match the FQDN or IP
216 address in the client certificate. Note that this is not required when the
217 client name is an IP prefix.
218 .PP
219 Alternatively one may use the \*(T<host\*(T> option inside a client
220 block. In that case, the value of the \*(T<host\*(T> option is used as
221 above, while the name of the block is only used as a descriptive name for the
222 administrator.
223 .PP
224 The allowed options in a client block are \*(T<host\*(T>,
225 \*(T<type\*(T>, \*(T<secret\*(T>, \*(T<tls\*(T>,
226 \*(T<certificateNameCheck\*(T>,
227 \*(T<matchCertificateAttribute\*(T>,
228 \*(T<duplicateInterval\*(T>, \*(T<rewrite\*(T>,
229 \*(T<rewriteIn\*(T>, \*(T<rewriteOut\*(T> and
230 \*(T<rewriteAttribute\*(T>. We already discussed the
231 \*(T<host\*(T> option. The value of \*(T<type\*(T> must be
232 one of \*(T<udp\*(T>, \*(T<tcp\*(T>, \*(T<tls\*(T>
233 or \*(T<dtls\*(T>. The value of \*(T<secret\*(T> is the
234 shared RADIUS key used with this client. If the secret contains whitespace,
235 the value must be quoted. This option is optional for TLS/DTLS.
236 .PP
237 For a TLS/DTLS client you may also specify the \*(T<tls\*(T> option.
238 The option value must be the name of a previously defined TLS block. If this
239 option is not specified, the TLS block with the name
240 \*(T<defaultClient\*(T> will be used if defined. If not defined, it
241 will try to use the TLS block named \*(T<default\*(T>. If the
242 specified TLS block name does not exist, or the option is not specified and
243 none of the defaults exist, the proxy will exit with an error.
244 .PP
245 For a TLS/DTLS client, the option \*(T<certificateNameCheck\*(T>
246 can be set
247 to \*(T<off\*(T>, to disable the default behaviour of matching CN or
248 SubjectAltName against the specified hostname or IP address.
249 .PP
250 Additional validation of certificate attributes can be done by use of the
251 \*(T<matchCertificateAttribute\*(T> option. Currently one can only do
252 some matching of CN and SubjectAltName. For regexp matching on CN, one can use
253 the value \*(T<CN:/regexp/\*(T>. For SubjectAltName one can only do
254 regexp matching of the URI, this is specified as
255 \*(T<SubjectAltName:URI:/regexp/\*(T>. Note that currently this option
256 can only be specified once in a client block.
257 .PP
258 The \*(T<duplicateInterval\*(T> option can be used to specify for how
259 many seconds duplicate checking should be done. If a proxy receives a new
260 request within a few seconds of a previous one, it may be treated the same if
261 from the same client, with the same authenticator etc. The proxy will then
262 ignore the new request (if it is still processing the previous one), or
263 returned a copy of the previous reply.
264 .PP
265 The \*(T<rewrite\*(T> option is deprecated. Use
266 \*(T<rewriteIn\*(T> instead.
267 .PP
268 The \*(T<rewriteIn\*(T> option can be used to refer to a rewrite block
269 that specifies certain rewrite operations that should be performed on incoming
270 messages from the client. The rewriting is done before other processing.
271 For details, see the rewrite block text below. Similarly to
272 \*(T<tls\*(T> discussed above, if this option is not used, there is a
273 fallback to using the \*(T<rewrite\*(T> block named
274 \*(T<defaultClient\*(T> if it exists; and if not, a fallback to a
275 block named \*(T<default\*(T>.
276 .PP
277 The \*(T<rewriteOut\*(T> option is used in the same way as
278 \*(T<rewriteIn\*(T>, except that it specifies rewrite operations that
279 should be performed on outgoing messages to the client. The rewriting is done
280 after other processing. Also, there is no rewrite fallback if this option is
281 not used.
282 .PP
283 The \*(T<rewriteAttribute\*(T> option currently makes it possible to
284 specify that the User-Name attribute in a client request shall be rewritten in
285 the request sent by the proxy. The User-Name attribute is written back to the
286 original value if a matching response is later sent back to the client. The
287 value must be of the form User-Name:/regexpmatch/replacement/. Example usage:
288 .RS 
289 rewriteAttribute User-Name:/^(.*)@local$/$1@example.com/
290 .RE
291 .SH "SERVER BLOCK"
292 The server block is used to configure a server. That is, tell the proxy about a
293 server, and what parameters should be used when communicating with that server.
294 The name of the server block must (with one exception, see below) be either the
295 IP address (IPv4 or IPv6) of the server, or a domain name (FQDN). If a domain
296 name is specified, then this will be resolved immediately to all the addresses
297 associated with the name, and the proxy will not care about any possible DNS
298 changes that might occur later. Hence there is no dependency on DNS after
299 startup. If the domain name resolves to multiple addresses, then for UDP/DTLS
300 the first address is used. For TCP/TLS, the proxy will loop through the
301 addresses until it can connect to one of them. In the case of TLS/DTLS, the
302 name of the server must match the FQDN or IP address in the server certificate.
303 .PP
304 Alternatively one may use the \*(T<host\*(T> option inside a server
305 block. In that case, the value of the \*(T<host\*(T> option is used as
306 above, while the name of the block is only used as a descriptive name for the
307 administrator.
308 .PP
309 The allowed options in a server block are \*(T<host\*(T>,
310 \*(T<port\*(T>, \*(T<type\*(T>, \*(T<secret\*(T>,
311 \*(T<tls\*(T>, \*(T<certificateNameCheck\*(T>,
312 \*(T<matchCertificateAttribute\*(T>, \*(T<rewrite\*(T>,
313 \*(T<rewriteIn\*(T>, \*(T<rewriteOut\*(T>,
314 \*(T<statusServer\*(T>, \*(T<retryCount\*(T>,
315 \*(T<retryInterval\*(T> and \*(T<dynamicLookupCommand\*(T>.
316 .PP
317 We already discussed the \*(T<host\*(T> option. The
318 \*(T<port\*(T> option allows you to specify which port number the
319 server uses. The usage of \*(T<type\*(T>, \*(T<secret\*(T>,
320 \*(T<tls\*(T>, \*(T<certificateNameCheck\*(T>,
321 \*(T<matchCertificateAttribute\*(T>, \*(T<rewrite\*(T>,
322 \*(T<rewriteIn\*(T> and \*(T<rewriteOut\*(T> are just as
323 specified for the \*(T<client block\*(T> above, except that
324 \*(T<defaultServer\*(T> (and not \*(T<defaultClient\*(T>)
325 is the fallback for the \*(T<tls\*(T>, \*(T<rewrite\*(T>
326 and \*(T<rewriteIn\*(T> options.
327 .PP
328 \*(T<statusServer\*(T> can be specified to enable the use of
329 status-server messages for this server. The value must be either
330 \*(T<on\*(T> or \*(T<off\*(T>. The default when not
331 specified, is \*(T<off\*(T>. If statusserver is enabled, the proxy
332 will during idle periods send regular status-server messages to the server
333 to verify that it is alive. This should only be enabled if the server
334 supports it.
335 .PP
336 The options \*(T<retryCount\*(T> and
337 \*(T<retryInterval\*(T> can be used to specify how many times the
338 proxy should retry sending a request and how long it should wait between each
339 retry. The defaults are 2 retries and an interval of 5s.
340 .PP
341 The option \*(T<dynamicLookupCommand\*(T> can be used to specify a
342 command that should be executed to dynamically configure and use a server.
343 The use of this feature will be documented separately/later.
344 .SH "REALM BLOCK"
345 When the proxy receives an Access-Request it needs to figure out to which
346 server it should be forwarded. This is done by looking at the Username attribute
347 in the request, and matching that against the names of the defined realm blocks.
348 The proxy will match against the blocks in the order they are specified, using
349 the first match if any. If no realm matches, the proxy will simply ignore the
350 request. Each realm block specifies what the server should do when a match is
351 found. A realm block may contain none, one or multiple \*(T<server\*(T>
352 options, and similarly \*(T<accountingServer\*(T> options. There are
353 also \*(T<replyMessage\*(T> and \*(T<accountingResponse\*(T>
354 options. We will discuss these later.
355 .SS "REALM BLOCK NAMES AND MATCHING"
356 In the general case the proxy will look for a \*(T<@\*(T> in the
357 username attribute, and try to do an exact case insensitive match between what
358 comes after the \*(T<@\*(T> and the name of the realm block. So if you
359 get a request with the attribute value \*(T<anonymous@example.com\*(T>,
360 the proxy will go through the realm names in the order they are specified,
361 looking for a realm block named \*(T<example.com\*(T>.
362 .PP
363 There are two exceptions to this, one is the realm name \*(T<*\*(T>
364 which means match everything. Hence if you have a realm block named
365 \*(T<*\*(T>, then it will always match. This should then be the last
366 realm block defined, since any blocks after this would never be checked. This
367 is useful for having a default.
368 .PP
369 The other exception is regular expression matching. If the realm name starts
370 with a \*(T</\*(T>, the name is treated as an regular expression. A
371 case insensitive regexp match will then be done using this regexp on the value
372 of the entire Username attribute. Optionally you may also have a trailing
373 \*(T</\*(T> after the regexp. So as an example, if you want to use
374 regexp matching the domain \*(T<example.com\*(T> you could have a
375 realm block named \*(T</@example\e\e.com$\*(T>. Optinally this can also
376 be written \*(T</@example\e\e.com$/\*(T>. If you want to match all
377 domains under the \*(T<.com\*(T> top domain, you could do
378 \*(T</@.*\e\e.com$\*(T>. Note that since the matching is done on the
379 entire attribute value, you can also use rules like
380 \*(T</^[a\-k].*@example\e\e.com$/\*(T> to get some of the users in this
381 domain to use one server, while other users could be matched by another realm
382 block and use another server.
383 .SS "REALM BLOCK OPTIONS"
384 A realm block may contain none, one or multiple \*(T<server\*(T>
385 options. If defined, the values of the \*(T<server\*(T> options must
386 be the names of previously defined server blocks. Normally requests will be
387 forwarded to the first server option defined. If there are multiple server
388 options, the proxy will do fail-over and use the second server if the first
389 is down. If the two first are down, it will try the third etc. If say the
390 first server comes back up, it will go back to using that one. Currently
391 detection of servers being up or down is based on the use of StatusServer (if
392 enabled), and that TCP/TLS/DTLS connections are up.
393 .PP
394 A realm block may also contain none, one or multiple
395 \*(T<accountingServer\*(T> options. This is used exactly like the
396 \*(T<server\*(T> option, except that it is used for specifying where
397 to send matching accounting requests. The values must be the names of
398 previously defined server blocks. When multiple accounting servers are
399 defined, there is a failover mechanism similar to the one for the
400 \*(T<server\*(T> option.
401 .PP
402 If there is no \*(T<server\*(T> option, the proxy will if
403 \*(T<replyMessage\*(T> is specified, reply back to the client with
404 an Access Reject message. The message contains a replyMessage attribute with
405 the value as specified by the \*(T<replyMessage\*(T> option. Note
406 that this is different from having no match since then the request is simply
407 ignored. You may wonder why this is useful. One example is if you handle say
408 all domains under say \*(T<.bv\*(T>. Then you may have several realm
409 blocks matching the domains that exists, while for other domains under
410 \*(T<\&.bv\*(T> you want to send a reject. At the same time you might
411 want to send all other requests to some default server. After the realms for
412 the subdomains, you would then have two realm definitions. One with the name
413 \*(T</@.*\e\e.bv$\*(T> with no servers, followed by one with the name
414 \*(T<*\*(T> with the default server defined. This may also be useful
415 for blocking particular usernames.
416 .PP
417 If there is no \*(T<accountingServer\*(T> option, the proxy will
418 normally do nothing, ignoring accounting requests. There is however an option
419 called \*(T<accountingResponse\*(T>. If this is set to
420 \*(T<on\*(T>, the proxy will log some of the accounting information
421 and send an Accounting-Response back. This is useful if you do not care much
422 about accounting, but want to stop clients from retransmitting accounting
423 requests. By default this option is set to \*(T<off\*(T>.
424 .SH "TLS BLOCK"
425 The TLS block specifies TLS configuration options and you need at least one
426 of these if you have clients or servers using TLS/DTLS. As discussed in the
427 client and server block descriptions, a client or server block may reference
428 a particular TLS block by name. There are also however the special TLS block
429 names \*(T<default\*(T>, \*(T<defaultClient\*(T> and
430 \*(T<defaultServer\*(T> which are used as defaults if the client or
431 server block does not reference a TLS block. Also note that a TLS block must
432 be defined before the client or server block that would use it. If you want
433 the same TLS configuration for all TLS/DTLS clients and servers, you need
434 just a single tls block named \*(T<default\*(T>, and the client and
435 servers need not refer to it. If you want all TLS/DTLS clients to use one
436 config, and all TLS/DTLS servers to use another, then you would be fine only
437 defining two TLS blocks named \*(T<defaultClient\*(T> and
438 \*(T<defaultServer\*(T>. If you want different clients (or different
439 servers) to have different TLS parameters, then you may need to create other
440 TLS blocks with other names, and reference those from the client or server
441 definitions. Note that you could also have say a client block refer to a
442 default, even \*(T<defaultServer\*(T> if you really want to.
443 .PP
444 The available TLS block options are \*(T<CACertificateFile\*(T>,
445 \*(T<CACertificatePath\*(T>, \*(T<certificateFile\*(T>,
446 \*(T<certificateKeyFile\*(T>,
447 \*(T<certificateKeyPassword\*(T>, \*(T<cacheExpiry\*(T>
448 and \*(T<CRLCheck\*(T>. When doing RADIUS over TLS/DTLS, both the
449 client and the server present certificates, and they are both verified by
450 the peer. Hence you must always specify \*(T<certificateFile\*(T>
451 and \*(T<certificateKeyFile\*(T> options, as well as
452 \*(T<certificateKeyPassword\*(T> if a password is needed to decrypt
453 the private key. Note that \*(T<CACertificateFile\*(T> may be a
454 certificate chain. In order to verify certificates, or send a chain of
455 certificates to a peer, you also always need to specify
456 \*(T<CACertificateFile\*(T> or \*(T<CACertificatePath\*(T>.
457 Note that you may specify both, in which case the certificates in
458 \*(T<CACertificateFile\*(T> are checked first. By default CRLs are
459 not checked. This can be changed by setting \*(T<CRLCheck\*(T> to
460 \*(T<on\*(T>.
461 .PP
462 CA certificates and CRLs are normally cached permanently. That is, once a CA
463 or CRL has been read, the proxy will never attempt to re-read it. CRLs may
464 change relatively often and the proxy should ideally always use the latest
465 CRLs. Rather than restarting the proxy, there is an option
466 \*(T<cacheExpiry\*(T> that specifies how many seconds the CA and
467 CRL information should be cached. Reasonable values might be say 3600
468 (1 hour) or 86400 (24 hours), depending on how frequently CRLs are updated
469 and how critical it is to be up to date. This option may be set to zero to
470 disable caching.
471 .SH "REWRITE BLOCK"
472 The rewrite block specifies rules that may rewrite RADIUS messages. It can be
473 used to add, remove and modify specific attributes from messages received
474 from and sent to clients and servers. As discussed in the client and server
475 block descriptions, a client or server block may reference a particular
476 rewrite block by name. There are however also the special rewrite block names
477 \*(T<default\*(T>, \*(T<defaultClient\*(T> and
478 \*(T<defaultServer\*(T> which are used as defaults if the client or
479 server block does not reference a block. Also note that a rewrite block must
480 be defined before the client or server block that would use it. If you want
481 the same rewrite rules for input from all clients and servers, you need just
482 a single rewrite block named \*(T<default\*(T>, and the client and
483 servers need not refer to it. If you want all clients to use one config, and
484 all servers to use another, then you would be fine only defining two rewrite
485 blocks named \*(T<defaultClient\*(T> and
486 \*(T<defaultServer\*(T>. Note that these defaults are only used for
487 rewrite on input. No rewriting is done on output unless explicitly specifed
488 using the \*(T<rewriteOut\*(T> option.
489 .PP
490 The available rewrite block options are \*(T<addAttribute\*(T>,
491 \*(T<removeAttribute\*(T>, \*(T<removeVendorAttribute\*(T>
492 and \*(T<modifyAttribute\*(T>. They can all be specified none, one
493 or multiple times.
494 .PP
495 \*(T<addAttribute\*(T> is used to add attributes to a message. The
496 option value must be of the form \*(T<attribute:value\*(T> where
497 attribute is a numerical value specifying the attribute.
498 .PP
499 The \*(T<removeAttribute\*(T> option is used to specify an
500 attribute that should be removed from received messages. The option value
501 must be a numerical value specifying which attribute is to be removed.
502 Similarly, \*(T<removeVendorAttribute\*(T> is used to specify a
503 vendor attribute that is to be removed. The value can be a numerical value
504 for removing all attributes from a given vendor, or of the form
505 \*(T<vendor:subattribute\*(T>, where vendor and subattribute are
506 numerical values, for removing a specific subattribute for a specific
507 vendor.
508 .PP
509 \*(T<modifyAttribute\*(T> is used to specify modification of
510 attributes. The value must be of the form
511 \*(T<attribute:/regexpmatch/replacement/\*(T> where attribute is
512 a numerical attribute type, regexpmatch is regexp matching rule and
513 replacement specifies how to replace the matching regexp. Example usage:
514 .RS 
515 modifyAttribute 1:/^(.*)@local$/$1@example.com/
516 .RE
517 .SH "SEE ALSO"
518 \fBradsecproxy\fR(1),
519 .URL http://tools.ietf.org/html/draft-ietf-radext-radsec "         RadSec internet draft       "