Internet-Draft HTTP Challenge Problem Details December 2026
Meunier Expires 6 June 2027 [Page]
Workgroup:
HTTP
Internet-Draft:
draft-authors-httpbis-challenge-problem-detail-latest
Published:
Intended Status:
Informational
Expires:
Author:
T. Meunier
Cloudflare

HTTP Challenge Problem Details

Abstract

This document proposes the "Challenge Required" problem detail for cases where an origin requires a client to complete an interactive or automated challenge before a request can be processed. It allows the origin to tell the client that a non-idempotent request was not applied and can be safely retried after challenge completion.

About This Document

This note is to be removed before publishing as an RFC.

The latest revision of this draft can be found at https://thibmeu.github.io/draft-authors-httpbis-challenge-problem-detail/draft-authors-httpbis-challenge-problem-detail.html. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-authors-httpbis-challenge-problem-detail/.

Discussion of this document takes place on the HTTP Working Group mailing list (mailto:ietf-http-wg@w3.org), which is archived at https://lists.w3.org/Archives/Public/ietf-http-wg/.

Source for this draft and an issue tracker can be found at https://github.com/thibmeu/draft-authors-httpbis-challenge-problem-detail.

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 6 June 2027.

▲

Table of Contents

1. Introduction

When a client requests a resource from an origin, that origin may require more information from the client. The client may need to log in, solve a CAPTCHA, or complete a proof of work. This creates issues when the request is non-idempotent. For instance, a client makes a POST that charges a credit card. If the origin challenges the client before applying the POST, how does the client know it can safely retry (Section 9.2.2 of [RFC9110])?

Some responses already tell the client how to retry. A DPoP challenge asks for a fresh proof with the supplied nonce (Section 9 of [RFC9449]). With 425 Too Early, the client can retry after the TLS handshake (Section 5.2 of [RFC8470]). Can an origin tell the client just as clearly when to retry after a challenge of its own?

An orthogonal approach is Idempotency-Key ([IDEMPOTENCY-KEY]), where the client knows ahead of time that an endpoint supports idempotency keys and attaches one so the origin can deduplicate retries of an applied request. Here, the client has no foreknowledge that a challenge will occur, and the origin signals that the request was never applied in the first place.

2. Proposed Problem Detail

An origin that has not applied (and will not apply) a request can send the "Challenge Required" problem detail (see Section 6) using the Problem-Details HTTP header ([PROBLEM-HEADER]). It is defined as a problem detail ([RFC9457]) and can also be carried as application/problem+json.

Problem-Details: type="https://todo.example/challenge-required",
  title=%"Challenge Required",
  instance="/c/arbitrary-id"
{
  "type": "https://todo.example/challenge-required",
  "title": "Challenge Required",
  "detail": "Please solve the CAPTCHA and retry the request.",
  "instance": "/c/arbitrary-id"
}

Challenges are commonly served as an HTML interstitial (e.g., 403 or 429), an iframe, or a redirect (3xx) to a challenge page. In these cases the response body is used by the challenge or ignored on redirect, so the Problem-Details header is used. On a redirect, Problem-Details goes on the initial 3xx response to the unapplied request, even if the client follows the redirect with a GET and discards the original request body.

Even without instance or automatic replay, this problem detail is useful on its own. Clients know the request was not applied, and tooling can distinguish challenges from permanent errors.

3. Coordinating Replay with Problem-Resolved

The instance member is optional (Section 3.1.5 of [RFC9457]). Its value is an opaque URI reference chosen by the origin, and it requires the origin to be able to re-derive the "instance" label all through a given challenge time window (for instance, by carrying it in challenge state or a cookie). If the client intends to replay the request, it should preserve the instance value. When set, the client would replay the request only if it receives a Problem-Resolved header for the origin. It is recommended that clients discard a given instance after 10 minutes. This does not imply they failed the origin challenge, or that the origin is unresponsive. Clients should also bound buffered request sizes and cap replay attempts to avoid loops. Both the challenge response and the Problem-Resolved response should carry Cache-Control: no-store.

Problem-Resolved: "<instance>", ... is a Structured Field List of Strings ([RFC9651]) that an origin sends when a given problem is resolved.

The challenge flow itself may involve redirects, including to a cross-origin challenge host, before redirecting back to the challenged origin:

Client shop.example captcha.example POST /checkout 302 (Location:) https://captcha.example/recaptcha Problem-Details: type="...challenge...", instance="/c/arbitrary-id" GET /recaptcha 200 (solve challenge) POST /verify 302 (Location:) https://shop.example/cb?t=... GET /cb?t=... 302 /checkout (fallback) Set-Cookie: clearance=... Problem-Resolved: "/c/arbitrary-id" POST /checkout (replay) 200 OK
Figure 1: Cross-origin redirect challenge and replay

If the completion response includes both Problem-Resolved and a fallback redirect (3xx for legacy clients), an aware client replays the buffered request instead of following the fallback redirect.

4. Security Considerations

  1. Oracle attacks

    • Not a concern as existing bots are already able to tell.

  2. Passing the instance around

    • For the site, alice.example could send the instance ID to bob.example, which would return it within Problem-Resolved. Redirects during the challenge flow are allowed, but the instance should be bound to the challenged origin (and possibly more), and that binding does not follow redirects.

    • For the client, there is no advantage.

  3. False "not applied" signals

    • An origin should not emit this if the request might have been applied, or clients could double-apply a non-idempotent request.

5. Privacy Considerations

  1. Tracking across requests through a new mechanism (yay)

    • As an origin, I provide an instance ID at time t = 0 while storing the original request. At time t = 1, I send a Problem-Resolved. If the client is able to provide the request, I know it's the same client. That's the point of a challenge though.

    • Pending instances should be partitioned like other site state and cleared when cookies or site data are cleared.

6. IANA Considerations

The example URI is a placeholder for possible registration in the IANA HTTP Problem Types registry [IANA-HTTP-PROBLEM-TYPES]. If Problem-Resolved remains in this document, it will also need registration in the HTTP Field Name Registry.

7. References

7.1. Normative References

[RFC9457]
Nottingham, M., Wilde, E., and S. Dalal, "Problem Details for HTTP APIs", RFC 9457, DOI 10.17487/RFC9457, , <https://www.rfc-editor.org/rfc/rfc9457>.
[RFC9651]
Nottingham, M. and P. Kamp, "Structured Field Values for HTTP", RFC 9651, DOI 10.17487/RFC9651, , <https://www.rfc-editor.org/rfc/rfc9651>.

7.2. Informative References

[IANA-HTTP-PROBLEM-TYPES]
IANA, "HTTP Problem Types", n.d., <https://www.iana.org/assignments/http-problem-types>.
[IDEMPOTENCY-KEY]
Jena, J., Dalal, S., and D. Tishkin, "The Idempotency-Key HTTP Header Field", Work in Progress, Internet-Draft, draft-ietf-httpapi-idempotency-key-header-09, , <https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-idempotency-key-header-09>.
[PARTIAL-POST-REPLAY]
Frindell, A., "Partial POST Replay", , <https://github.com/HTTPWorkshop/workshop2019/blob/main/talks/frindell-partialpostreplay.pdf>.
[PROBLEM-HEADER]
Nottingham, M., "The Problem-Details HTTP Header Field", Work in Progress, Internet-Draft, draft-nottingham-problem-header-00, , <https://datatracker.ietf.org/doc/html/draft-nottingham-problem-header-00>.
[RFC8470]
Thomson, M., Nottingham, M., and W. Tarreau, "Using Early Data in HTTP", RFC 8470, DOI 10.17487/RFC8470, , <https://www.rfc-editor.org/rfc/rfc8470>.
[RFC9110]
Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP Semantics", STD 97, RFC 9110, DOI 10.17487/RFC9110, , <https://www.rfc-editor.org/rfc/rfc9110>.
[RFC9449]
Fett, D., Campbell, B., Bradley, J., Lodderstedt, T., Jones, M., and D. Waite, "OAuth 2.0 Demonstrating Proof of Possession (DPoP)", RFC 9449, DOI 10.17487/RFC9449, , <https://www.rfc-editor.org/rfc/rfc9449>.

Appendix A. Thibault's Questions, Notes, and Observations

  1. Could use a cookie for the instances of the challenge.

  2. The introduction is really focused on CAPTCHA. It seems this goes beyond. Should we expand the scope? The current mechanism is not tied to CAPTCHA at all (beyond the problem detail definition).

  3. Some previous work: [PARTIAL-POST-REPLAY].

  4. One thing we hope for with such a header, beyond user-visible benefits (clients and origins), is that it would facilitate measurements and further improve the ecosystem.

  5. Should we split "Challenge Required" from Problem-Resolved?

Acknowledgments

TODO

Author's Address

Thibault Meunier
Cloudflare