]> git.sur5r.net Git - openldap/blob - doc/guide/admin/security.sdf
Add link to SDF tools at CPAN.
[openldap] / doc / guide / admin / security.sdf
1 # Copyright 1999-2001, 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 provides 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 IP Firewall be
28 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 LDAP over
41 {{TERM:TCP}} (e.g.  {{F:ldap://}}) and port 636/tcp for LDAP over
42 {{TERM:SSL}} (e.g.  {{F:ldaps://}}).
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 OpenLDAP supports {{TERM:TCP}} Wrappers.  TCP Wrappers provide a rule-based
52 access control system for controlling TCP/IP access to the server.
53 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
61 It is noted that TCP wrappers require the connection to be accepted.
62 As significant processing is required just to deny a connection,
63 it is generally advised that IP firewall protection be used instead
64 of TCP wrappers.
65
66 See {{hosts_access}}(5) for more information on TCP wrapper rules.
67
68
69 H2: Integrity and Confidentiality Protection
70
71 {{TERM[expand]TLS}} (TLS) can be used to provide integrity and
72 confidentiality protection.  OpenLDAP supports both StartTLS and
73 {{F:ldaps://}}.  See the {{SECT:Using TLS}} chapter for more
74 information.
75
76 A number of {{TERM[expand]SASL}} (SASL) mechanisms, such as DIGEST-MD5
77 and {{TERM:GSSAPI}}, also provide integrity and confidentiality
78 protection.  See the {{SECT:Using SASL}} chapter for more information.
79
80
81 H3: Security Strength Factors
82
83 The server uses {{TERM[expand]SSF}}s (SSF) to indicate the relative
84 strength of protection.  A SSF of zero (0) indicates no protections
85 are in place.  A SSF of one (1) indicates integrity protection are
86 in place.  A SSF greater than one (>1) roughly correlates to the
87 effective encryption key length.  For example, {{TERM:DES}} is 56,
88 {{TERM:3DES}} is 112, and {{TERM:AES}} 128, 192, or 256.
89
90 A number of administrative controls rely on SSFs associated with
91 TLS and SASL protection in place on an LDAP session.
92
93 {{EX:security}} controls disallow operations when appropriate
94 protections are not in place.  For example:
95
96 >       security ssf=1 update_ssf=112
97
98 requires integrity protection for all operations and encryption
99 protection, 3DES equivalent, for update operations (e.g. add, delete,
100 modify, etc.).  See {{slapd.conf}}(5) for details.
101
102 For fine-grained control, SSFs may be used in access controls.  See
103 {{SECT:Access Control}} section of the {{SECT:The slapd Configuration
104 File}} for more information.
105
106
107 H2: Authentication Methods
108
109 H3: "simple" method
110
111 The LDAP "simple" method has three modes of operation:
112
113 * anonymous,
114 * unauthenticated, and
115 * user/password authenticated.
116
117 Anonymous access is obtained by providing no name and no password
118 to the "simple" bind operation.  Unauthenticated access is obtained
119 by providing a name but no password.  Authenticated access is obtain
120 by providing a valid name and password.
121
122 An anonymous bind results in an {{anonymous}} authorization.
123 Anonymous bind mechanism is enabled by default, but can be disabled
124 by specifying "{{EX:disallow bind_anon}}" in {{slapd.conf}}(5).
125
126 An unauthenticated bind results in an {{anonymous}} authorization.
127 Unauthenticated bind mechanism is disabled by default, but can be
128 enabled by specifying "{{EX:allow bind_anon_cred}}" in {{slapd.conf}}(5).
129 As a number of LDAP applications mistakenly generate unauthenticated
130 bind request when authenticated access was intended (that is, they
131 do not ensure a password was provided), this mechanism should
132 generally not be enabled.
133
134 A successful authenticated bind results in a user authorization
135 identity, the provided name, being associated with the session.
136 Authenticated bind is enabled by default.  However, as this mechanism
137 offers no evesdropping protection (e.g., the password is set in the
138 clear), it is generally recommended that it be used only in tightly
139 controlled systems or when the LDAP session is protected by other
140 means (e.g., TLS, {{TERM:IPSEC}}).  Where the administrator relies
141 on TLS to protect the password, it is recommended that unprotected
142 authentication be disabled.  This is done by setting "{{EX:disallow
143 bind_simple_unprotected}} in {{slapd.conf}}(5).   The authenticated
144 bind mechanism can be completely disabled by setting "{{EX:disallow
145 bind_simple}}".
146
147 Note:  An unsuccessful bind always results in the session having
148 an {{anonymous}} authorization state.
149
150
151 H3: SASL method
152
153 The LDAP SASL method allows use of any SASL authentication
154 mechanism.  The {{SECT:Using SASL}} discusses use of SASL.
155