Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 4. 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.
4.1. Prerequisites Link kopierenLink in die Zwischenablage kopiert!
- The server meets the requirements of the latest Red Hat Directory Server version as described in the Red Hat Directory Server 12 Release Notes.
4.2. Installing the Directory Server packages Link kopierenLink in die Zwischenablage kopiert!
Use the following procedure to install the Directory Server packages.
Prerequisites
- You enabled RHEL and Directory Server repositories as described in Enabling Directory Server repositories.
Procedure
Enable the
redhat-ds:12module and install Directory Server packages:dnf module enable redhat-ds:12 dnf install 389-ds-base cockpit-389-ds
# dnf module enable redhat-ds:12 # dnf install 389-ds-base cockpit-389-dsCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.3. Creating a .inf file for a Directory Server instance installation Link kopierenLink in die Zwischenablage kopiert!
Create a .inf file for the dscreate utility, and adjust the file to your environment. In a later step, you will use this file to create the new Directory Server instance.
Prerequisites
-
You installed the
redhat-ds:12module.
Procedure
Use the
dscreate create-templatecommand to create a template.inffile. For example, to store the template in the/root/instance_name.inffile, enter:dscreate create-template /root/instance_name.inf
# dscreate create-template /root/instance_name.infCopy to Clipboard Copied! Toggle word wrap Toggle overflow The created file contains all available parameters including descriptions.
Edit the file that you created in the previous step:
Uncomment the parameters that you want to set to customize the installation.
All parameters have defaults. However, customize certain parameters for a production environment. For example, set at least the following parameters in the
[slapd]section:instance_name = instance_name root_password = password
instance_name = instance_name root_password = passwordCopy to Clipboard Copied! Toggle word wrap Toggle overflow By default, Directory Server creates an instance with the Berkeley Database (BDB). To install an instance with the LMDB backend that is a Technology Preview starting with Directory Server 12.5, set the following parameters:
db_lib = mdb mdb_max_size = 21474836480
db_lib = mdb mdb_max_size = 21474836480Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note that
mdb_max_sizemust be an integer value that depends on your directory size. For more details, see nsslapd-mdb-max-size attribute description.To use the instance behind a load balancer with GSSAPI authentication, set the
full_machine_nameparameter in the[general]section to the fully-qualified domain name (FQDN) of the load balancer instead of the FQDN of the Directory Server host:full_machine_name = loadbalancer.example.com
full_machine_name = loadbalancer.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow Uncomment the
strict_host_checkingparameter in the[general]section and set it toFalse:strict_host_checking = False
strict_host_checking = FalseCopy to Clipboard Copied! Toggle word wrap Toggle overflow To automatically create a suffix during instance creation, set the following parameters in the
[backend-userroot]section:create_suffix_entry = True suffix = dc=example,dc=com
create_suffix_entry = True suffix = dc=example,dc=comCopy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantIf you do not create a suffix during instance creation, you must create it later manually before you can store data in this instance.
Optional: Uncomment other parameters and set them to appropriate values for your environment. For example, use these parameters to specify replication options, such as authentication credentials and changelog trimming, or set different ports for the LDAP and LDAPS protocols.
NoteBy default, new instances that you create include a self-signed certificate and TLS enabled. For increased security, do not disable this feature. Note that you can replace the self-signed certificate with a certificate issued by a Certificate Authority (CA) at a later date.
4.4. Using a .inf file to set up a new Directory Server instance Link kopierenLink in die Zwischenablage kopiert!
This section describes how to use a .inf file to set up a new Directory Server instance using the command line.
Prerequisites
-
You created a
.inffile for the Directory Server instance.
Procedure
Pass the
.inffile to thedscreate from-filecommand to create the new instance:Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
dscreateutility automatically starts the instance and configures RHEL to start the service when the system boots.Open the required ports in the firewall:
firewall-cmd --permanent --add-port={389/tcp,636/tcp}# firewall-cmd --permanent --add-port={389/tcp,636/tcp}Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload the firewall configuration:
firewall-cmd --reload
# firewall-cmd --reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.5. Creating a keytab for the load balancer and configuring Directory Server to use the keytab Link kopierenLink in die Zwischenablage kopiert!
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.keytab
KRB5_KTNAME=/etc/dirsrv/slapd-instance_name/ldap.keytabCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the Directory Server instance:
dsctl instance_name restart
# dsctl instance_name restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that you can connect to the load balancer using the GSSAPI protocol:
ldapsearch -H ldap://loadbalancer.example.com -Y GSSAPI
# ldapsearch -H ldap://loadbalancer.example.com -Y GSSAPICopy to Clipboard Copied! Toggle word wrap Toggle overflow If 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
# ldapsearch -H ldap://server1.example.com -Y GSSAPICopy to Clipboard Copied! Toggle word wrap Toggle overflow