Re: [Wimse] Attempts to apply pieces of OAuth DPoP to workload identity

Pieter Kasselman <pieter.kasselman@microsoft.com> Fri, 01 December 2023 14:37 UTC

Return-Path: <pieter.kasselman@microsoft.com>
X-Original-To: wimse@ietfa.amsl.com
Delivered-To: wimse@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A5F9AC15108F for <wimse@ietfa.amsl.com>; Fri, 1 Dec 2023 06:37:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.111
X-Spam-Level:
X-Spam-Status: No, score=-2.111 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_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] 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 KqryBQCtEdUN for <wimse@ietfa.amsl.com>; Fri, 1 Dec 2023 06:37:05 -0800 (PST)
Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2108.outbound.protection.outlook.com [40.107.22.108]) (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 A4B89C151083 for <wimse@ietf.org>; Fri, 1 Dec 2023 06:37:05 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a0YhXvETzn0vGL1mex51zu4XnTUrvw3gjmFPE20Omg4goDpWnO9nhCEaaxdwokLuXbMePjfALRT0RHmQJ4yZV3VNrWeJhXiCDuJTntesS1jbbtMYY8umAgyW3YKxKD8BqsKuj/UYHrJBMz0YZ+ydkB87Urny/sFtQTTiE3gs66xxaBO/+FrIv+Lgpq7tTbC+na/apmFXzwIPSoYK9qYBhbMB8ei/kRBUgo183YBU86WVT0vM7z2EUjTVSClnXt6CzhWmpzi0H0VTYqdF1NtNnye5Umbfvik0eOuTCouxgSWCcBP6dcnRLEBc7JA+XaZH3B5UmXsV2O+ehD+rbEKT7Q==
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=qBlbKN6hUabJKBoOmtLB37Na2ijmlgdsctUo8AHYifU=; b=e42vykzjz6FQo1eJLORs27qESgZGcFfgXJEWd43356esQBOLeCJAcnq9qloqoHMeDV/crrtevpRKQB9pon5dRcLwQrJU0jL+bwbaZcR0QRbxh0PQ3W8XdLGuz1CyCdObTgTG1HwcQg7ZJK6N1WgzOJHyDtsjD/D7J9uRk9k85tA62nHIAP4nm0VcyszyDW1mlb7ISbjdTZ+gDfwYUSXiTmVSoyIFld4gk2B6WE6arz5kmpNKC/VivWsBoI95aAWAYvoIylv/uWlOyjVxZRDiQJX/cd/deXT9REBI99rR6p3rWK5lwOC6NTYqYnn3AGELp1uvrEC4Vd1P7mxDWHpsFg==
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=qBlbKN6hUabJKBoOmtLB37Na2ijmlgdsctUo8AHYifU=; b=b8lgQW5rv5AZLC/MR82hq5xplxhPGwJmMRRmbj8cekJEeBKANPRtopFXjuMcz0RUYYY1O3+XE4PjHlmpNpQOekMos8hyKa/RHM5rkY2YZKMVonZgxoaPqYcriMOA3QkImFxRB9CPqnOMvdmzK/Vs7upU4Y4l4atlrDL8iEGsv6Q=
Received: from DBAPR83MB0422.EURPRD83.prod.outlook.com (2603:10a6:10:195::11) by AM7PR83MB0436.EURPRD83.prod.outlook.com (2603:10a6:20b:1bf::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.16; Fri, 1 Dec 2023 14:37:01 +0000
Received: from DBAPR83MB0422.EURPRD83.prod.outlook.com ([fe80::c70a:7598:17f:db3d]) by DBAPR83MB0422.EURPRD83.prod.outlook.com ([fe80::c70a:7598:17f:db3d%3]) with mapi id 15.20.7068.014; Fri, 1 Dec 2023 14:37:01 +0000
From: Pieter Kasselman <pieter.kasselman@microsoft.com>
To: Hannes Tschofenig <hannes.tschofenig@gmx.net>, Evan Gilman <evan@spirl.com>
CC: "wimse@ietf.org" <wimse@ietf.org>
Thread-Topic: [Wimse] Attempts to apply pieces of OAuth DPoP to workload identity
Thread-Index: AQHZ50cfDvDsYKFMvkmb9kEqbK1P4LCR6GMAgABzsYCAALCsgIAB6ADQ
Date: Fri, 01 Dec 2023 14:37:01 +0000
Message-ID: <DBAPR83MB04224CB0865C9EA4DC15296C9181A@DBAPR83MB0422.EURPRD83.prod.outlook.com>
References: <CAOB-mKm6oG5AY-GUDnbPJ5=UXh9sqDm56AWRTzqkVWt8L=pRAA@mail.gmail.com> <6afafc01-c92c-4164-b8ec-4a88b770ea53@gmx.net> <CAOB-mK=BJ5HxPedPw+yNTU6rbbhkD6eBEgef2Rhrf2dY=e8LmQ@mail.gmail.com> <60fe135d-4498-44f5-8c8f-eb89ab597e38@gmx.net>
In-Reply-To: <60fe135d-4498-44f5-8c8f-eb89ab597e38@gmx.net>
Accept-Language: en-IE, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=12e05a3e-da03-41d3-b7c7-1774178a4487; 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-12-01T14:21:20Z; 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: DBAPR83MB0422:EE_|AM7PR83MB0436:EE_
x-ms-office365-filtering-correlation-id: 9221b4a4-f714-41bf-1a08-08dbf27afb31
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 3cYwvc62m3vdulMl9RlYY0wAiUoKucUd6Dd/O6GRHyN8JwVw+KAGvFBWtUY26jwtEKAv46Wo0RZPmoY9WLNuw4DIRo9ZBiSZ2fYAa2iY2Kx02rYnWcmsEUMDzQ0wEt58P3kZdhooihJKNDmxSe6OB7SPTx5rbVZzUJSme5Y85XnqTsJeEHH7HnmxyHt3JNDCwzevxoSS1nUOhOcUh9ZkGHTcAkjpPNOShKCGCwQq837DJrKKr2lZmLoDQ108zApoBgVlha4K8JgXto4ItDvieQCljPlA0khedWhnzPiR1z1CdnRrd95zAxjCsiNk8nQf6oFyU5Zqjam1IhDrVKal+auY8Ac/F1ZG2UXTLOFB8mBe6l3IAtdsBLrEg5dTLta2WjK+uqvDleyDLC1AONhZVysj5plDIC0UyAFRzGsSKq5tZbG///QNQXUeV4S6jjgla52JqyY/BHMcZuDTArdhCAw8ttnj3wcKMUwE0p/5z6jqRZLY7ilYotzb0Vk7lT6RmKHg4tho/JXvZMD/WZaU8NVKP47+wJxu2ffRcOPDVrN0Ccz9RJa0gHQQ0z8jWuMPHtO+ozYf4kSJxLwEDwc6ofh3IkS8j99yPMCSnoU93NpqnTgsMyLR8NONg2YRtuu8h0939pyp6hIy4l+kSHvtUDxmP5p/fPVVJIQq0i8aSJo=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR83MB0422.EURPRD83.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(136003)(346002)(39860400002)(366004)(396003)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(53546011)(7696005)(6506007)(33656002)(5660300002)(71200400001)(2906002)(9686003)(110136005)(66446008)(64756008)(66476007)(76116006)(66946007)(66556008)(83380400001)(26005)(478600001)(55016003)(8990500004)(122000001)(10290500003)(38070700009)(52536014)(44832011)(86362001)(41300700001)(38100700002)(82950400001)(82960400001)(4326008)(8676002)(8936002)(316002); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: ++pXmLbBVIeD8abtiQed2QfScAjNGxhbYouNHQFZ/WJWPw6Uh5PlvXeyAMT1B2hpL6prIQs870umug5B2VnJAeekTn5MByunEfuzWb1Las7psvwGxbi3YZ8RSWG+NDZ+vmtd9KR7jVLCg2tYk93BelaS41+QaPO3nCMKZEkTAiwVGJKclxlQYIlb2HZw6Rl+ZrLEMbT8pgJ1dkgHBBECCupHsLHlgX9+IuMct7GM+iSR4Bgc3kTAxMv7/I03owSd0eUHyQsv8jamSmg4f3RuVNNYtpN/uqNgzUDH1ea5m7xMcWrj8yqsD2JetoJum96x5+MhPm36bYOHtkiswGyFgGqL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N46Fd4IzcRfpcI8rZ593L8uLP0HcQquRuQJoJmqyOCIpJ82wLPLkMR2MDobYVQCNxLfol1+vqxDnvFJenjLfyezNsXAfM8b9rFOsG5OiKtt9E
Content-Type: multipart/alternative; boundary="_000_DBAPR83MB04224CB0865C9EA4DC15296C9181ADBAPR83MB0422EURP_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DBAPR83MB0422.EURPRD83.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 9221b4a4-f714-41bf-1a08-08dbf27afb31
X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Dec 2023 14:37:01.7061 (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: EWMnmJveWgimn+/FLbGutHP2VmH/aVIcg8DmH/oRKS+PbduCaV/mkdeSV25PitDz+OLZxSrviOaWt5BWf3DMS8nZ6muEsptwcij4vIlSUfo=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR83MB0436
Archived-At: <https://mailarchive.ietf.org/arch/msg/wimse/yPKNyvXRVx24rV2eoOIQPtwM8JM>
Subject: Re: [Wimse] Attempts to apply pieces of OAuth DPoP to workload identity
X-BeenThere: wimse@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: WIMSE Workload Identity in Multi-Service Environment <wimse.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/wimse>, <mailto:wimse-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/wimse/>
List-Post: <mailto:wimse@ietf.org>
List-Help: <mailto:wimse-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/wimse>, <mailto:wimse-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 01 Dec 2023 14:37:07 -0000

Hi Hannes

The proposal I was looking at is more focused on the JWT being used for authentication. This is the case with the JWT-SVID from SPIFFE. Since it is a bearer token, and the workload presents it to another workload as part of a request, the second workload can take the JWT-SVID and impersonate the original caller by calling a third workload. By binding the request to the JWT SVID, the moment a request is made without the binding proof, or with a binding proof that is not bound to the request, it can be detected.

The scenario where Authorization Tokens are used (obtained from the Authorization server (AS)), is addressed by other mechanisms like DPoP and Transaction Tokens (DPoP to bind the Authorization Token to the sender, Transaction Tokens to swap the Authorization Token for a Transaction Token which cannot be replayed at the front door of the resource service).

Does that help?

Cheers

Pieter

From: Wimse <wimse-bounces@ietf.org> On Behalf Of Hannes Tschofenig
Sent: Thursday, November 30, 2023 9:15 AM
To: Evan Gilman <evan@spirl.com>
Cc: wimse@ietf.org
Subject: Re: [Wimse] Attempts to apply pieces of OAuth DPoP to workload identity


Hi Evan,



thanks for your detailed response.


Am 29.11.2023 um 23:42 schrieb Evan Gilman:
On Wed, Nov 29, 2023 at 7:48 AM Hannes Tschofenig <hannes.tschofenig@gmx.net<mailto:hannes.tschofenig@gmx.net>> wrote:
This scenario assumes that WL 1 has, somehow, obtained a token to
interact with the AS (possibly in the way described in
<draft-hofmann-wimse-workload-identity-bcp>).


Now, WL 1 can use the AS to request a token to access two other workloads.

Apologies in advance, as it's a little hard for me to reason about AS involvement here .. but I think the example works even without it, if we assume that WL 1 has received a platform-specific JWT by some opaque mechanism.

Are you concerned that

- WL 2 would steal the token?

- WL 3 steals the token?

Yes. I think "steal" the token is one vector (e.g. the service has been compromised), but there are others as pointed out in today's call (e.g. tokens getting logged, leaking via crash dump, etc).



I consider all these cases as "stealing". Of course, there are differences in how the tokens get into the wrong hands. I think it is nevertheless good to distinguish these cases.


The general concern is that anyone who obtains the token can impersonate WL 1. Currently, `aud` value and tight expiry is the best mitigation we have, but these fall short in a number of ways.

There is an implicit assumption in the communication model that the "edge workload", i.e. the workloads that obtain the request from outside the network (potentially from a user) are assumed to be more secure than "internal" workloads. Is this a correct assumption? (Here is a drawing for a graphical representation)


          +--------------+
 -------->|              |
          |   Edge       |
          | Workload     |
 <--------|              |
          +--------^-----+
               |   |
               |   |
          +----v---------+
          |              |
          |  Internal    |
          |  Workload    |
          |              |
          +--------^-----+
               |   |
               v   |

                ...

               |   ^
               |   |
          +----v---------+
          |              |
          |  Internal    |
          |  Workload    |
          |              |
          +--------------+





You made some comments on the call today about it being important to know for whom the token is for. I'm curious to hear your thoughts on the importance of the `aud` mechanism beyond replay mitigation.



I was trying to find out what type of threats are relevant in the scenarios being discussed. The threat that is addressed by an audience-restricted access token is that a stolen token cannot be presented elsewhere for illegitimate access to other resources.



- WL 1 uses a token with some other workload not listed in that chain?

From my perspective, we are talking about an identity token, and WL 1 should be able to present its identity to whomever it needs to. And WL 1 should be able to do that in a way that doesn't risk it being stolen by whomever happens to see it.

OK.



- the token is used by some eavesdropped sitting between the
communication paths of the WLs?

This is also a concern, I think it's practically indistinguishable from a compromised WL 2 in terms of security posture (if you get the token you win)? A very common pattern is TLS-terminating load balancers, which could be pictured as WL 2 or could be considered a person in the middle. In other words, it should not be the case that a compromised load balancer leads to total compromise because the attacker now has access to all the credentials and can attach them to (new) arbitrary requests... same for compromised WL 2. Hope that makes sense



OK.



Thanks for your quick feedback, Evan.



Ciao

Hannes