Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions draft-ietf-httpapi-digest-fields-problem-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Want-Content-Digest: sha-512=3, sha-256=10
"type": "https://iana.org/assignments/http-problem-types#\
digest-unsupported-algorithms",
"title": "Unsupported hashing algorithms",
"unsupported-algorithms": [
"unsupported_algorithms": [
{
"algorithm": "foo",
"header": "Want-Content-Digest"
Expand Down Expand Up @@ -111,7 +111,7 @@ A server can use this problem type to communicate to the client that
one or more of the hashing algorithms referenced in the integrity or integrity preference fields present in the request
are not supported.

For this problem type, the `unsupported-algorithms` extension member is defined, whose value is a JSON {{JSON}} array of entries identifying each unsupported algorithm.
For this problem type, the `unsupported_algorithms` extension member is defined, whose value is a JSON {{JSON}} array of entries identifying each unsupported algorithm.
Each entry in the array is a JSON object with the following members:

- The `algorithm` member is a JSON string containing the algorithm key of the unsupported algorithm.
Expand Down Expand Up @@ -149,7 +149,7 @@ Want-Unencoded-Digest: sha-512=10, md5=0
"type": "https://iana.org/assignments/http-problem-types#\
digest-unsupported-algorithms",
"title": "Unsupported hashing algorithms",
"unsupported-algorithms": [
"unsupported_algorithms": [
{
"algorithm": "md5",
"header": "Repr-Digest"
Expand Down Expand Up @@ -187,7 +187,7 @@ Content-Type: application/problem+json
"type": "https://iana.org/assignments/http-problem-types#\
digest-unsupported-algorithms",
"title": "Unsupported hashing algorithms",
"unsupported-algorithms": [
"unsupported_algorithms": [
{
"algorithm": "md5",
"header": "Want-Repr-Digest"
Expand All @@ -201,7 +201,7 @@ Content-Type: application/problem+json

This section defines the "https://iana.org/assignments/http-problem-types#digest-invalid-values" problem type. A server can use this problem type when responding to a request, whose integrity fields include a digest value that cannot be generated by the corresponding hashing algorithm. For example, if the digest value of the `sha-512` hashing algorithm is not 64 bytes long, it cannot be a valid SHA-512 digest value and the server can skip computing the digest value. This problem type MUST NOT be used if the server is not able to parse the integrity fields according to {{Section 4.5 of STRUCTURED-FIELDS}}, for example because of a syntax error in the field value.

For this problem type, the `invalid-digests` extension member is defined, whose value is a JSON {{JSON}} array of entries identifying each invalid digest.
For this problem type, the `invalid_digests` extension member is defined, whose value is a JSON {{JSON}} array of entries identifying each invalid digest.
Each entry in the array is a JSON object with the following members:

- The `algorithm` member is a JSON string containing the algorithm key.
Expand Down Expand Up @@ -232,7 +232,7 @@ Content-Type: application/problem+json
"type": "https://iana.org/assignments/http-problem-types#\
digest-invalid-values",
"title": "Invalid digest values",
"invalid-digests": [
"invalid_digests": [
{
"algorithm": "sha-512",
"header": "Repr-Digest",
Expand All @@ -247,11 +247,11 @@ Content-Type: application/problem+json

This section defines the "https://iana.org/assignments/http-problem-types#digest-mismatched-values" problem type. A server can use this problem type when responding to a request, whose integrity fields include a digest value that does not match the digest value that the server calculated for the request content or representation.

For this problem type, the `mismatched-digests` extension member is defined, whose value is a JSON {{JSON}} array of entries identifying each mismatched digest.
For this problem type, the `mismatched_digests` extension member is defined, whose value is a JSON {{JSON}} array of entries identifying each mismatched digest.
Each entry in the array is a JSON object with the following members:

- The `algorithm` member is a JSON string containing the algorithm key of the hashing algorithm.
- The `provided-digest` member is a JSON string containing the digest value taken from the request's integrity fields. The digest value is serialized as a byte sequence as described in {{Section 4.1.8 of STRUCTURED-FIELDS}}.
- The `provided_digest` member is a JSON string containing the digest value taken from the request's integrity fields. The digest value is serialized as a byte sequence as described in {{Section 4.1.8 of STRUCTURED-FIELDS}}.
- The `header` member is a JSON string containing the name of the integrity field that contained the mismatched digest value.

The problem type intentionally does not include the digest value calculated by the server to avoid attackers abusing this information for oracle attacks.
Expand Down Expand Up @@ -280,10 +280,10 @@ Content-Type: application/problem+json
"type": "https://iana.org/assignments/http-problem-types#\
digest-mismatched-values",
"title": "Mismatched digest values",
"mismatched-digests": [
"mismatched_digests": [
{
"algorithm": "sha-256",
"provided-digest": \
"provided_digest": \
":RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=:",
"header": "Repr-Digest"
}
Expand Down