Skip to content

Supervision: an SS allow cannot size a Budgets allocation #259

In review

Description

@xmuruaga

draft-hardt-aauth-budgets.md at 70d6737:

  • L263 (A Budget Is Structurally a Scope): "Every party that already knows how to narrow a scope knows how to narrow a budget."
  • L485 (What the PS Is Deciding): "Sizing the allocation is where the PS's supervision happens."
  • L507, L510 (How the PS Responds): "Grant less", "Issue a lower amount"; "Decline with a figure", "Error response carrying suggested_budget"

draft-hardt-aauth-supervision.md at 70d6737:

  • L79 (Introduction): "A PS that has an SS configured for an agent makes no supervision decision of its own for that agent."
  • L264 (Decisions): "The decision MAY narrow it, with members the endpoint defines: a scope narrower than requested, an exp earlier than the PS would otherwise issue"
  • L540 (Event Endpoint): auth_token.issued carries "sdi, jti, aud, scope, exp, issuer"

With an SS configured, sizing the allocation is a supervision decision, so it belongs to the SS. The SS receives the resource's budget offer and the signed budget_consumed record in the forwarded resource_token, but an allow has no member for a granted amount and a deny has none for suggested_budget. The SS narrows scope, yet it cannot narrow a budget, so it can only grant the whole offer, ask, or deny. Since auth_token.issued does not say what was granted, an SS that holds a ceiling must also assume the whole offer was issued. (Found implementing an SS against both drafts: https://github.com/xmuruaga/aauth-supervision-server, docs/findings.md F8.)

Ask: In Decisions (L264) and Auth Token (L508), let an allow carry budget, a budget object no larger than the resource token's, which the PS applies to the auth token it issues as it applies scope; let a deny carry suggested_budget as Budgets defines it; and add the granted budget to auth_token.issued (L540). Also: R3 has the same shape, since the issuer populates r3_granted and r3_per_call per policy (draft-hardt-aauth-r3.md L537) and R3 claims may replace scope in the resource token (draft-hardt-aauth-r3.md L415), so where they do an SS allow has no narrowing member at all; the same member list could admit them.

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