Chapter 9. Using canonicalized DNS host names in IdM
DNS canonicalization is disabled by default on Identity Management (IdM) clients to avoid potential security risks. For example, if an attacker controls the DNS server and a host in the domain, the attacker can cause the short host name, such as demo
, to resolve to a compromised host, such as malicious.example.com
. In this case, the user connects to a different server than expected.
This procedure describes how to use canonicalized host names on IdM clients.
9.1. Adding an alias to a host principal
By default, Identity Management (IdM) clients enrolled by using the ipa-client-install
command do not allow to use short host names in service principals. For example, users can use only host/demo.example.com@EXAMPLE.COM
instead of host/demo@EXAMPLE.COM
when accessing a service.
Follow this procedure to add an alias to a Kerberos principal. Note that you can alternatively enable canonicalization of host names in the /etc/krb5.conf
file. For details, see Enabling canonicalization of host names in service principals on clients.
Prerequisites
- The IdM client is installed.
- The host name is unique in the network.
Procedure
Authenticate to IdM as the
admin
user:$ kinit admin
Add the alias to the host principal. For example, to add the
demo
alias to thedemo.examle.com
host principal:$ ipa host-add-principal demo.example.com --principal=demo
9.2. Enabling canonicalization of host names in service principals on clients
Follow this procedure to enable canonicalization of host names in services principals on clients.
Note that if you use host principal aliases, as described in Adding an alias to a host principal, you do not need to enable canonicalization.
Prerequisites
- The Identity Management (IdM) client is installed.
-
You are logged in to the IdM client as the
root
user. - The host name is unique in the network.
Procedure
Set the
dns_canonicalize_hostname
parameter in the[libdefaults]
section in the/etc/krb5.conf
file tofalse
:[libdefaults] ... dns_canonicalize_hostname = true
9.3. Options for using host names with DNS host name canonicalization enabled
If you set dns_canonicalize_hostname = true
in the /etc/krb5.conf
file as explained in Enabling canonicalization of host names in service principals on clients, you have the following options when you use a host name in a service principal:
-
In Identity Management (IdM) environments, you can use the full host name in a service principal, such as
host/demo.example.com@EXAMPLE.COM
. - In environments without IdM, but if the RHEL host as a member of an Active Directory (AD) domain, no further considerations are required, because AD domain controllers (DC) automatically create service principals for NetBIOS names of the machines enrolled into AD.