Re: [OAUTH-WG] DPoP with token exchange where the subject_token and / or actor_token is also DPoP bound

Brian Campbell <bcampbell@pingidentity.com> Mon, 18 July 2022 18:46 UTC

Return-Path: <bcampbell@pingidentity.com>
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 DF67DC15A72F for <oauth@ietfa.amsl.com>; Mon, 18 Jul 2022 11:46:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.105
X-Spam-Level:
X-Spam-Status: No, score=-2.105 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, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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=pingidentity.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 5CE2dtfwdkhj for <oauth@ietfa.amsl.com>; Mon, 18 Jul 2022 11:46:55 -0700 (PDT)
Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) (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 4E796C14792E for <oauth@ietf.org>; Mon, 18 Jul 2022 11:46:55 -0700 (PDT)
Received: by mail-yb1-xb30.google.com with SMTP id i14so22523057yba.1 for <oauth@ietf.org>; Mon, 18 Jul 2022 11:46:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pingidentity.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IBMWqE4o9hdhGYKfSXrD2r7WbkKegp+rSASDqz+MB7c=; b=SLGnUNUrq81G/RpR9VQBslyIhZU7uxRum9zt6Mnc4/hijDx5Ssd5b47AS96a0uoC82 HkBSNHYJ1a4w27i2dVAHFvoRm8hw1J+2WRk+ez5Fq9d0jj0vCZzGo41L6FxfrgrhksM3 UQkMqNBoUSyLCncaHYmTTOWjNX5+sn7kRQNpZ53MlvLR/RpPjk7A8SYKL0VQWLbv+4nS D7Hp03nk8SEVvud5Uqa4erpwwjy9JzdGXqob5UvcSCZIrzotDUesuQml/Cis9eGYz/Ed 5rgNVAaWp3uoHYXu6vNR4HowQvB+NeSrUZkvlJleNBx6F7UUK5InADYTwKuWedqVVtn9 0TNw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IBMWqE4o9hdhGYKfSXrD2r7WbkKegp+rSASDqz+MB7c=; b=uLLbwPPdv4Lh3+qzX5WEPYZb8EcTcA3N8ksY3WeqHEBKwGks8Mu5mecchhGu+NY0tc Cu47hmo59D77a223kIajqdqVlEUSLqx9hu6zLFlM4DkjC2sqg/PqHCIBRg/vHEIGiCrq iMwbc5JUAChivMinQWZu/PHj34s0hkOoMUrG8tB13LCTLNjc5rQYmR17cjZ64ZnYwqh9 Uffs8QMSiC9EI3MfXMzUvcPbV8wIGZTpelx8tJYRMP0v8vNi2UTbc4QlpV8ON7OVUi5X giYHyKoPawOxnJcE3rPu586iffdBiGnQOmD8cJIaMu6BGAsoO1aPsRYBdOvokOhlHnPk z6sQ==
X-Gm-Message-State: AJIora+gwmr0hmoo/pN1Y2dgOBIeN222fqW133dfPmQ2eDHq1rrjUVGX hPTmI/nyQy6Nlzsldp84I67fQg6+M1Tdm3a1Qz5/j63XaR2Ep5CLKRlQdJy//dcYdeN4f5C2SrE dJPlAqyGfd7zTg0NNjcAL9w==
X-Google-Smtp-Source: AGRyM1sFKgdUsUfHmaTThWMC2puGhBHPxl8vqFyLvNIw2L1AxNDbZgwmB19lqgwUP573MjQYvpGC5CQ9qmFkP2gd/eo=
X-Received: by 2002:a25:3c9:0:b0:66e:c58a:7c99 with SMTP id 192-20020a2503c9000000b0066ec58a7c99mr28703038ybd.256.1658170013504; Mon, 18 Jul 2022 11:46:53 -0700 (PDT)
MIME-Version: 1.0
References: <14aa5cd3-ac9a-3189-1077-1e198bee3c5b@connect2id.com> <CAJot-L2L4=OiaRJhZ+9u1HmGRQGruWSdQRyhJQ1USvQwjmQ6Ng@mail.gmail.com> <193be267-467c-10a6-caa3-6dc87ad57ae9@connect2id.com> <c72189c5-fc93-497c-d05e-18279589c998@connect2id.com> <CAJot-L0zHUGQ8yhikm6CRt+U1X==4hxhCS9FUQ-+u+2KhXYD1g@mail.gmail.com> <21e37d7a-7fda-66b6-96ff-f463decc9681@connect2id.com>
In-Reply-To: <21e37d7a-7fda-66b6-96ff-f463decc9681@connect2id.com>
From: Brian Campbell <bcampbell@pingidentity.com>
Date: Mon, 18 Jul 2022 12:46:18 -0600
Message-ID: <CA+k3eCSJKJ8YaoNEKYW2RhUvupnn35tOtN2-7am_zpNtkFWrew@mail.gmail.com>
To: Vladimir Dzhuvinov <vladimir@connect2id.com>
Cc: Warren Parad <wparad@rhosys.ch>, oauth <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000a1fabd05e418ca69"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/lsyrw1TZpTCzfDOn5_AOjOs7nXk>
Subject: Re: [OAUTH-WG] DPoP with token exchange where the subject_token and / or actor_token is also DPoP bound
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: Mon, 18 Jul 2022 18:46:59 -0000

While there are potentially more tokens involved in a RFC 8693 token
exchange, it's still a single client and it's not evident (to me anyway at
this point) that there's sufficient need to give it distinct DPoP treatment
beyond other token endpoint interaction
<https://www.ietf.org/archive/id/draft-ietf-oauth-dpop-10.html#name-dpop-access-token-request>s.
Should the need arise more, I'd suggest maybe considering having the new
token type define how the token and associated proof be conveyed together
as the value of the subject/actor_token parameter rather than introducing
new parameters.

On Mon, Jul 18, 2022 at 9:34 AM Vladimir Dzhuvinov <vladimir@connect2id.com>
wrote:

> I find the token exchange RFC to be quite flexible, it allows the
> subject_token, actor_token and the output token to be of any type, and
> there is a mechanism to define (register) new
> urn:ietf:params:oauth:token-type values. The only concrete need is to
> define a way to pass the accompanying DPoP proof. I don't think that could
> have been anticipated at the time when the exchange spec was devised. And
> the token exchange spec is not explicit in prohibiting extensions.
>
> Vladimir
>
> Vladimir Dzhuvinov
>
> On 18/07/2022 17:03, Warren Parad wrote:
>
> I agree this is a problem, but as I see it as a problem for Token
> Exchange, and the lack of flexibility in that standard, it does not make
> sense to add to the DPoP spec.
>
> On Mon, Jul 18, 2022 at 3:33 PM Vladimir Dzhuvinov <
> vladimir@connect2id.com> wrote:
>
>> I would like to resurrect this thread and propose a new section to the
>> current DPoP draft which changes nothing in regard to DPoP itself, only
>> adds new parameters to enable DPoP with OAuth 2.0 token exchange (RFC 8693):
>>
>> https://datatracker.ietf.org/doc/html/rfc8693
>>
>> Why?
>>
>> Token exchange lets a client submit a subject_token (and potentially
>> actor_token) to obtain a new token from the AS.
>>
>> If the submitted token(s) and the minted token are DPoP bound there is a
>> need to submit a DPoP proof for each one:
>>
>>    - A DPoP proof for the subject_token
>>    - Potentially a DPoP proof for the actor_token (if there is one)
>>    - A DPoP proof for the token that is going to be minted by the AS
>>
>> At present the DPoP spec defines the DPoP header in such a way that only
>> one DPoP proof may be submitted.
>>
>>
>> The proposal:
>>
>> A new section "DPoP with Token Exchange":
>>
>> Specifies the following new optional form request parameters for use in
>> the token exchange grant, so that any DPoP proofs can be submitted together
>> with the subject_token / actor_token as form parameters:
>>
>> subject_token_dpop - To pass the DPoP proof for a subject_token that is
>> DPoP bound
>>
>> actor_token_dpop - To pass the DPoP proof for an actor_token that is DPoP
>> bound
>>
>>
>> (the existing std token exchange params can be seen here
>> https://datatracker.ietf.org/doc/html/rfc8693#section-2.1 )
>>
>>
>> Registration of a new token type identifier to indicate the token is a
>> DPoP access token:
>>
>> https://datatracker.ietf.org/doc/html/rfc8693#section-3
>>
>>    urn:ietf:params:oauth:token-type:dpop_access_token
>>       Indicates that the token is an OAuth 2.0 DPoP bound access token issued by the given authorization server.
>>
>>
>> I hope it's not too late to include this addition to the DPoP spec. The
>> token exchange grant is standard and is seeing use. With the introduction
>> of DPoP it is likely such tokens will become involved in token exchanges.
>> We tried a work around where the client uses a single DPoP proof for the
>> submitted tokens and the one to be minted, but this has issues, including
>> potential security issues. So I've come to the conclusion that a spec
>> change of some sort is the proper way to solve this. The proposed solution
>> has no effect on DPoP core and it preserves the existing token exchange
>> semantics.
>>
>>
>> Vladimir
>>
>> Vladimir Dzhuvinov
>>
>> On 25/06/2022 15:23, Vladimir Dzhuvinov wrote:
>>
>> Hi Warren,
>>
>> The case looks like this:
>>
>>    - An OAuth client registered with AS1 for code flow, with AS2 for
>>    token exchange
>>    - API1 secured by AS1, API2 secured by AS2
>>    - For API1 the client obtains DPoP tokens from AS1
>>    - For API2 the client presents DPoP token from AS1 as grant at AS2 to
>>    obtain its own DPoP token (AS2 trusts selected AS1 token scopes for this)
>>
>> So we have a case where the token endpoint at AS2 needs once a DPoP proof
>> for the submitted access token (in the subject_token form parameter), and a
>> second time to bind the token that is going to be issued. I.e. a situation
>> where the token endpoint is also "addressed" as a DPoP aware protected
>> resource.
>>
>> If only one DPoP HTTP header is permitted one work around I see is to
>> insist on a single DPoP proof for both jobs, by including the "ath" claim
>> in the proof to the AS2 token endpoint and requiring the client to use the
>> same JWK with both ASes. Another possibility is to include the DPoP proof
>> in the form parameters alongside the subject_token, but this will require a
>> spec change.
>>
>> Vladimir Dzhuvinov
>>
>> On 25/06/2022 13:33, Warren Parad wrote:
>>
>> What's the flow here? Assuming we are talking about RFC 8693, what's the
>> situation where you would need to do a token exchange, and you actually
>> have access to the subject's DPoP key? If you have access to the subject's
>> key, then you are the subject and can request a new token. Or am I missing
>> something fundamental here?
>>
>> Also, according to the RFC, the request must be made with client
>> authentication, you don't need DPoP, because if the client's credentials
>> are compromised, you have a different problem. Unless the goal is to DPoP
>> instead of client credentials, in which case, I think I'm back to the
>> previous question.
>>
>> On Sat, Jun 25, 2022 at 12:19 PM Vladimir Dzhuvinov <
>> vladimir@connect2id.com> wrote:
>>
>>> I have a question to the DPoP spec authors - do you have a suggestion
>>> how to approach a token exchange case where the client requests a DPoP
>>> token and the submitted subject(actor)_token is / are also DPoP bound?
>>>
>>> My first thought was to simply let the client send two DPoP JWTs, one
>>> for the submitted token and another for the requested token, and then find
>>> a way in the AS to figure out which is which, but then I found this in
>>> section 4.3.1:
>>>
>>> To validate a DPoP proof, the receiving server MUST ensure that that
>>> there is not more than one DPoP HTTP request header field,
>>>
>>>
>>> Thanks,
>>>
>>> Vladimir
>>>
>>> --
>>> Vladimir Dzhuvinov
>>>
>>> _______________________________________________
>>> OAuth mailing list
>>> OAuth@ietf.org
>>> https://www.ietf.org/mailman/listinfo/oauth
>>>
>>
>> _______________________________________________
>> OAuth mailing listOAuth@ietf.orghttps://www.ietf.org/mailman/listinfo/oauth
>>
>> _______________________________________________
>> OAuth mailing list
>> OAuth@ietf.org
>> https://www.ietf.org/mailman/listinfo/oauth
>>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>

-- 
_CONFIDENTIALITY NOTICE: This email may contain confidential and privileged 
material for the sole use of the intended recipient(s). Any review, use, 
distribution or disclosure by others is strictly prohibited.  If you have 
received this communication in error, please notify the sender immediately 
by e-mail and delete the message and any file attachments from your 
computer. Thank you._