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

"Steve Syfuhs (AP)" <Steve.Syfuhs@microsoft.com> Sat, 18 February 2023 00:51 UTC

Return-Path: <Steve.Syfuhs@microsoft.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 45437C15DD44 for <kitten@ietfa.amsl.com>; Fri, 17 Feb 2023 16:51:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 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] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.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 hTSq5T31Xvem for <kitten@ietfa.amsl.com>; Fri, 17 Feb 2023 16:51:02 -0800 (PST)
Received: from BN3PR00CU001-vft-obe.outbound.protection.outlook.com (mail-eastus2azlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c110::1]) (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 8AF02C15AE03 for <kitten@ietf.org>; Fri, 17 Feb 2023 16:51:02 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dQ8R45FrAW+v4fUlSsJJKdCtp2mq9cgL7Ty1csZgP3XxC0piZhHEm9YfYA+9sThc9dZcl62u1o194Js9x25VNnPf36msPfAfU5NpBRW4MrDoDJh7XyuoDG2EF5erTKPMD0t7wHZeSDSrNrilsuzflgCQDDp9R765YmRf1w465n6MaODkgs5QcvANybF39w0R3RuN4ofr2bZc/Qmiw5IrVefylVIyUXFHJpO41HD4otcCLyc4khLRkgmm2aixn8QOjcXlilWsFiuIfW4iJzsBCvVLDu5wtV4vMDiphB4kdYNiQT0OYeq+2Qdeb7/LxGA1Z6/tt7ism1UDAy5viuq9fw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O15HJXRppATnDmGtrWdN9LNUAGmB5b4aNGRBMa0i3FU=; b=L8YhwxruR5PNbPobylWcCHpFyYmGAy9KLEAYJqvhqHE6e+O4Xnc2SDrWtW1fp/qwiX7s6qPkksSYloPhjGKsaafyzGVjVuXSsqx6Y2qJW/R+Tz+9ops1JaWS1fZydzpH7ZsGfF+M907AlGeyQPCMNwA/Q9Mj8ZivTtojDUliy2v5gVe1iHuVSRgOhdkQoSWRVA1tvUQ6htyShr9WTKfqr1IHlM3DEDpULwncT8Qo9+a4zo+99PmQh4UGgld4aMEAr5KI6ulLOTvxhQ77vZdZmdwRmUiUdTZRgIi2la3QANa8Pxn4wL1m/dLRF31uxiNrVLuWCJ1OWWvzuLVKj7XSjw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O15HJXRppATnDmGtrWdN9LNUAGmB5b4aNGRBMa0i3FU=; b=YcASyKqhMYmleSFlVNTgOcyRpG9Sqbz47TBqcPjg33HAwWF83PkQ2OS7JMTsX7SM8drtFR8NXkU/okI0TNPmn3YhL97tUAYLrBFCHzkax17rIdBfpvkmnr2MPhbm+Waa2i7sNV/16GbrGi+W44ku5aFbvmyc3cz7dDbv6GwEssA=
Received: from MW4PR21MB1970.namprd21.prod.outlook.com (2603:10b6:303:70::14) by PH0PR21MB2045.namprd21.prod.outlook.com (2603:10b6:510:b4::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.13; Sat, 18 Feb 2023 00:50:57 +0000
Received: from MW4PR21MB1970.namprd21.prod.outlook.com ([fe80::5e00:89be:2491:e25]) by MW4PR21MB1970.namprd21.prod.outlook.com ([fe80::5e00:89be:2491:e25%7]) with mapi id 15.20.6134.011; Sat, 18 Feb 2023 00:50:57 +0000
From: "Steve Syfuhs (AP)" <Steve.Syfuhs@microsoft.com>
To: Nico Williams <nico@cryptonector.com>
CC: Jeffrey Altman <jaltman@secure-endpoints.com>, "kitten@ietf.org" <kitten@ietf.org>
Thread-Topic: [kitten] [EXTERNAL] Re: Windows Intent to revive and implement IAKerb draft-ietf-kitten-iakerb-03
Thread-Index: AQHZQy3RG7pgpa/rrESkcdLapDYjjq7T2DIAgAABkpA=
Date: Sat, 18 Feb 2023 00:50:57 +0000
Message-ID: <MW4PR21MB1970AEAB4ABD68C0059A2AB99CA69@MW4PR21MB1970.namprd21.prod.outlook.com>
References: <MW4PR21MB1970A9D254B943A1763C55FF9CA09@MW4PR21MB1970.namprd21.prod.outlook.com> <de4cbe7b-85b5-7001-3a8c-74787990c6e0@secure-endpoints.com> <eb9fa7a4-a00d-f388-27aa-3624df8ce4f2@secure-endpoints.com> <MW4PR21MB197060FB388E7922FAADEB079CA19@MW4PR21MB1970.namprd21.prod.outlook.com> <Y/AYFbD6wCrszskG@gmail.com> <Y/AamL5pPJW1sYrv@gmail.com>
In-Reply-To: <Y/AamL5pPJW1sYrv@gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=dd17673a-cee5-410c-99d1-3e442b8a8c43; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2023-02-18T00:29:28Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: MW4PR21MB1970:EE_|PH0PR21MB2045:EE_
x-ms-office365-filtering-correlation-id: 54c8854d-b213-4072-c055-08db114a32a7
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: y3WZwPBcUnyT1kLhRKV5iISvdF5Os66ruHW1R+B/t5Brbdj7KZtEsLLRYKECSVfXwzL0gpcjfSudrB0kE7w4KMjEMY1eeA3jRTox1Kd0XdveRVBFyrG5kq2odmcN/TFAnHeATJ4I2h+HqBfXE1LECnPdLKdk22uFoO3xmPyjadliU8xCp5idSbamEAo4NUuAeru27HtiD0tyD88DxucyJRGKD26gGW52rJE6GFljQZOZ9wrXexpbC4GbajR7x1vpzc59WE87XggQWDXovCSBYCSXdEg6U0UcBapUneuqqnzqsvfUww0ffO2nkrO0JEtPBil0+SI+Aiq5VBqMNqqSzLa4pfL8hkU+y7pAuM2YdHNfdu8wa45VJ//aHZ9BM1Wd3BdoBrrZgyA2LR5VFB2ls4R6D7LaWYlq2v7eucJPsAg1UBZo9mJl3dF03GaeZt0J/9lup20qVxiTI4qqYZ/PsqD+ppo6AXp3F1p089fcYCpg7LRY8Gq9hVdSgvcixvAvoj7oEc38x6NLjaj9TYDytI1uSyGdhE2qxxsw00MjMyKVKWw7F9jcSJD5J93qucqPTffNnBWTlwKIyPyGgi+DKlNTP56ccWIcEKn98m4mrESpb63Byy7cpFJ8jG+ZOXiNzuN7IRiw0zOzdC1ikCqfRUxzP0LrtB7FmWzWX4wBUQ63MdzBCG+1cNP9fYYS7/HcUre+9tPvOUIk4XclsxSYecFiV6B+mf1DAUauhYjI2Gk=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR21MB1970.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(396003)(346002)(39860400002)(136003)(376002)(366004)(451199018)(66446008)(5660300002)(8936002)(52536014)(6916009)(4326008)(76116006)(66946007)(9686003)(41300700001)(8990500004)(82960400001)(82950400001)(122000001)(55016003)(38100700002)(38070700005)(33656002)(86362001)(66476007)(8676002)(66556008)(2906002)(478600001)(966005)(64756008)(10290500003)(7696005)(71200400001)(186003)(53546011)(6506007)(66899018)(316002)(54906003)(83380400001); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: MBq1LILc2DA1VaYx6rdK+eFBa4QcFMT5l8uSEoQWIRJvYRFaQjBDbj7t5DNBe7dMe0YRNkqmbzGoNnzuZnshCs8OtEjy414CVQSFX17DVgekhHYJ7U259h4nriixwzSXnmvpX15Xq9iyRT9R8OZKB4sTJuDuDAYKfqUgpMyxpsL4oq6brrpy5TFFNtrcxoFPWjI99hKzuFqMCsJI1MH79jnVHE7RvK2+OORKzGyB041eQe6sMw2EmX8AbHpbTgRPn6/3KBzxa+gSK1aX56VMaytFjt1q6qhdAS/aexUDN6JmMFlQjBV3DTJTuYhwpq9uCjXosRL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uMCjORkbNJD407ZgXx9X5v7Xrh+sRO1KEILZi1nPhEgCkWviG2oOZm/KL5s63BZODJYEL3ISNzzg8+pn6BUb2FVWNUEYh9zUHHgaAxiOOwowDbO2cJE6doLCvt1zai9VWfZSt4XpsTEs6qMAprmSpefIqND6yyzc5K/mRTOUII23UO0k9Hh3ys/pSErkQTWhGSVSpdHWeieC0Nq+gJP+5ddkJfUsAtmF7L/4RZNO9Tq53uTSG2zFj6r9czMQHEDbn5kbgdP
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: MW4PR21MB1970.namprd21.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 54c8854d-b213-4072-c055-08db114a32a7
X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Feb 2023 00:50:57.8008 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: /rfHlT7prsOlNvUC86RkMSqFLKLS6tt/g6E4gT9+m8BZOuOkKQsaHPFKZATjsFt6AscGw+oE2q0sh91ca+9McQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR21MB2045
Archived-At: <https://mailarchive.ietf.org/arch/msg/kitten/J3e23fwNPj0u5t4MAOQgh41xQqY>
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:51:08 -0000

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
--