Chapter 3. Requiring LDAPS or STARTTLS for encrypted connections
Chapter 3. Requiring LDAPS or STARTTLS for encrypted connections To prevent sending unencrypted passwords over the network, you can configure Directory Server to require users to use LDAPS or STARTTLS encryption when connecting to the server. 3.1. Configuring Directory Server using the command line to accept only connections encrypted with LDAPS or STARTTLS By default, Directory Server allows authentication using a bind DN and a password over unencrypted connections, which is a security risk. Suppose you cannot use an alternative secure mechanism, such as certificate-based authentication or SASL. In that case, you can configure Directory Server to require an encrypted connection when authenticating to the server using TLS or STARTTLS. Note Requiring a secure connection for bind operations only applies to authenticated binds. Bind operations without a password, such as anonymous and unauthenticated binds, can proceed over standard connections. Prerequisites You configured existing server-to-server connections, such as replication agreements, to use secure binds. Procedure Set the nsslapd-require-secure-binds configuration parameter to on : # dsconf -D " cn=Directory Manager " ldap://server.example.com config replace nsslapd-require-secure-binds=on Optional: If you want to use LDAPS, disable the plain text LDAP port: # dsconf -D " cn=Directory Manager " ldap://server.example.com security disable_plain_port Restart the instance: # dsctl instance_name restart Important When you enable this feature, it is required for all connections. For example, this includes replication agreements, synchronization, and database chaining. Additional resources Defining access based on the authentication method 3.2. Configuring Directory Server using the web console to accept only connections encrypted with LDAPS or STARTTLS By default, Directory Server allows authentication using a bind DN and a password over unencrypted connections, which is a security risk. Suppose you cannot use an alternative secure mechanism, such as certificate-based authentication or SASL. In that case, you can configure Directory Server to require an encrypted connection when authenticating to the server using TLS or STARTTLS. Note Requiring a secure connection for bind operations only applies to authenticated binds. Bind operations without a password, such as anonymous and unauthenticated binds, can proceed over standard connections. Prerequisites You configured existing server-to-server connections, such as replication agreements, to use secure binds. You are logged in to the instance in the web console. Procedure Navigate to Server Security Security Configuration , select the Require Secure Connections option, and click Save Configuration . Optional: If you want to use LDAPS, navigate to Server Server Settings General Settings , and set LDAP Port to 0 to disable the plain text LDAP port. Click Save . Click Actions in the top right corner, and select Restart Instance . Important When you enable this feature, it is required for all connections. For example, this includes replication agreements, synchronization, and database chaining. Additional resources Configuring certificate-based authentication
dsconf -D " cn=Directory Manager " ldap://server.example.com config replace nsslapd-require-secure-binds=on dsconf -D " cn=Directory Manager " ldap://server.example.com security disable_plain_port dsctl instance_name restart