Re: [OAUTH-WG] Call for adoption - SD-JWT

Torsten Lodderstedt <torsten@lodderstedt.net> Tue, 02 August 2022 09:47 UTC

Return-Path: <torsten@lodderstedt.net>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7C1DCC1907AA for <oauth@ietfa.amsl.com>; Tue, 2 Aug 2022 02:47:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.008
X-Spam-Level:
X-Spam-Status: No, score=-2.008 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, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lodderstedt.net
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 xrmKOMtB6jN4 for <oauth@ietfa.amsl.com>; Tue, 2 Aug 2022 02:47:14 -0700 (PDT)
Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4E23EC1907AC for <oauth@ietf.org>; Tue, 2 Aug 2022 02:47:14 -0700 (PDT)
Received: by mail-ej1-x62d.google.com with SMTP id gk3so12800850ejb.8 for <oauth@ietf.org>; Tue, 02 Aug 2022 02:47:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lodderstedt.net; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=DeLv3p5tElbBZIfZAGzytxqf73wSJFWSM81i2/BU3w0=; b=5d2zpX8HA6bYOVDxmbye9dBIYsF0nurUdFH6Ifg06kIZpw5UWWeMy+Ku9VjQqJlYCw 8DoyQs+eGTlUxi1/LI0VKqiSjXScmWSBS4AawoQ+tCk5SACavQuoIZqWO0rJPkK4glut EHV89WWjObyBEmkAoKgpbp9pfyoxYn1ipcCtdYE1dEeuPrE0b3af1Noi1hGd5J4J457g lqxM3UvOFKiFHfUqOgbi0dgbpWyi55vV3VedUjngzhiHbJWu86Qzrdn/tq4DDGVdotta I3r4TUU0K+knTGsTBnMjVUsPxU9oWLEGGlOlUQksVSBnlar9ONrp6JG3iEDvcArNZutf XNYg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=DeLv3p5tElbBZIfZAGzytxqf73wSJFWSM81i2/BU3w0=; b=5o/HjMh3lgwS1wVxCfcpd1q+CMx82QMVpqaY5kmRoQUzACHO6ixabC5qupYkM1VxpW aALxN11McmdDu08ZaJXGvOfF3l+MBFIs7ypbcY2a2ti1hSscglll12XpTv7zZerVTgl9 vDNoeqZXqcPF5WUmTikhw39Nk0oLZTvX0B1nFMoQG3mNHwrDBaF7pMat6SxRL6JOYAfh NWDswTUqVsy0Zg8JctOb58SAbRjAamyOAXUs95u8M7owtGN00RsWRwF+Vz87ihXMWVKn s4NM2MXKpdXKG1EE3cqLdIq9IjvNRey9mBlNoRsqqolsqzlY4oVUu8vdGECIyEZPDjN5 ka+A==
X-Gm-Message-State: ACgBeo1PilNrrKgfPom+pjj9euwQI2hiYveXZtwr0NJFkOXdx6FJ4wqe LJfaNfm/OZDmuj2x/qS1L0YMj92cxzqBaZli
X-Google-Smtp-Source: AA6agR6rYl2JIlvknxpHV9ejIO6X5NrKLi0+5I+wVgsSBcz/kI3h3ewQmThYbaMzlYLwZu+DDXzmuA==
X-Received: by 2002:a17:907:6e14:b0:730:a229:f747 with SMTP id sd20-20020a1709076e1400b00730a229f747mr1406493ejc.202.1659433631559; Tue, 02 Aug 2022 02:47:11 -0700 (PDT)
Received: from smtpclient.apple ([31.45.223.2]) by smtp.gmail.com with ESMTPSA id o24-20020a170906769800b0073061212425sm3282492ejm.179.2022.08.02.02.47.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Aug 2022 02:47:11 -0700 (PDT)
From: Torsten Lodderstedt <torsten@lodderstedt.net>
Message-Id: <431F1208-E0DA-45F4-AD60-9F10A3760EAB@lodderstedt.net>
Content-Type: multipart/alternative; boundary="Apple-Mail=_876E17DB-A4F7-40B8-AF45-F05D6A6BC97C"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Date: Tue, 02 Aug 2022 11:47:08 +0200
In-Reply-To: <CAJot-L16wwDeqcvZVxNy0Jzu+D7DCP5-75DZcSVFfYJB+x6QMw@mail.gmail.com>
Cc: Torsten Lodderstedt <torsten=40lodderstedt.net@dmarc.ietf.org>, Kristina Yasuda <kristina.yasuda@microsoft.com>, oauth <oauth@ietf.org>
To: Warren Parad <wparad@rhosys.ch>
References: <CAJot-L3jUMBteKK-PfMqJK95wCCvS0e5q2BWhK7acn16sHmA8g@mail.gmail.com> <C938FD28-CDDB-4E5A-BB68-363D312A0025@lodderstedt.net> <CAJot-L16wwDeqcvZVxNy0Jzu+D7DCP5-75DZcSVFfYJB+x6QMw@mail.gmail.com>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/utSEZgY6UtBGnbxEmoVHmOgKCRM>
Subject: Re: [OAUTH-WG] Call for adoption - SD-JWT
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/oauth/>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Aug 2022 09:47:18 -0000

> Am 02.08.2022 um 11:06 schrieb Warren Parad <wparad@rhosys.ch>:
> 
> I was following your train of thought, let me paste that here for transparency, you specifically said:
> In an OAuth scenario, the user‘s wallet would act as AS and issue access tokens (those could be short lived) that effectively are verifiable presentations (based on a verifiable credential) audience restricted for a certain RS. The client wouldn’t even know it’s a verifiable presentation since the access token is opaque to the client.
> 
> Which I replied:
> If the user's wallet acts as the AS issuing tokens, then there is zero need for this draft because we could pass the scopes that relate to the claims directly to the AS, and have the AS return a limited JWT, and we would actually do that every time because:
> we can
> because the tokens have short lifetime
> So that isn't a valid argument, unless there's a reason why the AS wouldn't be able to do this.
> 
> In this conversation, I'm still not able to parse what you are saying. Yes, of course the user having a physical device (as the AS) to issue tokens is privacy enhancing, but then we don't need this draft as I just proved. Or are you talking about a different point?

In the model I envision, OAuth clients are able to obtain access tokens for the user’s services through the user’s wallet. Since the wallet is not the AS the RS trusts, I would like to utilize verifiable credentials as basis for issuing access tokens from the wallet. That means the credential is issued by the AS and the wallet can mint access tokens containing a presentation of such a credential. From a RSs standpoint this retains the standard trust model since the RS only accepts access tokens containing a credential from an AS it trusts. 

I also assume that a single AS is managing access to several RSs as that was the case in almost all deployments I was involved with. 

I think the most efficient and flexible way to implement this scenario is to issue a single SD-JWT based credential and to mint RS-specific access token as needed by using SD-JWT’s selective disclosure capabilities. So an access token for the user’s contacts API would only include the claims needed for this service (e.g. the privilege to use the service) whereas an access token for the streaming API would include the data needed there (e.g. authorised channel lists and so on). 

> 
> On Tue, Aug 2, 2022 at 10:54 AM Torsten Lodderstedt <torsten=40lodderstedt.net@dmarc.ietf.org <mailto:40lodderstedt.net@dmarc.ietf.org>> wrote:
> 
> 
>> Am 02.08.2022 um 10:48 schrieb Warren Parad <wparad=40rhosys.ch@dmarc.ietf.org <mailto:40rhosys.ch@dmarc.ietf.org>>:
>> 
>> 
>> Can you please reread what you wrote and rephrase it differently? Telling us to look at the OAuth JWT RFC isn't helpful here.
> 
> You say the AS can issue an access token every time and I say the wallet can issue access tokens on its own without the need to go back to the AS every time again. That’s privacy enhancing and helps scalability.
> 
>> Also it isn't clear which part of your statement you are trying to clarify. What does "original AS" mean? Are you suggesting a "multi AS" configuration? What does that look like?
>> 
>> On Tue, Aug 2, 2022 at 10:44 AM Torsten Lodderstedt <torsten=40lodderstedt.net@dmarc.ietf.org <mailto:40lodderstedt.net@dmarc.ietf.org>> wrote:
>> 
>> 
>>> Am 02.08.2022 um 10:35 schrieb Warren Parad <wparad=40rhosys.ch@dmarc.ietf.org <mailto:40rhosys.ch@dmarc.ietf.org>>:
>>> 
>>> 
>>> Why would we not include those seemingly critical details in the draft then?
>>> Let's define what a verifiable presentation is (is that already defined somewhere? I didn't see it in the draft)
>>> Require the JWTs to be signed with a private key from a certificate chain, and include the whole certificate chain in the body. (I don't think there is already a RFC for this, but I could be wrong)
>>> Let's also talk about this comment:
>>> In an OAuth scenario, the user‘s wallet would act as AS and issue access tokens (those could be short lived) that effectively are verifiable presentations (based on a verifiable credential) audience restricted for a certain RS. The client wouldn’t even know it’s a verifiable presentation since the access token is opaque to the client.
>>> 
>>> If the user's wallet acts as the AS issuing tokens, then there is zero need for this draft because we could pass the scopes that relate to the claims directly to the AS, and have the AS return a limited JWT, and we would actually do that every time because:
>>> we can
>>> because the tokens have short lifetime
>>> So that isn't a valid argument, unless there's a reason why the AS wouldn't be able to do this.
>> 
>> Well, how many access tokens have you seen in the wild that only contain an access token? I haven’t, any of the carriers some for of user claims, e.g. a sub, in most cases some privileges/roles. Please take a look at https://www.rfc-editor.org/rfc/rfc9068.html <https://www.rfc-editor.org/rfc/rfc9068.html> for best current practice.
>> 
>> Using a VC in the way I described means the original AS doesn’t need to be involved in the
>> 
>>> 
>>> On Tue, Aug 2, 2022 at 10:14 AM Torsten Lodderstedt <torsten=40lodderstedt.net@dmarc.ietf.org <mailto:40lodderstedt.net@dmarc.ietf.org>> wrote:
>>> 
>>> 
>>>> Am 02.08.2022 um 09:53 schrieb Warren Parad <wparad=40rhosys.ch@dmarc.ietf.org <mailto:40rhosys.ch@dmarc.ietf.org>>:
>>>> 
>>>> 
>>>> If we are in a offline scenario how does the verifier got ahold of the public key associated with the id token?
>>> 
>>> Why id token? I would assume we are talking about verifiable presentations, right?
>>> 
>>> There are a couple of ways to provide the verifier with the public key needed to verify. The (raw) key could be contained in the credential or the presentation. If a trust chain is required, a x.509 certificate could serve the same purpose.
>>> 
>>> Beside that offline has different facets. In a Point of Sales scenario, even though the wallet would be offline the checkout counter would most likely have connectivity. That would also allow to resolve the public key on demand.
>>> 
>>>> 
>>>> They would need to be online, that defeats any benefit this could provide.
>>>> 
>>>> Or what if the token you have expires. Many providers issue tokens only good for 1 hour. If that expires, the user has to go through the online flow again.
>>>> 
>>>> Unless we can add some provisions to ensure long lived token validity, I think in practice we're cripling the usefulness.
>>> 
>>> Absolutely. That’s the reason a verifiable credential has a much longer lifetime simply because the user should be able to use it in a sensible way. As this makes replay more likely, all verifiable credentials formats utilize holder binding for reply detection. The public key mentioned above is part of the cryptographic holder binding that only the legitimate user is able to execute.
>>> 
>>> In an OAuth scenario, the user‘s wallet would act as AS and issue access tokens (those could be short lived) that effectively are verifiable presentations (based on a verifiable credential) audience restricted for a certain RS. The client wouldn’t even know it’s a verifiable presentation since the access token is opaque to the client.
>>> 
>>>> 
>>>> 
>>>> On Tue, Aug 2, 2022, 04:21 Kristina Yasuda <Kristina.Yasuda=40microsoft.com@dmarc.ietf.org <mailto:40microsoft.com@dmarc.ietf.org>> wrote:
>>>> I support adoption.
>>>> 
>>>>  
>>>> 
>>>> To add some color.
>>>> 
>>>>  
>>>> 
>>>> One of the use-cases is a flow where issuance of a user credential (collection of user claims) is decoupled from presentation (where both issuance and presentation of a user credential are done using extensions of OAuth flows). The goal of this decoupling is to avoid “issuer call home”, where the user can send a user credential directly to the RP, without RP needing to contact the Issuer directly. So the motivations are not limited to offline scenarios, but are applicable to the scenarios that want to recreate in the online environment, the user experience of presenting credentials in-person.
>>>> 
>>>>  
>>>> 
>>>> Driver’s Licence just happens to be an example familiar to many, and there is no reason it cannot be a diploma, or an employee card, or a training certificate, etc. But it is worth highlighting that SD-JWT work becomes critical if we are to enable ISO-compliant mobile Driver Licences expressed in JSON to enable online scenarios and make life of the Web developers easier (as opposed processing data encoded as CBOR and signed as a COSE message). Selective disclosure is a requirement in many government issued credentials, while the usage of advanced cryptography is not always encouraged by the national cybersecurity agencies.
>>>> 
>>>>  
>>>> 
>>>>  
>>>> 
>>>> Regarding an approach where issuer issues multiple JWTs of a same type but with different subset of claims, it is not an ideal way to do selective disclosure with JWTs (type as a way to differentiate credential with one data structure/syntax from another). It complicates implementations that try to provide RP-U unlinkability (RPs cannot collude to track the user). The simplest way to achieve unlinkability with JWTs without using advanced cryptography is to issue multiple credentials of the same type but with varying use identifiers and enable pairwise identifiers per RP. Now there are multiple copies of each JWT with subset of claims of the same type. This greatly complicates presentation of these credentials too – since credentials are of the same type, now wallet needs to manage the combination of a subset of claims + pairwise identifier…
>>>> 
>>>>  
>>>> 
>>>> What if the implementation also wants predicates property, where age_over_XX boolean is sent instead of a birthdate string? The simplest way to do predicates with JWTs without using advanced cryptography is to have issuers to issue multiple age_over_xx booleans so that an appropriate one can be selectively disclosed to the RP. How many “JWTs with subset of claims” does the issuer needs to issue to account for all possible age requirements? Note that it’s not just age_over_21 to start gambling, it’s also age_over_65 to get pension benefits.
>>>> 
>>>>  
>>>> 
>>>> Managing the combinatorial explosion of sets of claims in speculatively issued JWTs, many of which will never be used, seems unwieldy, to say the least. "A conventional JWT with a subset of claims" approach could be taken in some implementations, but it should not prevent a simpler, extensible alternative of SD-JWT.
>>>> 
>>>>  
>>>> 
>>>>  
>>>> 
>>>> Finally, as Giuseppe pointed out, an option to blind claim names is on the table. As discussed on this list previously, we should analyze privacy properties of the mechanism and decide if we want to mandate it – which can be discussed after the adoption.
>>>> 
>>>>  
>>>> 
>>>> Best,
>>>> 
>>>> Kristina
>>>> 
>>>>  
>>>> 
>>>>  
>>>> 
>>>> From: OAuth <oauth-bounces@ietf.org <mailto:oauth-bounces@ietf.org>> On Behalf Of Rifaat Shekh-Yusef
>>>> Sent: Thursday, July 28, 2022 8:17 PM
>>>> To: oauth <oauth@ietf.org <mailto:oauth@ietf.org>>
>>>> Subject: [OAUTH-WG] Call for adoption - SD-JWT
>>>> 
>>>>  
>>>> 
>>>> All,
>>>> 
>>>>  
>>>> 
>>>> This is a call for adoption for the SD-JWT document
>>>> 
>>>> https://datatracker.ietf.org/doc/draft-fett-oauth-selective-disclosure-jwt/ <https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdatatracker.ietf.org%2Fdoc%2Fdraft-fett-oauth-selective-disclosure-jwt%2F&data=05%7C01%7CKristina.Yasuda%40microsoft.com%7Ca2d72420ea2c40f2d7c908da70f7b388%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637946506426392735%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=d1EoHuRcBi40%2B1h1p5yZ28O7l8oq%2FibDewlJObT1Gwc%3D&reserved=0>
>>>>  
>>>> 
>>>> Please, provide your feedback on the mailing list by August 12th.
>>>> 
>>>>  
>>>> 
>>>> Regards,
>>>> 
>>>>  Rifaat & Hannes
>>>> 
>>>>  
>>>> 
>>>> _______________________________________________
>>>> OAuth mailing list
>>>> OAuth@ietf.org <mailto:OAuth@ietf.org>
>>>> https://www.ietf.org/mailman/listinfo/oauth <https://www.ietf.org/mailman/listinfo/oauth>
>>>> _______________________________________________
>>>> OAuth mailing list
>>>> OAuth@ietf.org <mailto:OAuth@ietf.org>
>>>> https://www.ietf.org/mailman/listinfo/oauth <https://www.ietf.org/mailman/listinfo/oauth>
>> _______________________________________________
>> OAuth mailing list
>> OAuth@ietf.org <mailto:OAuth@ietf.org>
>> https://www.ietf.org/mailman/listinfo/oauth <https://www.ietf.org/mailman/listinfo/oauth>