Convert DEBUG_REFERRALS to TRACE_* framework
[krb5.git] / doc / dnssrv.texinfo
1 @value{COMPANY} recommends that your KDCs have a predefined set of
2 CNAME records (DNS hostname aliases), such as @code{@value{KDCSERVER}}
3 for the master KDC and
4 @code{@value{KDCSLAVE1}}, @code{@value{KDCSLAVE2}}, @dots{} for the
5 slave KDCs.  This way, if you need to swap a machine, you only need to
6 change a DNS entry, rather than having to change hostnames.
7
8 A new mechanism for locating KDCs of a realm through DNS has been added
9 to the @value{COMPANY} @value{PRODUCT} distribution.  A relatively new
10 record type called @code{SRV} has been added to DNS.  Looked up by a
11 service name and a domain name, these records indicate the hostname and
12 port number to contact for that service, optionally with weighting and
13 prioritization.  (See RFC 2782 if you want more information.  You can
14 follow the example below for straightforward cases.)
15
16 The use with Kerberos is fairly straightforward.  The domain name used
17 in the SRV record name is the domain-style Kerberos realm name.  (It is
18 possible to have Kerberos realm names that are not DNS-style names, but
19 we don't recommend it for Internet use, and our code does not support it
20 well.)  Several different Kerberos-related service names are used:
21
22 @table @code 
23 @item _kerberos._udp 
24 This is for contacting any KDC by UDP.  This entry will be used the most
25 often.  Normally you should list port 88 on each of your KDCs.
26 @c Don't encourage continued use of port 750 for krb5.
27 @c It should be only for backwards compatibility with krb4.
28 @c Do the Mac/Windows krb4 libraries use this DNS entry?
29 @c The UNIX code does not.
30
31 @item _kerberos._tcp
32 This is for contacting any KDC by TCP.  The MIT KDC by default will not
33 listen on any TCP ports, so unless you've changed the configuration or
34 you're running another KDC implementation, you should leave this
35 unspecified.  If you do enable TCP support, normally you should use
36 port 88.
37
38 @item _kerberos-master._udp
39 This entry should refer to those KDCs, if any, that will immediately see
40 password changes to the Kerberos database.  This entry is used only in
41 one case, when the user is logging in and the password appears to be
42 incorrect; the master KDC is then contacted, and the same password used
43 to try to decrypt the response, in case the user's password had recently
44 been changed and the first KDC contacted hadn't been updated.  Only if
45 that fails is an ``incorrect password'' error given.
46
47 If you have only one KDC, or for whatever reason there is no accessible
48 KDC that would get database changes faster than the others, you do not
49 need to define this entry.
50
51 @item _kerberos-adm._tcp
52 This should list port @value{DefaultKadmindPort} on your master KDC.
53 Support for it is not complete at this time, but it will eventually be
54 used by the @code{kadmin} program and related utilities.  For now, you
55 will also need the @code{admin_server} entry in @code{krb5.conf}.
56 (@xref{krb5.conf}.)
57
58 @item _kpasswd._udp
59 This should list port @value{DefaultKpasswdPort} on your master KDC.
60 It is used when a user changes her password.
61
62 @end table
63
64 Be aware, however, that the DNS SRV specification requires that the
65 hostnames listed be the canonical names, not aliases.  So, for example,
66 you might include the following records in your (BIND-style) zone file:
67
68 @smallexample
69 $ORIGIN foobar.com.
70 _kerberos               TXT       "FOOBAR.COM"
71 kerberos                CNAME     daisy
72 kerberos-1              CNAME     use-the-force-luke
73 kerberos-2              CNAME     bunny-rabbit
74 _kerberos._udp          SRV       0 0 88 daisy
75                         SRV       0 0 88 use-the-force-luke
76                         SRV       0 0 88 bunny-rabbit
77 _kerberos-master._udp   SRV       0 0 88 daisy
78 _kerberos-adm._tcp      SRV       0 0 749 daisy
79 _kpasswd._udp           SRV       0 0 464 daisy
80 @end smallexample
81
82 As with the DNS-based mechanism for determining the Kerberos realm of a
83 host, we recommend distributing the information this way for use by
84 other sites that may want to interact with yours using Kerberos, even if
85 you don't immediately make use of it within your own site.  If you
86 anticipate installing a very large number of machines on which it will
87 be hard to update the Kerberos configuration files, you may wish to do
88 all of your Kerberos service lookups via DNS and not put the information
89 (except for @code{admin_server} as noted above) in future versions of
90 your @code{krb5.conf} files at all.  Eventually, we hope to phase out
91 the listing of server hostnames in the client-side configuration files;
92 making preparations now will make the transition easier in the future.
93