]> git.ipfire.org Git - thirdparty/krb5.git/commit
Minimize usage of tgs_server in KDC 1120/head
authorGreg Hudson <ghudson@mit.edu>
Fri, 25 Sep 2020 15:12:34 +0000 (11:12 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 2 Oct 2020 18:50:16 +0000 (14:50 -0400)
commit90fedf8188fc47aa5a476a969af34671555df389
tree936408c1f489ea54c0a676e53f7ee8cedf12b0ca
parent7ccc08a889b40693b2ce7f108f2cdda51bc04bff
Minimize usage of tgs_server in KDC

Where possible, use the realm of the request server principal
(canonicalized via KDB lookup, if available) in preference to
tgs_server.  This change facilitates alias realm support and potential
future support for serving multiple realms from the same KDB.

S4U2Self local user testing currently uses the uncanonicalized request
realm after this change, which will require attention for alias realm
support.

FAST armor ticket checking is unaffected by this change (it still
compares against tgs_server).  This check poses no issue for realm
aliases, as both tgs_server and the armor ticket server should have
canonical realms, but it will require attention for multi-realm KDB
support.

Remove is_local_principal() as it is no longer used.  Add an
is_local_tgs_principal() helper and shorten is_cross_tgs_principal().

Move the header ticket lineage check from kdc_process_tgs_req() to
process_tgs_req(), where we have the canonical request server name and
a more natural indication of whether the request was an S4U2Self
request.
src/kdc/do_as_req.c
src/kdc/do_tgs_req.c
src/kdc/kdc_util.c
src/kdc/kdc_util.h
src/kdc/tgs_policy.c