Chapter 9. Security hardening of IdM in RHEL


Apply recommended practices to harden your Identity Management (IdM) deployment against common threats. Secure identities, harden access control, ensure system integrity, and implement security monitoring and detection. Follow a priority guide that sequences the controls by risk and urgency.

9.1. Identity protection in IdM

Protect Identity Management (IdM) identities against credential theft.

Require MFA for all users, administrative and non-administrative ones
First, eliminate the risk of credential theft for privileged accounts. This ensures that even if a password is leaked, an attacker cannot authenticate without the second physical or temporal factor. Administrative accounts are the highest-value targets in any IdM deployment and must be protected first. After that, consider extending this protection to the entire user base.
Rotate the Directory Manager password and restrict its use

The Directory Manager DN (cn=Directory Manager) authenticates directly against the underlying 389 Directory Server via a simple LDAP bind, bypassing Kerberos, MFA policies, HBAC rules, and all access controls. It is not an IdM user account and cannot benefit from any MFA policy configured in IdM.

Note

Treat it as a break-glass credential, that is an emergency-access account used only when normal access paths are unavailable: store it in a secrets vault or sealed procedure, prohibit routine use, log every use, and rotate on a defined schedule. Day-to-day administration should always use a named admin account.

Limit admin group membership
Reduces the blast radius. Fewer users with full privileges means a smaller statistical chance of a high-value account being compromised. Review membership periodically and remove accounts that no longer require it.

To implement the above-mentioned recommendations, see the following table:

Expand
Table 9.1. Identity protection recommendations and links
RecommendationDocumentation

Require MFA for all users, administrative and non-administrative ones

Enabling the one-time password in the Web UI

Rotate the Directory Manager password and restrict its use

Resetting the Directory Manager user password

Limit admin group membership

Managing user groups in IdM CLI

9.2. Access control hardening in IdM

Restrict access in your Identity Management (IdM) deployment to enforce a Zero Trust model.

Disable the allow_all HBAC rule
Shifts the environment to a Zero Trust model. The default allow_all rule grants every enrolled user login access to every enrolled host — a direct violation of least-privilege. Disable it immediately and replace it with specific, scoped host-based access control (HBAC) rules that permit only the access each role genuinely requires.
Verify that TLS is used when IdM clients communicate with IdM servers through LDAP

Plain LDAP on port 389 transmits credentials and directory data in cleartext, making it interceptable on the network. Check that trying to initiate StartTLS results in an error because an SSL/TLS connection is already established:

$ ldapsearch -x -ZZ '(uid=admin)'
ldap_start_tls: Operations error (1)
        additional info: SSL connection already established
Keep SELinux enforcing on all IdM servers and map users to SELinux contexts
SELinux must remain in enforcing mode on all IdM servers — disabling it removes mandatory access controls for the server itself and all enrolled hosts. Beyond keeping SELinux enforcing, map IdM users to confined SELinux users (for example, staff_u, user_u) to ensure the Linux kernel restricts what files or processes a user can interact with, even if their account is compromised. Ensure all enrolled users are explicitly mapped and restrict unconfined_u to accounts that genuinely require it.
Define custom RBAC roles
Enforces least privilege. The built-in IdM roles (User Administrator, Group Administrator, etc.) are intentionally broad — designed to be usable by all RHEL IdM customers and will not match the specific permission boundaries of your deployment. Use them as a reference, then create custom roles that grant only the privileges each administrative function requires.
Disable anonymous LDAP binds

Set the nsslapd-allow-anonymous-access attribute to rootdse to prevent user enumeration and thereby reduce the risk of brute-force or phishing attacks.

Do not set the attribute to off, because this blocks external clients from checking the server configuration. LDAP and web clients are not necessarily domain clients, so they connect anonymously to read the root Directory Server Entry (DSE) file to get connection information.

Restrict admin login locations
Prevents remote exploitation. Requiring administrators to authenticate from a designated Jump Host or secure console stops attackers from using stolen credentials over the general network, even if MFA is bypassed through a client-side compromise. In addition, you can use Kerberos authentication indicators to secure access to the jump hosts.
Disable the Schema Compatibility (compat) plugin when not needed
The compat plugin creates a virtual NIS/RFC 2307-compatible subtree at cn=compat,dc=…​ that is enabled by default. It was designed for backward compatibility with legacy clients that cannot speak the native FreeIPA LDAP schema. The security risk is that this subtree exposes user and group information in a broadly readable form and can remain accessible even after anonymous binds are disabled on the main directory tree. If all enrolled clients use SSSD with the ipa provider, the compat tree serves no purpose. Disable it with ipa-compat-manage disable and restart the directory service. If legacy NIS clients still depend on it, isolate those clients at the network level so the compat tree is not reachable from general network segments.
Review sudo rules regularly
sudo rules are a common and often overlooked privilege escalation vector. An overly broad sudo rule can grant a regular user effective root access on enrolled hosts without that access appearing in HBAC or RBAC reviews. Run ipa sudorule-find --all periodically and audit each rule: confirm the scope of hosts and commands is intentional, remove rules that are no longer needed, and ensure no rules grant unrestricted (ALL) command access without a documented justification.

To implement the above-mentioned recommendations, see the following table:

Expand
Table 9.2. Access control hardening recommendations and links
RecommendationDocumentation

Disable the allow_all HBAC rule

Configuring HBAC rules in an IdM domain using the CLI

Keep SELinux enforcing on all IdM servers and map users to SELinux contexts

Mapping SELinux users and IdM users in the IdM CLI

Define custom RBAC roles

Managing IdM roles in the CLI

Disable anonymous LDAP binds

Anonymous LDAP binds in Identity Management

Restrict admin login locations

Configuring host-based access control rules

Review sudo rules regularly

Granting sudo access to an IdM user on an IdM client

9.3. System integrity in IdM

Protect the infrastructure that Identity Management (IdM) depends on.

Dedicated IdM servers (no co-located services)
Reduces the attack surface. IdM servers hold the Kerberos KDC, LDAP directory, and CA, which are the most sensitive components in your identity infrastructure. Co-locating web servers, databases, or other workloads introduces unrelated vulnerabilities that could be used to pivot directly into the identity store.
Enable FIPS mode during RHEL installation (regulated environments)

If operating in a regulated environment (for example, FedRAMP, NIST 800-53, PCI-DSS, or government/defence contexts), enable FIPS 140-2/140-3 mode on the underlying OS before deploying IdM. FIPS mode restricts the system to approved cryptographic algorithms system-wide, covering Kerberos, TLS, and all OpenSSL consumers.

Note

FIPS mode must be enabled before IdM installation. Enabling it post-deployment requires reinstallation. Therefore, verify that all clients and integrated services support FIPS-compliant cipher suites before enabling.

Back up IdM data securely (ipa-backup)
A backup of an IdM server is as sensitive as the live server as it contains every password hash, Kerberos key, and certificate private key in your environment. Use the native ipa-backup utility to produce consistent, application-aware backups. Store them encrypted and in an off-site or air-gapped location, with access strictly limited to personnel who would legitimately perform a restore.
Use OpenSCAP regularly

Ensures continuous compliance. Automatically detects if security settings have drifted from the intended baseline due to error or unauthorized changes. Integrate into a scheduled job and treat failures as incidents.

Note

This audits the operating system configuration only and does not evaluate internal IdM data, such as user accounts or HBAC rules.

Use ipa-healthcheck
Provides operational security monitoring. Detects technical failures, such as replication lag, expiring certificates, and misconfigured services, that could result in a denial of service or undetected configuration drift. Run regularly and forward output to a monitoring system.
Audit and clean up replication topology
Stale replication agreements left over from decommissioned replicas are a persistent risk. Each replica holds a full copy of every password hash, Kerberos key, and group membership. When decommissioning a replica, always use ipa server-del, not just a power-off, so that agreements and service principals are cleanly removed. Periodically run ipa topologysegment-find and compare output against your known infrastructure inventory.
Certificate and CA lifecycle management

The ipa-healthcheck tool flags certificate expiry, but additional controls are needed:

  • Audit which services have certificates issued by the IdM CA and verify no unexpected certificates exist.
  • Restrict sub-CA issuance if lightweight sub-CAs are in use.
  • Review CRL and OCSP configuration to ensure revocation is functional.

To implement the above-mentioned recommendations, see the following table:

Expand
Table 9.3. System integrity recommendations and links
RecommendationDocumentation

Enable FIPS mode during RHEL installation (regulated environments)

Installing the system with FIPS mode enabled

Back up IdM data securely (ipa-backup)

Preparing for data loss with IdM backups

Use OpenSCAP regularly

Assessing configuration compliance with a specific baseline

Use ipa-healthcheck

Installing and running the IdM healthcheck tool

Audit and clean up replication topology

Managing replication topology

Certificate and CA lifecycle management

Managing certificates in IdM

9.4. Security monitoring and detection in IdM

Detect and respond to security incidents in your Identity Management (IdM) deployment.

Enable audit logging and forward logs off-host

Hardening controls reduce the likelihood of a breach, but do not eliminate it. Audit logs provide the evidence needed to detect a control bypass after the fact. Enable IdM’s LDAP audit log, collect Kerberos authentication events, and forward all logs to a centralized security information and event management (SIEM) before they can be tampered with on the IdM host itself.

Note

Key signals to alert on: repeated failed LDAP binds, unexpected changes to admin group membership, Kerberos ticket requests for sensitive service principals, and Directory Manager bind events.

Audit and detect security configuration drift
Security posture degrades over time through configuration drift, staff changes, and new enrolments. Schedule a periodic review, at minimum quarterly, that re-checks admin group membership, active HBAC rules, custom RBAC role assignments, replication topology, and certificate inventory. Treat deviations from the baseline as incidents.

To implement the above-mentioned recommendations, see the following table:

Expand
Table 9.4. Security monitoring and detection recommendations and links
RecommendationDocumentation

Enable audit logging and forward logs off-host

IdM log files and directories

9.5. IdM security hardening implementation phases

The following table summarizes recommended security controls by implementation phase.

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top