Re: [core] [art] Artart last call review of draft-ietf-core-problem-details-05

Francesca Palombini <francesca.palombini@ericsson.com> Thu, 16 June 2022 13:33 UTC

Return-Path: <francesca.palombini@ericsson.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D4567C147921; Thu, 16 Jun 2022 06:33:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.854
X-Spam-Level:
X-Spam-Status: No, score=-2.854 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.745, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3KvnO2Ql4iM2; Thu, 16 Jun 2022 06:33:40 -0700 (PDT)
Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20630.outbound.protection.outlook.com [IPv6:2a01:111:f400:7d00::630]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 109B0C14F743; Thu, 16 Jun 2022 06:33:38 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XYYPXBuoeJhSV+sk/P8IjmJUArBMreovExiQG78rr7gwW48CQ9YSk0noi9p+LYqSqhv0sXTs+I2+CLlwTlceX/ETSI3hTCHEeQUKKE/SdBwlvQkSbvDAiHVXrXb2u6ZcIqfvpvBEupkbRO3XKRMEgcL6PgyRgyfX6CHwgtfNbPzvFLkPJ8haX0FovZy+eX82mSpyOrK9/28mSbtPgxadUkoRBelBD0vs1WuTKkRG7r2gj+wPT/T2X3HM/4rZ3Vo+jUJ8aCJGY46V/nu+U+eWG4ZfP1w+bRpGembUxS+pqZhVeqXUsusXIA50Xg2BsJFv6lOnGTdJcKyMd03t6vQD6g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hV3jf0LiFaWK9Nn76dKI+vn7ONMaXbQ7ZYKTzcwc0lA=; b=L9tBcfX1XwRmG7F3kak9+x2uqBb/EgPrLGDrPfL71IUQoEYsDkeSIZH9qEdSvaWWo1S7Ra8l2I4fEqE/pb5OiFbdngjyK9a7yVkdm31TvIgXosAb8wIeGqur8ubrWEr357N/WGHdGTBQblcW8553Lfy5cUaViw1aZa8VBohfH0YR/6HOB41Mpbzx6oN1gbhZ9WnzNmKGx8pSs35LfMMx0DLH0YIje4gK0KmIqy3ZFwKTnB12ZmY5xsShU+KdKghzg8uOuaeaYm9xsCAahq/1TGiGS6a65Bo2dHDH5x4DXRAUY4MRjj1v3mOiMwUQvF/LGm84TfNpmgZ65nVUMHnerA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hV3jf0LiFaWK9Nn76dKI+vn7ONMaXbQ7ZYKTzcwc0lA=; b=aCm7/YiYKsxlFD8uA6feMrAZAmY7bhx5MM2so0BQwIefJwkm1jAKOFXxbMPELlv6CYiQIS9v0gwz/rd4kNmy/68INRqir0dmgGtlJuvEdAmlRvKlmyjqU64gX/xck99um4T395Xxdp2hurYJm/iDM+xrYkzWTQ+soMzCvJpNci8=
Received: from AS1PR07MB8616.eurprd07.prod.outlook.com (2603:10a6:20b:474::16) by DB9PR07MB7082.eurprd07.prod.outlook.com (2603:10a6:10:21d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.5; Thu, 16 Jun 2022 13:33:30 +0000
Received: from AS1PR07MB8616.eurprd07.prod.outlook.com ([fe80::ac35:2d3b:3bb8:cad4]) by AS1PR07MB8616.eurprd07.prod.outlook.com ([fe80::ac35:2d3b:3bb8:cad4%4]) with mapi id 15.20.5373.009; Thu, 16 Jun 2022 13:33:30 +0000
From: Francesca Palombini <francesca.palombini@ericsson.com>
To: Carsten Bormann <cabo@tzi.org>, Harald Alvestrand <harald@alvestrand.no>
CC: "art@ietf.org" <art@ietf.org>, "core@ietf.org" <core@ietf.org>, "draft-ietf-core-problem-details.all@ietf.org" <draft-ietf-core-problem-details.all@ietf.org>, "last-call@ietf.org" <last-call@ietf.org>
Thread-Topic: [art] Artart last call review of draft-ietf-core-problem-details-05
Thread-Index: AQHYgNRC3fTduy8+sku3etkhuebUxK1SBmYY
Date: Thu, 16 Jun 2022 13:33:30 +0000
Message-ID: <AS1PR07MB86169230F0D43E82CB2BCA1698AC9@AS1PR07MB8616.eurprd07.prod.outlook.com>
References: <165511479760.19573.12671700576299137749@ietfa.amsl.com> <63D13796-758D-469B-AFA8-3050C9F87819@tzi.org>
In-Reply-To: <63D13796-758D-469B-AFA8-3050C9F87819@tzi.org>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ericsson.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 8495db50-1c4a-41f3-72c6-08da4f9ccd45
x-ms-traffictypediagnostic: DB9PR07MB7082:EE_
x-microsoft-antispam-prvs: <DB9PR07MB7082C577FB5D9086699003B298AC9@DB9PR07MB7082.eurprd07.prod.outlook.com>
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: ExgUNcA8SDkLjUVZwYGQXGlMPQUHxYhgsVtFFsXUeYRjGfRo75wI2iLd7EnxfHkckl5RJPhOn6uNKyRjZK13yXSCz6xTSOnVOvBvpzYG9UY48DHehtT9HKSyTgyJ4Yd9lRUUipApgc401gVxA2aM2C1QSVvh4oIXaCalnRFlLHpFRvM4c6QXJsaA1p0zbXEIAAnjgBoh5vvvsbQolcGBHUmg4wCyAvoWzNDeIJBhyxVNGLUqH7AYjYSmoQO1fZYtsB1dcaMQj6W/r8pLQXzCyTJ95xVKJpMvgEB3erVKAtnRVG/l7pugUmtzL1KuQmfJXldbWypSDGIHU5zGsqtyI9V8BAmyiQpELNw5ZupSXPs+ekJR7XXC6MpKGg9I9YJkBwlQTHdYNSCycEuTDjgSjd4w5pjDcVSdOPYdwOno/NRSy04/7HHu6VoCcQ/zc8ExBEnJjLvrFWq21XrviohdebK2mMngoi2ejBktKAdE+JRUCqYyobZ+fkmpx/XOUO74zItKkRhoZiGylD+vDRF+U4BhwpL8JiZRvwn1BefgM365h9gduBUhctLV3iWMJKrKIzWQDn6xuaFdiZjkG38aM7ySRfy0z3u1LqIzqO14+yhebu0Gag6J/IgXT09zFCcIfFhVefuzngbtra1Xr9HiS6xyc5xte8Z0GNGAqxXW84RiT7z0KxR2P3fCp3aJ4Rx8bLlKpLIBerEwCH04P79ESsQybfMz3Tk0Jqq4zFbW9TyC24zHZMgjScXpfAjrLBNmSVsGp0TjQBe+R4nvJHttqj1M9SbJkk25eyi8awYGuR/jCLHYFIiebsB1U0GLSFNhHSBuYMVN1zuDZOeIUftW0A==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS1PR07MB8616.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(366004)(498600001)(122000001)(316002)(91956017)(52536014)(5660300002)(186003)(166002)(83380400001)(33656002)(55016003)(4326008)(44832011)(38100700002)(7696005)(71200400001)(53546011)(966005)(6506007)(64756008)(66476007)(66446008)(66556008)(76116006)(82960400001)(66946007)(8676002)(38070700005)(54906003)(8936002)(86362001)(110136005)(2906002)(9686003); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 2
x-ms-exchange-antispam-messagedata-0: eJR50LOKZwio/+rfXXgUil2OxPABJGEZBtQcWUMA2gMBIo1hFoRFz+5+EerErs6rWAzAYsRDsuVoUnTsZdoqGP7sRwKjJJPBz+VKgsekmJHaON7uwS+th54szYh1Vch04lDjgzWt2X+xJ6hzZIT3pBKl2bNwMuUsF+a4M7utB0jyNYqQ7WBTWNZT6GOUchDqrP7g0SpdacaHGAVynscLlG9t2hgjVvw7vFLWHi30gPl0w6Cl+v52pIJheP0bPyILjqt7MJ9zKOSc6XU1qLVzFxYxAXNRbvknQWTDDpbn9GES1VE2C3ocjHfMGnXFsqnD0lrv1UmHRYAT9qMyvAcpdxefj+JDXR3/xiSUrB4k6EBOWtpgsNefFHDtcrGYqJgfmmhdYCiScryw836lPw7J7HBdLL1ZAMlqa8HozRIsJZYdd2eN7nNlChpPBT57FaIEvtrQuukv8yZrevaA/kqLSK13sIBzkTcCFmlOfAe/e4xFN96LjQyf1MSVULaUpsFkW+C/CinCOjCpWAGU0MQ1U9iCZ77CsQqY8krpYnEK4uKg6FQqiX4D50a9iMGjvCJADCx0wDEJGWRz2n/gzyJD9d0tNzxQlEiyC2gs4aOTed3fYDohkr+QBCJxbSNgMVGBJ0gEQvsgw5tc+4DT63Mg2UasgkpgvAqp/OcPtKAaV0Ag6d1XI25S/K5CHLKfAbjsTe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7DDE6kQHnsCgWrlRY
x-ms-exchange-antispam-messagedata-1: yuda0pG0r0RlNKfHAP7eG47zyYsuQbHDfCtOf1H8jRdcJmO19zEkGRTItjDOa3MSuQSE391UtPtg7g==
Content-Type: multipart/alternative; boundary="_000_AS1PR07MB86169230F0D43E82CB2BCA1698AC9AS1PR07MB8616eurp_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: AS1PR07MB8616.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 8495db50-1c4a-41f3-72c6-08da4f9ccd45
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jun 2022 13:33:30.3407 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: wkIjet9UWpZekfJVi5knLAIpCQBeCtvNmf3q2AVPMb4Yjp1mkrZr082IBe3stFg/i9pcuIYNeN/KZtuWlSj0J+sYC4sMv2CUX0nhUSJpwYjZ9fI5s7DfV2j+US+MJ9DI
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR07MB7082
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/QuJxZfjP_FDtvMTsUnyOOEcq4zM>
Subject: Re: [core] [art] Artart last call review of draft-ietf-core-problem-details-05
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Jun 2022 13:33:44 -0000

Harald: thank you very much for this in depth double review!

I am looking forward to your reply to Carsten’s answer below (for some reason it is truncated in my local version, but I read the mailarchive one), but just on one point, since it also had come to me when reviewing the document – you do suggest this document be split in two, the error format and the internationalized string format. I considered that too, but seeing that the CBOR tag is already registered, and this document merely updates that definition and the reference, I evaluated that it was ok to have it in one document; moreover in this way you have both the tag and one example of the tag in usage in the same doc, I think that is valuable. If you think Appendix is considered less important, I would not object to moving it into a main section of the document.

Thanks,
Francesca

From: Carsten Bormann <cabo@tzi.org>
Date: Wednesday, 15 June 2022 at 18:23
To: Harald Alvestrand <harald@alvestrand.no>
Cc: art@ietf.org <art@ietf.org>, core@ietf.org <core@ietf.org>, draft-ietf-core-problem-details.all@ietf.org <draft-ietf-core-problem-details.all@ietf.org>, last-call@ietf.org <last-call@ietf.org>
Subject: Re: [art] Artart last call review of draft-ietf-core-problem-details-05

Hi Harald,

thank you for this thoughtful review.

A number of the considerations listed are already solved by the underlying standards CoAP, CBOR, and CDDL; I’ll try to explain this in context, and get to the other observations.

> Summary of conclusions
> I recommend that this document be broken into two documents: An error format
> and an internationalized string format.

(I’ll get to this below.)

> Summary of content
>
> This document defines an error reporting format for use with REST APIs using
> COAP as their response format. Note: This reviewer does not know COAP, so the
> appropriate usage of COAP is not checked in this review.
>
> The standardized form of the response consists of:
> * A “problem shape” - human readable

The “title” field is the human-readable part; the problem shape is the shape of the problem details as presented that can be recognized by an automated mechanism.

> * An “explanation” - human readable

This (“detail” field) goes into instance-specific details.

> * An “instance” - an URI

E.g., a shopping basket etc.

> * A “response code” (ref RFC 7252), a 2-level code mimicking the 2xx/4xx/5xx
> system (IANA registry) * A “base URI” that is only for internal usage * (added
> in -05): base-lang and base-rtl It is not clear to this reviewer from the
> document whether these fields are mandatory or optional;

The fields are all optional, hence the non-empty<…> to say at least one of them needs to be there (or the whole thing is pointless).  They are optional because the context (specifically, the URI in the request providing the base URI, and the response code in the response providing the response-code) often provides them, and this format is intended to be concise.

> if the question mark
> in front of the fields is “optional”, then there is no mandatory field in the
> details at all; rather, the “non-empty” notation seems to mean that there
> should be *something* in it. So an error report consisting of just base-rtl is
> syntactically legal.

(But not very useful.)

It is usually hard to capture semantic constraints in a structural language like CDDL (or ABNF), so we didn’t try.

> The report may be extended with standard or app-specific details - identified
> with negative numbers (standard), positive numbers (registered) or URIs.
>
> Appendix A defines the “Tag 38” string format, which decorates a string with
> language and direction attributes.
>
> Usability as an error format
> The general treatment of an error consists of two processes:
> * The client receiving the error takes an automatic action based on the error
> content. For this to work well, the error needs to be machine parsable and
> clearly indicate the appropriate action to be taken (in the context of the
> application).

Right, this is where the standard or custom problem details come in and provide the problem shape that the application can react on.

> * The user reports an error that was unexpected and not handled
> by the client to the developer or support personnel that can use other
> processes to figure out why there was a problem and give (human) advice. For
> this to work well, the error has to be capable of being picked up by the human
> and transmitted to the issue investigator.

CoAP already has the concept of diagnostic payloads (specified to be UTF-8 strings), so this is already covered; the present draft provides a structure that can be used instead of these unstructured payloads.

> This error format is somewhat capable of doing both, but its great
> extensibility and lack of required parts serves to make it difficult to know
> whether it’s actually useful for both.

It is hard to define “useful” exactly.  We expect common usages of this format will emerge, but it would be too early to standardize these.  Instead, we provide a framework inside which these usages can evolve in an interoperable way.

> The document does not contain any advice on how to make the format useful for
> these two purposes when used with a specific application. This is a weakness.

The document would need to list all those applications, and more specific advice might also be too early to standardize.

> Specific guidance that could be included:
>
> * When an error can be handled automatically, always include a COAP response
> code, even if it is only “5.00 internal error”.

The response code is usually provided in the CoAP response already, so there is no need to deliver it in the payload.  Only when problem details are stored/forwarded is it a good idea to set response-code, base-uri etc.
to save the (implicit) transaction context that would otherwise be lost.

> If an application specific
> action is desired (like “refresh your credentials” in an authorized action),
> use a registered custom problem detail number or a custom problem detail URI.

The general action may also be implied by the response code, e.g. 4.01 Unauthorized (really: Unauthenticated, but we inherit this misnomer from HTTP), or 4.03 Forbidden (really: Unauthorized).

> *
> When an error may need to be reported, make sure that it can be fully
> represented in a text format that can be copy/pasted into an error report

As Section 3.1.1 demonstrates, human-readable text form is often not needed, so I’m not sure we should give this advice.

> *
> When an error may need to be reported, makes ure that any personally
> identifiable information (PII) is either obvious to the casual viewer or
> omitted from the report. In particular, do NOT include PII in encoded formats
> like Base64.

Good point!

We added a brief Privacy Considerations section and expanded the Security Considerations section in https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-762cab0b21555e42&q=1&e=5ccc0dd6-e0d8-481a-a32c-b39bca5b77b6&u=https%3A%2F%2Fgithub.com%2Fcore-wg%2Fcore-problem-details%2Fpull%2F34 — editor’s copy at https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-492c71a889cc066b&q=1&e=5ccc0dd6-e0d8-481a-a32c-b39bca5b77b6&u=https%3A%2F%2Fcore-wg.github.io%2Fcore-problem-details%2Fprivcons-seccons%2Fdraft-ietf-core-problem-details.html%23name-privacy-considerations).

> Unless some guidance of this kind is included, I fear that the applications of
> the concise error format will be so diverse as to make the “commonality” less
> useful.
>
> The “Tag 38 internationalized string”
> This document adds an appendix defining an “internationalized string” format
> that adds a BCP 47 language tag and an Unicode-based direction indicator to an
> UTF-8 string. This is laudable; RFC 2277 section 4 pointed out the need for
> this ability 24 years ago.
>
> Unfortunately neither definition is problem-free.
>
> First of all, this tag, if useful at all, is of far greater utility than the
> error format. Burying it in an appendix of a document whose stated purpose is
> something else makes it far more difficult to refer to than it needs to be.

That is usually not a problem.  The focal point for finding a CBOR tag for a specific application is the CBOR tag registry; this then points to the places where the specifications for the tags can be found (which in this case is easily expressed as “Appendix A of RFC XXXX”)