Skip to content

fix(core): define 404/410 for resources removed after the challenge - #409

Open
MizukiSonoko wants to merge 2 commits into
tempoxyz:mainfrom
MizukiSonoko:fix/core-404-after-challenge
Open

MizukiSonoko wants to merge 2 commits into
tempoxyz:mainfrom
MizukiSonoko:fix/core-404-after-challenge

Conversation

@MizukiSonoko

@MizukiSonoko MizukiSonoko commented Nov 21, 2026 •

Copy link
Copy Markdown

Summary

Section 4.2 (Status Codes) only enumerates 402, 200 and 403 as outcomes once a Payment credential has been presented, so the behavior for a resource removed between challenge issuance and credential presentation is undefined. For methods where verification is settlement (such as lightning), a conforming server could settle a payment for a resource it can never deliver.

This PR adds the 404/410 outcome to the core and requires servers to check resource availability before consuming the challenge or settling, as proposed in #393.

Closes #393

Changes

  • Section 4.2 (Status Codes): add a row for a credential presented against a resource that no longer exists (404 or 410; no challenge, credential not consumed, no settlement), and reference the new section from the text below the table.
  • Section 4.3 (Relationship to 401 Unauthorized): add a 404/410 bullet.
  • Section 4.4.2 (When NOT to Return 402): extend the 404 bullet to cover a credential presented for a resource removed after the challenge was issued.
  • Section 11.5 (new, Security Considerations): "Resource Availability Before Settlement". Servers MUST confirm the resource exists and can be delivered before consuming the challenge id or settling; on 404/410 they MUST NOT include a WWW-Authenticate: Payment challenge, settle, mark the challenge consumed, or return Payment-Receipt. Clients MUST NOT retry with the same credential. Refund semantics for prepaid methods are left to method specs.
  • Appendix B.6 (new): an example 404 response with Cache-Control: no-store and an about:blank Problem Details body. No new problem type is introduced.

The revision is not bumped. Earlier content changes to the core (#362, #328, #323) did not bump either; only the datatracker expiry renewal (#351) did, since a bump triggers submit-draft.yml. Happy to bump to -02 if you prefer.

Test plan

  • make lint
  • make test (80 passed)
  • make check (all drafts build, rfclint passes)
  • Verified the rendered TXT for the new table row, Section 11.5 and Appendix B.6

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Section 4.2 lacks a 404/410 row for resources removed after the challenge is issued

1 participant