1KRB5.CONF(5) MIT Kerberos KRB5.CONF(5)
2
3
4
6 krb5.conf - Kerberos configuration file
7
8 The krb5.conf file contains Kerberos configuration information, includ‐
9 ing the locations of KDCs and admin servers for the Kerberos realms of
10 interest, defaults for the current realm and for Kerberos applications,
11 and mappings of hostnames onto Kerberos realms. Normally, you should
12 install your krb5.conf file in the directory /etc. You can override
13 the default location by setting the environment variable KRB5_CONFIG.
14 Multiple colon-separated filenames may be specified in KRB5_CONFIG; all
15 files which are present will be read. Starting in release 1.14, direc‐
16 tory names can also be specified in KRB5_CONFIG; all files within the
17 directory whose names consist solely of alphanumeric characters,
18 dashes, or underscores will be read.
19
21 The krb5.conf file is set up in the style of a Windows INI file. Lines
22 beginning with '#' or ';' (possibly after initial whitespace) are
23 ignored as comments. Sections are headed by the section name, in
24 square brackets. Each section may contain zero or more relations, of
25 the form:
26
27 foo = bar
28
29 or:
30
31 fubar = {
32 foo = bar
33 baz = quux
34 }
35
36 Placing a '*' after the closing bracket of a section name indicates
37 that the section is final, meaning that if the same section appears
38 within a later file specified in KRB5_CONFIG, it will be ignored. A
39 subsection can be marked as final by placing a '*' after either the tag
40 name or the closing brace.
41
42 The krb5.conf file can include other files using either of the follow‐
43 ing directives at the beginning of a line:
44
45 include FILENAME
46 includedir DIRNAME
47
48 FILENAME or DIRNAME should be an absolute path. The named file or
49 directory must exist and be readable. Including a directory includes
50 all files within the directory whose names consist solely of alphanu‐
51 meric characters, dashes, or underscores. Starting in release 1.15,
52 files with names ending in ".conf" are also included, unless the name
53 begins with ".". Included profile files are syntactically independent
54 of their parents, so each included file must begin with a section
55 header. Starting in release 1.17, files are read in alphanumeric
56 order; in previous releases, they may be read in any order.
57
58 The krb5.conf file can specify that configuration should be obtained
59 from a loadable module, rather than the file itself, using the follow‐
60 ing directive at the beginning of a line before any section headers:
61
62 module MODULEPATH:RESIDUAL
63
64 MODULEPATH may be relative to the library path of the krb5 installa‐
65 tion, or it may be an absolute path. RESIDUAL is provided to the mod‐
66 ule at initialization time. If krb5.conf uses a module directive,
67 kdc.conf(5) should also use one if it exists.
68
70 The krb5.conf file may contain the following sections:
71
72 ┌───────────────┬────────────────────────────┐
73 │[libdefaults] │ Settings used by the Ker‐ │
74 │ │ beros V5 library │
75 ├───────────────┼────────────────────────────┤
76 │[realms] │ Realm-specific contact │
77 │ │ information and settings │
78 ├───────────────┼────────────────────────────┤
79 │[domain_realm] │ Maps server hostnames to │
80 │ │ Kerberos realms │
81 ├───────────────┼────────────────────────────┤
82 │[capaths] │ Authentication paths for │
83 │ │ non-hierarchical │
84 │ │ cross-realm │
85 ├───────────────┼────────────────────────────┤
86 │[appdefaults] │ Settings used by some Ker‐ │
87 │ │ beros V5 applications │
88 ├───────────────┼────────────────────────────┤
89 │[plugins] │ Controls plugin module │
90 │ │ registration │
91 └───────────────┴────────────────────────────┘
92
93 Additionally, krb5.conf may include any of the relations described in
94 kdc.conf(5), but it is not a recommended practice.
95
96 [libdefaults]
97 The libdefaults section may contain any of the following relations:
98
99 allow_weak_crypto
100 If this flag is set to false, then weak encryption types (as
101 noted in Encryption_types in kdc.conf(5)) will be filtered out
102 of the lists default_tgs_enctypes, default_tkt_enctypes, and
103 permitted_enctypes. The default value for this tag is false.
104
105 canonicalize
106 If this flag is set to true, initial ticket requests to the KDC
107 will request canonicalization of the client principal name, and
108 answers with different client principals than the requested
109 principal will be accepted. The default value is false.
110
111 ccache_type
112 This parameter determines the format of credential cache types
113 created by kinit(1) or other programs. The default value is 4,
114 which represents the most current format. Smaller values can be
115 used for compatibility with very old implementations of Kerberos
116 which interact with credential caches on the same host.
117
118 clockskew
119 Sets the maximum allowable amount of clockskew in seconds that
120 the library will tolerate before assuming that a Kerberos mes‐
121 sage is invalid. The default value is 300 seconds, or five min‐
122 utes.
123
124 The clockskew setting is also used when evaluating ticket start
125 and expiration times. For example, tickets that have reached
126 their expiration time can still be used (and renewed if they are
127 renewable tickets) if they have been expired for a shorter dura‐
128 tion than the clockskew setting.
129
130 default_ccache_name
131 This relation specifies the name of the default credential
132 cache. The default is FILE:/tmp/krb5cc_%{uid}. This relation
133 is subject to parameter expansion (see below). New in release
134 1.11.
135
136 default_client_keytab_name
137 This relation specifies the name of the default keytab for
138 obtaining client credentials. The default is FILE:/var/ker‐
139 beros/krb5/user/%{euid}/client.keytab. This relation is subject
140 to parameter expansion (see below). New in release 1.11.
141
142 default_keytab_name
143 This relation specifies the default keytab name to be used by
144 application servers such as sshd. The default is
145 FILE:/etc/krb5.keytab. This relation is subject to parameter
146 expansion (see below).
147
148 default_rcache_name
149 This relation specifies the name of the default replay cache.
150 The default is dfl:. This relation is subject to parameter
151 expansion (see below). New in release 1.18.
152
153 default_realm
154 Identifies the default Kerberos realm for the client. Set its
155 value to your Kerberos realm. If this value is not set, then a
156 realm must be specified with every Kerberos principal when
157 invoking programs such as kinit(1).
158
159 default_tgs_enctypes
160 Identifies the supported list of session key encryption types
161 that the client should request when making a TGS-REQ, in order
162 of preference from highest to lowest. The list may be delimited
163 with commas or whitespace. See Encryption_types in kdc.conf(5)
164 for a list of the accepted values for this tag. Starting in
165 release 1.18, the default value is the value of permitted_enc‐
166 types. For previous releases or if permitted_enctypes is not
167 set, the default value is aes256-cts-hmac-sha1-96
168 aes128-cts-hmac-sha1-96 aes256-cts-hmac-sha384-192
169 aes128-cts-hmac-sha256-128 arcfour-hmac-md5 camellia256-cts-cmac
170 camellia128-cts-cmac.
171
172 Do not set this unless required for specific backward compati‐
173 bility purposes; stale values of this setting can prevent
174 clients from taking advantage of new stronger enctypes when the
175 libraries are upgraded.
176
177 default_tkt_enctypes
178 Identifies the supported list of session key encryption types
179 that the client should request when making an AS-REQ, in order
180 of preference from highest to lowest. The format is the same as
181 for default_tgs_enctypes. Starting in release 1.18, the default
182 value is the value of permitted_enctypes. For previous releases
183 or if permitted_enctypes is not set, the default value is
184 aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96
185 aes256-cts-hmac-sha384-192 aes128-cts-hmac-sha256-128 arc‐
186 four-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac.
187
188 Do not set this unless required for specific backward compati‐
189 bility purposes; stale values of this setting can prevent
190 clients from taking advantage of new stronger enctypes when the
191 libraries are upgraded.
192
193 dns_canonicalize_hostname
194 Indicate whether name lookups will be used to canonicalize host‐
195 names for use in service principal names. Setting this flag to
196 false can improve security by reducing reliance on DNS, but
197 means that short hostnames will not be canonicalized to
198 fully-qualified hostnames. If this option is set to fallback
199 (new in release 1.18), DNS canonicalization will only be per‐
200 formed the server hostname is not found with the original name
201 when requesting credentials. The default value is fallback.
202
203 dns_lookup_kdc
204 Indicate whether DNS SRV records should be used to locate the
205 KDCs and other servers for a realm, if they are not listed in
206 the krb5.conf information for the realm. (Note that the
207 admin_server entry must be in the krb5.conf realm information in
208 order to contact kadmind, because the DNS implementation for
209 kadmin is incomplete.)
210
211 Enabling this option does open up a type of denial-of-service
212 attack, if someone spoofs the DNS records and redirects you to
213 another server. However, it's no worse than a denial of ser‐
214 vice, because that fake KDC will be unable to decode anything
215 you send it (besides the initial ticket request, which has no
216 encrypted data), and anything the fake KDC sends will not be
217 trusted without verification using some secret that it won't
218 know.
219
220 dns_uri_lookup
221 Indicate whether DNS URI records should be used to locate the
222 KDCs and other servers for a realm, if they are not listed in
223 the krb5.conf information for the realm. SRV records are used
224 as a fallback if no URI records were found. The default value
225 is true. New in release 1.15.
226
227 enforce_ok_as_delegate
228 If this flag to true, GSSAPI credential delegation will be dis‐
229 abled when the ok-as-delegate flag is not set in the service
230 ticket. If this flag is false, the ok-as-delegate ticket flag
231 is only enforced when an application specifically requests
232 enforcement. The default value is false.
233
234 err_fmt
235 This relation allows for custom error message formatting. If a
236 value is set, error messages will be formatted by substituting a
237 normal error message for %M and an error code for %C in the
238 value.
239
240 extra_addresses
241 This allows a computer to use multiple local addresses, in order
242 to allow Kerberos to work in a network that uses NATs while
243 still using address-restricted tickets. The addresses should be
244 in a comma-separated list. This option has no effect if noad‐
245 dresses is true.
246
247 forwardable
248 If this flag is true, initial tickets will be forwardable by
249 default, if allowed by the KDC. The default value is false.
250
251 ignore_acceptor_hostname
252 When accepting GSSAPI or krb5 security contexts for host-based
253 service principals, ignore any hostname passed by the calling
254 application, and allow clients to authenticate to any service
255 principal in the keytab matching the service name and realm name
256 (if given). This option can improve the administrative flexi‐
257 bility of server applications on multihomed hosts, but could
258 compromise the security of virtual hosting environments. The
259 default value is false. New in release 1.10.
260
261 k5login_authoritative
262 If this flag is true, principals must be listed in a local
263 user's k5login file to be granted login access, if a .k5login(5)
264 file exists. If this flag is false, a principal may still be
265 granted login access through other mechanisms even if a k5login
266 file exists but does not list the principal. The default value
267 is true.
268
269 k5login_directory
270 If set, the library will look for a local user's k5login file
271 within the named directory, with a filename corresponding to the
272 local username. If not set, the library will look for k5login
273 files in the user's home directory, with the filename .k5login.
274 For security reasons, .k5login files must be owned by the local
275 user or by root.
276
277 kcm_mach_service
278 On macOS only, determines the name of the bootstrap service used
279 to contact the KCM daemon for the KCM credential cache type. If
280 the value is -, Mach RPC will not be used to contact the KCM
281 daemon. The default value is org.h5l.kcm.
282
283 kcm_socket
284 Determines the path to the Unix domain socket used to access the
285 KCM daemon for the KCM credential cache type. If the value is
286 -, Unix domain sockets will not be used to contact the KCM dae‐
287 mon. The default value is /var/run/.heim_org.h5l.kcm-socket.
288
289 kdc_default_options
290 Default KDC options (Xored for multiple values) when requesting
291 initial tickets. By default it is set to 0x00000010
292 (KDC_OPT_RENEWABLE_OK).
293
294 kdc_timesync
295 Accepted values for this relation are 1 or 0. If it is nonzero,
296 client machines will compute the difference between their time
297 and the time returned by the KDC in the timestamps in the tick‐
298 ets and use this value to correct for an inaccurate system clock
299 when requesting service tickets or authenticating to services.
300 This corrective factor is only used by the Kerberos library; it
301 is not used to change the system clock. The default value is 1.
302
303 noaddresses
304 If this flag is true, requests for initial tickets will not be
305 made with address restrictions set, allowing the tickets to be
306 used across NATs. The default value is true.
307
308 permitted_enctypes
309 Identifies the encryption types that servers will permit for
310 session keys and for ticket and authenticator encryption,
311 ordered by preference from highest to lowest. Starting in
312 release 1.18, this tag also acts as the default value for
313 default_tgs_enctypes and default_tkt_enctypes. The default
314 value for this tag is aes256-cts-hmac-sha1-96
315 aes128-cts-hmac-sha1-96 aes256-cts-hmac-sha384-192
316 aes128-cts-hmac-sha256-128 arcfour-hmac-md5 camellia256-cts-cmac
317 camellia128-cts-cmac.
318
319 plugin_base_dir
320 If set, determines the base directory where krb5 plugins are
321 located. The default value is the krb5/plugins subdirectory of
322 the krb5 library directory. This relation is subject to parame‐
323 ter expansion (see below) in release 1.17 and later.
324
325 preferred_preauth_types
326 This allows you to set the preferred preauthentication types
327 which the client will attempt before others which may be adver‐
328 tised by a KDC. The default value for this setting is "17, 16,
329 15, 14", which forces libkrb5 to attempt to use PKINIT if it is
330 supported.
331
332 proxiable
333 If this flag is true, initial tickets will be proxiable by
334 default, if allowed by the KDC. The default value is false.
335
336 qualify_shortname
337 If this string is set, it determines the domain suffix for sin‐
338 gle-component hostnames when DNS canonicalization is not used
339 (either because dns_canonicalize_hostname is false or because
340 forward canonicalization failed). The default value is the
341 first search domain of the system's DNS configuration. To dis‐
342 able qualification of shortnames, set this relation to the empty
343 string with qualify_shortname = "". (New in release 1.18.)
344
345 radius_md5_fips_override
346 Downstream-only option to enable use of MD5 in RADIUS communica‐
347 tion (libkrad). This allows for local (or protected tunnel)
348 communication with a RADIUS server that doesn't use krad (e.g.,
349 freeradius) while in FIPS mode.
350
351 rdns If this flag is true, reverse name lookup will be used in addi‐
352 tion to forward name lookup to canonicalizing hostnames for use
353 in service principal names. If dns_canonicalize_hostname is set
354 to false, this flag has no effect. The default value is true.
355
356 realm_try_domains
357 Indicate whether a host's domain components should be used to
358 determine the Kerberos realm of the host. The value of this
359 variable is an integer: -1 means not to search, 0 means to try
360 the host's domain itself, 1 means to also try the domain's imme‐
361 diate parent, and so forth. The library's usual mechanism for
362 locating Kerberos realms is used to determine whether a domain
363 is a valid realm, which may involve consulting DNS if
364 dns_lookup_kdc is set. The default is not to search domain com‐
365 ponents.
366
367 renew_lifetime
368 (duration string.) Sets the default renewable lifetime for ini‐
369 tial ticket requests. The default value is 0.
370
371 spake_preauth_groups
372 A whitespace or comma-separated list of words which specifies
373 the groups allowed for SPAKE preauthentication. The possible
374 values are:
375
376 ┌─────────────┬────────────────────────────┐
377 │edwards25519 │ Edwards25519 curve (RFC │
378 │ │ 7748) │
379 ├─────────────┼────────────────────────────┤
380 │P-256 │ NIST P-256 curve (RFC │
381 │ │ 5480) │
382 ├─────────────┼────────────────────────────┤
383 │P-384 │ NIST P-384 curve (RFC │
384 │ │ 5480) │
385 ├─────────────┼────────────────────────────┤
386 │P-521 │ NIST P-521 curve (RFC │
387 │ │ 5480) │
388 └─────────────┴────────────────────────────┘
389
390 The default value for the client is edwards25519. The default
391 value for the KDC is empty. New in release 1.17.
392
393 ticket_lifetime
394 (duration string.) Sets the default lifetime for initial ticket
395 requests. The default value is 1 day.
396
397 udp_preference_limit
398 When sending a message to the KDC, the library will try using
399 TCP before UDP if the size of the message is above udp_prefer‐
400 ence_limit. If the message is smaller than udp_prefer‐
401 ence_limit, then UDP will be tried before TCP. Regardless of
402 the size, both protocols will be tried if the first attempt
403 fails.
404
405 verify_ap_req_nofail
406 If this flag is true, then an attempt to verify initial creden‐
407 tials will fail if the client machine does not have a keytab.
408 The default value is false.
409
410 client_aware_channel_bindings
411 If this flag is true, then all application protocol authentica‐
412 tion requests will be flagged to indicate that the application
413 supports channel bindings when operating over a secure channel.
414 The default value is false.
415
416 [realms]
417 Each tag in the [realms] section of the file is the name of a Kerberos
418 realm. The value of the tag is a subsection with relations that define
419 the properties of that particular realm. For each realm, the following
420 tags may be specified in the realm's subsection:
421
422 admin_server
423 Identifies the host where the administration server is running.
424 Typically, this is the master Kerberos server. This tag must be
425 given a value in order to communicate with the kadmind(8) server
426 for the realm.
427
428 auth_to_local
429 This tag allows you to set a general rule for mapping principal
430 names to local user names. It will be used if there is not an
431 explicit mapping for the principal name that is being trans‐
432 lated. The possible values are:
433
434 RULE:exp
435 The local name will be formulated from exp.
436
437 The format for exp is [n:string](regexp)s/pat‐
438 tern/replacement/g. The integer n indicates how many
439 components the target principal should have. If this
440 matches, then a string will be formed from string, sub‐
441 stituting the realm of the principal for $0 and the n'th
442 component of the principal for $n (e.g., if the principal
443 was johndoe/admin then [2:$2$1foo] would result in the
444 string adminjohndoefoo). If this string matches regexp,
445 then the s//[g] substitution command will be run over the
446 string. The optional g will cause the substitution to be
447 global over the string, instead of replacing only the
448 first match in the string.
449
450 DEFAULT
451 The principal name will be used as the local user name.
452 If the principal has more than one component or is not in
453 the default realm, this rule is not applicable and the
454 conversion will fail.
455
456 For example:
457
458 [realms]
459 ATHENA.MIT.EDU = {
460 auth_to_local = RULE:[2:$1](johndoe)s/^.*$/guest/
461 auth_to_local = RULE:[2:$1;$2](^.*;admin$)s/;admin$//
462 auth_to_local = RULE:[2:$2](^.*;root)s/^.*$/root/
463 auth_to_local = DEFAULT
464 }
465
466 would result in any principal without root or admin as the sec‐
467 ond component to be translated with the default rule. A princi‐
468 pal with a second component of admin will become its first com‐
469 ponent. root will be used as the local name for any principal
470 with a second component of root. The exception to these two
471 rules are any principals johndoe/*, which will always get the
472 local name guest.
473
474 auth_to_local_names
475 This subsection allows you to set explicit mappings from princi‐
476 pal names to local user names. The tag is the mapping name, and
477 the value is the corresponding local user name.
478
479 default_domain
480 This tag specifies the domain used to expand hostnames when
481 translating Kerberos 4 service principals to Kerberos 5 princi‐
482 pals (for example, when converting rcmd.hostname to host/host‐
483 name.domain).
484
485 disable_encrypted_timestamp
486 If this flag is true, the client will not perform encrypted
487 timestamp preauthentication if requested by the KDC. Setting
488 this flag can help to prevent dictionary attacks by active
489 attackers, if the realm's KDCs support SPAKE preauthentication
490 or if initial authentication always uses another mechanism or
491 always uses FAST. This flag persists across client referrals
492 during initial authentication. This flag does not prevent the
493 KDC from offering encrypted timestamp. New in release 1.17.
494
495 http_anchors
496 When KDCs and kpasswd servers are accessed through HTTPS prox‐
497 ies, this tag can be used to specify the location of the CA cer‐
498 tificate which should be trusted to issue the certificate for a
499 proxy server. If left unspecified, the system-wide default set
500 of CA certificates is used.
501
502 The syntax for values is similar to that of values for the
503 pkinit_anchors tag:
504
505 FILE: filename
506
507 filename is assumed to be the name of an OpenSSL-style ca-bundle
508 file.
509
510 DIR: dirname
511
512 dirname is assumed to be an directory which contains CA certifi‐
513 cates. All files in the directory will be examined; if they
514 contain certificates (in PEM format), they will be used.
515
516 ENV: envvar
517
518 envvar specifies the name of an environment variable which has
519 been set to a value conforming to one of the previous values.
520 For example, ENV:X509_PROXY_CA, where environment variable
521 X509_PROXY_CA has been set to FILE:/tmp/my_proxy.pem.
522
523 kdc The name or address of a host running a KDC for that realm. An
524 optional port number, separated from the hostname by a colon,
525 may be included. If the name or address contains colons (for
526 example, if it is an IPv6 address), enclose it in square brack‐
527 ets to distinguish the colon from a port separator. For your
528 computer to be able to communicate with the KDC for each realm,
529 this tag must be given a value in each realm subsection in the
530 configuration file, or there must be DNS SRV records specifying
531 the KDCs.
532
533 kpasswd_server
534 Points to the server where all the password changes are per‐
535 formed. If there is no such entry, DNS will be queried (unless
536 forbidden by dns_lookup_kdc). Finally, port 464 on the
537 admin_server host will be tried.
538
539 master_kdc
540 Identifies the master KDC(s). Currently, this tag is used in
541 only one case: If an attempt to get credentials fails because of
542 an invalid password, the client software will attempt to contact
543 the master KDC, in case the user's password has just been
544 changed, and the updated database has not been propagated to the
545 replica servers yet.
546
547 v4_instance_convert
548 This subsection allows the administrator to configure exceptions
549 to the default_domain mapping rule. It contains V4 instances
550 (the tag name) which should be translated to some specific host‐
551 name (the tag value) as the second component in a Kerberos V5
552 principal name.
553
554 v4_realm
555 This relation is used by the krb524 library routines when con‐
556 verting a V5 principal name to a V4 principal name. It is used
557 when the V4 realm name and the V5 realm name are not the same,
558 but still share the same principal names and passwords. The tag
559 value is the Kerberos V4 realm name.
560
561 [domain_realm]
562 The [domain_realm] section provides a translation from a domain name or
563 hostname to a Kerberos realm name. The tag name can be a host name or
564 domain name, where domain names are indicated by a prefix of a period
565 (.). The value of the relation is the Kerberos realm name for that
566 particular host or domain. A host name relation implicitly provides
567 the corresponding domain name relation, unless an explicit domain name
568 relation is provided. The Kerberos realm may be identified either in
569 the realms section or using DNS SRV records. Host names and domain
570 names should be in lower case. For example:
571
572 [domain_realm]
573 crash.mit.edu = TEST.ATHENA.MIT.EDU
574 .dev.mit.edu = TEST.ATHENA.MIT.EDU
575 mit.edu = ATHENA.MIT.EDU
576
577 maps the host with the name crash.mit.edu into the TEST.ATHENA.MIT.EDU
578 realm. The second entry maps all hosts under the domain dev.mit.edu
579 into the TEST.ATHENA.MIT.EDU realm, but not the host with the name
580 dev.mit.edu. That host is matched by the third entry, which maps the
581 host mit.edu and all hosts under the domain mit.edu that do not match a
582 preceding rule into the realm ATHENA.MIT.EDU.
583
584 If no translation entry applies to a hostname used for a service prin‐
585 cipal for a service ticket request, the library will try to get a
586 referral to the appropriate realm from the client realm's KDC. If that
587 does not succeed, the host's realm is considered to be the hostname's
588 domain portion converted to uppercase, unless the realm_try_domains
589 setting in [libdefaults] causes a different parent domain to be used.
590
591 [capaths]
592 In order to perform direct (non-hierarchical) cross-realm authentica‐
593 tion, configuration is needed to determine the authentication paths
594 between realms.
595
596 A client will use this section to find the authentication path between
597 its realm and the realm of the server. The server will use this sec‐
598 tion to verify the authentication path used by the client, by checking
599 the transited field of the received ticket.
600
601 There is a tag for each participating client realm, and each tag has
602 subtags for each of the server realms. The value of the subtags is an
603 intermediate realm which may participate in the cross-realm authentica‐
604 tion. The subtags may be repeated if there is more then one intermedi‐
605 ate realm. A value of "." means that the two realms share keys
606 directly, and no intermediate realms should be allowed to participate.
607
608 Only those entries which will be needed on the client or the server
609 need to be present. A client needs a tag for its local realm with sub‐
610 tags for all the realms of servers it will need to authenticate to. A
611 server needs a tag for each realm of the clients it will serve, with a
612 subtag of the server realm.
613
614 For example, ANL.GOV, PNL.GOV, and NERSC.GOV all wish to use the ES.NET
615 realm as an intermediate realm. ANL has a sub realm of TEST.ANL.GOV
616 which will authenticate with NERSC.GOV but not PNL.GOV. The [capaths]
617 section for ANL.GOV systems would look like this:
618
619 [capaths]
620 ANL.GOV = {
621 TEST.ANL.GOV = .
622 PNL.GOV = ES.NET
623 NERSC.GOV = ES.NET
624 ES.NET = .
625 }
626 TEST.ANL.GOV = {
627 ANL.GOV = .
628 }
629 PNL.GOV = {
630 ANL.GOV = ES.NET
631 }
632 NERSC.GOV = {
633 ANL.GOV = ES.NET
634 }
635 ES.NET = {
636 ANL.GOV = .
637 }
638
639 The [capaths] section of the configuration file used on NERSC.GOV sys‐
640 tems would look like this:
641
642 [capaths]
643 NERSC.GOV = {
644 ANL.GOV = ES.NET
645 TEST.ANL.GOV = ES.NET
646 TEST.ANL.GOV = ANL.GOV
647 PNL.GOV = ES.NET
648 ES.NET = .
649 }
650 ANL.GOV = {
651 NERSC.GOV = ES.NET
652 }
653 PNL.GOV = {
654 NERSC.GOV = ES.NET
655 }
656 ES.NET = {
657 NERSC.GOV = .
658 }
659 TEST.ANL.GOV = {
660 NERSC.GOV = ANL.GOV
661 NERSC.GOV = ES.NET
662 }
663
664 When a subtag is used more than once within a tag, clients will use the
665 order of values to determine the path. The order of values is not
666 important to servers.
667
668 [appdefaults]
669 Each tag in the [appdefaults] section names a Kerberos V5 application
670 or an option that is used by some Kerberos V5 application[s]. The
671 value of the tag defines the default behaviors for that application.
672
673 For example:
674
675 [appdefaults]
676 telnet = {
677 ATHENA.MIT.EDU = {
678 option1 = false
679 }
680 }
681 telnet = {
682 option1 = true
683 option2 = true
684 }
685 ATHENA.MIT.EDU = {
686 option2 = false
687 }
688 option2 = true
689
690 The above four ways of specifying the value of an option are shown in
691 order of decreasing precedence. In this example, if telnet is running
692 in the realm EXAMPLE.COM, it should, by default, have option1 and
693 option2 set to true. However, a telnet program in the realm
694 ATHENA.MIT.EDU should have option1 set to false and option2 set to
695 true. Any other programs in ATHENA.MIT.EDU should have option2 set to
696 false by default. Any programs running in other realms should have
697 option2 set to true.
698
699 The list of specifiable options for each application may be found in
700 that application's man pages. The application defaults specified here
701 are overridden by those specified in the realms section.
702
703 [plugins]
704 · pwqual interface
705
706 · kadm5_hook interface
707
708 · clpreauth and kdcpreauth interfaces
709
710 Tags in the [plugins] section can be used to register dynamic plugin
711 modules and to turn modules on and off. Not every krb5 pluggable
712 interface uses the [plugins] section; the ones that do are documented
713 here.
714
715 New in release 1.9.
716
717 Each pluggable interface corresponds to a subsection of [plugins]. All
718 subsections support the same tags:
719
720 disable
721 This tag may have multiple values. If there are values for this
722 tag, then the named modules will be disabled for the pluggable
723 interface.
724
725 enable_only
726 This tag may have multiple values. If there are values for this
727 tag, then only the named modules will be enabled for the plug‐
728 gable interface.
729
730 module This tag may have multiple values. Each value is a string of
731 the form modulename:pathname, which causes the shared object
732 located at pathname to be registered as a dynamic module named
733 modulename for the pluggable interface. If pathname is not an
734 absolute path, it will be treated as relative to the plug‐
735 in_base_dir value from [libdefaults].
736
737 For pluggable interfaces where module order matters, modules registered
738 with a module tag normally come first, in the order they are regis‐
739 tered, followed by built-in modules in the order they are documented
740 below. If enable_only tags are used, then the order of those tags
741 overrides the normal module order.
742
743 The following subsections are currently supported within the [plugins]
744 section:
745
746 ccselect interface
747 The ccselect subsection controls modules for credential cache selection
748 within a cache collection. In addition to any registered dynamic mod‐
749 ules, the following built-in modules exist (and may be disabled with
750 the disable tag):
751
752 k5identity
753 Uses a .k5identity file in the user's home directory to select a
754 client principal
755
756 realm Uses the service realm to guess an appropriate cache from the
757 collection
758
759 hostname
760 If the service principal is host-based, uses the service host‐
761 name to guess an appropriate cache from the collection
762
763 pwqual interface
764 The pwqual subsection controls modules for the password quality inter‐
765 face, which is used to reject weak passwords when passwords are
766 changed. The following built-in modules exist for this interface:
767
768 dict Checks against the realm dictionary file
769
770 empty Rejects empty passwords
771
772 hesiod Checks against user information stored in Hesiod (only if Ker‐
773 beros was built with Hesiod support)
774
775 princ Checks against components of the principal name
776
777 kadm5_hook interface
778 The kadm5_hook interface provides plugins with information on principal
779 creation, modification, password changes and deletion. This interface
780 can be used to write a plugin to synchronize MIT Kerberos with another
781 database such as Active Directory. No plugins are built in for this
782 interface.
783
784 kadm5_auth interface
785 The kadm5_auth section (introduced in release 1.16) controls modules
786 for the kadmin authorization interface, which determines whether a
787 client principal is allowed to perform a kadmin operation. The follow‐
788 ing built-in modules exist for this interface:
789
790 acl This module reads the kadm5.acl(5) file, and authorizes opera‐
791 tions which are allowed according to the rules in the file.
792
793 self This module authorizes self-service operations including pass‐
794 word changes, creation of new random keys, fetching the client's
795 principal record or string attributes, and fetching the policy
796 record associated with the client principal.
797
798 clpreauth and kdcpreauth interfaces
799 The clpreauth and kdcpreauth interfaces allow plugin modules to provide
800 client and KDC preauthentication mechanisms. The following built-in
801 modules exist for these interfaces:
802
803 pkinit This module implements the PKINIT preauthentication mechanism.
804
805 encrypted_challenge
806 This module implements the encrypted challenge FAST factor.
807
808 encrypted_timestamp
809 This module implements the encrypted timestamp mechanism.
810
811 hostrealm interface
812 The hostrealm section (introduced in release 1.12) controls modules for
813 the host-to-realm interface, which affects the local mapping of host‐
814 names to realm names and the choice of default realm. The following
815 built-in modules exist for this interface:
816
817 profile
818 This module consults the [domain_realm] section of the profile
819 for authoritative host-to-realm mappings, and the default_realm
820 variable for the default realm.
821
822 dns This module looks for DNS records for fallback host-to-realm
823 mappings and the default realm. It only operates if the
824 dns_lookup_realm variable is set to true.
825
826 domain This module applies heuristics for fallback host-to-realm map‐
827 pings. It implements the realm_try_domains variable, and uses
828 the uppercased parent domain of the hostname if that does not
829 produce a result.
830
831 localauth interface
832 The localauth section (introduced in release 1.12) controls modules for
833 the local authorization interface, which affects the relationship
834 between Kerberos principals and local system accounts. The following
835 built-in modules exist for this interface:
836
837 default
838 This module implements the DEFAULT type for auth_to_local val‐
839 ues.
840
841 rule This module implements the RULE type for auth_to_local values.
842
843 names This module looks for an auth_to_local_names mapping for the
844 principal name.
845
846 auth_to_local
847 This module processes auth_to_local values in the default
848 realm's section, and applies the default method if no
849 auth_to_local values exist.
850
851 k5login
852 This module authorizes a principal to a local account according
853 to the account's .k5login(5) file.
854
855 an2ln This module authorizes a principal to a local account if the
856 principal name maps to the local account name.
857
858 certauth interface
859 The certauth section (introduced in release 1.16) controls modules for
860 the certificate authorization interface, which determines whether a
861 certificate is allowed to preauthenticate a user via PKINIT. The fol‐
862 lowing built-in modules exist for this interface:
863
864 pkinit_san
865 This module authorizes the certificate if it contains a PKINIT
866 Subject Alternative Name for the requested client principal, or
867 a Microsoft UPN SAN matching the principal if pkinit_allow_upn
868 is set to true for the realm.
869
870 pkinit_eku
871 This module rejects the certificate if it does not contain an
872 Extended Key Usage attribute consistent with the
873 pkinit_eku_checking value for the realm.
874
875 dbmatch
876 This module authorizes or rejects the certificate according to
877 whether it matches the pkinit_cert_match string attribute on the
878 client principal, if that attribute is present.
879
881 NOTE:
882 The following are PKINIT-specific options. These values may be
883 specified in [libdefaults] as global defaults, or within a
884 realm-specific subsection of [libdefaults], or may be specified as
885 realm-specific values in the [realms] section. A realm-specific
886 value overrides, not adds to, a generic [libdefaults] specification.
887 The search order is:
888
889 1. realm-specific subsection of [libdefaults]:
890
891 [libdefaults]
892 EXAMPLE.COM = {
893 pkinit_anchors = FILE:/usr/local/example.com.crt
894 }
895
896 2. realm-specific value in the [realms] section:
897
898 [realms]
899 OTHERREALM.ORG = {
900 pkinit_anchors = FILE:/usr/local/otherrealm.org.crt
901 }
902
903 3. generic value in the [libdefaults] section:
904
905 [libdefaults]
906 pkinit_anchors = DIR:/usr/local/generic_trusted_cas/
907
908 Specifying PKINIT identity information
909 The syntax for specifying Public Key identity, trust, and revocation
910 information for PKINIT is as follows:
911
912 FILE:filename[,keyfilename]
913 This option has context-specific behavior.
914
915 In pkinit_identity or pkinit_identities, filename specifies the
916 name of a PEM-format file containing the user's certificate. If
917 keyfilename is not specified, the user's private key is expected
918 to be in filename as well. Otherwise, keyfilename is the name
919 of the file containing the private key.
920
921 In pkinit_anchors or pkinit_pool, filename is assumed to be the
922 name of an OpenSSL-style ca-bundle file.
923
924 DIR:dirname
925 This option has context-specific behavior.
926
927 In pkinit_identity or pkinit_identities, dirname specifies a
928 directory with files named *.crt and *.key where the first part
929 of the file name is the same for matching pairs of certificate
930 and private key files. When a file with a name ending with .crt
931 is found, a matching file ending with .key is assumed to contain
932 the private key. If no such file is found, then the certificate
933 in the .crt is not used.
934
935 In pkinit_anchors or pkinit_pool, dirname is assumed to be an
936 OpenSSL-style hashed CA directory where each CA cert is stored
937 in a file named hash-of-ca-cert.#. This infrastructure is
938 encouraged, but all files in the directory will be examined and
939 if they contain certificates (in PEM format), they will be used.
940
941 In pkinit_revoke, dirname is assumed to be an OpenSSL-style
942 hashed CA directory where each revocation list is stored in a
943 file named hash-of-ca-cert.r#. This infrastructure is encour‐
944 aged, but all files in the directory will be examined and if
945 they contain a revocation list (in PEM format), they will be
946 used.
947
948 PKCS12:filename
949 filename is the name of a PKCS #12 format file, containing the
950 user's certificate and private key.
951
952 PKCS11:[module_name=]modname[:slotid=slot-id][:token=token-label][:cer‐
953 tid=cert-id][:certlabel=cert-label]
954 All keyword/values are optional. modname specifies the location
955 of a library implementing PKCS #11. If a value is encountered
956 with no keyword, it is assumed to be the modname. If no mod‐
957 ule-name is specified, the default is opensc-pkcs11.so. slotid=
958 and/or token= may be specified to force the use of a particular
959 smard card reader or token if there is more than one available.
960 certid= and/or certlabel= may be specified to force the selec‐
961 tion of a particular certificate on the device. See the
962 pkinit_cert_match configuration option for more ways to select a
963 particular certificate to use for PKINIT.
964
965 ENV:envvar
966 envvar specifies the name of an environment variable which has
967 been set to a value conforming to one of the previous values.
968 For example, ENV:X509_PROXY, where environment variable
969 X509_PROXY has been set to FILE:/tmp/my_proxy.pem.
970
971 PKINIT krb5.conf options
972 pkinit_anchors
973 Specifies the location of trusted anchor (root) certificates
974 which the client trusts to sign KDC certificates. This option
975 may be specified multiple times. These values from the config
976 file are not used if the user specifies X509_anchors on the com‐
977 mand line.
978
979 pkinit_cert_match
980 Specifies matching rules that the client certificate must match
981 before it is used to attempt PKINIT authentication. If a user
982 has multiple certificates available (on a smart card, or via
983 other media), there must be exactly one certificate chosen
984 before attempting PKINIT authentication. This option may be
985 specified multiple times. All the available certificates are
986 checked against each rule in order until there is a match of
987 exactly one certificate.
988
989 The Subject and Issuer comparison strings are the RFC 2253
990 string representations from the certificate Subject DN and
991 Issuer DN values.
992
993 The syntax of the matching rules is:
994 [relation-operator]component-rule ...
995
996 where:
997
998 relation-operator
999 can be either &&, meaning all component rules must match,
1000 or ||, meaning only one component rule must match. The
1001 default is &&.
1002
1003 component-rule
1004 can be one of the following. Note that there is no punc‐
1005 tuation or whitespace between component rules.
1006 <SUBJECT>regular-expression
1007 <ISSUER>regular-expression
1008 <SAN>regular-expression
1009 <EKU>extended-key-usage-list
1010 <KU>key-usage-list
1011
1012
1013 extended-key-usage-list is a comma-separated list of
1014 required Extended Key Usage values. All values in the
1015 list must be present in the certificate. Extended Key
1016 Usage values can be:
1017
1018 · pkinit
1019
1020 · msScLogin
1021
1022 · clientAuth
1023
1024 · emailProtection
1025
1026 key-usage-list is a comma-separated list of required Key
1027 Usage values. All values in the list must be present in
1028 the certificate. Key Usage values can be:
1029
1030 · digitalSignature
1031
1032 · keyEncipherment
1033
1034 Examples:
1035
1036 pkinit_cert_match = ||<SUBJECT>.*DoE.*<SAN>.*@EXAMPLE.COM
1037 pkinit_cert_match = &&<EKU>msScLogin,clientAuth<ISSUER>.*DoE.*
1038 pkinit_cert_match = <EKU>msScLogin,clientAuth<KU>digitalSignature
1039
1040 pkinit_eku_checking
1041 This option specifies what Extended Key Usage value the KDC cer‐
1042 tificate presented to the client must contain. (Note that if
1043 the KDC certificate has the pkinit SubjectAlternativeName
1044 encoded as the Kerberos TGS name, EKU checking is not necessary
1045 since the issuing CA has certified this as a KDC certificate.)
1046 The values recognized in the krb5.conf file are:
1047
1048 kpKDC This is the default value and specifies that the KDC must
1049 have the id-pkinit-KPKdc EKU as defined in RFC 4556.
1050
1051 kpServerAuth
1052 If kpServerAuth is specified, a KDC certificate with the
1053 id-kp-serverAuth EKU will be accepted. This key usage
1054 value is used in most commercially issued server certifi‐
1055 cates.
1056
1057 none If none is specified, then the KDC certificate will not
1058 be checked to verify it has an acceptable EKU. The use
1059 of this option is not recommended.
1060
1061 pkinit_dh_min_bits
1062 Specifies the size of the Diffie-Hellman key the client will
1063 attempt to use. The acceptable values are 1024, 2048, and 4096.
1064 The default is 2048.
1065
1066 pkinit_identities
1067 Specifies the location(s) to be used to find the user's X.509
1068 identity information. If this option is specified multiple
1069 times, the first valid value is used; this can be used to spec‐
1070 ify an environment variable (with ENV:envvar) followed by a
1071 default value. Note that these values are not used if the user
1072 specifies X509_user_identity on the command line.
1073
1074 pkinit_kdc_hostname
1075 The presence of this option indicates that the client is willing
1076 to accept a KDC certificate with a dNSName SAN (Subject Alterna‐
1077 tive Name) rather than requiring the id-pkinit-san as defined in
1078 RFC 4556. This option may be specified multiple times. Its
1079 value should contain the acceptable hostname for the KDC (as
1080 contained in its certificate).
1081
1082 pkinit_pool
1083 Specifies the location of intermediate certificates which may be
1084 used by the client to complete the trust chain between a KDC
1085 certificate and a trusted anchor. This option may be specified
1086 multiple times.
1087
1088 pkinit_require_crl_checking
1089 The default certificate verification process will always check
1090 the available revocation information to see if a certificate has
1091 been revoked. If a match is found for the certificate in a CRL,
1092 verification fails. If the certificate being verified is not
1093 listed in a CRL, or there is no CRL present for its issuing CA,
1094 and pkinit_require_crl_checking is false, then verification suc‐
1095 ceeds.
1096
1097 However, if pkinit_require_crl_checking is true and there is no
1098 CRL information available for the issuing CA, then verification
1099 fails.
1100
1101 pkinit_require_crl_checking should be set to true if the policy
1102 is such that up-to-date CRLs must be present for every CA.
1103
1104 pkinit_revoke
1105 Specifies the location of Certificate Revocation List (CRL)
1106 information to be used by the client when verifying the validity
1107 of the KDC certificate presented. This option may be specified
1108 multiple times.
1109
1111 Starting with release 1.11, several variables, such as
1112 default_keytab_name, allow parameters to be expanded. Valid parameters
1113 are:
1114
1115 ┌──────────────────┬────────────────────────────┐
1116 │%{TEMP} │ Temporary directory │
1117 ├──────────────────┼────────────────────────────┤
1118 │%{uid} │ Unix real UID or Windows │
1119 │ │ SID │
1120 ├──────────────────┼────────────────────────────┤
1121 │%{euid} │ Unix effective user ID or │
1122 │ │ Windows SID │
1123 ├──────────────────┼────────────────────────────┤
1124 │%{USERID} │ Same as %{uid} │
1125 ├──────────────────┼────────────────────────────┤
1126 │%{null} │ Empty string │
1127 ├──────────────────┼────────────────────────────┤
1128 │%{LIBDIR} │ Installation library │
1129 │ │ directory │
1130 └──────────────────┴────────────────────────────┘
1131
1132 │%{BINDIR} │ Installation binary direc‐ │
1133 │ │ tory │
1134 ├──────────────────┼────────────────────────────┤
1135 │%{SBINDIR} │ Installation admin binary │
1136 │ │ directory │
1137 ├──────────────────┼────────────────────────────┤
1138 │%{username} │ (Unix) Username of effec‐ │
1139 │ │ tive user ID │
1140 ├──────────────────┼────────────────────────────┤
1141 │%{APPDATA} │ (Windows) Roaming applica‐ │
1142 │ │ tion data for current user │
1143 ├──────────────────┼────────────────────────────┤
1144 │%{COMMON_APPDATA} │ (Windows) Application data │
1145 │ │ for all users │
1146 ├──────────────────┼────────────────────────────┤
1147 │%{LOCAL_APPDATA} │ (Windows) Local applica‐ │
1148 │ │ tion data for current user │
1149 ├──────────────────┼────────────────────────────┤
1150 │%{SYSTEM} │ (Windows) Windows system │
1151 │ │ folder │
1152 ├──────────────────┼────────────────────────────┤
1153 │%{WINDOWS} │ (Windows) Windows folder │
1154 ├──────────────────┼────────────────────────────┤
1155 │%{USERCONFIG} │ (Windows) Per-user MIT │
1156 │ │ krb5 config file directory │
1157 ├──────────────────┼────────────────────────────┤
1158 │%{COMMONCONFIG} │ (Windows) Common MIT krb5 │
1159 │ │ config file directory │
1160 └──────────────────┴────────────────────────────┘
1161
1163 Here is an example of a generic krb5.conf file:
1164
1165 [libdefaults]
1166 default_realm = ATHENA.MIT.EDU
1167 dns_lookup_kdc = true
1168 dns_lookup_realm = false
1169
1170 [realms]
1171 ATHENA.MIT.EDU = {
1172 kdc = kerberos.mit.edu
1173 kdc = kerberos-1.mit.edu
1174 kdc = kerberos-2.mit.edu
1175 admin_server = kerberos.mit.edu
1176 master_kdc = kerberos.mit.edu
1177 }
1178 EXAMPLE.COM = {
1179 kdc = kerberos.example.com
1180 kdc = kerberos-1.example.com
1181 admin_server = kerberos.example.com
1182 }
1183
1184 [domain_realm]
1185 mit.edu = ATHENA.MIT.EDU
1186
1187 [capaths]
1188 ATHENA.MIT.EDU = {
1189 EXAMPLE.COM = .
1190 }
1191 EXAMPLE.COM = {
1192 ATHENA.MIT.EDU = .
1193 }
1194
1196 /etc/krb5.conf
1197
1199 syslog(3)
1200
1202 MIT
1203
1205 1985-2020, MIT
1206
1207
1208
1209
12101.18.2 KRB5.CONF(5)