1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
2 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
5 <date>2011-09-30</date>
9 <application>radsecproxy.conf</application>
11 <manvolnum>5</manvolnum>
12 <refmiscinfo>radsecproxy 1.5-dev</refmiscinfo>
16 <application>radsecproxy.conf</application>
18 <refpurpose>Radsec proxy configuration file</refpurpose>
21 <title>Description</title>
23 When the proxy server starts, it will first check the command
24 line arguments, and then read the configuration file. Normally
25 radsecproxy will read the configuration file
26 <filename>/etc/radsecproxy.conf</filename>. The command line
27 <option>-c</option> option can be used to instead read an
30 <refentrytitle>radsecproxy</refentrytitle><manvolnum>1</manvolnum>
35 If the configuration file can not be found, the proxy will exit
36 with an error message. Note that there is also an include facility
37 so that any configuration file may include other configuration
38 files. The proxy will also exit on configuration errors.
42 <title>Configuration Syntax</title>
44 When the configuration file is processed, whitespace (spaces and
45 tabs) are generally ignored. For each line, leading and trailing
46 whitespace are ignored. A line is ignored if it is empty, only
47 consists of whitespace, or if the first non-whitespace character
48 is a <literal>#</literal>. The configuration is generally case
49 insensitive, but in some cases the option values (see below) are
53 There are two types of configuration structures than can be
54 used. The first and simplest are lines on the format
55 <emphasis>option value</emphasis>. That is, an option name, see
56 below for a list of valid options, followed by whitespace (at
57 least one space or tab character), followed by a value. Note
58 that if the value contains whitespace, then it must be quoted
59 using <literal>""</literal> or <literal>''</literal>. Any
60 whitespace in front of the option or after the value will be
64 The other type of structure is a block. A block spans at least
65 two lines, and has the format:
66 <blockquote><literallayout>
72 </literallayout></blockquote>
73 That is, some blocktype, see below for a list of the different
74 block types, and then enclosed in braces you have zero or more
75 lines that each have the previously described <emphasis>option
76 value</emphasis> format. Different block types have different
77 rules for which options can be specified, they are listed
78 below. The rules regarding white space, comments and quotes are
79 as above. Hence you may do things like:
80 <blockquote><literallayout>
83 option "value with space"
86 </literallayout></blockquote>
89 Option value characters can also be written in hex. This is done
90 by writing the character <literal>%</literal> followed by two
91 hexadecimal digits. If a <literal>%</literal> is used without
92 two following hexadecimal digits, the <literal>%</literal> and
93 the following characters are used as written. If you want to
94 write a <literal>%</literal> and not use this decoding, you may
95 of course write <literal>%</literal> in hex; i.e.,
96 <literal>%25</literal>.
99 There is one special option that can be used both as a basic
100 option and inside all blocks. That is the option
101 <literal>Include</literal> where the value specifies files to be
102 included. The value can be a single file, or it can use normal
103 shell globbing to specify multiple files, e.g.:
106 include /etc/radsecproxy.conf.d/*.conf
109 The files are sorted alphabetically. Included files are read in
110 the order they are specified, when reaching the end of a file,
111 the next file is read. When reaching the end of the last
112 included file, the proxy returns to read the next line following
113 the <literal>Include</literal> option. Included files may again
118 <title>Basic Options</title>
120 The following basic options may be specified in the
121 configuration file. Note that blocktypes and options inside
122 blocks are discussed later. Note that none of these options are
123 required, and indeed in many cases they are not needed. Note
124 that you should specify each at most once. The behaviour with
125 multiple occurences is undefined.
129 <term><literal>LogLevel</literal></term>
132 This option specifies the debug level. It must be set to
133 1, 2, 3, 4 or 5, where 1 logs only serious errors, and 5
134 logs everything. The default is 2 which logs errors,
135 warnings and a few informational messages. Note that the
136 command line option <option>-d</option> overrides this.
141 <term><literal>LogDestination</literal></term>
144 This specifies where the log messages should go. By
145 default the messages go to syslog with facility
146 <literal>LOG_DAEMON</literal>. Using this option you can
147 specify another syslog facility, or you may specify that
148 logging should be to a particular file, not using
149 syslog. The value must be either a file or syslog URL. The
150 file URL is the standard one, specifying a local file that
151 should be used. For syslog, you must use the syntax:
152 <literal>x-syslog:///FACILITY</literal> where
153 <literal>FACILITY</literal> must be one of
154 <literal>LOG_DAEMON</literal>,
155 <literal>LOG_MAIL</literal>, <literal>LOG_USER</literal>,
156 <literal>LOG_LOCAL0</literal>,
157 <literal>LOG_LOCAL1</literal>,
158 <literal>LOG_LOCAL2</literal>,
159 <literal>LOG_LOCAL3</literal>,
160 <literal>LOG_LOCAL4</literal>,
161 <literal>LOG_LOCAL5</literal>,
162 <literal>LOG_LOCAL6</literal> or
163 <literal>LOG_LOCAL7</literal>. You may omit the facility
164 from the URL to specify logging to the default facility,
165 but this is not very useful since this is the default log
166 destination. Note that this option is ignored if
167 <option>-f</option> is specified on the command line.
173 <term><literal>FTicksReporting</literal></term>
176 The FTicksReporting option is used to enable F-Ticks
177 logging and can be set to <literal>None</literal>,
178 <literal>Basic</literal> or <literal>Full</literal>. Its
179 default value is <literal>None</literal>.
182 See <literal>radsecproxy.conf-example</literal> for
183 details. Note that radsecproxy has to be configured with
184 support for F-Ticks (<literal>--enable-fticks</literal>)
185 for this option to have any effect.
191 <term><literal>FTicksMAC</literal></term>
194 The FTicksMAC option can be used to control if and how
195 Calling-Station-Id is being logged. It can be set to one
196 of <literal>Static</literal>,
197 <literal>Original</literal>,
198 <literal>VendorHashed</literal>,
199 <literal>VendorKeyHashed</literal>,
200 <literal>FullyHashed</literal> or
201 <literal>FullyKeyHashed</literal>.
204 The default value for FTicksMAC is <literal>Static</literal>.
205 Before chosing any of <literal>Original</literal>
208 See <literal>radsecproxy.conf-example</literal> for
209 details. Note that radsecproxy has to be configured with
210 support for F-Ticks (<literal>--enable-fticks</literal>)
211 for this option to have any effect.
217 <term><literal>FTicksKey</literal></term>
220 The FTicksKey option is used to specify the key to use
221 when producing HMAC's as an effect of specifying
222 VendorKeyHashed or FullyKeyHashed for the FTicksMAC
226 Note that radsecproxy has to be configured with support
227 for F-Ticks (<literal>--enable-fticks</literal>) for this
228 option to have any effect.
234 <term><literal>ListenUDP</literal></term>
237 Normally the proxy will listen to the standard RADIUS UDP
238 port <literal>1812</literal> if configured to handle UDP
239 clients. On most systems it will do this for all of the
240 system's IP addresses (both IPv4 and IPv6). On some
241 systems however, it may respond to only IPv4 or only
242 IPv6. To specify an alternate port you may use a value on
243 the form <literal>*:port</literal> where port is any valid
244 port number. If you also want to specify a specific
246 e.g. <literal>192.168.1.1:1812</literal> or
247 <literal>[2001:db8::1]:1812</literal>. The port may be
248 omitted if you want the default one (like in these
249 examples). These examples are equivalent to
250 <literal>192.168.1.1</literal> and
251 <literal>2001:db8::1</literal>. Note that you must use
252 brackets around the IPv6 address. This option may be
253 specified multiple times to listen to multiple addresses
259 <term><literal>ListenTCP</literal></term>
262 This option is similar to the <literal>ListenUDP</literal>
263 option, except that it is used for receiving connections
264 from TCP clients. The default port number is
265 <literal>1812</literal>.
270 <term><literal>ListenTLS</literal></term>
273 This is similar to the <literal>ListenUDP</literal>
274 option, except that it is used for receiving connections
275 from TLS clients. The default port number is
276 <literal>2083</literal>. Note that this option was
277 previously called <literal>ListenTCP</literal>.
282 <term><literal>ListenDTLS</literal></term>
285 This is similar to the <literal>ListenUDP</literal>
286 option, except that it is used for receiving connections
287 from DTLS clients. The default port number is
288 <literal>2083</literal>.
293 <term><literal>SourceUDP</literal></term>
296 This can be used to specify source address and/or source
297 port that the proxy will use for sending UDP client
298 messages (e.g. Access Request).
303 <term><literal>SourceTCP</literal></term>
306 This can be used to specify source address and/or source
307 port that the proxy will use for TCP connections.
312 <term><literal>SourceTLS</literal></term>
315 This can be used to specify source address and/or source
316 port that the proxy will use for TLS connections.
321 <term><literal>SourceDTLS</literal></term>
324 This can be used to specify source address and/or source
325 port that the proxy will use for DTLS connections.
330 <term><literal>TTLAttribute</literal></term>
333 This can be used to change the default TTL attribute. Only
334 change this if you know what you are doing. The syntax is
335 either a numerical value denoting the TTL attribute, or
336 two numerical values separated by column specifying a
338 i.e. <literal>vendorid:attribute</literal>.
343 <term><literal>AddTTL</literal></term>
346 If a TTL attribute is present, the proxy will decrement
347 the value and discard the message if zero. Normally the
348 proxy does nothing if no TTL attribute is present. If you
349 use the AddTTL option with a value 1-255, the proxy will
350 when forwarding a message with no TTL attribute, add one
351 with the specified value. Note that this option can also
352 be specified for a client/server. It will then override
353 this setting when forwarding a message to that
359 <term><literal>LoopPrevention</literal></term>
362 This can be set to <literal>on</literal> or
363 <literal>off</literal> with <literal>off</literal> being
364 the default. When this is enabled, a request will never be
365 sent to a server named the same as the client it was
366 received from. I.e., the names of the client block and the
367 server block are compared. Note that this only gives
368 limited protection against loops. It can be used as a
369 basic option and inside server blocks where it overrides
375 <term><literal>Include</literal></term>
378 This is not a normal configuration option; it can be
379 specified multiple times. It can both be used as a basic
380 option and inside blocks. For the full description, see
381 the configuration syntax section above.
388 <title>Blocks</title>
390 There are five types of blocks, they are
391 <literal>client</literal>, <literal>server</literal>,
392 <literal>realm</literal>, <literal>tls</literal> and
393 <literal>rewrite</literal>. At least one instance of each of
394 <literal>client</literal> and <literal>realm</literal> is
395 required. This is necessary for the proxy to do anything useful,
396 and it will exit if not. The <literal>tls</literal> block is
397 required if at least one TLS/DTLS client or server is
398 configured. Note that there can be multiple blocks for each
399 type. For each type, the block names should be unique. The
400 behaviour with multiple occurences of the same name for the same
401 block type is undefined. Also note that some block option values
402 may reference a block by name, in which case the block name must
403 be previously defined. Hence the order of the blocks may be
408 <title>Client Block</title>
410 The client block is used to configure a client. That is, tell
411 the proxy about a client, and what parameters should be used for
412 that client. The name of the client block must (with one
413 exception, see below) be either the IP address (IPv4 or IPv6) of
414 the client, an IP prefix (IPv4 or IPv6) on the form
415 IpAddress/PrefixLength, or a domain name (FQDN). Note that
416 literal IPv6 addresses must be enclosed in brackets.
419 If a domain name is specified, then this will be resolved
420 immediately to all the addresses associated with the name, and
421 the proxy will not care about any possible DNS changes that
422 might occur later. Hence there is no dependency on DNS after
426 When some client later sends a request to the proxy, the proxy
427 will look at the IP address the request comes from, and then go
428 through all the addresses of each of the configured clients (in
429 the order they are defined), to determine which (if any) of the
433 In the case of TLS/DTLS, the name of the client must match the
434 FQDN or IP address in the client certificate. Note that this is
435 not required when the client name is an IP prefix.
438 Alternatively one may use the <literal>host</literal> option
439 inside a client block. In that case, the value of the
440 <literal>host</literal> option is used as above, while the name
441 of the block is only used as a descriptive name for the
442 administrator. The host option may be used multiple times, and
443 can be a mix of addresses, FQDNs and prefixes.
446 The allowed options in a client block are
447 <literal>host</literal>, <literal>type</literal>,
448 <literal>secret</literal>, <literal>tls</literal>,
449 <literal>certificateNameCheck</literal>,
450 <literal>matchCertificateAttribute</literal>,
451 <literal>duplicateInterval</literal>, <literal>AddTTL</literal>,
452 <literal>fticksVISCOUNTRY</literal>, <literal>rewrite</literal>,
453 <literal>rewriteIn</literal>, <literal>rewriteOut</literal>, and
454 <literal>rewriteAttribute</literal>.
456 We already discussed the <literal>host</literal> option. The
457 value of <literal>type</literal> must be one of
458 <literal>udp</literal>, <literal>tcp</literal>,
459 <literal>tls</literal> or <literal>dtls</literal>. The value of
460 <literal>secret</literal> is the shared RADIUS key used with
461 this client. If the secret contains whitespace, the value must
462 be quoted. This option is optional for TLS/DTLS.
465 For a TLS/DTLS client you may also specify the
466 <literal>tls</literal> option. The option value must be the
467 name of a previously defined TLS block. If this option is not
468 specified, the TLS block with the name
469 <literal>defaultClient</literal> will be used if defined. If not
470 defined, it will try to use the TLS block named
471 <literal>default</literal>. If the specified TLS block name does
472 not exist, or the option is not specified and none of the
473 defaults exist, the proxy will exit with an error.
476 For a TLS/DTLS client, the option
477 <literal>certificateNameCheck</literal> can be set to
478 <literal>off</literal>, to disable the default behaviour of
479 matching CN or SubjectAltName against the specified hostname or
483 Additional validation of certificate attributes can be done by
484 use of the <literal>matchCertificateAttribute</literal>
485 option. Currently one can only do some matching of CN and
486 SubjectAltName. For regexp matching on CN, one can use the value
487 <literal>CN:/regexp/</literal>. For SubjectAltName one can only
488 do regexp matching of the URI, this is specified as
489 <literal>SubjectAltName:URI:/regexp/</literal>. Note that
490 currently this option can only be specified once in a client
494 The <literal>duplicateInterval</literal> option can be used to
495 specify for how many seconds duplicate checking should be
496 done. If a proxy receives a new request within a few seconds of
497 a previous one, it may be treated the same if from the same
498 client, with the same authenticator etc. The proxy will then
499 ignore the new request (if it is still processing the previous
500 one), or returned a copy of the previous reply.
503 The <literal>AddTTL</literal> option is similar to the
504 <literal>AddTTL</literal> option used in the basic config. See
505 that for details. Any value configured here overrides the basic
506 one when sending messages to this client.
509 The <literal>fticksVISCOUNTRY</literal> option configures
510 clients eligible to F-Ticks logging as defined by the
511 <literal>FTicksReporting</literal> basic option.
514 The <literal>rewrite</literal> option is deprecated. Use
515 <literal>rewriteIn</literal> instead.
518 The <literal>rewriteIn</literal> option can be used to refer to
519 a rewrite block that specifies certain rewrite operations that
520 should be performed on incoming messages from the client. The
521 rewriting is done before other processing. For details, see the
522 rewrite block text below. Similarly to <literal>tls</literal>
523 discussed above, if this option is not used, there is a fallback
524 to using the <literal>rewrite</literal> block named
525 <literal>defaultClient</literal> if it exists; and if not, a
526 fallback to a block named <literal>default</literal>.
529 The <literal>rewriteOut</literal> option is used in the same way
530 as <literal>rewriteIn</literal>, except that it specifies
531 rewrite operations that should be performed on outgoing messages
532 to the client. The rewriting is done after other
533 processing. Also, there is no rewrite fallback if this option is
537 The <literal>rewriteAttribute</literal> option currently makes
538 it possible to specify that the User-Name attribute in a client
539 request shall be rewritten in the request sent by the proxy. The
540 User-Name attribute is written back to the original value if a
541 matching response is later sent back to the client. The value
542 must be on the form User-Name:/regexpmatch/replacement/. Example
546 rewriteAttribute User-Name:/^(.*)@local$/\1@example.com/
552 <title>Server Block</title>
554 The server block is used to configure a server. That is, tell
555 the proxy about a server, and what parameters should be used
556 when communicating with that server. The name of the server
557 block must (with one exception, see below) be either the IP
558 address (IPv4 or IPv6) of the server, or a domain name
559 (FQDN). If a domain name is specified, then this will be
560 resolved immediately to all the addresses associated with the
561 name, and the proxy will not care about any possible DNS changes
562 that might occur later. Hence there is no dependency on DNS
563 after startup. If the domain name resolves to multiple
564 addresses, then for UDP/DTLS the first address is used. For
565 TCP/TLS, the proxy will loop through the addresses until it can
566 connect to one of them. In the case of TLS/DTLS, the name of the
567 server must match the FQDN or IP address in the server
571 Alternatively one may use the <literal>host</literal> option
572 inside a server block. In that case, the value of the
573 <literal>host</literal> option is used as above, while the name
574 of the block is only used as a descriptive name for the
575 administrator. Note that multiple host options may be used. This
576 will then be treated as multiple names/addresses for the same
577 server. When initiating a TCP/TLS connection, all addresses of
578 all names may be attempted, but there is no failover between the
579 different host values. For failover one must use separate server
583 Note that the name of the block, or values of host options may
584 include a port number (separated with a column). This port
585 number will then override the default port or a port option in
586 the server block. Also note that literal IPv6 addresses must be
587 enclosed in brackets.
590 The allowed options in a server block are
591 <literal>host</literal>, <literal>port</literal>,
592 <literal>type</literal>, <literal>secret</literal>,
593 <literal>tls</literal>, <literal>certificateNameCheck</literal>,
594 <literal>matchCertificateAttribute</literal>,
595 <literal>AddTTL</literal>, <literal>rewrite</literal>,
596 <literal>rewriteIn</literal>, <literal>rewriteOut</literal>,
597 <literal>statusServer</literal>, <literal>retryCount</literal>,
598 <literal>retryInterval</literal>,
599 <literal>dynamicLookupCommand</literal> and
600 <literal>LoopPrevention</literal>.
603 We already discussed the <literal>host</literal> option. The
604 <literal>port</literal> option allows you to specify which port
605 number the server uses. The usage of <literal>type</literal>,
606 <literal>secret</literal>, <literal>tls</literal>,
607 <literal>certificateNameCheck</literal>,
608 <literal>matchCertificateAttribute</literal>,
609 <literal>AddTTL</literal>, <literal>rewrite</literal>,
610 <literal>rewriteIn</literal> and <literal>rewriteOut</literal>
611 are just as specified for the <literal>client block</literal>
612 above, except that <literal>defaultServer</literal> (and not
613 <literal>defaultClient</literal>) is the fallback for the
614 <literal>tls</literal>, <literal>rewrite</literal> and
615 <literal>rewriteIn</literal> options.
618 <literal>statusServer</literal> can be specified to enable the
619 use of status-server messages for this server. The value must be
620 either <literal>on</literal> or <literal>off</literal>. The
621 default when not specified, is <literal>off</literal>. If
622 statusserver is enabled, the proxy will during idle periods send
623 regular status-server messages to the server to verify that it
624 is alive. This should only be enabled if the server supports it.
627 The options <literal>retryCount</literal> and
628 <literal>retryInterval</literal> can be used to specify how many
629 times the proxy should retry sending a request and how long it
630 should wait between each retry. The defaults are 2 retries and
634 The option <literal>dynamicLookupCommand</literal> can be used
635 to specify a command that should be executed to dynamically
636 configure and use a server. The use of this feature will be
637 documented separately/later.
640 Using the <literal>LoopPrevention</literal> option here
641 overrides any basic setting of this option. See section
642 <literal>BASIC OPTIONS</literal> for details on this option.
646 <title>Realm Block</title>
648 When the proxy receives an Access-Request it needs to figure out
649 to which server it should be forwarded. This is done by looking
650 at the Username attribute in the request, and matching that
651 against the names of the defined realm blocks. The proxy will
652 match against the blocks in the order they are specified, using
653 the first match if any. If no realm matches, the proxy will
654 simply ignore the request. Each realm block specifies what the
655 server should do when a match is found. A realm block may
656 contain none, one or multiple <literal>server</literal> options,
657 and similarly <literal>accountingServer</literal> options. There
658 are also <literal>replyMessage</literal> and
659 <literal>accountingResponse</literal> options. We will discuss
663 <title>Realm block names and matching</title>
665 In the general case the proxy will look for a
666 <literal>@</literal> in the username attribute, and try to do
667 an exact case insensitive match between what comes after the
668 <literal>@</literal> and the name of the realm block. So if
669 you get a request with the attribute value
670 <literal>anonymous@example.com</literal>, the proxy will go
671 through the realm names in the order they are specified,
672 looking for a realm block named
673 <literal>example.com</literal>.
676 There are two exceptions to this, one is the realm name
677 <literal>*</literal> which means match everything. Hence if
678 you have a realm block named <literal>*</literal>, then it
679 will always match. This should then be the last realm block
680 defined, since any blocks after this would never be
681 checked. This is useful for having a default.
684 The other exception is regular expression matching. If the
685 realm name starts with a <literal>/</literal>, the name is
686 treated as an regular expression. A case insensitive regexp
687 match will then be done using this regexp on the value of the
688 entire Username attribute. Optionally you may also have a
689 trailing <literal>/</literal> after the regexp. So as an
690 example, if you want to use regexp matching the domain
691 <literal>example.com</literal> you could have a realm block
692 named <literal>/@example\\.com$</literal>. Optinally this can
693 also be written <literal>/@example\\.com$/</literal>. If you
694 want to match all domains under the <literal>.com</literal>
695 top domain, you could do <literal>/@.*\\.com$</literal>. Note
696 that since the matching is done on the entire attribute value,
697 you can also use rules like
698 <literal>/^[a-k].*@example\\.com$/</literal> to get some of
699 the users in this domain to use one server, while other users
700 could be matched by another realm block and use another
705 <title>Realm block options</title>
707 A realm block may contain none, one or multiple
708 <literal>server</literal> options. If defined, the values of
709 the <literal>server</literal> options must be the names of
710 previously defined server blocks. Normally requests will be
711 forwarded to the first server option defined. If there are
712 multiple server options, the proxy will do fail-over and use
713 the second server if the first is down. If the two first are
714 down, it will try the third etc. If say the first server comes
715 back up, it will go back to using that one. Currently
716 detection of servers being up or down is based on the use of
717 StatusServer (if enabled), and that TCP/TLS/DTLS connections
721 A realm block may also contain none, one or multiple
722 <literal>accountingServer</literal> options. This is used
723 exactly like the <literal>server</literal> option, except that
724 it is used for specifying where to send matching accounting
725 requests. The values must be the names of previously defined
726 server blocks. When multiple accounting servers are defined,
727 there is a failover mechanism similar to the one for the
728 <literal>server</literal> option.
731 If there is no <literal>server</literal> option, the proxy
732 will if <literal>replyMessage</literal> is specified, reply
733 back to the client with an Access Reject message. The message
734 contains a replyMessage attribute with the value as specified
735 by the <literal>replyMessage</literal> option. Note that this
736 is different from having no match since then the request is
737 simply ignored. You may wonder why this is useful. One example
738 is if you handle say all domains under say
739 <literal>.bv</literal>. Then you may have several realm blocks
740 matching the domains that exists, while for other domains
741 under <literal>.bv</literal> you want to send a reject. At the
742 same time you might want to send all other requests to some
743 default server. After the realms for the subdomains, you would
744 then have two realm definitions. One with the name
745 <literal>/@.*\\.bv$</literal> with no servers, followed by one
746 with the name <literal>*</literal> with the default server
747 defined. This may also be useful for blocking particular
751 If there is no <literal>accountingServer</literal> option, the
752 proxy will normally do nothing, ignoring accounting
753 requests. There is however an option called
754 <literal>accountingResponse</literal>. If this is set to
755 <literal>on</literal>, the proxy will log some of the
756 accounting information and send an Accounting-Response
757 back. This is useful if you do not care much about accounting,
758 but want to stop clients from retransmitting accounting
759 requests. By default this option is set to
760 <literal>off</literal>.
765 <title>TLS Block</title>
767 The TLS block specifies TLS configuration options and you need
768 at least one of these if you have clients or servers using
769 TLS/DTLS. As discussed in the client and server block
770 descriptions, a client or server block may reference a
771 particular TLS block by name. There are also however the special
772 TLS block names <literal>default</literal>,
773 <literal>defaultClient</literal> and
774 <literal>defaultServer</literal> which are used as defaults if
775 the client or server block does not reference a TLS block. Also
776 note that a TLS block must be defined before the client or
777 server block that would use it. If you want the same TLS
778 configuration for all TLS/DTLS clients and servers, you need
779 just a single tls block named <literal>default</literal>, and
780 the client and servers need not refer to it. If you want all
781 TLS/DTLS clients to use one config, and all TLS/DTLS servers to
782 use another, then you would be fine only defining two TLS blocks
783 named <literal>defaultClient</literal> and
784 <literal>defaultServer</literal>. If you want different clients
785 (or different servers) to have different TLS parameters, then
786 you may need to create other TLS blocks with other names, and
787 reference those from the client or server definitions. Note that
788 you could also have say a client block refer to a default, even
789 <literal>defaultServer</literal> if you really want to.
792 The available TLS block options are
793 <literal>CACertificateFile</literal>,
794 <literal>CACertificatePath</literal>,
795 <literal>certificateFile</literal>,
796 <literal>certificateKeyFile</literal>,
797 <literal>certificateKeyPassword</literal>,
798 <literal>cacheExpiry</literal>, <literal>CRLCheck</literal> and
799 <literal>policyOID</literal>. When doing RADIUS over TLS/DTLS,
800 both the client and the server present certificates, and they
801 are both verified by the peer. Hence you must always specify
802 <literal>certificateFile</literal> and
803 <literal>certificateKeyFile</literal> options, as well as
804 <literal>certificateKeyPassword</literal> if a password is
805 needed to decrypt the private key. Note that
806 <literal>CACertificateFile</literal> may be a certificate
807 chain. In order to verify certificates, or send a chain of
808 certificates to a peer, you also always need to specify
809 <literal>CACertificateFile</literal> or
810 <literal>CACertificatePath</literal>. Note that you may specify
811 both, in which case the certificates in
812 <literal>CACertificateFile</literal> are checked first. By
813 default CRLs are not checked. This can be changed by setting
814 <literal>CRLCheck</literal> to <literal>on</literal>. One can
815 require peer certificates to adhere to certain policies by
816 specifying one or multiple policyOIDs using one or multiple
817 <literal>policyOID</literal> options.
820 CA certificates and CRLs are normally cached permanently. That
821 is, once a CA or CRL has been read, the proxy will never attempt
822 to re-read it. CRLs may change relatively often and the proxy
823 should ideally always use the latest CRLs. Rather than
824 restarting the proxy, there is an option
825 <literal>cacheExpiry</literal> that specifies how many seconds
826 the CA and CRL information should be cached. Reasonable values
827 might be say 3600 (1 hour) or 86400 (24 hours), depending on how
828 frequently CRLs are updated and how critical it is to be up to
829 date. This option may be set to zero to disable caching.
833 <title>Rewrite Block</title>
835 The rewrite block specifies rules that may rewrite RADIUS
836 messages. It can be used to add, remove and modify specific
837 attributes from messages received from and sent to clients and
838 servers. As discussed in the client and server block
839 descriptions, a client or server block may reference a
840 particular rewrite block by name. There are however also the
841 special rewrite block names <literal>default</literal>,
842 <literal>defaultClient</literal> and
843 <literal>defaultServer</literal> which are used as defaults if
844 the client or server block does not reference a block. Also note
845 that a rewrite block must be defined before the client or server
846 block that would use it. If you want the same rewrite rules for
847 input from all clients and servers, you need just a single
848 rewrite block named <literal>default</literal>, and the client
849 and servers need not refer to it. If you want all clients to use
850 one config, and all servers to use another, then you would be
851 fine only defining two rewrite blocks named
852 <literal>defaultClient</literal> and
853 <literal>defaultServer</literal>. Note that these defaults are
854 only used for rewrite on input. No rewriting is done on output
855 unless explicitly specifed using the
856 <literal>rewriteOut</literal> option.
859 The available rewrite block options are
860 <literal>addAttribute</literal>,
861 <literal>addVendorAttribute</literal>,
862 <literal>removeAttribute</literal>,
863 <literal>removeVendorAttribute</literal> and
864 <literal>modifyAttribute</literal>. They can all be specified
865 none, one or multiple times.
868 <literal>addAttribute</literal> is used to add attributes to a
869 message. The option value must be on the form
870 <literal>attribute:value</literal> where attribute is a
871 numerical value specifying the attribute. Simliarly, the
872 <literal>addVendorAttribute</literal> is used to specify a
873 vendor attribute to be added. The option value must be on the
874 form <literal>vendor:subattribute:value</literal>, where vendor
875 and subattribute are numerical values.
878 The <literal>removeAttribute</literal> option is used to specify
879 an attribute that should be removed from received messages. The
880 option value must be a numerical value specifying which
881 attribute is to be removed. Similarly,
882 <literal>removeVendorAttribute</literal> is used to specify a
883 vendor attribute that is to be removed. The value can be a
884 numerical value for removing all attributes from a given vendor,
885 or on the form <literal>vendor:subattribute</literal>, where
886 vendor and subattribute are numerical values, for removing a
887 specific subattribute for a specific vendor.
890 <literal>modifyAttribute</literal> is used to specify
891 modification of attributes. The value must be on the form
892 <literal>attribute:/regexpmatch/replacement/</literal> where
893 attribute is a numerical attribute type, regexpmatch is regexp
894 matching rule and replacement specifies how to replace the
895 matching regexp. Example usage:
898 modifyAttribute 1:/^(.*)@local$/\1@example.com/
904 <title>See Also</title>
907 <refentrytitle>radsecproxy</refentrytitle><manvolnum>1</manvolnum>
909 <ulink url="http://tools.ietf.org/html/draft-ietf-radext-radsec">
910 <citetitle>RadSec internet draft</citetitle>