Re: [kitten] [EXTERNAL] Re: Windows Intent to revive and implement IAKerb draft-ietf-kitten-iakerb-03

Luke Howard <lukeh@padl.com> Sat, 18 February 2023 00:58 UTC

Return-Path: <lukeh@padl.com>
X-Original-To: kitten@ietfa.amsl.com
Delivered-To: kitten@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2949DC15C533; Fri, 17 Feb 2023 16:58:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=padl.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wcU_4mZAlivS; Fri, 17 Feb 2023 16:58:43 -0800 (PST)
Received: from us.padl.com (us.padl.com [216.154.215.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A89DAC15AE03; Fri, 17 Feb 2023 16:58:43 -0800 (PST)
Received: from auth (localhost [127.0.0.1]) by us.padl.com (8.14.7/8.14.7) with ESMTP id 31I0wam0004846 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 18 Feb 2023 00:58:38 GMT
DKIM-Filter: OpenDKIM Filter v2.11.0 us.padl.com 31I0wam0004846
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=padl.com; s=default; t=1676681919; bh=YvnX1JkGN3zcX9aePoc9ae+f5jvfzzmZC+i9A8oVYYQ=; h=From:Subject:Date:References:Cc:In-Reply-To:To:From; b=U3W4zK+/HQGaHdY9DWrfX6H17ED5p/v3LW/YBkt4haOUZdOzfEi1myoQxkJw6vJCR aFGUWBp1MgMq6vSRe1x3y8/9g4MRoCIRjc1UF0nm9t6cYWi3mutLLrik2/WeITFNge nSmny6LDttPdNMXLnHwPoy7ndTlbj3vdNIQsLuwj5WJa4QcU002JCBugQ/t0RQe/1b EpkkRBSxrc1gR+Jx2X5YzqJO06eeSHQLHeIVhOHhXAsbQO/hXIu8fzc3y+xypRtVcb JpW4j/uGtFXGiW04Sb1gFPMQM/ENfuROp4/GH6Xe2st5lUQOBicjI+S7fu4NGtLAaF N3jIXJGB04Ypg==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
From: Luke Howard <lukeh@padl.com>
Mime-Version: 1.0 (1.0)
Date: Sat, 18 Feb 2023 11:58:25 +1100
Message-Id: <C2C1587E-FEFF-4CEB-B97B-8853F0A85406@padl.com>
References: <MW4PR21MB1970AEAB4ABD68C0059A2AB99CA69@MW4PR21MB1970.namprd21.prod.outlook.com>
Cc: Nico Williams <nico@cryptonector.com>, kitten@ietf.org
In-Reply-To: <MW4PR21MB1970AEAB4ABD68C0059A2AB99CA69@MW4PR21MB1970.namprd21.prod.outlook.com>
To: "Steve Syfuhs (AP)" <Steve.Syfuhs=40microsoft.com@dmarc.ietf.org>
X-Mailer: iPhone Mail (20A362)
Archived-At: <https://mailarchive.ietf.org/arch/msg/kitten/FDGxvCIRCU16IO76-fLM7bml7GA>
Subject: Re: [kitten] [EXTERNAL] Re: Windows Intent to revive and implement IAKerb draft-ietf-kitten-iakerb-03
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Common Authentication Technologies - Next Generation <kitten.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/kitten>, <mailto:kitten-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/kitten/>
List-Post: <mailto:kitten@ietf.org>
List-Help: <mailto:kitten-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 18 Feb 2023 00:58:48 -0000

NegoEx (which both MIT and Heimdal implement) supports fallback right? But not between NegoEx and non-NegoEx mechs. So maybe not much use.

Sent from my iPhone

> On 18 Feb 2023, at 11:51, Steve Syfuhs (AP) <Steve.Syfuhs=40microsoft.com@dmarc.ietf.org> wrote:
> 
> The rest is a mix of null target name, SPN unknown, local accounts, and IP targets. Harcoding is honestly the most painful one.
> 
> Our plan for dealing with the failure scenario you mention below is through a mechanism we're referring to as 'late fallback' where we stuff a sentry OID in the mech list. If both initiator and acceptor SPNego libraries understand what that OID is, it'll treat it as a signal that both parties know that failures at any stage of the exchange can trigger a move to the next mech. Windows-wise you'll always understand both IAKerb and this late fallback or you'll understand neither. We have some work to make it not fall back insecurely, but I think we can figure it out such that we don't take an explicit dependency on knowing IAKerb exists. Ideally we figure out how to get that into an RFC, this one or some nego extension, otherwise it'll be documented as part of one of our [MS-] specs.
> 
> That doesn't cover the single-shot protocols. At this stage of our adventure our answer is to block them from using IAKerb by target name and service class. If admins really care, they can change the opt-in/opt-out rules.
> 
> -----Original Message-----
> From: Nico Williams <nico@cryptonector.com> 
> Sent: Friday, February 17, 2023 4:24 PM
> To: Steve Syfuhs (AP) <Steve.Syfuhs@microsoft.com>
> Cc: Jeffrey Altman <jaltman@secure-endpoints.com>; kitten@ietf.org
> Subject: Re: [kitten] [EXTERNAL] Re: Windows Intent to revive and implement IAKerb draft-ietf-kitten-iakerb-03
> 
> In other words, the fix for rt #8021 was expedient and correct-enough, but not really correct, while the correct fix would pollute the SPNEGO implementation with knowledge of mechanism details it has heretofore managed to avoid.
> 
> If we implement IAKERB in Heimdal we'll want to implement the more correct fix that makes us sad.
> 
> Nico
> -- 
> 
>> On Fri, Feb 17, 2023 at 07:04:02PM +0000, Steve Syfuhs (AP) wrote:
>> As for why we care - Luke is spot on. NTLM deprecation. Despite the 
>> good intentions of our corporate overlords over the last few years, 
>> Kerberos ain't going away anytime soon, and with that NTLM certainly 
>> isn't going away without us giving it a good shove. So...
> 
> I'd like for something to be able to replace Kerberos, but we shouldn't have that discussion in this thread, so I'll shut up about that :)
> 
>> 52% of NTLM usage is because of hardcoding the package in GSS or SSPI.
>> We know why this happens some of the time - lack of visibility into 
>> outer negotiation processes like HTTP - and sometimes just lack of 
>> knowledge on the implementers part. Internally, we're working with the 
>> top offenders to move them to SPNego. Once that happens we predict it 
>> will increase line of sight issues a fair bit, though relative to the 
>> rest of the fallback reasons.
> 
> So you could lie to the app and say "you got NTLM" but actually do IAKERB?  Seems reasonable to me; NTLM must die.
> 
>> 100% - 52% - 7% != 0%, so obviously there would have to be some other 
>> things going on to kill NTLM. We have a plan, but aren't ready to talk 
>> about it yet. Suffice to say IAKerb is an integral part of it.
> 
> Any idea what the remaining 41% are about?
> 
> The one thing I'll say is that when MIT enabled IAKERB by default in SPNEGO that broke things for users.  See
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fkrbdev.mit.edu%2Frt%2FTicket%2FHistory.html%3Fid%3D8021&data=05%7C01%7CSteve.Syfuhs%40microsoft.com%7C6e8a38ae670a41b6fe8708db1144f244%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638122760049599708%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ZJCwrx4k8SbNwW8V1G4IQ9677GX0V5mma3ScphLDPUU%3D&reserved=0 whose description
> says:
> 
> | We implemented IAKERB in 1.9. SPNEGO automatically tries all 
> | mechanisms except for SPNEGO itself, so it tries IAKERB after regular 
> | krb5. In practice, this is rarely useful and often serves to 
> | complicate scenarios which would otherwise be simple. For instance, if 
> | the user has credentials but we cannot get a service ticket for the 
> | target host, we try IAKERB instead of failing locally; most of the 
> | time this is unnecessary work and obscures the resulting error 
> | message.
> 
> That captures the issues I saw exactly.  But let me rephrase.  In some cases it took longer to fail and then the resulting error was different from what users understood already, while in other cases -IIRC- we saw failures where the _app_ could not do more than one round-trip and then the error definitely had to be very different from "service principal unknown".
> 
> In order to fallback to pick IAKERB in SPNEGO because krb5 failed, SPNEGO has to know that the failure was due to line of sight issues and not that the server principal is unknown.
> 
> The fix in #8021 was to make SPNEGO never try IAKERB by default.  It can still be negotiated IIRC, but the app has to opt-into it.
> 
> Thinking about it now, a better fix would be to allow SPNEGO to try falling back to IAKERB IFF initSecContext() w/ krb5 failed with a KDC unreachable error.  That requires hard-coding -in the SPNEGO initiator
> implementation- knowledge of the special relationship between IAKERB and
> krb5 -- this might be unpleasant to us implementors givne that we've striven to keep SPNEGO implementations totally generic, but so what.
> 
> Assuming you already have a TGT for the user, then having SPNEGO know when to fall back on IAKERB and when not to should suffice.
> 
> Otherwise you might run into an API design issue with how to defer initial credential acquisition to initSecContext() time in a backwards- compatible way.  But I assume that if you want to do initial credential acquisition using IAKERB then you probably only need to do that when connecting to a remote access gateway, in which case backwards-compat in APIs is probably not a concern.
> 
> Nico
> --
> 
> _______________________________________________
> Kitten mailing list
> Kitten@ietf.org
> https://www.ietf.org/mailman/listinfo/kitten