]> git.sur5r.net Git - openldap/blob - doc/guide/admin/security.sdf
happy new year
[openldap] / doc / guide / admin / security.sdf
1 # Copyright 1999-2007 The OpenLDAP Foundation, All Rights Reserved.
2 # COPYING RESTRICTIONS APPLY, see COPYRIGHT.
3
4 H1: Security Considerations
5
6 OpenLDAP Software is designed to run in a wide variety of computing
7 environments from tightly-controlled closed networks to the global
8 Internet.  Hence, OpenLDAP Software supports many different security
9 mechanisms.  This chapter describes these mechanisms and discusses
10 security considerations for using OpenLDAP Software.
11
12 H2: Network Security
13
14 H3: Selective Listening
15
16 By default, {{slapd}}(8) will listen on both the IPv4 and IPv6 "any"
17 addresses.  It is often desirable to have {{slapd}} listen on select
18 address/port pairs.  For example, listening only on the IPv4 address
19 {{EX:127.0.0.1}} will disallow remote access to the directory server.
20 E.g.:
21
22 >       slapd -h ldap://127.0.0.1
23
24 While the server can be configured to listen on a particular interface
25 address, this doesn't necessarily restrict access to the server to
26 only those networks accessible via that interface.   To selective
27 restrict remote access, it is recommend that an {{SECT:IP Firewall}}
28 be used to restrict access.
29
30 See {{SECT:Command-line Options}} and {{slapd}}(8) for more
31 information.
32
33
34 H3: IP Firewall
35
36 {{TERM:IP}} firewall capabilities of the server system can be used
37 to restrict access based upon the client's IP address and/or network
38 interface used to communicate with the client.
39
40 Generally, {{slapd}}(8) listens on port 389/tcp for {{F:ldap://}}
41 sessions and port 636/tcp for {{F:ldaps://}}) sessions.  {{slapd}}(8)
42 may be configured to listen on other ports.
43
44 As specifics of how to configure IP firewall are dependent on the
45 particular kind of IP firewall used, no examples are provided here.
46 See the document associated with your IP firewall.
47
48
49 H3: TCP Wrappers
50
51 {{slapd}}(8) supports {{TERM:TCP}} Wrappers.  TCP Wrappers provide
52 a rule-based access control system for controlling TCP/IP access
53 to the server.  For example, the {{host_options}}(5) rule:
54
55 >       slapd: 10.0.0.0/255.0.0.0 127.0.0.1 : ALLOW
56 >       slapd: ALL : DENY
57
58 allows only incoming connections from the private network {{F:10.0.0.0}}
59 and localhost ({{F:127.0.0.1}}) to access the directory service.
60 Note that IP addresses are used as {{slapd}}(8) is not normally
61 configured to perform reverse lookups.
62
63 It is noted that TCP wrappers require the connection to be accepted.
64 As significant processing is required just to deny a connection,
65 it is generally advised that IP firewall protection be used instead
66 of TCP wrappers.
67
68 See {{hosts_access}}(5) for more information on TCP wrapper rules.
69
70
71 H2: Data Integrity and Confidentiality Protection
72
73 {{TERM[expand]TLS}} (TLS) can be used to provide data integrity and
74 confidentiality protection.  OpenLDAP supports negotiation of
75 {{TERM:TLS}} ({{TERM:SSL}}) via both StartTLS and {{F:ldaps://}}.
76 See the {{SECT:Using TLS}} chapter for more information.  StartTLS
77 is the standard track mechanism.
78
79 A number of {{TERM[expand]SASL}} (SASL) mechanisms, such as
80 {{TERM:DIGEST-MD5}} and {{TERM:GSSAPI}}, also provide data integrity
81 and confidentiality protection.  See the {{SECT:Using SASL}} chapter
82 for more information.
83
84
85 H3: Security Strength Factors
86
87 The server uses {{TERM[expand]SSF}}s (SSF) to indicate the relative
88 strength of protection.  A SSF of zero (0) indicates no protections
89 are in place.  A SSF of one (1) indicates integrity protection are
90 in place.  A SSF greater than one (>1) roughly correlates to the
91 effective encryption key length.  For example, {{TERM:DES}} is 56,
92 {{TERM:3DES}} is 112, and {{TERM:AES}} 128, 192, or 256.
93
94 A number of administrative controls rely on SSFs associated with
95 TLS and SASL protection in place on an LDAP session.
96
97 {{EX:security}} controls disallow operations when appropriate
98 protections are not in place.  For example:
99
100 >       security ssf=1 update_ssf=112
101
102 requires integrity protection for all operations and encryption
103 protection, 3DES equivalent, for update operations (e.g. add, delete,
104 modify, etc.).  See {{slapd.conf}}(5) for details.
105
106 For fine-grained control, SSFs may be used in access controls.
107 See {{SECT:The access Configuration Directive}} section of the
108 {{SECT:The slapd Configuration File}} for more information.
109
110
111 H2: Authentication Methods
112
113 H3: "simple" method
114
115 The LDAP "simple" method has three modes of operation:
116
117 * anonymous,
118 * unauthenticated, and
119 * user/password authenticated.
120
121 Anonymous access is requested by providing no name and no password
122 to the "simple" bind operation.  Unauthenticated access is requested
123 by providing a name but no password.  Authenticated access is
124 requested by providing a valid name and password.
125
126 An anonymous bind results in an {{anonymous}} authorization
127 association.  Anonymous bind mechanism is enabled by default, but
128 can be disabled by specifying "{{EX:disallow bind_anon}}" in
129 {{slapd.conf}}(5).  Note that disabling the anonymous bind mechanism
130 does not prevent anonymous access to the directory.  To require
131 authentication to access the directory, one should instead
132 specify "{{EX:require authc}}".
133
134 An unauthenticated bind also results in an {{anonymous}} authorization
135 association.  Unauthenticated bind mechanism is disabled by default,
136 but can be enabled by specifying "{{EX:allow bind_anon_cred}}" in
137 {{slapd.conf}}(5).  As a number of LDAP applications mistakenly
138 generate unauthenticated bind request when authenticated access was
139 intended (that is, they do not ensure a password was provided),
140 this mechanism should generally remain disabled.
141
142 A successful user/password authenticated bind results in a user
143 authorization identity, the provided name, being associated with
144 the session.  User/password authenticated bind is enabled by default.
145 However, as this mechanism itself offers no evesdropping protection
146 (e.g., the password is set in the clear), it is recommended that
147 it be used only in tightly controlled systems or when the LDAP
148 session is protected by other means (e.g., TLS, {{TERM:IPsec}}).
149 Where the administrator relies on TLS to protect the password, it
150 is recommended that unprotected authentication be disabled.  This
151 is done using the {{EX:security}} directive's {{EX:simple_bind}}
152 option, which provides fine grain control over the level of confidential
153 protection to require for {{simple}} user/password authentication.
154 E.g., using {{EX:security simple_bind=56}} would require {{simple}}
155 binds to use encryption of DES equivalent or better.
156
157 The user/password authenticated bind mechanism can be completely
158 disabled by setting "{{EX:disallow bind_simple}}".
159
160 Note:  An unsuccessful bind always results in the session having
161 an {{anonymous}} authorization association.
162
163
164 H3: SASL method
165
166 The LDAP {{TERM:SASL}} method allows use of any SASL authentication
167 mechanism.  The {{SECT:Using SASL}} discusses use of SASL.
168