[OAUTH-WG] Re: Deferred Key Binding / TMB

Ethan Heilman <eth3rs@gmail.com> Thu, 05 June 2025 18:13 UTC

Return-Path: <eth3rs@gmail.com>
X-Original-To: oauth@mail2.ietf.org
Delivered-To: oauth@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 363AA3165D34 for <oauth@mail2.ietf.org>; Thu, 5 Jun 2025 11:13:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dfMipMgQ1lAP for <oauth@mail2.ietf.org>; Thu, 5 Jun 2025 11:13:03 -0700 (PDT)
Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 29D993165CF3 for <oauth@ietf.org>; Thu, 5 Jun 2025 11:13:03 -0700 (PDT)
Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-ad1b94382b8so219361766b.0 for <oauth@ietf.org>; Thu, 05 Jun 2025 11:13:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749147182; x=1749751982; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ravARJq7C/xv5d4IBLIEY1cm8IZBYdVTHKabvSOkLiA=; b=k0VFOvuuR49ApA+/ePgGNVJdjboO2ZLIcxNDDO7IlU08Gj85S5k8qBx3VG27T+EIiK 3VhWjOfMjEaw1hfYfv6Ya7iia9yxKs8TeKWzaUGwAvW9rF75OmJHDPKaDsqMIVBDG6m9 S+CYYG3SjeP6Q474aqMlimY1YkCA/V3+rliNPcdl6xXqkQ1jaP2QXzVFXpXQ2yMiRFmC gZ4NRK2JyiuX6BtzYE+vEds8WEyEzAS3oxwgdjIvA8sfgh+pGI8RWDmhK8bj90Xh2za/ EUuzClrtLjOfgZOG7bZLKWxFxU1ES0iQqGLi8naDn0YRYpwUvij0TkWXotYFCLTFHm35 zfug==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749147182; x=1749751982; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ravARJq7C/xv5d4IBLIEY1cm8IZBYdVTHKabvSOkLiA=; b=Mjg0sgwkpq1Dl90QesMkbe51eMAhpgdoxyuMG+zhBITr3FNeYkJrZIM2YO0kQID/II D6xGMuCdC07b3miFDZikBHaQ9nLSZgo/cc6K7eybLuC+Lvw2ZaStFsW6aeY33QjQIGSb Xf0N0LSxvj8+pdxCs+z7I25DLZiDajo6RvcHcQG0dYp47oak7hQfTuO2+0GBlyeUlEb7 Xdo4gABMo5bjAEQSRlYhiSF6E8NXk0g74/NuPE/t/Oa1lT1/CB57UMgQv0MVSAS8nI4N oPhcfQhV33+L8QWYHZVBR4pCRu6fqNj+tFiCh9Mu3Ml1dLBU4ErONp3ziSUO6nAam8oO cJEA==
X-Forwarded-Encrypted: i=1; AJvYcCULB/RIoeoq28AuuebcloaYMx3CGinmTN29RaL6njTYVN0aNtvwjY54v7wn/Si1cPx7BpFc1A==@ietf.org
X-Gm-Message-State: AOJu0Ywed3EE89+B7isinlOsizfm+gHQkrI90689bIVdecH4u/jjTgR+ PaNNVOBa3B2nRnLLGrdKl2HLuIt6EHaqlQ7yLbN606oTj187uhgsZTFrpBm7dRFzVh6ZdTSEUrn PCZzinhAVA2MM3P4fqj2KSvnm0igcUMU=
X-Gm-Gg: ASbGncuENjqdkhEtz2q28TyiS1N/xZuQVJ7+OnPJXAYETExnEnlVtmTpqwN/aL+5lCg oMNtBSV3WhzM+s0wAkIXg7NcOmVac4a8tEKrx5YnQ40ELC7I+jcVxR8uSHkdnMwPmvUKeIlXde4 MsIpBf2fOuFvbdLt9VaN4Fiv2bg2r0TTM+QBqF5Lgn3trPSZZegChWrhTx9cEfKgJgbWk=
X-Google-Smtp-Source: AGHT+IFrm50QWyLnV01t+/IPK+vXrav5HRZVej1JRt00p692IRlBsksP0KGB4FJA1jXXxeeZ+Q2n7feUDxFHRj3YuNQ=
X-Received: by 2002:a17:906:4fc7:b0:ad8:89c7:2735 with SMTP id a640c23a62f3a-ade1aa0fbaemr19847466b.58.1749147181744; Thu, 05 Jun 2025 11:13:01 -0700 (PDT)
MIME-Version: 1.0
References: <E40270D7-F032-49B1-9B10-87167331EA3C@mit.edu> <CACsn0cmbadUJTR7pi36ZwOQFAxvTNraYof30bPcv60qGSRNzdA@mail.gmail.com>
In-Reply-To: <CACsn0cmbadUJTR7pi36ZwOQFAxvTNraYof30bPcv60qGSRNzdA@mail.gmail.com>
From: Ethan Heilman <eth3rs@gmail.com>
Date: Thu, 05 Jun 2025 14:12:50 -0400
X-Gm-Features: AX0GCFueAaGYTF7vemzAQtENhUm2mSgvRp5Sdb-AXREqTNB490byVey3hAXhw_o
Message-ID: <CAEM=y+UN84LKY_MBzWFn2gRv7fXxtj_5C4p6mVxBLZBHnnQHXg@mail.gmail.com>
To: Watson Ladd <watsonbladd@gmail.com>
Content-Type: multipart/alternative; boundary="0000000000006d88790636d71069"
Message-ID-Hash: RFRZXRMWRQXN3B536XGZXFH2HOD3F3HS
X-Message-ID-Hash: RFRZXRMWRQXN3B536XGZXFH2HOD3F3HS
X-MailFrom: eth3rs@gmail.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-oauth.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: oauth <oauth@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [OAUTH-WG] Re: Deferred Key Binding / TMB
List-Id: OAUTH WG <oauth.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/suaYtOGmg3u59TXZGOrh0H8ViQw>
List-Archive: <https://mailarchive.ietf.org/arch/browse/oauth>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Owner: <mailto:oauth-owner@ietf.org>
List-Post: <mailto:oauth@ietf.org>
List-Subscribe: <mailto:oauth-join@ietf.org>
List-Unsubscribe: <mailto:oauth-leave@ietf.org>

Hi Justin,

I can not answer for the motivations to do deferred POP, but OpenPubkey [0]
provides a way to do a key binding and defer the POP to a later point using
JWS signing rules which does not seem to have the identified problem.

It would work as follows:

1. Bind keypair (upk,usk) to JWT by creating JWT token with cnf claim set
to pk

2. Later to add to POP to JWT, sign JWT with usk and include this new
signature as a additional signature on the token. Token is now only a JWS
but not a JWT because JWTs can not have more than one signature.

3. Anyone to whom the token is presented  rejects token if token does
include a second signature s.t.

JWS_VERIFY(token.payload.cnf, token, token.sig2) = 1

> (They register the credential after seeing the PoP exchange, but before
finishing). This is a very subtle change in the semantics that likely
invalidates a lot of security assumptions.

The approach used by OpenPubkey overcomes this problem by having the POP
depend on the JWT payload itself. This forces an order on the token
issuance and POP.

The JWS token would look like:

```
{"payload":{
    "iss": "https://issuer.example.com",
    "nonce": "iPk...",
    "cnf": <upk>,

"signatures":[
  {
    "protected":{
      "alg": "RS256",
      "kid": "1234",
      "typ": "JWT"
    },
    "signature": "GqjU... (Issuer's signature)"
  },
  {
    "protected": {
    "alg": "ES256",
    "typ": "POP",
    "upk": {
        "alg": "ES256",
        "crv": "P-256",
        "kty": "EC",
        "x": "cv...",
        "y": "Wh..."
    }},
    "signature":"TBa... (Client's signature)"
  },
]}
```

OpenPubkey diffs slightly because we don't have a cnf claim and so must do
the binding in the nonce claim, but this idea seems adaptable to the
deferred POP need. We document our JWS token formats here[1]

[0]: OpenPubkey: Augmenting OpenID Connect with User held Signing Keys -
https://eprint.iacr.org/2023/296

[1]: A guide to PK Tokens -
https://github.com/openpubkey/openpubkey/blob/main/docs/pktoken.md


On Thu, Jun 5, 2025, 13:16 Watson Ladd <watsonbladd@gmail.com> wrote:

> On Thu, Jun 5, 2025 at 9:45 AM Justin Richer <jricher@mit.edu> wrote:
> >
> > Hi Chairs and WG,
> >
> > Back in Bangkok, we presented the draft
> https://datatracker.ietf.org/doc/draft-richer-oauth-tmb-claim/ that
> introduces, in a concrete way, the notion of getting a token bound to a key
> that you don’t possess. As we discussed, this is a topic that keeps coming
> up in the OAuth space and is usually dutifully pushed aside for the sake of
> simplicity (and some would argue sanity).
> >
> > The chairs mentioned pulling together an interim meeting for the OAuth
> WG for us to discuss this topic ahead of Madrid, to see if there was
> anything more we as a community want to do with it. As we’re now more than
> halfway between the meetings, we wanted to bring that up again and see if
> that interim can get scheduled soon. I’d also like to encourage people to
> read through the draft and open the discussion here on the list more.
>
> This draft, plus the properties of many existing signature schemes
> like RSA and ECDSA, creates the possibility of an attacker getting a
> credential issued that will work with an already existing PoP exchange
> without actually having possession of the key. (They register the
> credential after seeing the PoP exchange, but before finishing). This
> is a very subtle change in the semantics that likely invalidates a lot
> of security assumptions.
>
> Why do we need to do this?
>
> >
> >  — Justin
> > _______________________________________________
> > OAuth mailing list -- oauth@ietf.org
> > To unsubscribe send an email to oauth-leave@ietf.org
>
>
>
> --
> Astra mortemque praestare gradatim
>
> _______________________________________________
> OAuth mailing list -- oauth@ietf.org
> To unsubscribe send an email to oauth-leave@ietf.org
>