From 8e83494ca816aad193edeb107edcf9ab7825d954 Mon Sep 17 00:00:00 2001 From: ID Bot Date: Mon, 8 Jul 2024 20:41:33 +0000 Subject: [PATCH] Script updating gh-pages from 97cc1f4. [ci skip] --- draft-kleidl-digest-fields-problem-types.html | 58 +++++---- draft-kleidl-digest-fields-problem-types.txt | 111 ++++++++---------- 2 files changed, 83 insertions(+), 86 deletions(-) diff --git a/draft-kleidl-digest-fields-problem-types.html b/draft-kleidl-digest-fields-problem-types.html index 41e5011..f2d5d77 100644 --- a/draft-kleidl-digest-fields-problem-types.html +++ b/draft-kleidl-digest-fields-problem-types.html @@ -6,8 +6,9 @@ HTTP Problem Types for Digest Fields + @@ -1029,7 +1030,7 @@ July 2024 -Kleidl +Kleidl & Pardue Expires 9 January 2025 [Page] @@ -1049,19 +1050,23 @@
Informational
Expires:
-
Author:
+
Authors:
M. Kleidl
Transloadit
+
+
L. Pardue
+
Cloudflare
+

HTTP Problem Types for Digest Fields

Abstract

-

TODO Abstract

+

This document specifies problem types that servers can use in responses to problems encountered while dealing with a request carrying integrity fields and integrity preference fields.

@@ -1155,7 +1160,7 @@

1. Introduction

-

Digest fields [DIGEST] are HTTP fields that support integrity digests. A request can include the Content-Digest and Repr-Digest header fields for verifying the integrity of the HTTP message content and the HTTP representation, respectively. In addition, a sender can include the Want-Content-Digest and Want-Repr-Digest header fields in a request to express interest in receiving integrity field in the response. [DIGEST] by design does not define, require or recommend specific server behavior if errors regarding the integrity appear.

-

For example, a request may include a digest algorithm in the Content-Digest and Repr-Digest header fields that the server does not support. Similar, a sender may request to the digest utilizing a hashing algorithm that the server does not support. Another possible problem is that the digest supplied in the request does not match up with the digest calculated by the server. Depending on the application, the server may choose to ignore these errors or communicate them back to the client. However, no recommended response format for communicating these errors is defined so far.

-

Problem types [PROBLEM] are machine-readable description of errors in HTTP response content [PROBLEM]. Each problem definition includes a unique type that can be used to identify the error and also allows the attachment of a short, human-readable summary as well as additional properties to aid debugging and error handling. In addition, a JSON and XML representation of the problem types is defined to simplify parsing.

-

As an example, if the resource receives a request with an integrity field utilizing an unsupported hashing algorithm foo, the response may use the following problem type:

-
+

[DIGEST] by design does not define, require or recommend any specific behavior for error handling relating to integrity. The responsibility is instead delegated to applications. This draft defines a set of problem types [PROBLEM] that can be used by server applications to indicate that a problem was encountered while dealing with a request carrying integrity fields and integrity preference fields.

+

For example, a request message may include content alongside Content-Digest and Repr-Digest header fields that use a digest algorithm the server does not support. An application could decide to reject this request because it cannot validate the integrity. Using a problem type, the server can provide machine-readable error details to aid debugging or error reporting, as shown in the following example.

+
 HTTP/1.1 400 Bad Request
 Content-Type: application/problem+json
+Want-Content-Digest: sha-512=3, sha-256=10
 
 {
   "type": "https://iana.org/assignments/http-problem-types#unsupported-hashing-algorithm",
-  "title": "upload is already completed",
-  "requested-algorithm": "foo",
-  "supported-algorithms": ["sha-256", "sha-512"]
+  "title": "hashing algorithm is not supported",
+  "unsupported-algorithm": "foo"
 }
-
+
-

The response includes the unique problem type, the requested algorithm that is not supported by the server, as well as an array of the supported algorithms.

@@ -1209,22 +1211,22 @@

3.1. Unsupported Hashing Algorithm

This section defines the "https://iana.org/assignments/http-problem-types#unsupported-hashing-algorithm" problem type [PROBLEM]. A server MAY use this problem type when responding to a request, whose integrity or integrity preference fields reference a hashing algorithm that the server can not or does not want to support for this request, and if the server wants to indicate this problem to the sender.

-

Two problem type extension members are defined: the unsupported-algorithm and supported-algorithms members. A response using this problem type SHOULD populate both members, with the value of unsupported-algorithm being the algorithm key of the unsupported algorithm from the request and the value of supported-algorithms being an array of the algorithm keys, as registered in the "Hash Algorithms for HTTP Digest Fields" registry, of the supported algorithms.

+

For this problem type, the unsupported-algorithm is defined as the only extension member. It SHOULD be populated in a response using this problem type, with its value being the algorithm key of the unsupported algorithm from the request. The response SHOULD include the corresponding integrity preference field to indicate the server's algorithm support and preference.

The following example shows a response for a request with an integrity field utilizing an unsupported hashing algorithm foo. The response also includes a list of supported algorithms.

 HTTP/1.1 400 Bad Request
 Content-Type: application/problem+json
+Want-Content-Digest: sha-512=3, sha-256=10
 
 {
   "type": "https://iana.org/assignments/http-problem-types#unsupported-hashing-algorithm",
   "title": "hashing algorithm is not supported",
-  "unsupported-algorithm": "foo",
-  "supported-algorithms": ["sha-256", "sha-512"]
+  "unsupported-algorithm": "foo"
 }
 
-

If the sender receives this problem type, it SHOULD retry the request while picking another hashing algorithm. If the response includes an array of supported algorithms, it SHOULD choose one of them.

+

This problem type is a hint to the client about algorithm support, which the client could use to retry the request with a different algorithm supported by the server.

@@ -1246,7 +1248,7 @@

}

-

If the sender receives this problem type, it SHOULD NOT retry the request without modification. Such an error is likely rooted in a fault in the sender's calculation or encoding of the digest value.

+

This problem type indicates a fault in the sender's calculation or encoding of the digest value. A retry of the same request without modification will likely not yield a successful response.

@@ -1271,7 +1273,7 @@

}

-

If the sender receives this problem type, the request might be modified unintentionally by an intermediary. The sender MAY retry the request without modification. However, if the sender continue receiving this problem type, it SHOULD stop retrying.

+

If the sender receives this problem type, the request might be modified unintentionally by an intermediary. The sender could use this information to retry the request without modification to address temporary transmission issues.

@@ -1394,13 +1396,13 @@

Acknowledgments

-

TODO acknowledge.

+

This document is based on ideas from a discussion with Roberto Polli, so thanks to him for his valuable input and feedback on this topic.

-

-Author's Address +

+Authors' Addresses

Marius Kleidl
@@ -1410,6 +1412,14 @@

+
+
Lucas Pardue
+
Cloudflare
+ +