With KDC policy checks for AS and TGS requests, it is possible to extend KDC policy to enforce lifetime of a generated service ticket to be shorter than the TGT lifetime.
This is currently not implemented in FreeIPA. Ticket policies currently only applied to user principals and only at the point they obtain their ticket granting tickets.
For own FreeIPA services it might make sense to add a policy that reduces effective lifetime of service tickets towards them according to a configuration defined by the administrators.
It is probably best be achieved by limiting via association of a Kerberos ticket policy with a group and making services a part of the group.
I'm open for the actual implementation design. My current proposal below reflects my current ideas. Following steps need to be done:
ipa_kdcpolicy_check_tgs()
This is a good summary. If/when we add this capability, it's important to keep in mind that a user/process with a valid TGT can simply request another service ticket when their current one expires and it will be granted. So we need to be clear with what we're trying to achieve.
One of cases to handle is mod_auth_gssapi's use of tickets inside its session cookie. The cookie is valid until the end of the ticket's lifetime, so we need to have a way to limit that. With this capability the limiting of the ticket will make cookie useless once the ticket expires. Setting it down to 30 minutes would be an improvement to a cookie that is valid for 24 hours.
mod_auth_gssapi
To note that the point here is that these tickets are used for proxying, so by limiting their lifetime we limit the amount of time these are valid to access resources by the proxy. In the FreeIPA case it may be nice to tie a different lifetime based on the fact the ticket is obtained via impersonation rather than via a full blown TGT.