Merge from vendor branch NCURSES:
[dragonfly.git] / crypto / heimdal-0.6.3 / doc / misc.texi
1 @c $Id: misc.texi,v 1.13 2003/03/30 21:30:59 lha Exp $
2
3 @node Things in search for a better place, Kerberos 4 issues, Setting up a realm, Top
4 @chapter Things in search for a better place
5
6 @section Making things work on Ciscos
7
8 Modern versions of Cisco IOS has some support for authenticating via
9 Kerberos 5. This can be used both by having the router get a ticket when
10 you login (boring), and by using Kerberos authenticated telnet to access
11 your router (less boring). The following has been tested on IOS
12 11.2(12), things might be different with other versions. Old versions
13 are known to have bugs.
14
15 To make this work, you will first have to configure your router to use
16 Kerberos (this is explained in the documentation). A sample
17 configuration looks like the following:
18
19 @example
20 aaa new-model
21 aaa authentication login default krb5-telnet krb5 enable
22 aaa authorization exec krb5-instance
23 kerberos local-realm FOO.SE
24 kerberos srvtab entry host/router.foo.se 0 891725446 4 1 8 012345678901234567
25 kerberos server FOO.SE 10.0.0.1
26 kerberos instance map admin 15
27 @end example
28
29 This tells you (among other things) that when logging in, the router
30 should try to authenticate with kerberised telnet, and if that fails try
31 to verify a plain text password via a Kerberos ticket exchange (as
32 opposed to a local database, RADIUS or something similar), and if that
33 fails try the local enable password. If you're not careful when you
34 specify the `login default' authentication mechanism, you might not be
35 able to login at all. The `instance map' and `authorization exec' lines
36 says that people with `admin' instances should be given `enabled' shells
37 when logging in.
38
39 The numbers after the principal on the `srvtab' line are principal type,
40 time stamp (in seconds since 1970), key version number (4), keytype (1 ==
41 des), key length (always 8 with des), and then the key.
42
43 To make the Heimdal KDC produce tickets that the Cisco can decode you
44 might have to turn on the @samp{encode_as_rep_as_tgs_rep} flag in the
45 KDC. You will also have to specify that the router can't handle anything
46 but @samp{des-cbc-crc}. This can be done with the @samp{del_enctype}
47 command of @samp{kadmin}.
48
49 This all fine and so, but unless you have an IOS version with encryption
50 (available only in the U.S) it doesn't really solve any problems. Sure
51 you don't have to send your password over the wire, but since the telnet
52 connection isn't protected it's still possible for someone to steal your
53 session. This won't be fixed until someone adds integrity to the telnet
54 protocol.
55
56 A working solution would be to hook up a machine with a real operating
57 system to the console of the Cisco and then use it as a backwards
58 terminal server.
59
60 @section Making things work on Transarc/OpenAFS AFS
61
62 @subsection How to get a KeyFile
63
64 @file{ktutil -k AFSKEYFILE:KeyFile get afs@@MY.REALM}
65
66 or you can extract it with kadmin
67
68 @example
69 kadmin> ext -k AFSKEYFILE:/usr/afs/etc/KeyFile afs@@My.CELL.NAME
70 @end example
71
72 You have to make sure you have a @code{des-cbc-md5} encryption type since that
73 is the key that will be converted.
74
75 @subsection How to convert a srvtab to a KeyFile
76
77 You need a @file{/usr/vice/etc/ThisCell} containing the cellname of you
78 AFS-cell.
79
80 @file{ktutil copy krb4:/root/afs-srvtab AFSKEYFILE:/usr/afs/etc/KeyFile}.
81
82 If keyfile already exists, this will add the new key in afs-srvtab to
83 KeyFile.
84
85 @section Using 2b tokens with AFS
86
87 @subsection What is 2b ?
88
89 2b is the name of the proposal that was implemented to give basic
90 Kerberos 5 support to AFS in rxkad. Its not real Kerberos 5 support
91 since it still uses fcrypt for data encryption and not Kerberos
92 encryption types.
93
94 Its only possible (in all cases) to do this for DES encryption types because
95 only then the token (the AFS equivalent of a ticket) will be be smaller
96 than the maximum size that can fit in the token cache in
97 OpenAFS/Transarc client. Its so tight fit that some extra wrapping on the ASN1/DER encoding is removed from the Kerberos ticket.
98
99 2b uses a Kerberos 5 EncTicketPart instead of a Kerberos 4 ditto for
100 the part of the ticket that is encrypted with the service's key. The
101 client doesn't know what's inside the encrypted data so to the client it doesn't matter.
102
103 To  differentiate between Kerberos 4 tickets and Kerberos 5 tickets 2b
104 uses a special kvno, 213 for 2b tokens and 255 for Kerberos 5 tokens.
105
106 Its a requirement that all AFS servers that support 2b also support
107 native Kerberos 5 in rxkad.
108
109 @subsection Configuring Heimdal to use 2b tokens
110
111 Support for 2b tokens are turned on for specific principals by adding
112 them to the string list option @code{[kdc]use_2b} in the kdc's
113 @file{krb5.conf} file.
114
115 @example
116 [kdc]
117         use_2b = @{
118                 afs@@SU.SE = yes
119                 afs/it.su.se@@SU.SE = yes
120         @}
121 @end example
122
123 @subsection Configuring AFS clients
124
125 There is no need to configure AFS clients. The only software that
126 needs to be installed/upgrade is a Kerberos 5 enabled @file{afslog}.