]> git.ipfire.org Git - thirdparty/krb5.git/commit
Improve S4U2Self realm identification internals 890/head
authorGreg Hudson <ghudson@mit.edu>
Wed, 2 Jan 2019 21:54:28 +0000 (16:54 -0500)
committerGreg Hudson <ghudson@mit.edu>
Tue, 5 Mar 2019 16:45:21 +0000 (11:45 -0500)
commit9d6847c8f0187a0dd6466420335b5460de5c449e
tree94bf7e5a0a8d9f285f550aaace3a0cb50cfbb5e6
parent46655c8557c00c639e6aba2e0ed1980ff5df50af
Improve S4U2Self realm identification internals

Realm identification for S4U2Self requests ([MS-SFU] 3.1.5.1.1.1) uses
the AS code path with some differences: we might want to include a
subject certificate in pa-data, we want to stop as soon as we get a
reply indicating which realm the client is in, and we want to
communicate that realm to the caller.  The current method of making
these changes is fragile--it uses an optimistic preauth type but does
not actually pre-authenticate, and it assumes that the AS code will
terminate with a predictable error if there is no prompter and a
trivial GAK function.

Instead, add fields to krb5_get_init_creds_context for realm
identification, and support them in the AS state machine, making sure
never to invoke preauth modules.  Add a new library-internal function
k5_identify_realm() to set up an appropriate context, run the state
machine, and copy out the client principal of the last request on
success.
src/include/k5-trace.h
src/lib/krb5/krb/get_in_tkt.c
src/lib/krb5/krb/init_creds_ctx.h
src/lib/krb5/krb/int-proto.h
src/lib/krb5/krb/preauth2.c
src/lib/krb5/krb/s4u_creds.c
src/tests/gssapi/t_s4u.py