On Mon, Apr 15, 2024 at 7:56 PM Ken Hornstein <k...@cmf.nrl.navy.mil> wrote:
> I'm a LITTLE confused as to what you're describing here. As I > understand you, the TRUSTED_FOR_DELEGATION flag doesn't appear on > the wire and only in the account properties. Yes. Apologies; I should have been more precise: when Microsoft AD is acting as the KDC, whether AD sets the the OK-AS-DELEGATE flag in the TGS-REP is determined by whether the userAccountControl attribute in Active Directory of the host for which a service ticket is being requested has the TRUSTED_FOR_DELEGATION flag set. If TRUSTED_FOR_DELEGATION is set, OK-AS-DELEGATE is set in the TGS-REP; otherwise, OK-AS-DELEGATE is not set in the TGS-REP. > the [MIT Kerberos] library already provides an option to ignore that > [the OK-AS-DELEGATE] flag and it seems that by default it DOES > ignore that flag) I think the enforce_ok_as_delegate is the option you’re referring to? The man page claims it is disabled by default (unless an application specifically requests it). That matches our experiences. Heimdal appears to implement the same option (enforce_ok_as_delegate), but although the upstream source claims the default is false (do not enforce), Macs seem to enforce it by default. So either Apple has changed that default in the code, or else they are overriding the default somewhere in the Kerberos configuration. In terms of Windows, Microsoft’s Kerberos implementation seems to enforce compliance with the OK-AS-DELEGATE flag. (PuTTY on Windows will not delegate a credential unless the target host has the TRUSTED_FOR_DELEGATION flag set in AD.) Perhaps there is a way to disable this behavior, but we have not yet found a way to do so. > the RFC provides what I would consider a cognizant explanation: > > https://datatracker.ietf.org/doc/html/rfc4120#section-2.8 Microsoft provides a similar explanation, but it is still an unsatisfying one, because it does not speak to our issue: if denying the ability to delegate a credential (in order to protect it from exposure to a possibly-untrustworthy host) forces the user to instead acquire a credential directly from the possibly-untrustworthy host (thereby exposing the user’s actual password), then this is not a security improvement. And while I acknowledge that RFC4120 is 19 years old and a lot has changed since it was originally published, neither the RFC authors nor Microsoft seems to have considered/predicted this scenario. On Mon, Apr 15, 2024 at 8:40 PM Stephen Frost <sfr...@snowman.net> wrote: > I'd *strongly* encourage you to ignore what OSX comes with in terms > of Kerberos "support" and push to move everything away from what OSX > ships with and to instead use MIT Kerberos. In my experience, this > is far from the only issue you're going to run into with the hacked > up Kerberos from OSX and they don't seem to care to properly > maintain it. It has been our experience that ripping out a vendor-supplied library/package and replacing it with an in-house version almost always has a higher long-term cost than simply living with whatever warts the vendor-supplied library/package has. So we are reluctant to take this approach unless there is truly no other choice. But this segues back to my original question: how are other sites that use Microsoft AD as their KDCs handling this? Are other sites ensuring that the TRUSTED_FOR_DELEGATION flag is set for Linux hosts, so that all various Kerberos libraries (including ones that enforce OK-AS-DELEGATE by default) will correctly delegate credentials to Linux hosts? Are other sites configuring their Kerberos libraries (on a per-OS basis) to ignore the OK-AS-DELEGATE flag? Have few other sites that use Microsoft AD as their KDC even run into this, because they don’t have services (e.g. home directories mounted via NFSv4+RPCGSS) that require a Kerberos credential, and therefore don’t need to forward Kerberos credentials to the remote host when making an ssh connection to it? My read of the MIT Kerberos kdc.conf man page is that ok-as-delegate is not one of the flags in default_principal_flags that defaults to enabled. So heterogeneous sites that use MIT Kerberos as their KDCs (not AD) should also be seeing this issue. At least so far, we *think* the best course of action is to always set the TRUSTED_FOR_DELEGATION flag for Linux hosts in AD, so that credential delegation won’t depend on whether the Kerberos library that any specific host uses pays attention to the OK-AS-DELEGATE flag. And this does seem to be the intention of the TRUSTED_FOR_DELEGATION / OK-AS-DELEGATE flags: it’s advice to Kerberos clients that it’s OK to delegate credentials to the target host, which is exactly what we want to happen. The only thing we’re not completely sure about is whether setting the TRUSTED_FOR_DELEGATION flag in AD will have other security ramifications that aren’t clear from Microsoft’s documentation. Which is why I was hoping that others on this list have already been down this particular road and could offer advice. ________________________________________________ Kerberos mailing list Kerberos@mit.edu https://mailman.mit.edu/mailman/listinfo/kerberos