Re: [OAUTH-WG] [DPoP] Protected resource access and invalid DPoP proofs

Dmitry Telegin <dmitryt@backbase.com> Fri, 24 September 2021 03:00 UTC

Return-Path: <dmitryt@backbase.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 216403A0DCA for <oauth@ietfa.amsl.com>; Thu, 23 Sep 2021 20:00:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
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, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=backbase.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XpYTt-6tC_ow for <oauth@ietfa.amsl.com>; Thu, 23 Sep 2021 20:00:31 -0700 (PDT)
Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 49BDB3A0DC1 for <oauth@ietf.org>; Thu, 23 Sep 2021 20:00:31 -0700 (PDT)
Received: by mail-lf1-x12f.google.com with SMTP id u8so33530703lff.9 for <oauth@ietf.org>; Thu, 23 Sep 2021 20:00:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=backbase.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GkOwOzMsPRRn+k4oyUG9aTX75iO3Q6BycTt9BnpRCnA=; b=LhMzGY/wtzW/8rOtk0Aqhlh7cl5bIcHZCeLv7aGRxJZSg03Ll42tbVpBK4eC2CxJIP 6x2OTkD4/lf7/rDsxrud1vdc8I4Po5CJoGB5Ge77ZATtLOH9QjyX6NgeykLWGuF2HwX6 L7ckmVuoPQq6p4yKNq0hDFQa7ivV1esYXSBQNu9MFdqKN9rveE1XP2F2mG5LwyGNzwvr TzLzT1PyufHdDXCLTvTFJKgkEEL2X9AudGD03j53UInBfCUa8O3JA/1C+NwKY5hWfKzA tQRMDNMygQPq4+iahr7ZKuvUzL+Ff0vmg7OErqu1A1fCNzPt6vRM8yxBxvSimY5Wp18I 1K+Q==
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=GkOwOzMsPRRn+k4oyUG9aTX75iO3Q6BycTt9BnpRCnA=; b=pzR/ErBq4VSLEG8DUdfoAcq05JDlzexaCfhxyRDA+df3CrgjRCDkrhR2bGt9gu80rP 2g/z4U4YFEmomUE6MsmAVLKRIUbEH2uXsnCP6QZu7mEwxJVxsyNkNRndTDiC5SQMJZps RiwDopUVfNfcuUD8Fd54NzarVi7oDbTI+e6Tx747LDNJ5ZMZt+JU+KaVWlmAX7l6zo8B GgluXg3eKm26DqxXRGBg0Pv6tKmZg4H9EYE2j8tElQaGSMQuzcibpMmjzyJw1B0Y8jsv tlbDS5zvMgy4ZSW3ZyP/7UFbxMntTRh7R+5KrQwH4oZpAGcRFGIvz7WVBx+5zn0NqQdz HAkQ==
X-Gm-Message-State: AOAM533f+rWAHVQ6LoytPWHfzYOlqwD86JinuMwoVQoCeD7rkrY05h2t 3wE21LEobyAHdd6K3PCgRpp4YtQbRBhQT6mmHt1kfeNEoHLTkfcM3QXMOVdmVLDBVgM59mGlii6 FAseXkRoFVQCdzOZ+Ot5Q
X-Google-Smtp-Source: ABdhPJwSMSSh8sgRZrJDviy1LKRLoqLSKFL8NhzQQv2hxLwSaqt3Un4v5iTUBvt6sFipeU2PgIQ/vlNc2NXpnhUKfDA=
X-Received: by 2002:a05:6512:3191:: with SMTP id i17mr7111439lfe.381.1632452428702; Thu, 23 Sep 2021 20:00:28 -0700 (PDT)
MIME-Version: 1.0
References: <CAOtx8DnASb6Lmr4H_zo6Tb8SgE=A1_4TTdQfgZDpNNaYmgVvEQ@mail.gmail.com> <CA+k3eCS2SAJgSUBPF0gtOQKefCr48Mr02OGL_OF1ocF2BDTaMw@mail.gmail.com>
In-Reply-To: <CA+k3eCS2SAJgSUBPF0gtOQKefCr48Mr02OGL_OF1ocF2BDTaMw@mail.gmail.com>
From: Dmitry Telegin <dmitryt@backbase.com>
Date: Fri, 24 Sep 2021 06:00:18 +0300
Message-ID: <CAOtx8Dm4oPZwHMgH_3hr5d9LPz9eiCyZHmNypFnP+4-8PXGQxw@mail.gmail.com>
To: Brian Campbell <bcampbell=40pingidentity.com@dmarc.ietf.org>
Cc: oauth <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000020427f05ccb4f3ae"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/ENGEdM29nq4iJGwOWweeFfTsp4o>
Subject: Re: [OAUTH-WG] [DPoP] Protected resource access and invalid DPoP proofs
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 24 Sep 2021 03:00:37 -0000

Hi Brian,

Just wondering if there's still a chance for this to be addressed in 04? I
could try preparing a draft PR if that helps.

On a related note, are there any recommendations on the contents of the
"error_description" WWW-Authenticate attribute? For example, our prototype
DPoP implementation for Keycloak recognizes the following error conditions:
- DPoP proof decoding failure
- Invalid DPoP signature
- Invalid or missing "typ" in DPoP header
- Unsupported DPoP algorithm
- No JWK in DPoP header
- No public key in DPoP header
- Private key is present in DPoP header
- DPoP mandatory claims are missing
- DPoP HTTP method/URL mismatch
- Malformed HTTP URL in DPoP proof
- DPoP proof has already been used
- DPoP proof is not active
- No access token hash in DPoP proof (when used with an access token)
- DPoP proof access token hash mismatch (same)

Would you recommend to a) provide detailed info (above) in
error_description, b) provide generic "DPoP proof missing or invalid", c)
omit error_description?

Thanks,
Dmitry

On Tue, Aug 10, 2021 at 12:58 AM Brian Campbell <bcampbell=
40pingidentity.com@dmarc.ietf.org> wrote:

> Hi Dmitry,
>
> I think you are right that it's probably worthwhile to allow for a
> distinction in a protected resource error response. I'm inclined to say
> that a new error code such as "invalid_dpop_proof" to use with the 401
> response containing the DPoP WWW-Authenticate header is the most
> straightforward way to accommodate it in the document. I'll look to add
> that, probably somewhere in section 7
> <https://www.ietf.org/archive/id/draft-ietf-oauth-dpop-03.html#name-protected-resource-access>,
> in the next draft revision.
>
>
> On Thu, Aug 5, 2021 at 8:50 AM Dmitry Telegin <dmitryt=
> 40backbase.com@dmarc.ietf.org> wrote:
>
>> Hello,
>>
>> When a protected resource is accessed using DPoP proof + DPoP-bound
>> access token, either of those could be invalid. Should we make distinction
>> between these two cases? I.e. should the response always be a 401
>> Unauthorized with WWW-Authenticate: DPoP ... error="invalid_token"? or
>> could we use error="invalid_dpop_proof", similar to token request? or maybe
>> even 400 Bad Request?
>>
>> Regards,
>> Dmitry
>>
>> _______________________________________________
>> 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.*