Internet-Draft HTTP Requester Impairment Status Code December 2023
Roda Expires 14 June 2024 [Page]
Workgroup:
HTTP
Internet-Draft:
draft-richardroda-420requesterimpaired-04
Published:
Intended Status:
Informational
Expires:
Author:
R. Roda, Ed.

An HTTP Status Code to Report Requester Impairment

Abstract

This document specifies a Hypertext Transfer Protocol (HTTP) status code for use when an operation or resource is denied due to requester impairment.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 14 June 2024.

Table of Contents

1. Introduction

This document specifies a Hypertext Transfer Protocol (HTTP) status code for use when a request is denied because the requester is impaired.

1.1. Requirements Language

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

2. 420 Requester Impaired

The status code 420 indicates that the server is denying the request as a consequence of evidence of requester impairment.

The server in question might not be an origin server. An intermediate proxy closer to the requester may be in a better position to assess potential requester impairment. Such a proxy may refuse to forward the request and respond with this error code.

There is no requirement that the requester be human. Certain AI systems can exhibit behaviors such as giving hallucinated, incorrect, and differing answers for a given input.

420 responses MUST include a Link header [RFC8288] with a relation type of "status". This link is used by the remediated requester to obtain information about the server state and to signal to the server that the requester is remediated. Requesters SHOULD use this link when remediated before making subsequent requests unless a bearer token is used as described under Section 4 and the server does not require usage of the link.

A 420 response is non-cacheable by default, i.e., unless otherwise indicated by the method definition or explicit cache controls; see [RFC9111].

AI
An artificial intelligence system that is capable of making independent decisions without direct human control.
proxy
A server with a primary purpose of forwarding requests to other servers to process.

HTTP/1.1 420 Requester Impaired
Link: <https://example.com/impaired/remediated>; rel="status"
Content-Type: application/problem+json
Content-Language: en
{
    "type": "https://example.com/erratic-requests",
    "title": "Requester Impaired: Erratic Behavior Detected.",
    "detail": "Erratic requests detected."
}

Figure 1: Example Response in [RFC9457] Problem Details Format

3. IANA Considerations

IANA is asked to update the HTTP Status Codes Registry with the following entry:

4. Security Considerations

The usage of the link resource provided by the Link header to assert requester remediation assumes a requester or proxy that is trustworthy enough to halt requests and only access the link resource after requester remediation. If greater security is required, perhaps to enable an external system to remediate and validate the requester, a server MAY require an OAuth authorization [RFC7523] bearer token [RFC6750] to signal remediation of the requester.

If a valid bearer token is required and missing, further requests SHOULD be rejected with a 403 Forbidden response code with the insufficient_scope error code and scope attribute naming the authorization token required as described in [RFC6750] section 3.1. Once this authorization bearer token is validated the server MAY allow requests without using the Link provided in the 420 response, but MUST NOT respond to usage of the link as an error.

5. References

5.1. Normative References

[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
[RFC9111]
Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP Caching", STD 98, RFC 9111, DOI 10.17487/RFC9111, , <https://www.rfc-editor.org/info/rfc9111>.
[RFC9457]
Nottingham, M., Wilde, E., and S. Dalal, "Problem Details for HTTP APIs", RFC 9457, DOI 10.17487/RFC9457, , <https://www.rfc-editor.org/info/rfc9457>.
[RFC8288]
Nottingham, M., "Web Linking", RFC 8288, DOI 10.17487/RFC8288, , <https://www.rfc-editor.org/info/rfc8288>.
[RFC7523]
Jones, M., Campbell, B., and C. Mortimore, "JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants", RFC 7523, DOI 10.17487/RFC7523, , <https://www.rfc-editor.org/info/rfc7523>.
[RFC6750]
Jones, M. and D. Hardt, "The OAuth 2.0 Authorization Framework: Bearer Token Usage", RFC 6750, DOI 10.17487/RFC6750, , <https://www.rfc-editor.org/info/rfc6750>.

Author's Address

Richard Roda (editor)