Pull fix from branch_1_1, so proxied EAP replies work
[freeradius.git] / raddb / protocol_filter.conf
1 #
2 #       $Id$
3 #
4 #       Filter protocols by realm (or other key)
5 #       The "protocol_filter" module reads this file, and implements
6 #       the restrictions contained in it.
7 #
8 #       The main purpose of this configuration file is to permit the
9 #       administrator to control, by realm (or any other key), which
10 #       protocols the request is permitted to contain.  This allows
11 #       the server to permit users in one realm to use (say) EAP, and
12 #       to deny EAP to users in other realms.
13 #
14 #       The key is used to look up entries by subsection.  Within each
15 #       subsection, there is a list of attributes, with value "permit"
16 #       or "deny".  When a request comes in, the attributes from the
17 #       request packet are looked up in the appropriate section given
18 #       by the key.  If the section has an entry which says "permit"
19 #       for that attribute, the request is permitted to continue.  If
20 #       the section has and entry which says "deny" for that
21 #       attribute, the request is immediately rejected.
22 #
23 #       The default (if the attribute is not listed in the subsection)
24 #       is to permit the attribute.
25 #
26 #       The attribute names MUST be spelled the same way as in
27 #       the dictionary files.
28 #
29 #       The entries can have sub-sections, too.  Each subsection
30 #       MUST begin with a "key" entry, which is used to apply
31 #       one of the rules in the subsection.  Only one rule from
32 #       each subsection is applied, and that rule is the one pointed
33 #       to by the key.  The key is dynamically expanded (see doc/variables.txt)
34 #       at run time, for each request as it comes in.
35 #
36 DEFAULT {
37         #
38         #  There is no key here, as the key is always hard-coded to be
39         #  attributes in the request.  For a request to pass the tests
40         #  in this section, ALL of the rules below must permit the
41         #  request to pass.  That is, the rules are logically ANDed
42         #  together.
43         #
44
45         # allow requests to contain a user password attribute.
46         User-Password = permit
47
48         # Deny requests which try to use MS-CHAP, for testing.
49         # just because we can.  Both MS-CHAPv1 and MS-CHAPv2
50         # use MS-CHAP-Challenge, so we just deny that.
51         # If we wanted to deny just MS-CHAPv2, we would deny the
52         # MS-CHAP2-Response attribute.
53         MS-CHAP-Challenge = deny
54
55         #
56         #  Allow some EAP protocols, but not others.
57         #
58         #  The use of the EAP-Type for the key, below, means that the
59         #  protocol_filter module MUST be listed after "eap" in the
60         #  "authorize" section.
61         #
62         EAP-Message {
63                 #
64                 #  See the dictionary for the names of the EAP-Types.
65                 #  e.g. VALUE EAP-Type <name> <number>
66                 #
67                 #  The names for the EAP types MUST be exactly the same
68                 #  as the names in the dictionary file.
69                 #
70                 key = %{EAP-Type:-DEFAULT}
71
72                 #  This is insecure, so we don't allow it.
73                 MD5-Challenge = deny
74
75                 # Permit one EAP type.  We picked this one at random.
76                 EAP-MSCHAP-V2 = permit          
77
78                 DEFAULT = deny
79         }
80 }
81
82 #
83 #  A more complicated example.
84 #
85 example.com {
86         #
87         #  For various reasons, we often would like to use the same
88         #  configuration entries inside, and outside of the TLS tunnel.
89         #  This allows us to keep all of the per-realm configuration in
90         #  one place.
91         #
92         EAP-Message {
93                 #
94                 #  Define subsections, based on the request being
95                 #  inside, or outside, of the TLS tunnel.
96                 #
97                 key = %{FreeRADIUS-Proxied-To:-Outer}
98
99                 #
100                 #  Outside of the tunnel.
101                 #
102                 Outer {
103                         key = %{EAP-Type:-DEFAULT}
104
105                         #  This is insecure, so we don't allow it.
106                         #  It's not necessary, as the DEFAULT below will
107                         #  take care of it, but this is a good example.
108                         MD5-Challenge = deny
109
110                         # We allow TTLS & PEAP as EAP types.
111                         EAP-TTLS = permit
112
113                         PEAP = permit
114
115                         DEFAULT = deny
116                 }
117
118                 #
119                 #  Inside of the tunnel.
120                 #
121                 127.0.0.1 {
122                         key = %{EAP-Type:-DEFAULT}
123
124                         #  We don't do TLS inside of TTLS.
125                         EAP-TLS = deny
126
127                         DEFAULT = permit
128                 }
129         }
130 }