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