Back in krb5-1.16 (and in RHEL-7.5), I added the kdcpolicy plugin to krb5. This interface allows a module to hook all AS and TGS requests, potentially reject them, and manipulate ticket lifetimes. This PR is a basic implementation of the interface, with all the plumbing IPA needs to get it loaded and installed.
There are ~~two~~ three use cases I had in mind, though of course many more are possible (this is a very powerful place to have a hook into the KDC):
https://github.com/freeipa/freeipa/pull/2147
Metadata Update from @abiagion: - Issue set to the milestone: FreeIPA 4.8
This could also be useful to mitigate a "kerberoasting"-style attack against user passwords. The typical presentation of the attack is against AD services which use a bad password to generate their service keys. That exact attack isn't much of an issue in IPA, since it doesn't lend itself to the same poor method of generating service keys.
However, the same basic approach could be used to get service tickets for user principals (eg, 'kinit -S alice@EXAMPLE.COM') and use the resulting service ticket as a target for password cracking. Key derivation should make this relatively expensive as password cracking goes, but not prohibitive for a moderately well-funded adversary.
To mitigate the attack, it would be nice if FreeIPA exposed enough KDC policy to be able to say something like "no service tickets can be issued for service principals without an instance". Since I can imagine scenarios where such a ticket might be legitimate, finer control might be nice as well.