Chapter 5. Installing Directory Server with Kerberos authentication behind a load balancer
Installing Directory Server instances that work behind a load balancer and support Kerberos authentication require additional steps compared during the installation.
If a user accesses a service using Generic Security Services API (GSSAPI), the Kerberos principal includes the DNS name of the service’s host. In case the user connects to a load balancer, the principal contains the DNS name of the load balancer, for example: ldap/loadbalancer.example.com@EXAMPLE.COM, and not the DNS name of the Directory Server instance.
To facilitate successful connection, the Directory Server instance that receives the request must use the same name as the load balancer, even if the load balancer DNS name is different.
This section describes how to set up an Directory Server instance with Kerberos authentication support behind a load balancer.
5.1. Prerequisites Copy linkLink copied to clipboard!
-
You installed the Directory Server instance as described in the Setting up a new instance on the command line using a
.inffile section.
5.2. Creating a keytab for the load balancer and configuring Directory Server to use the keytab Copy linkLink copied to clipboard!
Before user can authenticate to Directory Server behind a load balancer using GSSAPI, you must create a Kerberos principal for the load balancer and configure Directory Server to use the Kerberos principal. This section describes this procedure.
Prerequisites
An instance that contains the following
.inffile configuration:-
The
full_machine_nameparameter set to the DNS name of the load balancer. -
The
strict_host_checkingparameter set toFalse.
-
The
Procedure
-
Create the Kerberos principal for the load balancer, for example
ldap/loadbalancer.example.com_@_EXAMPLE.COM. The procedure to create the service principal depends on your Kerberos installation. For details, see your Kerberos server’s documentation. -
Optional: You can add further principals to the keytab file. For example, to enable users to connect to the Directory Server instance behind the load balancer directly using Kerberos authentication, add additional principals for the Directory Server host. For example,
ldap/server1.example.com@EXAMPLE.COM. -
Copy the service keytab file to the Directory Server host, and store it, for example, in the
/etc/dirsrv/slapd-instance_name/ldap.keytabfile. Add the path to the service keytab to the
/etc/sysconfig/slapd-instance_namefile:KRB5_KTNAME=/etc/dirsrv/slapd-instance_name/ldap.keytabRestart the Directory Server instance:
# dsctl <instance_name> restart
Verification
Verify that you can connect to the load balancer using the GSSAPI protocol:
# ldapsearch -H ldap://loadbalancer.example.com -Y GSSAPIIf you added additional Kerberos principals to the keytab file, such as for the Directory Server host itself, also verify these connections:
# ldapsearch -H ldap://server1.example.com -Y GSSAPI