KDC(8)

πŸ‘‘ KDC(8) β€” the Kerberos 5 server, but make it a vibe ✨

okay bestie, gather round, because this is the kdc manual page from the System Manager's Manual and she is serving tickets πŸ’…


🌸 NAME 🌸

kdc β€” the Kerberos 5 server. that's it, that's the girl. πŸ‘‘


✨ SYNOPSIS ✨

kdc [-c file | --config-file=file] [-p | --no-require-preauth]
    [--max-request=size] [-H | --enable-http] [-r string |
    --v4-realm=string] [-P portspec | --ports=portspec] [--detach]
    [--disable-des] [--addresses=list of addresses]

πŸ’– DESCRIPTION πŸ’–

so kdc serves requests for tickets. that's her whole job, and she's so good at it πŸŽ€

when she starts up, first thing she does is check the flags you passed her. and here's the tea: any option you did not specify with a command-line flag gets pulled from a config file, or from a default compiled-in value. no cap.

Options supported, let's get into it 🫢

  • -c file, --config-file=file β€” tells her where the config file lives. the default is /var/heimdal/kdc.conf. fun fact: this is the only value that can't be specified in the config file itself. iconique of her honestly.
  • -p, --no-require-preauth β€” turns off the requirement for pre-authentication in the initial AS-REQ for all principals. why would you want pre-auth at all? because it makes offline password attacks way harder πŸ”₯ so turning it off is lowkey risky. but you might want it off if you have clients that don't support pre-authentication. and since the version 4 protocol doesn't support any pre-authentication, serving version 4 clients is basically the same thing as not requiring pre-auth. the default is to require pre-authentication. and ngl, adding the require-preauth per principal is a more flexible way of handling all this.
  • --max-request=size β€” gives an upper limit on the size of the requests that the kdc is willing to handle. she has boundaries βœ‹
  • -H, --enable-http β€” makes the kdc listen on port 80 and handle requests encapsulated in HTTP. yes really πŸ’€
  • -r string, --v4-realm=string β€” what realm this server should act as when dealing with version 4 requests. the database can contain any number of realms, but since the version 4 protocol doesn't contain a realm for the server, it must be explicitly specified. default is whatever krb_get_lrealm() returns. πŸ¦‹ and heads up: this option is only available if the KDC has been compiled with version 4 support.
  • -P portspec, --ports=portspec β€” specifies the set of ports the KDC should listen on. it's given as a white-space separated list of services or port numbers. simple as that ✨
  • --addresses=list of addresses β€” the list of addresses to listen for requests on. by default, the kdc will listen on all the locally configured addresses. if you only want a subset, or the automatic detection fails, this option might be used. she's flexible like that πŸ’…
  • --detach β€” detach from pty and run as a daemon. main character energy, going off on her own 🧚
  • --disable-des β€” disable all des encryption types, makes the kdc not use them. periodt.

all activities are logged to one or more destinations, see krb5.conf(5), and krb5_openlog(3). the entity used for logging is kdc. ⭐


πŸŽ€ CONFIGURATION FILE πŸŽ€

the configuration file has the same syntax as krb5.conf(5), but it will be read before /etc/krb5.conf, so it may override settings found there. the way that it gets first dibs... obsessed 😭

options specific to the KDC only are found in the β€œ[kdc]” section. all the command-line options can preferably be added in the configuration file. the only difference is the pre-authentication flag, which has to be specified as:

require-preauth = no

(in fact you can specify the option as --require-preauth=no). love an option with range πŸ’œ

and there are some configuration options which do not have command-line equivalents, so listen up:

  • enable-digest = boolean β€” turn on support for digest processing in the KDC. the default is FALSE.
  • check-ticket-addresses = boolean β€” check the addresses in the ticket when processing TGS requests. the default is TRUE.
  • allow-null-ticket-addresses = boolean β€” permit tickets with no addresses. this option is only relevant when check-ticket-addresses is TRUE.
  • allow-anonymous = boolean β€” permit anonymous tickets with no addresses.
  • historical_anon_realm = boolean β€” enables pre-7.0 non-RFC-comformant KDC behavior. with this option set to true the client realm in anonymous pkinit AS replies will be the requested realm, rather than the RFC-conformant WELLKNOWN:ANONYMOUS realm. and this one matters, bestie β€” it can have a security impact on servers that expect to grant access to anonymous-but-authenticated to the KDC users of the realm in question: they would also grant access to unauthenticated anonymous users. as such, it is not recommend to set this option to true. 🚨
  • max-kdc-datagram-reply-length = number β€” maximum packet size the UDP rely that the KDC will transmit, instead the KDC sends back a reply telling the client to use TCP instead.
  • transited-policy = always-check | allow-per-principal | always-honour-request β€” this controls how KDC requests with the disable-transited-check flag are handled. it can be one of:
    • always-check β€” always check transited encoding, this is the default.
    • allow-per-principal β€” currently this is identical to always-check. in a future release, it will be possible to mark a principal as able to handle unchecked requests.
    • always-honour-request β€” always do what the client asked. in a future release, it will be possible to force a check per principal.
  • encode_as_rep_as_tgs_rep = boolean β€” encode AS-Rep as TGS-Rep to be bug-compatible with old DCE code. the Heimdal clients allow both. 🀝
  • kdc_warn_pwexpire = time β€” how long before password/principal expiration the KDC should start sending out warning messages. she's just looking out for you πŸ₯Ί
⚠️ the configuration file is only read when the kdc is started. if changes made to the configuration file are to take effect, the kdc needs to be restarted. no hot reloading here, babes.

an example of a config file:

[kdc]
        require-preauth = no
        v4-realm = FOO.SE

πŸ’€ BUGS πŸ’€

if the machine running the KDC has new addresses added to it, the KDC will have to be restarted to listen to them. the reason it doesn't just listen to wildcarded (like INADDR_ANY) addresses, is that the replies has to come from the same address they were sent to, and most OS:es doesn't pass this information to the application. 😭

if your normal mode of operation require that you add and remove addresses, the best option is probably to listen to a wildcarded TCP socket, and make sure your clients use TCP to connect. for instance, this will listen to IPv4 TCP port 88 only:

kdc --addresses=0.0.0.0 --ports="88/tcp"

and fr fr, there should be a way to specify protocol, port, and address triplets, not just addresses and protocol, port tuples. one day πŸ™ˆ


🌈 SEE ALSO 🌈

kinit(1), krb5.conf(5)


and that's the whole page, bestie. this one shipped from HEIMDAL on August 24, 2006 β€” an absolute vintage queen, still serving tickets, still iconic πŸ‘‘βœ¨ go read the SEE ALSOs, ily, bye πŸ«ΆπŸ’–

πŸ“¦ where this page comes from