Re: [Ace] ace-coap-est-08: using /skg with Accept Option set to TBD287

Klaus Hartke <hartke@projectcool.de> Tue, 12 February 2019 15:19 UTC

Return-Path: <hartke@projectcool.de>
X-Original-To: ace@ietfa.amsl.com
Delivered-To: ace@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 240A81271FF for <ace@ietfa.amsl.com>; Tue, 12 Feb 2019 07:19:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 RHB47nDpdUlA for <ace@ietfa.amsl.com>; Tue, 12 Feb 2019 07:19:43 -0800 (PST)
Received: from wp382.webpack.hosteurope.de (wp382.webpack.hosteurope.de [IPv6:2a01:488:42:1000:50ed:8597::]) (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 D312C124C04 for <ace@ietf.org>; Tue, 12 Feb 2019 07:19:42 -0800 (PST)
Received: from mail-qk1-f173.google.com ([209.85.222.173]); authenticated by wp382.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1gtZqV-0002J8-HA; Tue, 12 Feb 2019 16:19:39 +0100
Received: by mail-qk1-f173.google.com with SMTP id w204so8908960qka.2 for <ace@ietf.org>; Tue, 12 Feb 2019 07:19:39 -0800 (PST)
X-Gm-Message-State: AHQUAuYYlemwzbKcmv90JIKzqNkePSLJcSJm/gUKHQRsXoL6km2CHLNz MGoA4KfzCL667AVZzwqIeNApSb9nl+/V9ST7gJ4=
X-Google-Smtp-Source: AHgI3IaeeqjGv23jpDHPlMBFCHVRK7d+owN41oYpX1cJIdCjskIuO7kV3Q2fwebQhyHZ1fMmsfhOmhkvR+F5rs9CrJM=
X-Received: by 2002:a37:9e15:: with SMTP id h21mr3121738qke.2.1549984778500; Tue, 12 Feb 2019 07:19:38 -0800 (PST)
MIME-Version: 1.0
References: <DB6P190MB0054313C1BA6E125FA07813BFD650@DB6P190MB0054.EURP190.PROD.OUTLOOK.COM>
In-Reply-To: <DB6P190MB0054313C1BA6E125FA07813BFD650@DB6P190MB0054.EURP190.PROD.OUTLOOK.COM>
From: Klaus Hartke <hartke@projectcool.de>
Date: Tue, 12 Feb 2019 16:19:02 +0100
X-Gmail-Original-Message-ID: <CAAzbHvaMTXgzKtMbpVpbXfT1EKjJu4L3zM5hesrNPgG+BqfoJw@mail.gmail.com>
Message-ID: <CAAzbHvaMTXgzKtMbpVpbXfT1EKjJu4L3zM5hesrNPgG+BqfoJw@mail.gmail.com>
To: Esko Dijk <esko.dijk@iotconsultancy.nl>
Cc: "ace@ietf.org" <ace@ietf.org>
Content-Type: text/plain; charset="UTF-8"
X-bounce-key: webpack.hosteurope.de; hartke@projectcool.de; 1549984782; d966ed7f;
X-HE-SMSGID: 1gtZqV-0002J8-HA
Archived-At: <https://mailarchive.ietf.org/arch/msg/ace/vj5CYF8eRrra5yph2Z9ui3Gkllk>
Subject: Re: [Ace] ace-coap-est-08: using /skg with Accept Option set to TBD287
X-BeenThere: ace@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Authentication and Authorization for Constrained Environments \(ace\)" <ace.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ace>, <mailto:ace-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ace/>
List-Post: <mailto:ace@ietf.org>
List-Help: <mailto:ace-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ace>, <mailto:ace-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Feb 2019 15:19:45 -0000

Esko Dijk wrote:
> So the client asks for 286, but gets 62 (which has 286
> embedded in it as one of the parts). At first sight this
> appears incompatible with CoAP RFC7252 logic.
>
> A strict server implementation might return 4.06 Not
> Acceptable since the server code has registered the
> response type to be 62; and the client asks something
> different.

 RFC 7252 is quite strict about this:

   If the preferred Content-
   Format cannot be returned, then a 4.06 "Not Acceptable" MUST be sent
   as a response, unless another error code takes precedence for this
   response.

That's a MUST, not a SHOULD.

Since a client might actually support multiple formats, it might make
sense to indicate all supported formats in order of preference e.g. as
query parameters:

Client:
  POST /.well-known/est/skg?ct=TBD287&ct=281
    Accept: 62
    ...

Server:
  2.04
  Content-Format: 62
  Payload: (multipart containing TBD287)

Klaus