Skip to content

Token endpoints have no registered error for a policy refusal #229

In review

Description

@joshuagay

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

  • L840 (Person Token Endpoint): "invalid_request covers a missing or malformed resource or mission_s256."
  • L1658 (Auth Token Delivery): "When the AS answers with a well-formed terminal error, the PS relays it: the response to the agent carries the AS's error value and status"
  • L2599 (Token Endpoint Error Codes): "Distinct from an AS denial, which the PS relays."
  • L2621 (Polling Error Codes): "| denied | 403 | User or approver explicitly denied the request |"

The table at L2582-L2600 has no code for a PS or AS that refuses a request outright on policy: denied is a polling code, the AS decision logic says only "Return 403" (L1753), and the state machine has no 403 branch for an initial request (L2538-L2548). A PS can reach denied only by deferring first, which is a workaround rather than a requirement; otherwise each server picks its own code, and an agent deciding from error (L2575) cannot tell a terminal refusal from a malformed or retryable request.

Ask: Register one terminal policy-denial error for the token endpoints, usable by the PS and relayed from an AS, and add a 403 branch for the initial request to the state machine; or, if refusals are meant to be deferred, say so.

POST /person   {"resource": "https://payroll.example"}
PS policy forbids this resource for this person.
No code in L2582-L2600 fits; `denied` exists only after a 202 (L2621).
One PS may answer 403 with a code of its own, another 400 invalid_request.
The PS forwards an auth token request; the AS refuses it on policy (L1753).
AS-1: 403 "denied"   AS-2: 400 "invalid_request"   AS-3: 500 "server_error"
The PS relays each error value and status (L1658).
Deciding from `error` (L2575), the agent treats them as terminal, malformed and retryable.
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