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 04:56 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 F1B4AC15DD44 for <kitten@ietfa.amsl.com>; Fri, 17 Feb 2023 20:56:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.999
X-Spam-Level:
X-Spam-Status: No, score=-6.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_DNSWL_HI=-5, 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 H8QuBmfAr962 for <kitten@ietfa.amsl.com>; Fri, 17 Feb 2023 20:56:29 -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 B6967C153CBF for <kitten@ietf.org>; Fri, 17 Feb 2023 20:56:29 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BffWDUREQsRo31Wd4LeQ1WUob5q/4se8Snng6obovwytXlXHhbvszGAiCesfWDdAUDPfoO9zQmxSdHMbwyQzybFjE8GBXG4iY9kPgtC+TekAkFZY1QbJg2nf/JLzI5scjGhTxBHOyiEaoJk01qab7FQrJR6yo7XvMxgjvzS5ejWzEC9HRSGDKeFKXKtNKJ2kI1H3NlyqlexIY+wxD5AXf0aZ8IUJsv98quOLnEzKqcLD6/xxjXa/jW3xswMPWwaMsZQi8Kk4I3OzZ60m6POsRchsuZ6d+c5uqJKp4kO5V304/yUc3y44j4sabZONxWv6He8RY7qG5r+Ux8UbkAAT0w==
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=flNFvKfDF49O8EWrKmx1ciy3dJI/Kbf8cH8PX8mQckU=; b=e0uM0pa1qnHWKRe3/hzpmWuFJuRfTUjMYxj3xaN/IRhyD7r7fd4BtZbHubpfFq5IddM2y9YL448FWGpZAgkJDfY41mgcz7QDiq5zfjN8nVgGj6TWq3iHQ8oGdgBlC7vYBpNbuw3RmZBGZIxmAhEyo2M1cszCr7efSwniIrJidMFnWtKYA9pWipxZzme3nMbrNaJAI+tOQFuiS1Wsu6sZ+56KyB+t+HJ8D/diplll0+qpGC1j8DLqPXHvyDVvr7iD17CgOvkM9FK4HtaGRP4nL+ffG09rv0WETl0IVH3JKfjMPgpOCAHrVbwUw2EXZX4dhonEYzbPqIPECODeGTAKMA==
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=flNFvKfDF49O8EWrKmx1ciy3dJI/Kbf8cH8PX8mQckU=; b=ULIF/G4ZRm0mrkBofbpm8m0+qTAj7BhQoPd17EBC47xP7y8PpDjIfSHMzGtfDg6oqdoCYmU36K5cevjiyiGQDiMG62mF6iYIz4fkONthI4WpFFldPhVCklGrlz0HXwhGlN2PmKvfxIYVBR7JKKJKKm9GbtSecz9v8G9kIOsXV1o=
Received: from MW4PR21MB1970.namprd21.prod.outlook.com (2603:10b6:303:70::14) by PH8PR21MB3833.namprd21.prod.outlook.com (2603:10b6:510:215::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.0; Sat, 18 Feb 2023 04:56:25 +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 04:56:24 +0000
From: "Steve Syfuhs (AP)" <Steve.Syfuhs@microsoft.com>
To: Luke Howard Bentata <lukeh@padl.com>, Nicolas Williams <nico@cryptonector.com>
CC: "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/rrESkcdLapDYjjq7T2DIAgAABkpCAACIOAIAADS6AgAAPoVY=
Date: Sat, 18 Feb 2023 04:56:24 +0000
Message-ID: <MW4PR21MB19709BF16824B097019F5EC19CA69@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> <MW4PR21MB1970AEAB4ABD68C0059A2AB99CA69@MW4PR21MB1970.namprd21.prod.outlook.com> <Y/A4eirujnDjO+46@gmail.com> <E1A16BAA-9B3D-4D63-96F5-6DD150DB0D6F@padl.com>
In-Reply-To: <E1A16BAA-9B3D-4D63-96F5-6DD150DB0D6F@padl.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_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2023-02-18T04:14:28.4834737Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard
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_|PH8PR21MB3833:EE_
x-ms-office365-filtering-correlation-id: a425b7ce-670e-41ec-12e8-08db116c7c64
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: R02rk+ILhyawKk1jQ1tID4QfNQJBfaiHf2m8YLks19xPSk1sSMHaOg5kBjBUVclWu5cCE89fUDKjCZCfZ/1pQl0zhO0c13xic6KHZGYo9756jAej3SNAX3L/Hdal0DPCxF7qB92IY6l1C8S5BugJ+neWu3z9Z9r4BJ2+hAqT2BvGaLZz2+SN2yNOxb45jAFUmUgIpuTDuXw2NKh2Qc2SIv+69kB5Vl4erxR85jc9bu6aJaX9oURR9J22maM7Jq6KVpyqtLN/LgqNYGuSomH/UNJBPQE+s+ztBwO+GaCznrETj+UAPydqo5sdSjI/fLc8ydgFPerziulRkdLG/a1L5RtC2CpaLxbLuxcYPr8GPx9fSBPx/NIfIAsb+Rb0iciGSXGR3Oa9tfi9LRK+MbkXenei73HqNzEwGD5ksOvGRcziKYxkdV0Rg2dVJDPGAXgSy0gTZLID5QSqesM7mttR4cq1/zkL6akQLqgTuf5E8PS8l+Il2vjqB/UElhVoAwtg990klIshsQvPHEo3bFpTAFE4a6NdoVTFecaWKpoEYGSxzjm9Erubez9PO+wdqTs3JYPcgcAPLyqpGwluHTyx7VVfTY/5a6MAOCBWjM2OzC/1Osm710lsYT5iDPacuAH6ZTLDbPtSTbS2XpvYYbPoeJhem9hCanRIwJGP0t+sZzl0hgzF2LbZK5O1uLEKSpzhECBKOAR5DqgvSIU8aGlU3z0TVZJciJhOn5TpwD5zTDVYBRqolOKMC1IzKlA/URa5
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)(136003)(39860400002)(366004)(346002)(396003)(376002)(451199018)(316002)(76116006)(110136005)(41300700001)(8936002)(52536014)(66946007)(66556008)(66476007)(66446008)(64756008)(8676002)(4326008)(122000001)(38070700005)(55016003)(166002)(38100700002)(33656002)(86362001)(82950400001)(82960400001)(53546011)(6506007)(71200400001)(10290500003)(478600001)(7696005)(186003)(26005)(5660300002)(2906002)(8990500004)(9686003)(966005)(83380400001); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: UjeaQ50OYVhHiIcemglDYbkFh4ee58GCjXo4UgX89VfxarZFA3OWwJ3fsz6abT3iCvszDKCAn+NQHVe4ENUfyGJ26sKmM3bCeuAlL1ndhHEQbaeN1Go/e15v0jXIkuyQliMKJmYMJ3NodpzLYPDU7MtnkhBl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dn0vjGNG8u5YW98yYx3s3IRl/7H6xkRa8n3bRP1bOo/bjGkgOzo8943lofo3eUNRnIUsMhQdCUMCMj0abPbKGtgYVv0NpjJWO+kJVjItkzAPSmTJg2cAmZcjqIXjXjiCMNJEinKt4u/3tTplxKc6wfOgde6vRie2GgyWmbGo4phoDTVHbxsr193StuApUoMAVOW71amz9/05Ez08xGLX1hjg9iKjspmBt5HhNiFAn8LOO13FuGzxuCW0DbUwVHWOu//gyaAWRVMiO+zG0Bf3j+qraqTFtK1AQQ4AlyY+WtgKPN5pRJFxNtQy+pHeD2a7uckhneVkltJR2vCwDsL1btfkiPzlyQc4oAIR6Mod6Uyj6Y3dGEf5sepKEOh2gZ3jzknAk8NvciGUO4=
Content-Type: multipart/alternative; boundary="_000_MW4PR21MB19709BF16824B097019F5EC19CA69MW4PR21MB1970namp_"
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: a425b7ce-670e-41ec-12e8-08db116c7c64
X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Feb 2023 04:56:24.3818 (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: i8/5lsKJqOC1He0TPMph+r6JAwswbo5jbBm/a5HevtRSZff12IBxej0+7iqdx4bAonSmJmLsyMUEX+LMaaOlHA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR21MB3833
Archived-At: <https://mailarchive.ietf.org/arch/msg/kitten/rF0aGQ1_CX7sn5HhHOYjOfpzMZ8>
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 04:56:31 -0000

Ah, I think I follow the failure case now Nico. I'll have to think about this in the generic case. In Windows our implementation is an extension within the core kerb stack, where kerberos exposes a list of mech OIDs it'll let nego try. This is incidentally how we expose u2u as a mech (NTLM, digest, etc. expose their own set of one; NegoEx is its own beast). Since kerb is still first, it'll try as usual and succeed, fail with no KDC, or fail with SPN not found. We keep a small bit of state such that when nego then tries the iakberb OID the kerb stack knows what the original failure was, and either starts the flow if KDC not found or triggers an error to move to the next mech. This doesn't help with non-Windows clients though.

For single shot I just mean encapsulation protocols that can't round-trip. A good example is when HTTP does a POST. The server will accept and trigger continuation and drop the body, but the client won't retry the POST for idempotent reasons. I'm kind of in the camp that this would be better solved by moving up the stack to OAuth or OpenID or something better suited for web flows. We know we can't solve all cases and are not trying to. Just the biggies. Let the rest die through attrition.

You have captured the exact problem with unknown names. We can extend the protocol to solicit an SPN, and it turns out if you're willing to look the other way on good protocol manners, this can work today within spec. We just lose server auth. This *is* a net-win for security still, just not much of one.

NegoEx does have better control over the nego state machine, but it has its own issues, predominantly lack of adoption and complexity. The thing I like about iakerb within SPNego is that it's trivially simple to understand.

One other thing I was thinking about. We came across a fun fragmentation bug in SPNego that's probably been around forever. When one party has a limited buffer size and we aren't allowed to allocate, we will fragment the message, where the other party sends an empty message to indicate gimme-more until full. The client->server flow has always worked, but the server->client flow was never implemented (when is the REP ever bigger than the REQ? Now any time it's not an AP). The bug, aside from lack of implementation, is that callers tend to assume responses with continuation are not empty and fail if they are. I've fixed it by always sending a specific value to indicate more is requested, but who knows how that plays with interop. Frankly I haven't done my research within all the RFCs to see if there's already an answer for this, but figured I'd include it here if folks have thoughts.
________________________________
From: Luke Howard Bentata <lukeh@padl.com>
Sent: Friday, February 17, 2023 7:18:33 PM
To: Nicolas Williams <nico@cryptonector.com>
Cc: Steve Syfuhs (AP) <Steve.Syfuhs@microsoft.com>; kitten@ietf.org <kitten@ietf.org>
Subject: Re: [kitten] [EXTERNAL] Re: Windows Intent to revive and implement IAKerb draft-ietf-kitten-iakerb-03

You don't often get email from lukeh@padl.com. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>


On 18 Feb 2023, at 1:31 pm, Nico Williams <nico@cryptonector.com<mailto:nico@cryptonector.com>> wrote:

On Sat, Feb 18, 2023 at 12:50:57AM +0000, Steve Syfuhs (AP) wrote:
The rest is a mix of null target name, SPN unknown, local accounts,
and IP targets. Harcoding is honestly the most painful one.

Oof.

For the first two one might imagine having an extension where the
initiator asks the acceptor what its name is, but, ugh, that would just
paper over an important problem so best not to.  You might just have to
break those apps in order to get rid of NTLM.

Microsoft’s SPNEGO used to do this, in the case where the acceptor sent the first message (or the initiator sent an empty message).

https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-spng/8e71cf53-e867-4b79-b5b5-38c92be3d472<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fopenspecs%2Fwindows_protocols%2Fms-spng%2F8e71cf53-e867-4b79-b5b5-38c92be3d472&data=05%7C01%7CSteve.Syfuhs%40microsoft.com%7C7b7f609d77e24ea7591e08db115ed8c5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638122871310386271%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=DVP8Sl9gWKuCCUNuNj%2FNqoMvHbTGVLNZEkPdKl9q%2FrI%3D&reserved=0>

=The fix I'm proposing now (as opposed to then[*]) is that SPNEGO could
assume that if krb5 failed with service principal unknown, then don't
bother trying IAKERB.  This is a purely local fix to the SPNEGO
initiator; no protocol changes -not even a sentinel OID- are needed.

You could probably avoid a special case in SPNEGO with a context option that contained the mechanisms that had been tried and their status codes, calling GSS_Set_sec_context_option() before the first call to GSS_Init_sec_context() for the fallback mechanism (and ignoring the error if it’s GSS_S_UNAVAILABLE).

Or, you know, just a special case in SPNEGO. We already have one for the 16-bit Kerberos OID.

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.

What's a "single-shot protocol”?

I suspect half / single round trip.

— Luke