As their IdM deployment expands over time with the addition of new IdM clients or new IdM servers and replicas, customers often have a mixed topology containing various RHEL versions.
This blog post describes the version requirements and limitations that can be seen in these mixed topologies.
- General version requirements
- FIPS mode
General version requirements
In the general case, it is possible to install a client with a different version from the server (for instance a RHEL 7.9 IdM client with a RHEL 9.2 IdM server, or the opposite). There are some restrictions, though, when replicas are taken into consideration:
- it is only possible to install a replica with the same or later version as the server (for instance a RHEL 8.8 replica can’t be created from a RHEL 9.2 server). The limitation is described in Replica version requirements
- it is not supported to skip a major version for replica installation (for instance a RHEL 9.2 replica can’t be installed directly from a RHEL 7.9 server). The limitation is described in Migrating your IdM environment from RHEL 8 servers to RHEL 9 servers.
FIPS mode
The Federal Information Processing Standard (FIPS) publication is a security standard published by NIST (National Institute of Standards and Technology). The most recent versions for the Security Requirements for Cryptographic Modules are FIPS 140-2 and FIPS 140-3, and RHEL versions, depending on their age, have been certified for one or the other. The consequence is that they allow different sets of algorithms and interoperability issues may arise when no common algorithm is found.
The following sections list the known issues and their workaround (when available).
Client installation in FIPS mode
If the IdM servers are installed in FIPS mode, Red Hat recommends that the IdM clients are also FIPS-enabled (as they may be later promoted to replicas).
Installation of a RHEL 7.9 (or lower) client with RHEL 9.2 (or above) server in FIPS mode
RHEL 9.2 introduced a new requirement for EMS (Extended Master Secret) extension in TLS 1.2: Bug 2188046 – Support requiring EMS in TLS 1.2, default to it when in FIPS mode.
This means that the EMS extension is now mandatory for TLS 1.2 connections on FIPS-enabled RHEL 9 systems, in accordance with FIPS-140-3 requirements. TLS 1.3 is not affected.
RHEL 7.9 clients and lower do not support TLS 1.3, and their version of openssl does not support the EMS extension in TLS 1.2. The consequence is that the installation of a RHEL 7.9 (or lower) client with a RHEL 9.2 (or higher) server fails with a SSL hanshake failure:
# ipa-client-install --domain ipa.test --realm IPA.TEST --server server.ipa.test --principal admin --password Secret123 -U
WARNING: ntpd time&date synchronization service will not be configured as
conflicting service (chronyd) is enabled
Use --force-ntpd option to disable it and force configuration of ntpd
Client hostname: client.ipa.test
Realm: IPA.TEST
DNS Domain: ipa.test
IPA Server: server.ipa.test
BaseDN: dc=ipa,dc=test
Skipping synchronizing time with NTP server.
Successfully retrieved CA cert
Subject: CN=Certificate Authority,O=IPA.TEST
Issuer: CN=Certificate Authority,O=IPA.TEST
Valid From: 2023-07-06 12:52:19
Valid Until: 2043-07-06 12:52:19
Enrolled in IPA realm IPA.TEST
Created /etc/ipa/default.conf
New SSSD config will be created
Configured sudoers in /etc/nsswitch.conf
Configured /etc/sssd/sssd.conf
trying https://server.ipa.test/ipa/json
[try 1]: Forwarding 'schema' to json server 'https://server.ipa.test/ipa/json'
cannot connect to 'https://server.ipa.test/ipa/json': [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:618)
The ipa-client-install command failed. See /var/log/ipaclient-install.log for more information
Important: RHEL 8.x clients are not affected because they support TLS 1.3 and use this version of TLS during IdM client installation.
Workaround
If the customer has no other solution than using a higher RHEL client version, it is possible to relax the requirement for EMS by applying a specific crypto sub-policy on the RHEL 9.2 (or above) server: NO-ENFORCE-EMS.
Note that this crypto policy breaks the FIPS 140-3 requirement.
[rhel9server]# update-crypto-policies --set FIPS:NO-ENFORCE-EMS
It is recommended to reboot the system after applying the crypto policy. The installation of the RHEL 7.9 (or lower) client after the crypto policy update completes successfully.
Relevant bug
Bug 2220915 – RHEL 7.9 client installation fails in FIPS mode with 9.2 server
Installation of a RHEL 9+ client with a RHEL 8.6 (or lower) server in FIPS mode
When the IPA server has been setup initially on a RHEL 8.6 or lower version, the IdM master key was created with the AES HMAC-SHA1 encryption type. This encryption type is blocked on RHEL9 in FIPS mode and IdM client installer fails to find a common encryption type. The consequence is that IdM client fails to install:
# ipa-client-install --principal admin --password Secret123 -U
This program will set up IPA client.
Version 4.10.2
Discovery was successful!
Client hostname: client9.testrelm.test
Realm: TESTRELM.TEST
DNS Domain: testrelm.test
IPA Server: master.testrelm.test
BaseDN: dc=testrelm,dc=test
Synchronizing time
No SRV records of NTP servers found and no NTP server or pool address was provided.
Using default chrony configuration.
Attempting to sync time with chronyc.
Process chronyc waitsync failed to sync time!
Unable to sync time with chrony server, assuming the time is in sync. Please check that 123 UDP port is opened, and any time server is on network.
Please make sure the following ports are opened in the firewall settings:
TCP: 80, 88, 389
UDP: 88 (at least one of TCP/UDP ports 88 has to be open)
Also note that following ports are necessary for ipa-client working properly after enrollment:
TCP: 464
UDP: 464, 123 (if NTP enabled)
Installation failed. Rolling back changes.
Disabling client Kerberos and LDAP configurations
nscd daemon is not installed, skip configuration
nslcd daemon is not installed, skip configuration
Client uninstall complete.
Kerberos authentication failed: kinit: KDC has no support for encryption type while getting initial credentials
The ipa-client-install command failed. See /var/log/ipaclient-install.log for more information
#
In order to check the encryption type of IdM master key on the RHEL 8 server:
# kadmin.local getprinc K/M | grep -E '^Key:' Key: vno 1, aes256-cts-hmac-sha1-96
If the encryption type is aes256-cts-hmac-sha1-96, the installation of a RHEL9 client fails.
Workaround
If the customer has no other solution (for instance for a migration from RHEL 8 to RHEL9 using the installation of a RHEL9 replica), the workaround consists in enabling the use of AES HMAC-SHA1 on the RHEL 9 client. Note that this workaround might violate FIPS compliance:
[rhel9client]# update-crypto-policies --set FIPS:AD-SUPPORT
Relevant bug
Bug 2103327 – Generate AES SHA-2 HMAC keys on deployed IPA instances in FIPS mode
Important: this issue does not happen if the first IdM server was installed with RHEL 8.7 or above, as the IdM master key encryption type is aes256-cts-hmac-sha384-192.
Replica installation/migration in FIPS mode
If the initial IdM server was installed in FIPS mode, then it is mandatory to enable FIPS mode on the replica before starting the ipa-replica-install procedure.
Migration from RHEL 8.7+ to RHEL9
The installation of the RHEL 9 replica fails during replication setup because the replication requires GSS authentication but the session key is encrypted with a type that is not supported by the RHEL9 replica.
# ipa-replica-install ... [26/40]: setting up initial replication Starting replication, please wait until this has completed. Update in progress, 15 seconds elapsed [ldap://master.testrelm.test:389] reports: Update failed! Status: [Error (49) - LDAP error: Invalid credentials - no response received] [error] RuntimeError: Failed to start replication Your system may be partly configured. Run /usr/sbin/ipa-server-install --uninstall to clean up. Failed to start replication The ipa-replica-install command failed. See /var/log/ipareplica-install.log for more information
Workaround
- On the server, edit /etc/krb5.conf.d/crypto-policies, so that permitted_enctypes uses aes256-cts-hmac-sha384-192 as first value
# cat /etc/krb5.conf.d/crypto-policies [libdefaults] permitted_enctypes = aes256-cts-hmac-sha384-192 aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 aes128-cts-hmac-sha256-128
- Restart IPA services on the server
- Retry the replica installation
Relevant bugs
Bug 2220834 – Migration of a RHEL 8.8+ server to RHEL 9.2 fails in FIPS mode
Bug 2219912 – krb5 policy updates
Bug 2225222 – Ordering matters for permitted_enctypes
Vault operations on a RHEL 9 client in FIPS mode
The ipa vault-* commands fail on a RHEL 9 client in FIPS mode. The vault client uses RSA-PKCS1v15 padding encryption that is blocked in FIPS mode.
# ipa vault-add myvault
New password:
Enter New password again to verify:
ipa: ERROR: non-public: ValueError: Encryption/decryption failed.
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/ipalib/backend.py", line 141, in execute
return self.Command[_name](*args, **options)
File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 471, in __call__
return self.__do_call(*args, **options)
File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 499, in __do_call
ret = self.run(*args, **options)
File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 1224, in run
return self.forward(*args, **options)
File "/usr/lib/python3.9/site-packages/ipaclient/plugins/vault.py", line 356, in forward
self.api.Command.vault_archive(*args, **opts)
File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 471, in __call__
return self.__do_call(*args, **options)
File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 499, in __do_call
ret = self.run(*args, **options)
File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 1224, in run
return self.forward(*args, **options)
File "/usr/lib/python3.9/site-packages/ipaclient/plugins/vault.py", line 932, in forward
self.api.Command.vault_retrieve(*args, **opts)
File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 471, in __call__
return self.__do_call(*args, **options)
File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 499, in __do_call
ret = self.run(*args, **options)
File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 1224, in run
return self.forward(*args, **options)
File "/usr/lib/python3.9/site-packages/ipaclient/plugins/vault.py", line 1127, in forward
response = self.internal(algo, transport_cert, *args, **options)
File "/usr/lib/python3.9/site-packages/ipaclient/plugins/vault.py", line 735, in internal
result = self._do_internal(algo, transport_cert, False,
File "/usr/lib/python3.9/site-packages/ipaclient/plugins/vault.py", line 712, in _do_internal
wrapped_session_key = public_key.encrypt(
File "/usr/lib64/python3.9/site-packages/cryptography/hazmat/backends/openssl/rsa.py", line 537, in encrypt
return _enc_dec_rsa(self._backend, self, plaintext, padding)
File "/usr/lib64/python3.9/site-packages/cryptography/hazmat/backends/openssl/rsa.py", line 87, in _enc_dec_rsa
return _enc_dec_rsa_pkey_ctx(backend, key, data, padding_enum, padding)
File "/usr/lib64/python3.9/site-packages/cryptography/hazmat/backends/openssl/rsa.py", line 151, in _enc_dec_rsa_pkey_ctx
raise ValueError("Encryption/decryption failed.")
ValueError: Encryption/decryption failed.
ipa: ERROR: an internal error has occurred
#
Note that it is possible to use a RHEL 8.x client (or lower) to execute ipa vault-* commands even if the server is a RHEL 9 system, because RHEL 8 does not block the RSA-PKCS1v15 padding encryption.
Relevant bug
Bug 2089907 – ‘ipa vault-add is failing with ipa: ERROR: an internal error has occurred in FIPS mode
Trust in FIPS mode
In order to establish a trust from a RHEL server in FIPS mode, the server must meet the following requirements:
- the IdM server must be a RHEL 8.4.0 or later system
- The AD server and the IdM server must support common encryption types. The supported options are detailed in Ensuring support for common encryption types in AD and RHEL
Establish 2-way trust on a RHEL server in FIPS mode
It is not possible to establish a 2-way trust from an IdM server in FIPS mode because the IdM server does not accept the RC4 NTLM hash that the AD domain controller uses when attempting to authenticate.
# /usr/bin/ipa trust-add windows-n3em.test --admin Administrator --type=ad --two-way=true --external=true ipa: ERROR: Insufficient access: IPA master denied trust validation requests from AD DC 10 times. Most likely AD DC contacted a replica that has no trust information replicated yet. Additionally, please check that AD DNS is able to resolve _ldap._tcp.testrealmext.test, _ldap._tcp.Default-First-Site-Name._sites.dc._msdcs.testrealmext.test SRV records to the correct IPA server.
Relevant bugs
Bug 2120572 – ipa trust-add fails with ipa: ERROR: Insufficient access in FIPS mode
Bug 2124243 – ipa trust-add fails with ipa: ERROR: Insufficient access in FIPS mode
Establish trust with a shared secret in FIPS mode
Establishing a cross-forest trust using a shared secret fails in FIPS mode because NTLMSSP authentication is not FIPS-compliant.
Workaround
Authenticate with an Active Directory (AD) administrative account when establishing a trust between an IdM domain with FIPS mode enabled and an AD domain: instead of using ipa trust-add –trust-secret […], use ipa trust-add –admin=<account> –password […]
Relevant bug
Bug 1924707 – Establishing trust with AD domain using shared secret fails in FIPS mode
Use trust functionality from a RHEL 9 IdM client
Active Directory (AD) uses AES SHA-1 HMAC encryption types, which are not allowed in FIPS mode on RHEL 9 by default. In order to authenticate as an AD user on a RHEL 9 IdM client and obtain a kerberos TGT, the AES SHA-1 HMAC encryption type must be enabled.
[root@client9 ~]# kinit testuser@ad.test kinit: KDC has no support for encryption type while getting initial credentials
Workaround
If you want to use RHEL 9 IdM hosts with an AD trust, enable support for AES SHA-1 HMAC encryption types before installing IdM software. Note that this workaround might violate FIPS compliance:
[root@client9]# update-crypto-policies --set FIPS:AD-SUPPORT