[jose] Header parameter uniqueness related problem in RFC 7516?

Philippe Leothaud <philippe.leothaud@42crunch.com> Mon, 06 November 2017 05:04 UTC

Return-Path: <philippe.leothaud@42crunch.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D90BF13FC13 for <jose@ietfa.amsl.com>; Sun, 5 Nov 2017 21:04:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=42crunch-com.20150623.gappssmtp.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 qvordgGLUYY7 for <jose@ietfa.amsl.com>; Sun, 5 Nov 2017 21:04:39 -0800 (PST)
Received: from mail-wr0-x235.google.com (mail-wr0-x235.google.com [IPv6:2a00:1450:400c:c0c::235]) (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 0E3DB13FAFE for <jose@ietf.org>; Sun, 5 Nov 2017 21:04:39 -0800 (PST)
Received: by mail-wr0-x235.google.com with SMTP id 15so7397285wrb.5 for <jose@ietf.org>; Sun, 05 Nov 2017 21:04:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=42crunch-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=q1cqVzja+GtbbVbIRX8vSKuyaeZH/9bLEDgMhSGpT3A=; b=pjpRJlnld0T2jphC0EOF1wpNob7t0cLVpidQWibecY0WVGyDHkqgkEvzaD70bV7GrI +zJbwMvA77+WSXEc5xz4a//j89j0YioBha5jzXTPsKu0erh9laMpEn98TXCyeON041Ay B9srniFFcbE3+KGqXroF82pKoA08I3YdqIBPc/9l7eEJuCEuSl9oZlWTLuHzrtPPt5Mx CO4l2YUWwSlhSJsdOn7QKwvZjDx2e9+NELhlYUhSQWRlleFdcoLYDAsXQinG0BTWD+ke ZWOerrPvUKDBGWjEGM+94fV95+XyEHR7QAaaSE5hN2IvwM2Y9oSGEonaTSPIbs1CjcLA +qEg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=q1cqVzja+GtbbVbIRX8vSKuyaeZH/9bLEDgMhSGpT3A=; b=QkStFpZyFudJf51mcYRh4GBK6KSCOe5pJeBXvgmwiwf/1i+kIYW4E111mc9Xt6ZRFd HVgHbHvqf60WSuR97p+TmpHQL8qCE3CFLtAwV+9Br31/qD0Cz0vOCAzXTe2DlQz/I8Jr kUfDpoiB1T4bKxMCCQdyo55m3oI3/xQ1iUILmvyt+G3ew1zThEgQp2ZVjMinkKi5l4xg MZpRX1v3yfOFqJeFKQDTytF3Qc7bCB/5ebXOxE00dzIBJt4N57YesGd9413JboXmor3e 3DZIdwp5969kQ0RG0v5Q3TS+pLhPXGiyrhmk6tTUGCvpsnDa88ah8mlZkjGNPRVlv8kh nvlA==
X-Gm-Message-State: AMCzsaV4ZPbWUtVnJrNHYv3pMkUPcp5BGWbno2mzzZdJx6jZE+jfTgJN caMVYzkhdQmnklDVgKH43OG9OGtbQYekcxNefWJFA+3x0tI=
X-Google-Smtp-Source: ABhQp+QSyjKxkHGnmHa9p1nIl1TjhJa7yNhcTmQKNM8AebGyvmS0jwTAlL5DYFNTCRryMOoIEwxW4zn28cKByO+vFuQ=
X-Received: by 10.223.131.226 with SMTP id 89mr12114660wre.227.1509944677284; Sun, 05 Nov 2017 21:04:37 -0800 (PST)
MIME-Version: 1.0
Received: by 10.223.170.200 with HTTP; Sun, 5 Nov 2017 21:04:36 -0800 (PST)
From: Philippe Leothaud <philippe.leothaud@42crunch.com>
Date: Mon, 06 Nov 2017 06:04:36 +0100
Message-ID: <CADNmM1DQPu1jYV_g7r701rR=2ndVFfOEuh3OvwO3dLqh2YUx-w@mail.gmail.com>
To: jose@ietf.org
Content-Type: multipart/alternative; boundary="94eb2c0d1fc21f14df055d4964a4"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/q0m0GHjnnSzCG9-SWyHW-_5SIF4>
X-Mailman-Approved-At: Mon, 06 Nov 2017 08:51:47 -0800
Subject: [jose] Header parameter uniqueness related problem in RFC 7516?
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jose/>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Nov 2017 05:05:50 -0000

Hi there,

In RFC 7516, page 23 at the end of section 7.2.2 (Flattened) it is written
:

  "Note that when using the flattened syntax, just as when using the
   general syntax, any unprotected Header Parameter values can reside in
   either the "unprotected" member or the "header" member, or in both."

While page 17, in the 5.2 Section (Message decryption) it is written :

 " 4.   If using the JWE Compact Serialization, let the JOSE Header be
        the JWE Protected Header.  Otherwise, when using the JWE JSON
        Serialization, let the JOSE Header be the union of the members
        of the JWE Protected Header, the JWE Shared Unprotected Header
        and the corresponding JWE Per-Recipient Unprotected Header, all
        of which must be completely valid JSON objects.  During this
        step, verify that the resulting JOSE Header does not contain
        duplicate Header Parameter names.  When using the JWE JSON
        Serialization, this restriction includes that the same Header
        Parameter name also MUST NOT occur in distinct JSON object
        values that together comprise the JOSE Header."

My problem is that if a Header Parameter is in "both" the "unprotected" and
the  "header" member, it is therefore not unique.

Am I missing something?

Thanks in advance,

Philippe Leothaud
42 Crunch