Repository navigation
Description
Summary
Peru's FAPI 2.0 security profile requires the user to authenticate for every revocation and limits each revocation to a single grant selected by the user. Chile's regulation also states that revocation follows the same flow as granting consent, with user authentication at the data holder.
Implementing this with the current draft (oauth-v2-grant-management-04) requires an authorization request that carries a grant_id without a grant_management_action, which §5.4 does not allow. Peru's profile already declares this as an explicit deviation from the specification, and we would like to bring it back within the standard.
We would also like to clarify four related points: binding the management token to one grant, revocation by co-signers, the grant state after revocation, and notification of the revocation. These points come from the same Chile–Peru work as #890.
Context
Peru (FAPI 2.0 security profile, SBS)
- Every revocation requires user authentication.
- A revocation initiated by the client uses the Grant Management API, with an access token obtained after a user authentication performed specifically for that revocation.
- To obtain that token, the client sends an authorization request (PAR) with the
openidandgrant_management_revokescopes and thegrant_idof the grant to revoke, withoutauthorization_detailsand without agrant_management_action. The AS shows the user the details of that grant so that the user confirms the revocation. - The profile states this deviation explicitly: in requests that include
grant_management_revoke, the AS must accept thegrant_idwithout agrant_management_actionand must bind the access token to that grant. - Each revocation applies to a single grant selected by the user, also when the user revokes through the data holder's own channels. The AS must reject the use of the access token on any grant other than the one indicated in the PAR request.
- The AS must not issue tokens that combine
offline_accessandgrant_management_revoke, so a token that can revoke cannot be refreshed. - In joint-action cases, any authorized signer can revoke the whole grant, without the consensus that was required to create it.
- Revocation takes effect immediately at the AS and is notified to the other participants (via webhook events) within 5 minutes.
Chile (SFA, NCG 514 as amended, Annex 3)
- Revocation follows the same flow as granting consent, with strong customer authentication of the user at the data holder.
- If the user revokes at the data holder, the data holder must notify the client via webhook within 5 minutes.
- If the user revokes at the client, the client must revoke the consent at the data holder's AS.
Chile: implementation experience
- The holder or any representative currently authorized can revoke, without the quorum required to create the grant.
- A revoked or expired grant remains queryable with its status for as long as the AS keeps it; only an unknown grant is reported as not found.
Sequence: user-authenticated revocation as defined in Peru's profile
sequenceDiagram
participant U as User
participant C as Client
participant AS as AS (data holder)
U->>C: Select one grant and ask to revoke it
C->>AS: PAR: scope "openid grant_management_revoke" + grant_id, no grant_management_action
Note over AS: -04 §5.4 requires invalid_request here
U->>AS: Authenticate and confirm revocation of that grant
AS-->>C: Code (JARM), then access token bound to that grant_id, no refresh token
C->>AS: DELETE /grants/{grant_id}
AS-->>C: 204 No Content
Note over AS: Revocation event to other participants within 5 minutes
What -04 says today
| Topic | -04 |
|---|---|
| Revocation | §6.5: DELETE on the grant resource, which returns 204. The AS "MUST revoke the grant and all refresh tokens issued based on that particular grant". |
| Protection | §6.1: the access token must be associated with the grant_management_revoke (or grant_management_query) scope, to revoke (or query) "its grants". "The grant type the client uses to obtain this access token is out of scope of this specification." Nothing binds the token to a specific grant_id. |
grant_id without action |
§5.4: if grant_id is provided and no action is specified, the AS returns invalid_request. |
| New tokens for an existing grant | §3.7: only through merge, with all request parameters. |
| Who may manage the grant | §5.4: invalid_grant_id if the logged-in user does not match a resource owner. #452 left the multi-user case to implementations. |
| After revocation | §6.6 only defines a 404 for an unknown resource URL. Nothing says what a query on a revoked or expired grant returns. §4.1 excludes historical records. |
| Notification | Not covered. |
Gaps
- §5.4 blocks user-authenticated revocation. §6.1 leaves open how the management token is obtained, but the natural way to obtain it with user authentication, an authorization request that references the grant, is rejected by §5.4 unless it creates, merges or replaces that grant. Within
-04alone, a client can only revoke with a management token that is tied neither to an authentication performed for that revocation nor to a specific grant, which does not meet the requirements of either ecosystem. Usingmerge(§3.7) is not suitable: it presents the user with a consent decision on a scope instead of a revocation, and on a joint-signing grant it would require the quorum, while revocation must not. Resuming an authorization (Grant Management: multi-party authorization (joint signing) #890, gap 2) has the same root cause. - No binding of a management token to a single grant. The specification does not say that a token obtained to manage a grant can only be used on that grant.
- Revocation by co-signers is undefined. It is not clear whether an AS may allow any authorized co-signer to revoke a grant created by joint action. Both ecosystems allow it.
- Grant state after revocation is undefined. The client cannot tell a revoked grant from an expired or nonexistent one.
- No notification of revocation. Both ecosystems require it within 5 minutes, through mechanisms each has defined on its own.
Proposal (options for discussion)
- A. A standard way to reference an existing grant without modifying it (shared with Grant Management: multi-party authorization (joint signing) #890, option B). Possible forms:
- allow an authorization request that carries a
grant_idand only grant management scopes (grant_management_queryand/orgrant_management_revoke, plusopenidwhere used), withoutauthorization_detailsor agrant_management_action; - define an explicit action value for management-only requests;
- use a parameterized (dynamic) scope that carries the grant reference, for example
grant_management_revoke:{grant_id}. The request would not include thegrant_idparameter, so the §5.4 rule would not apply, and the resulting token would be bound to that grant through its scope (option B). §6.1 would need to recognize this form. Parameterized scopes are already used for consent references in other open finance ecosystems, such as Open Finance Brasil, although RAR was designed in part to avoid them; - carry the grant reference inside an ecosystem-specific
authorization_detailstype. This works within-04, but each ecosystem would define its own type, which is the fragmentation we would like to avoid.
- allow an authorization request that carries a
- B. State that an access token issued for grant management through such a request is bound to the referenced
grant_id, and that the AS must reject its use on any other grant. - C. Clarify that the AS may allow any authorized co-signer (or another suitably authorized user, as discussed in When the user being authenticated is different from the user of the grant #452) to revoke the grant.
- D. Define what the query returns for a revoked or expired grant while the AS still keeps it. This is not a request for historical records (§4.1), only for the client to tell a revoked or expired grant from an unknown one. For example, the query could return the grant with its status (see Grant Management: multi-party authorization (joint signing) #890, option E), and 404 only for an unknown grant.
- E. Mention a mechanism for notifying revocation to the client, or state explicitly that it is left to an extension.
Related issues
- When the user being authenticated is different from the user of the grant #452 When the user being authenticated is different from the user of the grant
- Grant Management Lifecycle #407 Grant Management Lifecycle
- Grant Management: multi-party authorization (joint signing) #890 Multi-party authorization (joint signing)
Questions for the WG
- Which form would the WG prefer for management-only requests: relaxing §5.4, a new action value, or a parameterized scope?
- Should the binding of management tokens to a grant be normative, or left to ecosystem profiles?
Activity