Skip to content

Deferred Delivery: a bare 202 invocation result cannot be told from pending #231

In review

Description

@joshuagay

draft-hardt-oauth-aauth-protocol.md at 28e8258:

  • L659 (Deferred Delivery): "The resource executes the held invocation on the first poll that presents a valid auth token and answers with the invocation's response."
  • L2516 (Pending Response): "Location (REQUIRED): The pending URL."
  • L2523 (Pending Response): "Agents MUST treat unrecognized status values as "pending" and continue polling."
  • L2535 (Deferred Response State Machine): "A non-202 response terminates polling."

If the application's own result is a bare 202 Accepted with no Location (as RFC 9110 permits, for example from an ingestion endpoint), the agent cannot tell it from the pending signal. It either rejects it as malformed or keeps polling the pending URL, which answers from the retained result while the record is kept (at least until the auth token's exp, L661) and returns 410 Gone once retention ends (L2840), so the result is never treated as final. A result with a same-origin Location is followed (L2529) and does not loop; only the bare 202 is affected.

Ask: Say how a resource delivers an invocation result that is itself a 202, for example by requiring the 401 delivery for such results or by defining a marker that separates an application 202 from the pending signal.

POST /events                  -> 202, Location: /pending/p1, status "pending"
GET /pending/p1 (auth token)  -> invocation completes; the application answers 202, no Location, no body
agent: 202 means pending, but there is no Location to switch to and the body has no status
GET /pending/p1               -> the retained 202 again, for as long as the record is retained
GET /pending/p1               -> 410 Gone once retention ends (no earlier than the auth token's exp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions