Add mods-available/enabled
[freeradius.git] / raddb / modules / ldap
1 # -*- text -*-
2 #
3 #  $Id$
4
5 # Lightweight Directory Access Protocol (LDAP)
6 #
7 #  This module definition allows you to use LDAP for
8 #  authorization and authentication.
9 #
10 #  See raddb/sites-available/default for reference to the
11 #  ldap module in the authorize and authenticate sections.
12 #
13 #  However, LDAP can be used for authentication ONLY when the
14 #  Access-Request packet contains a clear-text User-Password
15 #  attribute.  LDAP authentication will NOT work for any other
16 #  authentication method.
17 #
18 #  This means that LDAP servers don't understand EAP.  If you
19 #  force "Auth-Type = LDAP", and then send the server a
20 #  request containing EAP authentication, then authentication
21 #  WILL NOT WORK.
22 #
23 #  The solution is to use the default configuration, which does
24 #  work.
25 #
26 #  Setting "Auth-Type = LDAP" is ALMOST ALWAYS WRONG.  We
27 #  really can't emphasize this enough.
28 #       
29 ldap {
30         #
31         #  Note that this needs to match the name in the LDAP
32         #  server certificate, if you're using ldaps.
33         server = "ldap.your.domain"
34         #identity = "cn=admin,o=My Org,c=UA"
35         #password = mypass
36         basedn = "o=My Org,c=UA"
37         filter = "(uid=%{%{Stripped-User-Name}:-%{User-Name}})"
38         #base_filter = "(objectclass=radiusprofile)"
39
40         #  How many connections to keep open to the LDAP server.
41         #  This saves time over opening a new LDAP socket for
42         #  every authentication request.
43         ldap_connections_number = 5
44
45         # seconds to wait for LDAP query to finish. default: 20
46         timeout = 4
47
48         #  seconds LDAP server has to process the query (server-side
49         #  time limit). default: 20
50         #
51         #  LDAP_OPT_TIMELIMIT is set to this value.
52         timelimit = 3
53
54         #
55         #  seconds to wait for response of the server. (network
56         #   failures) default: 10
57         #
58         #  LDAP_OPT_NETWORK_TIMEOUT is set to this value.
59         net_timeout = 1
60
61         #
62         #  This subsection configures the tls related items
63         #  that control how FreeRADIUS connects to an LDAP
64         #  server.  It contains all of the "tls_*" configuration
65         #  entries used in older versions of FreeRADIUS.  Those
66         #  configuration entries can still be used, but we recommend
67         #  using these.
68         #
69         tls {
70                 # Set this to 'yes' to use TLS encrypted connections
71                 # to the LDAP database by using the StartTLS extended
72                 # operation.
73                 #                       
74                 # The StartTLS operation is supposed to be
75                 # used with normal ldap connections instead of
76                 # using ldaps (port 689) connections
77                 start_tls = no
78
79                 # cacertfile    = /path/to/cacert.pem
80                 # cacertdir             = /path/to/ca/dir/
81                 # certfile              = /path/to/radius.crt
82                 # keyfile               = /path/to/radius.key
83                 # randfile              = /path/to/rnd
84
85                 #  Certificate Verification requirements.  Can be:
86                 #    "never" (don't even bother trying)
87                 #    "allow" (try, but don't fail if the cerificate
88                 #               can't be verified)
89                 #    "demand" (fail if the certificate doesn't verify.)
90                 #
91                 #       The default is "allow"
92                 # require_cert  = "demand"
93         }
94
95         # default_profile = "cn=radprofile,ou=dialup,o=My Org,c=UA"
96         # profile_attribute = "radiusProfileDn"
97         # access_attr = "dialupAccess"
98
99         # Mapping of RADIUS dictionary attributes to LDAP
100         # directory attributes.
101         dictionary_mapping = ${confdir}/ldap.attrmap
102
103         #  As of version 2.2.0, the "password_attribute" configuration item
104         #  is deprecated, and SHOULD NOT be used.
105         #  The default behavior now is to map the LDAP "userPassword" field
106         #  to a FreeRADIUS "password" field.  The PAP module will take care
107         #  of decoding headers (e.g. {crypt}, etc.), and doing any base-64
108         #  decoding.
109         #
110         #  It is only used for obtaining a password from a Novell eDirectory
111         #  backend. It will work ONLY IF FreeRADIUS has been
112         #  built with the --with-edir configure option.
113         #
114         #  See also the following links:
115         #
116         #  http://www.novell.com/coolsolutions/appnote/16745.html
117         #  https://secure-support.novell.com/KanisaPlatform/Publishing/558/3009668_f.SAL_Public.html
118         #
119         #  Novell may require TLS encrypted sessions before returning
120         #  the user's password.
121         #
122         # password_attribute = nspmPassword
123
124         #  Un-comment the following to disable Novell
125         #  eDirectory account policy check and intruder
126         #  detection. This will work *only if* FreeRADIUS is
127         #  configured to build with --with-edir option.
128         #
129         edir_account_policy_check = no
130
131         #
132         #  Group membership checking.  Disabled by default.
133         #
134         # groupname_attribute = cn
135         # groupmembership_filter = "(|(&(objectClass=GroupOfNames)(member=%{control:Ldap-UserDn}))(&(objectClass=GroupOfUniqueNames)(uniquemember=%{control:Ldap-UserDn})))"
136         # groupmembership_attribute = radiusGroupName
137
138         # compare_check_items = yes
139         # do_xlat = yes
140         # access_attr_used_for_allow = yes
141
142         #
143         #  The following two configuration items are for Active Directory
144         #  compatibility.  If you see the helpful "operations error"
145         #  being returned to the LDAP module, uncomment the next
146         #  two lines.
147         #
148         # chase_referrals = yes
149         # rebind = yes
150
151         #
152         #  By default, if the packet contains a User-Password,
153         #  and no other module is configured to handle the
154         #  authentication, the LDAP module sets itself to do
155         #  LDAP bind for authentication.
156         #
157         #  THIS WILL ONLY WORK FOR PAP AUTHENTICATION.
158         #
159         #  THIS WILL NOT WORK FOR CHAP, MS-CHAP, or 802.1x (EAP). 
160         #
161         #  You can disable this behavior by setting the following
162         #  configuration entry to "no".
163         #
164         #  allowed values: {no, yes}
165         # set_auth_type = yes
166
167         #  ldap_debug: debug flag for LDAP SDK
168         #  (see OpenLDAP documentation).  Set this to enable
169         #  huge amounts of LDAP debugging on the screen.
170         #  You should only use this if you are an LDAP expert.
171         #
172         #       default: 0x0000 (no debugging messages)
173         #       Example:(LDAP_DEBUG_FILTER+LDAP_DEBUG_CONNS)
174         #ldap_debug = 0x0028 
175
176         #  As of version 2.2.0, the "auto_header" and
177         #  "password_header" configuration items have been removed.
178         #  Since they were deprecated long ago, this change should not
179         #  affect anyone.
180
181         #
182         #  Keepalive configuration.  This MAY NOT be supported by your
183         #  LDAP library.  If these configuration entries appear in the
184         #  output of "radiusd -X", then they are supported.  Otherwise,
185         #  they are unsupported, and changing them will do nothing.
186         #
187         keepalive {
188                 # LDAP_OPT_X_KEEPALIVE_IDLE
189                 idle = 60
190
191                 # LDAP_OPT_X_KEEPALIVE_PROBES
192                 probes = 3
193
194                 # LDAP_OPT_X_KEEPALIVE_INTERVAL
195                 interval = 3
196         }
197 }