Re: [OAUTH-WG] draft-ietf-oauth-mtls-03: jwk / x5c sanity checks when registering for pub_key_tls_client_auth

Brian Campbell <bcampbell@pingidentity.com> Wed, 30 August 2017 14:51 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 D49E21326F6 for <oauth@ietfa.amsl.com>; Wed, 30 Aug 2017 07:51:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=pingidentity.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 jxQqQi1rcfBx for <oauth@ietfa.amsl.com>; Wed, 30 Aug 2017 07:51:38 -0700 (PDT)
Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::22c]) (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 8A382124B18 for <oauth@ietf.org>; Wed, 30 Aug 2017 07:51:38 -0700 (PDT)
Received: by mail-it0-x22c.google.com with SMTP id f1so6973064ith.0 for <oauth@ietf.org>; Wed, 30 Aug 2017 07:51:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pingidentity.com; s=gmail; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=98RTRuL3x4+Lt0OmIGfB4CWibem+QspRNWHjYBdIdbs=; b=AMQen9h5w8UFOTDGVcVnWqUrgFmigJRA+P8E50hbdpSoOSYHXRbg932V+BTwNQM7eO CJWER+H3nOMKchW52RaiuKYB3tNhuUMghMQpBJj/fgFDzSFqwfZ6nMleHy2OzfU1t9Lw D/JfbG11Cftau9QJPgNuV+DplYHeh39bijtSE=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=98RTRuL3x4+Lt0OmIGfB4CWibem+QspRNWHjYBdIdbs=; b=JJKo88Gi2Fua2wVSMMfWW+puCZtGfG5iVXbIRULqvTbQs8JTlVxE5qCoUb1NjHEZzI opcBO9RKoo1xMKNPcd6yK8WjaP/C0ROpy2Io5YHyXDH0OUT1ZnHv6vjugFhq0cBayPTh 4P9sOtRQ0XHmxWSlRQQeBL+NhRJrkXOA9gbmThxnQQLZMTE1elx9bcitk1zjO1wHCIuU 4XZtQ6U1rZ4RZYHfBMPd3IyC8Irz6fnWU9AB8UZkG/vl2VhiQsmj6stg5BJSfR+OLLXg kT6uW4OpapNIBz8OSwYncNFyVFjabRqkBhuv9jDK+UasTKQdWtZS70I+cTEnfZK6wB73 s1Yg==
X-Gm-Message-State: AHYfb5gW7XM9Ay62bWrFpr1R9vnlLL0MG/xp+iJ7dgga2OGKUpVYDCP1 YVH6Kqfk7Z3Gjx9EKDSBze259BeRe80v/W977IjQ0z/+xEzPLC4+hy9xlCE763xOYiIt/wXum4A bHVGS
X-Received: by 10.36.211.88 with SMTP id n85mr2109376itg.78.1504104697866; Wed, 30 Aug 2017 07:51:37 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.2.67.134 with HTTP; Wed, 30 Aug 2017 07:51:07 -0700 (PDT)
In-Reply-To: <8e9eaf64-6859-0674-d586-ab23ab91f086@connect2id.com>
References: <c8393341-18fe-df74-4d3f-26a444e65679@connect2id.com> <CA+k3eCRVPXN16qjnbU1zf8DP=XU+zu+o3N4jcD_yjmF7VKxjPg@mail.gmail.com> <8e9eaf64-6859-0674-d586-ab23ab91f086@connect2id.com>
From: Brian Campbell <bcampbell@pingidentity.com>
Date: Wed, 30 Aug 2017 08:51:07 -0600
Message-ID: <CA+k3eCRrc_4CDxTyJj0Fgr3Uu7DgyncwuaW5ELaTn27aX=Vjtg@mail.gmail.com>
To: Vladimir Dzhuvinov <vladimir@connect2id.com>
Cc: IETF oauth WG <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="001a1145ee8e38ccd70557f9aa1f"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/05vyE91X9rwvp_6qXXChJj2sv4w>
Subject: Re: [OAUTH-WG] draft-ietf-oauth-mtls-03: jwk / x5c sanity checks when registering for pub_key_tls_client_auth
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.22
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: Wed, 30 Aug 2017 14:51:41 -0000

I suppose a note or reference like that couldn't hurt. I'll look to add
something along those lines. Obviously, a spec like this can't restate
everything from the specs it builds on. But sometimes a call-out or pointer
is useful.

On Tue, Aug 29, 2017 at 11:10 PM, Vladimir Dzhuvinov <
vladimir@connect2id.com> wrote:

>
> On 29/08/17 18:14, Brian Campbell wrote:
> > Sec 4.7 of RFC 7517 <https://tools.ietf.org/html/rfc7517#section-4.7>,
> > which defines "x5c" for JWK, says that the "key in the first certificate
> > MUST match the public key represented by other members of the JWK." Thus,
> > how I read it anyway, the check you mention is already a requirement of
> the
> > JWK layer.
> Thanks Brian, I missed that bit!
>
> And just realised that the Nimbus lib doesn't check the x5c pub key when
> creating / parsing JWKs! I suppose other JOSE libs may have the same
> omission. A reason to add a note to the MTLS spec perhaps?
>
> Vladimir
>
> > On Tue, Aug 29, 2017 at 1:28 AM, Vladimir Dzhuvinov <
> vladimir@connect2id.com
> >> wrote:
> >> Aspects of this were previously discussed, on and off list.
> >>
> >> According to section 2.3, clients registering for public key bound mTLS
> >> auth must register their public keys as JWKs, or client X.509
> >> certificate (as x5c parameter in RSA and EC JWK).
> >>
> >> In the latter case, are there any security implications if there is
> >> mismatch between the registered x5c and the top-level public key JWK
> >> parameters? Should the AS perform some sanity checks on the JWK
> parameters?
> >>
> >> A client could for instance register a JWK where the top-level JWK
> >> public key doesn't match the public key in the x5c (as key type, or
> >> public key value).
> >>
> >> Thanks,
> >>
> >> Vladimir
> >>
> >>
> >> _______________________________________________
> >> OAuth mailing list
> >> OAuth@ietf.org
> >> https://www.ietf.org/mailman/listinfo/oauth
> >>
> >>
>
> --
> Vladimir Dzhuvinov :: vladimir@connect2id.com
>
>
>

-- 
*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.*