[ Team LiB ] |
4.5 DNS and KerberosA properly functioning DNS server for your domain and functioning DNS resolvers on machines participating in your Kerberos realm is essential for the proper operation of your realm. Traditional Unix Kerberos 5 implementations use the flat file /etc/krb5.conf file for hostname-to-Kerberos realm mapping, much like /etc/hosts can be used for name-to-IP mapping. The Kerberos configuration file contains two major pieces of information: the DNS domain name to Kerberos realm mappings, and a list of KDCs for each Kerberos realm. Obviously, this method does not scale, so just as DNS now serves the purpose of the old /etc/hosts file, DNS can also be used to provide Kerberos configuration. Kerberos can use DNS as a service location protocol, by using the DNS SRV record as defined in RFC 2052. In addition, Kerberos can use a TXT record to locate the appropriate realm for a given host or domain name. These DNS entries are not required to run a Kerberos realm, but they do eliminate the need for manual configuration of clients. With these DNS records, Kerberos clients can find the appropriate KDCs without the use of a configuration file. Windows will establish the necessary SRV records automatically when an Active Directory domain is created. Those using Unix for their KDCs can create these DNS entries manually in their zone files as a convenience to clients.
4.5.1 Setting Up KDC Discovery Over DNSIn order to use KDC discovery over DNS, the following records should be placed in the zone file corresponding to the Kerberos realm. In most cases, since the Kerberos realm name is simply an uppercase version of the DNS domain owned by the organization, these DNS entries are placed into the organization's existing DNS zone file. However, if the Kerberos realm and DNS domain differ, then a new zone must be created with the name of the Kerberos realm. A SRV DNS Resource Record describes the KDCs available for a particular realm and contains the following information:
Here is an example of a set of SRV records for several Kerberos KDCs: _kerberos._udp.WEDGIE.ORG. IN SRV 1 0 88 kerberos-1.wedgie.org. _kerberos._tcp.WEDGIE.ORG. IN SRV 1 0 88 kerberos-1.wedgie.org. _kerberos._udp.WEDGIE.ORG. IN SRV 10 0 88 kerberos-2.wedgie.org. _kerberos._tcp.WEDGIE.ORG. IN SRV 10 0 88 kerberos-2.wedgie.org. _kerberos-adm._tcp.WEDGIE.ORG. IN SRV 1 0 749 kerberos-1.wedgie.org. _kpasswd._udp.WEDGIE.ORG. IN SRV 1 0 464 kerberos-1.wedgie.org. This example includes two Kerberos KDCs, kerberos-1 and kerberos-2. Both listen to the standard Kerberos 5 port, 88, on both UDP and TCP. Kerberos-1 is the master KDC, so it also handles all of the administration requests and password change requests. Since kerberos-1 has a lower priority than kerberos-2 (1 versus 10), clients will prefer using kerberos-1 for queries over kerberos-2.
4.5.2 DNS Domain Name-to-Realm MappingKerberos can also use DNS for domain name-to-realm mapping. This mapping, provided by the domain_realm stanza in MIT-style krb5.conf files, can also be provided through TXT records in DNS. The TXT record format for specifying domain name-to-realm mappings is similar to the SRV record format for locating Kerberos KDCs within a given Kerberos realm. It contains three major fields:
An example, mapping all hosts within the domain wedgie.org to the Kerberos realm WEDGIE.ORG is shown below: _kerberos.wedgie.org. IN TXT "WEDGIE.ORG" Note that the latest Kerberos Clarifications call for less dependence on the insecure DNS service to perform domain name-to-realm mapping for future implementations of Kerberos. This DNS-to-realm mapping is used by Windows' Active Directory services to locate realm information, and was documented as part of an Internet Draft. However, the most recent Kerberos Clarifications drafts obsoletes the older Internet Draft and strongly recommends against using unsecured DNS services to provide this mapping. |
[ Team LiB ] |