honoring the TRUSTED_FOR_DELEGATION KDC MS-SFU Kerberos Protocol Extensions flag?
Simo Sorce
simo at redhat.com
Tue Apr 16 13:46:25 EDT 2024
The correct action is for you to ask the Domain Administrators to mark
the target hosts as ok for delegation, it is unclear why MIT Kerberos
should make it easy to override Realm policies.
Delegating a whole TGT is generally a bad idea, and often clients are
misconfigured to broadly forward it everywhere. That is why Microsoft
took back control in the hands of administrators. It is not a bad
thing, and if your setup has been vetted such that TGT delegation is an
acceptable risk, then it should be easy to get it fixed the proper way,
by getting your domain admins to set the right flag on the permitted
target hosts.
Note that if ticket delegation is needed solely to allow jumping from
hosts to host, you should be able to achieve the same result via agent
forwarding, it would be a safer option.
But all that said I would like to note that it is certainly
inappropriate to call people names before fully understanding the scope
of a security measure, just because it is a little inconvenient.
If you wanted a knob like the one you ask for it should probably be
called:
dishonor_trusted_for_delegation_mr_auditor_please_be_lenient
As for users that type their passwords onto random hosts, that is a
user education problem in general, but that can be addressed simply by
forcing the use of 2FA authentication on the user's part, preferably
via a hardware token and pkinit, but an OTP solution would work as
well.
Cheers,
Simo.
On Tue, 2024-04-16 at 03:03 -0400, James Ralston wrote:
> On Mon, Apr 15, 2024 at 7:56 PM Ken Hornstein <kenh at 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 <sfrost at 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 at mit.edu
> https://mailman.mit.edu/mailman/listinfo/kerberos
--
Simo Sorce
Distinguished Engineer
RHEL Crypto Team
Red Hat, Inc
More information about the Kerberos
mailing list