rfc9635.original | rfc9635.txt | |||
---|---|---|---|---|
GNAP J. Richer, Ed. | Internet Engineering Task Force (IETF) J. Richer, Ed. | |||
Internet-Draft Bespoke Engineering | Request for Comments: 9635 Bespoke Engineering | |||
Intended status: Standards Track F. Imbault | Category: Standards Track F. Imbault | |||
Expires: 10 September 2024 acert.io | ISSN: 2070-1721 acert.io | |||
9 March 2024 | October 2024 | |||
Grant Negotiation and Authorization Protocol | Grant Negotiation and Authorization Protocol (GNAP) | |||
draft-ietf-gnap-core-protocol-19 | ||||
Abstract | Abstract | |||
GNAP defines a mechanism for delegating authorization to a piece of | The Grant Negotiation and Authorization Protocol (GNAP) defines a | |||
software, and conveying the results and artifacts of that delegation | mechanism for delegating authorization to a piece of software and | |||
to the software. This delegation can include access to a set of APIs | conveying the results and artifacts of that delegation to the | |||
as well as subject information passed directly to the software. | software. This delegation can include access to a set of APIs as | |||
well as subject information passed directly to the software. | ||||
Status of This Memo | Status of This Memo | |||
This Internet-Draft is submitted in full conformance with the | This is an Internet Standards Track document. | |||
provisions of BCP 78 and BCP 79. | ||||
Internet-Drafts are working documents of the Internet Engineering | ||||
Task Force (IETF). Note that other groups may also distribute | ||||
working documents as Internet-Drafts. The list of current Internet- | ||||
Drafts is at https://datatracker.ietf.org/drafts/current/. | ||||
Internet-Drafts are draft documents valid for a maximum of six months | This document is a product of the Internet Engineering Task Force | |||
and may be updated, replaced, or obsoleted by other documents at any | (IETF). It represents the consensus of the IETF community. It has | |||
time. It is inappropriate to use Internet-Drafts as reference | received public review and has been approved for publication by the | |||
material or to cite them other than as "work in progress." | Internet Engineering Steering Group (IESG). Further information on | |||
Internet Standards is available in Section 2 of RFC 7841. | ||||
This Internet-Draft will expire on 10 September 2024. | Information about the current status of this document, any errata, | |||
and how to provide feedback on it may be obtained at | ||||
https://www.rfc-editor.org/info/rfc9635. | ||||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2024 IETF Trust and the persons identified as the | Copyright (c) 2024 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents (https://trustee.ietf.org/ | Provisions Relating to IETF Documents | |||
license-info) in effect on the date of publication of this document. | (https://trustee.ietf.org/license-info) in effect on the date of | |||
Please review these documents carefully, as they describe your rights | publication of this document. Please review these documents | |||
and restrictions with respect to this document. Code Components | carefully, as they describe your rights and restrictions with respect | |||
extracted from this document must include Revised BSD License text as | to this document. Code Components extracted from this document must | |||
described in Section 4.e of the Trust Legal Provisions and are | include Revised BSD License text as described in Section 4.e of the | |||
provided without warranty as described in the Revised BSD License. | Trust Legal Provisions and are provided without warranty as described | |||
in the Revised BSD License. | ||||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 6 | 1. Introduction | |||
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 7 | 1.1. Terminology | |||
1.2. Roles . . . . . . . . . . . . . . . . . . . . . . . . . . 8 | 1.2. Roles | |||
1.3. Elements . . . . . . . . . . . . . . . . . . . . . . . . 10 | 1.3. Elements | |||
1.4. Trust relationships . . . . . . . . . . . . . . . . . . . 11 | 1.4. Trust Relationships | |||
1.5. Protocol Flow . . . . . . . . . . . . . . . . . . . . . . 13 | 1.5. Protocol Flow | |||
1.6. Sequences . . . . . . . . . . . . . . . . . . . . . . . . 16 | 1.6. Sequences | |||
1.6.1. Overall Protocol Sequence . . . . . . . . . . . . . . 16 | 1.6.1. Overall Protocol Sequence | |||
1.6.2. Redirect-based Interaction . . . . . . . . . . . . . 19 | 1.6.2. Redirect-Based Interaction | |||
1.6.3. User-code Interaction . . . . . . . . . . . . . . . . 22 | 1.6.3. User Code Interaction | |||
1.6.4. Asynchronous Authorization . . . . . . . . . . . . . 25 | 1.6.4. Asynchronous Authorization | |||
1.6.5. Software-only Authorization . . . . . . . . . . . . . 27 | 1.6.5. Software-Only Authorization | |||
1.6.6. Refreshing an Expired Access Token . . . . . . . . . 28 | 1.6.6. Refreshing an Expired Access Token | |||
1.6.7. Requesting Subject Information Only . . . . . . . . . 30 | 1.6.7. Requesting Subject Information Only | |||
1.6.8. Cross-User Authentication . . . . . . . . . . . . . . 31 | 1.6.8. Cross-User Authentication | |||
2. Requesting Access . . . . . . . . . . . . . . . . . . . . . . 34 | 2. Requesting Access | |||
2.1. Requesting Access to Resources . . . . . . . . . . . . . 36 | 2.1. Requesting Access to Resources | |||
2.1.1. Requesting a Single Access Token . . . . . . . . . . 36 | 2.1.1. Requesting a Single Access Token | |||
2.1.2. Requesting Multiple Access Tokens . . . . . . . . . . 39 | 2.1.2. Requesting Multiple Access Tokens | |||
2.2. Requesting Subject Information . . . . . . . . . . . . . 41 | 2.2. Requesting Subject Information | |||
2.3. Identifying the Client Instance . . . . . . . . . . . . . 42 | 2.3. Identifying the Client Instance | |||
2.3.1. Identifying the Client Instance by Reference . . . . 44 | 2.3.1. Identifying the Client Instance by Reference | |||
2.3.2. Providing Displayable Client Instance Information . . 45 | 2.3.2. Providing Displayable Client Instance Information | |||
2.3.3. Authenticating the Client Instance . . . . . . . . . 45 | 2.3.3. Authenticating the Client Instance | |||
2.4. Identifying the User . . . . . . . . . . . . . . . . . . 46 | 2.4. Identifying the User | |||
2.4.1. Identifying the User by Reference . . . . . . . . . . 47 | 2.4.1. Identifying the User by Reference | |||
2.5. Interacting with the User . . . . . . . . . . . . . . . . 48 | 2.5. Interacting with the User | |||
2.5.1. Start Mode Definitions . . . . . . . . . . . . . . . 50 | 2.5.1. Start Mode Definitions | |||
2.5.2. Interaction Finish Methods . . . . . . . . . . . . . 52 | 2.5.2. Interaction Finish Methods | |||
2.5.3. Hints . . . . . . . . . . . . . . . . . . . . . . . . 55 | 2.5.3. Hints | |||
3. Grant Response . . . . . . . . . . . . . . . . . . . . . . . 56 | 3. Grant Response | |||
3.1. Request Continuation . . . . . . . . . . . . . . . . . . 58 | 3.1. Request Continuation | |||
3.2. Access Tokens . . . . . . . . . . . . . . . . . . . . . . 59 | 3.2. Access Tokens | |||
3.2.1. Single Access Token . . . . . . . . . . . . . . . . . 59 | 3.2.1. Single Access Token | |||
3.2.2. Multiple Access Tokens . . . . . . . . . . . . . . . 63 | 3.2.2. Multiple Access Tokens | |||
3.3. Interaction Modes . . . . . . . . . . . . . . . . . . . . 64 | 3.3. Interaction Modes | |||
3.3.1. Redirection to an arbitrary URI . . . . . . . . . . . 66 | 3.3.1. Redirection to an Arbitrary URI | |||
3.3.2. Launch of an application URI . . . . . . . . . . . . 66 | 3.3.2. Launch of an Application URI | |||
3.3.3. Display of a Short User Code . . . . . . . . . . . . 67 | 3.3.3. Display of a Short User Code | |||
3.3.4. Display of a Short User Code and URI . . . . . . . . 68 | 3.3.4. Display of a Short User Code and URI | |||
3.3.5. Interaction Finish . . . . . . . . . . . . . . . . . 69 | 3.3.5. Interaction Finish | |||
3.4. Returning Subject Information . . . . . . . . . . . . . . 69 | 3.4. Returning Subject Information | |||
3.4.1. Assertion Formats . . . . . . . . . . . . . . . . . . 71 | 3.4.1. Assertion Formats | |||
3.5. Returning a Dynamically-bound Client Instance | 3.5. Returning a Dynamically Bound Client Instance Identifier | |||
Identifier . . . . . . . . . . . . . . . . . . . . . . . 72 | 3.6. Error Response | |||
3.6. Error Response . . . . . . . . . . . . . . . . . . . . . 72 | 4. Determining Authorization and Consent | |||
4.1. Starting Interaction with the End User | ||||
4. Determining Authorization and Consent . . . . . . . . . . . . 74 | 4.1.1. Interaction at a Redirected URI | |||
4.1. Starting Interaction With the End User . . . . . . . . . 79 | 4.1.2. Interaction at the Static User Code URI | |||
4.1.1. Interaction at a Redirected URI . . . . . . . . . . . 79 | 4.1.3. Interaction at a Dynamic User Code URI | |||
4.1.2. Interaction at the Static User Code URI . . . . . . . 80 | 4.1.4. Interaction through an Application URI | |||
4.1.3. Interaction at a Dynamic User Code URI . . . . . . . 81 | 4.2. Post-Interaction Completion | |||
4.1.4. Interaction through an Application URI . . . . . . . 83 | ||||
4.2. Post-Interaction Completion . . . . . . . . . . . . . . . 83 | ||||
4.2.1. Completing Interaction with a Browser Redirect to the | 4.2.1. Completing Interaction with a Browser Redirect to the | |||
Callback URI . . . . . . . . . . . . . . . . . . . . 84 | Callback URI | |||
4.2.2. Completing Interaction with a Direct HTTP Request | 4.2.2. Completing Interaction with a Direct HTTP Request | |||
Callback . . . . . . . . . . . . . . . . . . . . . . 85 | Callback | |||
4.2.3. Calculating the interaction hash . . . . . . . . . . 86 | 4.2.3. Calculating the Interaction Hash | |||
5. Continuing a Grant Request . . . . . . . . . . . . . . . . . 87 | 5. Continuing a Grant Request | |||
5.1. Continuing After a Completed Interaction . . . . . . . . 90 | 5.1. Continuing after a Completed Interaction | |||
5.2. Continuing During Pending Interaction (Polling) . . . . . 92 | 5.2. Continuing during Pending Interaction (Polling) | |||
5.3. Modifying an Existing Request . . . . . . . . . . . . . . 94 | 5.3. Modifying an Existing Request | |||
5.4. Revoking a Grant Request . . . . . . . . . . . . . . . . 100 | 5.4. Revoking a Grant Request | |||
6. Token Management . . . . . . . . . . . . . . . . . . . . . . 101 | 6. Token Management | |||
6.1. Rotating the Access Token Value . . . . . . . . . . . . . 102 | 6.1. Rotating the Access Token Value | |||
6.1.1. Binding a New Key to the Rotated Access Token . . . . 104 | 6.1.1. Binding a New Key to the Rotated Access Token | |||
6.2. Revoking the Access Token . . . . . . . . . . . . . . . . 105 | 6.2. Revoking the Access Token | |||
7. Securing Requests from the Client Instance . . . . . . . . . 106 | 7. Securing Requests from the Client Instance | |||
7.1. Key Formats . . . . . . . . . . . . . . . . . . . . . . . 107 | 7.1. Key Formats | |||
7.1.1. Key References . . . . . . . . . . . . . . . . . . . 108 | 7.1.1. Key References | |||
7.1.2. Key Protection . . . . . . . . . . . . . . . . . . . 109 | 7.1.2. Key Protection | |||
7.2. Presenting Access Tokens . . . . . . . . . . . . . . . . 109 | 7.2. Presenting Access Tokens | |||
7.3. Proving Possession of a Key with a Request . . . . . . . 110 | 7.3. Proving Possession of a Key with a Request | |||
7.3.1. HTTP Message Signatures . . . . . . . . . . . . . . . 114 | 7.3.1. HTTP Message Signatures | |||
7.3.2. Mutual TLS . . . . . . . . . . . . . . . . . . . . . 121 | 7.3.2. Mutual TLS | |||
7.3.3. Detached JWS . . . . . . . . . . . . . . . . . . . . 124 | 7.3.3. Detached JWS | |||
7.3.4. Attached JWS . . . . . . . . . . . . . . . . . . . . 128 | 7.3.4. Attached JWS | |||
8. Resource Access Rights . . . . . . . . . . . . . . . . . . . 133 | 8. Resource Access Rights | |||
8.1. Requesting Resources By Reference . . . . . . . . . . . . 137 | 8.1. Requesting Resources by Reference | |||
9. Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . 140 | 9. Discovery | |||
9.1. RS-first Method of AS Discovery . . . . . . . . . . . . . 141 | 9.1. RS-First Method of AS Discovery | |||
9.2. Dynamic grant endpoint discovery . . . . . . . . . . . . 143 | 9.2. Dynamic Grant Endpoint Discovery | |||
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 144 | 10. IANA Considerations | |||
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 144 | 10.1. HTTP Authentication Scheme Registration | |||
11.1. HTTP Authentication Scheme Registration . . . . . . . . 145 | 10.2. Media Type Registration | |||
11.2. Media Type Registration . . . . . . . . . . . . . . . . 145 | 10.2.1. application/gnap-binding-jwsd | |||
11.3. GNAP Grant Request Parameters . . . . . . . . . . . . . 149 | 10.2.2. application/gnap-binding-jws | |||
11.3.1. Registration Template . . . . . . . . . . . . . . . 149 | 10.2.3. application/gnap-binding-rotation-jwsd | |||
11.3.2. Initial Contents . . . . . . . . . . . . . . . . . . 149 | 10.2.4. application/gnap-binding-rotation-jws | |||
11.4. GNAP Access Token Flags . . . . . . . . . . . . . . . . 150 | 10.3. GNAP Grant Request Parameters | |||
11.4.1. Registration Template . . . . . . . . . . . . . . . 150 | 10.3.1. Registration Template | |||
11.4.2. Initial Contents . . . . . . . . . . . . . . . . . . 151 | 10.3.2. Initial Contents | |||
11.5. GNAP Subject Information Request Fields . . . . . . . . 151 | 10.4. GNAP Access Token Flags | |||
11.5.1. Registration Template . . . . . . . . . . . . . . . 151 | 10.4.1. Registration Template | |||
11.5.2. Initial Contents . . . . . . . . . . . . . . . . . . 152 | 10.4.2. Initial Contents | |||
11.6. GNAP Assertion Formats . . . . . . . . . . . . . . . . . 152 | 10.5. GNAP Subject Information Request Fields | |||
11.6.1. Registration Template . . . . . . . . . . . . . . . 152 | 10.5.1. Registration Template | |||
11.6.2. Initial Contents . . . . . . . . . . . . . . . . . . 152 | 10.5.2. Initial Contents | |||
11.7. GNAP Client Instance Fields . . . . . . . . . . . . . . 153 | 10.6. GNAP Assertion Formats | |||
11.7.1. Registration Template . . . . . . . . . . . . . . . 153 | 10.6.1. Registration Template | |||
11.7.2. Initial Contents . . . . . . . . . . . . . . . . . . 153 | 10.6.2. Initial Contents | |||
11.8. GNAP Client Instance Display Fields . . . . . . . . . . 154 | 10.7. GNAP Client Instance Fields | |||
11.8.1. Registration Template . . . . . . . . . . . . . . . 154 | 10.7.1. Registration Template | |||
11.8.2. Initial Contents . . . . . . . . . . . . . . . . . . 154 | 10.7.2. Initial Contents | |||
11.9. GNAP Interaction Start Modes . . . . . . . . . . . . . . 155 | 10.8. GNAP Client Instance Display Fields | |||
11.9.1. Registration Template . . . . . . . . . . . . . . . 155 | 10.8.1. Registration Template | |||
11.9.2. Initial Contents . . . . . . . . . . . . . . . . . . 156 | 10.8.2. Initial Contents | |||
11.10. GNAP Interaction Finish Methods . . . . . . . . . . . . 156 | 10.9. GNAP Interaction Start Modes | |||
11.10.1. Registration Template . . . . . . . . . . . . . . . 156 | 10.9.1. Registration Template | |||
11.10.2. Initial Contents . . . . . . . . . . . . . . . . . 157 | 10.9.2. Initial Contents | |||
11.11. GNAP Interaction Hints . . . . . . . . . . . . . . . . . 157 | 10.10. GNAP Interaction Finish Methods | |||
11.11.1. Registration Template . . . . . . . . . . . . . . . 157 | 10.10.1. Registration Template | |||
11.11.2. Initial Contents . . . . . . . . . . . . . . . . . 157 | 10.10.2. Initial Contents | |||
11.12. GNAP Grant Response Parameters . . . . . . . . . . . . . 158 | 10.11. GNAP Interaction Hints | |||
11.12.1. Registration Template . . . . . . . . . . . . . . . 158 | 10.11.1. Registration Template | |||
11.12.2. Initial Contents . . . . . . . . . . . . . . . . . 158 | 10.11.2. Initial Contents | |||
11.13. GNAP Interaction Mode Responses . . . . . . . . . . . . 159 | 10.12. GNAP Grant Response Parameters | |||
11.13.1. Registration Template . . . . . . . . . . . . . . . 159 | 10.12.1. Registration Template | |||
11.13.2. Initial Contents . . . . . . . . . . . . . . . . . 159 | 10.12.2. Initial Contents | |||
11.14. GNAP Subject Information Response Fields . . . . . . . . 160 | 10.13. GNAP Interaction Mode Responses | |||
11.14.1. Registration Template . . . . . . . . . . . . . . . 160 | 10.13.1. Registration Template | |||
11.14.2. Initial Contents . . . . . . . . . . . . . . . . . 160 | 10.13.2. Initial Contents | |||
11.15. GNAP Error Codes . . . . . . . . . . . . . . . . . . . . 161 | 10.14. GNAP Subject Information Response Fields | |||
11.15.1. Registration Template . . . . . . . . . . . . . . . 161 | 10.14.1. Registration Template | |||
11.15.2. Initial Contents . . . . . . . . . . . . . . . . . 161 | 10.14.2. Initial Contents | |||
11.16. GNAP Key Proofing Methods . . . . . . . . . . . . . . . 162 | 10.15. GNAP Error Codes | |||
11.16.1. Registration Template . . . . . . . . . . . . . . . 162 | 10.15.1. Registration Template | |||
11.16.2. Initial Contents . . . . . . . . . . . . . . . . . 163 | 10.15.2. Initial Contents | |||
11.17. GNAP Key Formats . . . . . . . . . . . . . . . . . . . . 163 | 10.16. GNAP Key Proofing Methods | |||
11.17.1. Registration Template . . . . . . . . . . . . . . . 163 | 10.16.1. Registration Template | |||
11.17.2. Initial Contents . . . . . . . . . . . . . . . . . 164 | 10.16.2. Initial Contents | |||
11.18. GNAP Authorization Server Discovery Fields . . . . . . . 164 | 10.17. GNAP Key Formats | |||
11.18.1. Registration Template . . . . . . . . . . . . . . . 164 | 10.17.1. Registration Template | |||
11.18.2. Initial Contents . . . . . . . . . . . . . . . . . 165 | 10.17.2. Initial Contents | |||
12. Implementation Status . . . . . . . . . . . . . . . . . . . . 165 | 10.18. GNAP Authorization Server Discovery Fields | |||
13. Security Considerations . . . . . . . . . . . . . . . . . . . 166 | 10.18.1. Registration Template | |||
13.1. TLS Protection in Transit . . . . . . . . . . . . . . . 166 | 10.18.2. Initial Contents | |||
13.2. Signing Requests from the Client Software . . . . . . . 167 | 11. Security Considerations | |||
13.3. MTLS Message Integrity . . . . . . . . . . . . . . . . . 169 | 11.1. TLS Protection in Transit | |||
13.4. MTLS Deployment Patterns . . . . . . . . . . . . . . . . 169 | 11.2. Signing Requests from the Client Software | |||
13.5. Protection of Client Instance Key Material . . . . . . . 170 | 11.3. MTLS Message Integrity | |||
13.6. Protection of Authorization Server . . . . . . . . . . . 171 | 11.4. MTLS Deployment Patterns | |||
13.7. Symmetric and Asymmetric Client Instance Keys . . . . . 172 | 11.5. Protection of Client Instance Key Material | |||
13.8. Generation of Access Tokens . . . . . . . . . . . . . . 173 | 11.6. Protection of Authorization Server | |||
13.9. Bearer Access Tokens . . . . . . . . . . . . . . . . . . 174 | 11.7. Symmetric and Asymmetric Client Instance Keys | |||
13.10. Key-Bound Access Tokens . . . . . . . . . . . . . . . . 175 | 11.8. Generation of Access Tokens | |||
13.11. Exposure of End-user Credentials to Client Instance . . 176 | 11.9. Bearer Access Tokens | |||
13.12. Mixing Up Authorization Servers . . . . . . . . . . . . 177 | 11.10. Key-Bound Access Tokens | |||
13.13. Processing of Client-Presented User Information . . . . 177 | 11.11. Exposure of End-User Credentials to Client Instance | |||
13.14. Client Instance Pre-registration . . . . . . . . . . . . 178 | 11.12. Mixing Up Authorization Servers | |||
13.15. Client Instance Impersonation . . . . . . . . . . . . . 180 | 11.13. Processing of Client-Presented User Information | |||
13.16. Client-Hosted Logo URI . . . . . . . . . . . . . . . . . 180 | 11.14. Client Instance Pre-registration | |||
13.17. Interception of Information in the Browser . . . . . . . 181 | 11.15. Client Instance Impersonation | |||
13.18. Callback URI Manipulation . . . . . . . . . . . . . . . 181 | 11.16. Client-Hosted Logo URI | |||
13.19. Redirection Status Codes . . . . . . . . . . . . . . . . 182 | 11.17. Interception of Information in the Browser | |||
13.20. Interception of Responses from the AS . . . . . . . . . 183 | 11.18. Callback URI Manipulation | |||
13.21. Key Distribution . . . . . . . . . . . . . . . . . . . . 183 | 11.19. Redirection Status Codes | |||
13.22. Key Rotation Policy . . . . . . . . . . . . . . . . . . 184 | 11.20. Interception of Responses from the AS | |||
13.23. Interaction Finish Modes and Polling . . . . . . . . . . 185 | 11.21. Key Distribution | |||
13.24. Session Management for Interaction Finish Methods . . . 185 | 11.22. Key Rotation Policy | |||
13.25. Calculating Interaction Hash . . . . . . . . . . . . . . 187 | 11.23. Interaction Finish Modes and Polling | |||
13.26. Storage of Information During Interaction and | 11.24. Session Management for Interaction Finish Methods | |||
Continuation . . . . . . . . . . . . . . . . . . . . . 189 | 11.25. Calculating Interaction Hash | |||
13.27. Denial of Service (DoS) through Grant Continuation . . . 190 | 11.26. Storage of Information during Interaction and Continuation | |||
13.28. Exhaustion of Random Value Space . . . . . . . . . . . . 191 | 11.27. Denial of Service (DoS) through Grant Continuation | |||
13.29. Front-channel URIs . . . . . . . . . . . . . . . . . . . 191 | 11.28. Exhaustion of Random Value Space | |||
13.30. Processing Assertions . . . . . . . . . . . . . . . . . 192 | 11.29. Front-Channel URIs | |||
13.31. Stolen Token Replay . . . . . . . . . . . . . . . . . . 193 | 11.30. Processing Assertions | |||
13.32. Self-contained Stateless Access Tokens . . . . . . . . . 194 | 11.31. Stolen Token Replay | |||
13.33. Network Problems and Token and Grant Management . . . . 195 | 11.32. Self-Contained Stateless Access Tokens | |||
13.34. Server-side Request Forgery (SSRF) . . . . . . . . . . . 196 | 11.33. Network Problems and Token and Grant Management | |||
13.35. Multiple Key Formats . . . . . . . . . . . . . . . . . . 197 | 11.34. Server-Side Request Forgery (SSRF) | |||
13.36. Asynchronous Interactions . . . . . . . . . . . . . . . 198 | 11.35. Multiple Key Formats | |||
13.37. Compromised RS . . . . . . . . . . . . . . . . . . . . . 199 | 11.36. Asynchronous Interactions | |||
13.38. AS-Provided Token Keys . . . . . . . . . . . . . . . . . 199 | 11.37. Compromised RS | |||
14. Privacy Considerations . . . . . . . . . . . . . . . . . . . 200 | 11.38. AS-Provided Token Keys | |||
14.1. Surveillance . . . . . . . . . . . . . . . . . . . . . . 200 | 12. Privacy Considerations | |||
14.1.1. Surveillance by the Client . . . . . . . . . . . . . 200 | 12.1. Surveillance | |||
14.1.2. Surveillance by the Authorization Server . . . . . . 201 | 12.1.1. Surveillance by the Client | |||
14.2. Stored Data . . . . . . . . . . . . . . . . . . . . . . 201 | 12.1.2. Surveillance by the Authorization Server | |||
14.3. Intrusion . . . . . . . . . . . . . . . . . . . . . . . 202 | 12.2. Stored Data | |||
14.4. Correlation . . . . . . . . . . . . . . . . . . . . . . 202 | 12.3. Intrusion | |||
14.4.1. Correlation by Clients . . . . . . . . . . . . . . . 202 | 12.4. Correlation | |||
14.4.2. Correlation by Resource Servers . . . . . . . . . . 203 | 12.4.1. Correlation by Clients | |||
14.4.3. Correlation by Authorization Servers . . . . . . . . 204 | 12.4.2. Correlation by Resource Servers | |||
14.5. Disclosure in Shared References . . . . . . . . . . . . 204 | 12.4.3. Correlation by Authorization Servers | |||
15. References . . . . . . . . . . . . . . . . . . . . . . . . . 204 | 12.5. Disclosure in Shared References | |||
15.1. Normative References . . . . . . . . . . . . . . . . . . 204 | 13. References | |||
15.2. Informative References . . . . . . . . . . . . . . . . . 206 | 13.1. Normative References | |||
Appendix A. Document History . . . . . . . . . . . . . . . . . . 209 | 13.2. Informative References | |||
Appendix B. Compared to OAuth 2.0 . . . . . . . . . . . . . . . 215 | Appendix A. Comparison with OAuth 2.0 | |||
Appendix C. Example Protocol Flows . . . . . . . . . . . . . . . 217 | Appendix B. Example Protocol Flows | |||
C.1. Redirect-Based User Interaction . . . . . . . . . . . . . 218 | B.1. Redirect-Based User Interaction | |||
C.2. Secondary Device Interaction . . . . . . . . . . . . . . 221 | B.2. Secondary Device Interaction | |||
C.3. No User Involvement . . . . . . . . . . . . . . . . . . . 224 | B.3. No User Involvement | |||
C.4. Asynchronous Authorization . . . . . . . . . . . . . . . 225 | B.4. Asynchronous Authorization | |||
C.5. Applying OAuth 2.0 Scopes and Client IDs . . . . . . . . 229 | B.5. Applying OAuth 2.0 Scopes and Client IDs | |||
Appendix D. Interoperability Profiles . . . . . . . . . . . . . 230 | Appendix C. Interoperability Profiles | |||
D.1. Web-based Redirection . . . . . . . . . . . . . . . . . . 231 | C.1. Web-Based Redirection | |||
D.2. Secondary Device . . . . . . . . . . . . . . . . . . . . 231 | C.2. Secondary Device | |||
Appendix E. Guidance for Extensions . . . . . . . . . . . . . . 232 | Appendix D. Guidance for Extensions | |||
Appendix F. JSON Structures and Polymorphism . . . . . . . . . . 233 | Appendix E. JSON Structures and Polymorphism | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 234 | Acknowledgements | |||
Authors' Addresses | ||||
1. Introduction | 1. Introduction | |||
This protocol allows a piece of software, the client instance, to | GNAP allows a piece of software, the client instance, to request | |||
request delegated authorization to resource servers and subject | delegated authorization to resource servers and subject information. | |||
information. The delegated access to the resource server can be used | The delegated access to the resource server can be used by the client | |||
by the client instance to access resources and APIs on behalf a | instance to access resources and APIs on behalf a resource owner, and | |||
resource owner, and delegated access to subject information can in | delegated access to subject information can in turn be used by the | |||
turn be used by the client instance to make authentication decisions. | client instance to make authentication decisions. This delegation is | |||
This delegation is facilitated by an authorization server usually on | facilitated by an authorization server, usually on behalf of a | |||
behalf of a resource owner. The end user operating the software can | resource owner. The end user operating the software can interact | |||
interact with the authorization server to authenticate, provide | with the authorization server to authenticate, provide consent, and | |||
consent, and authorize the request as a resource owner. | authorize the request as a resource owner. | |||
The process by which the delegation happens is known as a grant, and | The process by which the delegation happens is known as a grant, and | |||
GNAP allows for the negotiation of the grant process over time by | GNAP allows for the negotiation of the grant process over time by | |||
multiple parties acting in distinct roles. | multiple parties acting in distinct roles. | |||
This specification focuses on the portions of the delegation process | This specification focuses on the portions of the delegation process | |||
facing the client instance. In particular, this specification | facing the client instance. In particular, this specification | |||
defines interoperable methods for a client instance to request, | defines interoperable methods for a client instance to request, | |||
negotiate, and receive access to information facilitated by the | negotiate, and receive access to information facilitated by the | |||
authorization server. This specification additionally defines | authorization server. This specification additionally defines | |||
methods for the client instance to access protected resources at a | methods for the client instance to access protected resources at a | |||
resource server. This specification also discusses discovery | resource server. This specification also discusses discovery | |||
mechanisms for the client instance to configure itself dynamically. | mechanisms that enable the client instance to configure itself | |||
The means for an authorization server and resource server to | dynamically. The means for an authorization server and resource | |||
interoperate are discussed in the companion document, | server to interoperate are discussed in [GNAP-RS]. | |||
[I-D.ietf-gnap-resource-servers]. | ||||
The focus of this protocol is to provide interoperability between the | The focus of this protocol is to provide interoperability between the | |||
different parties acting in each role, and is not to specify | different parties acting in each role, not to specify implementation | |||
implementation details of each. Where appropriate, GNAP may make | details of each. Where appropriate, GNAP may make recommendations | |||
recommendations about internal implementation details, but these | about internal implementation details, but these recommendations are | |||
recommendations are to ensure the security of the overall deployment | to ensure the security of the overall deployment rather than to be | |||
rather than to be prescriptive in the implementation. | prescriptive in the implementation. | |||
This protocol solves many of the same use cases as OAuth 2.0 | This protocol solves many of the same use cases as OAuth 2.0 | |||
[RFC6749], OpenID Connect [OIDC], and the family of protocols that | [RFC6749], OpenID Connect [OIDC], and the family of protocols that | |||
have grown up around that ecosystem. However, GNAP is not an | have grown up around that ecosystem. However, GNAP is not an | |||
extension of OAuth 2.0 and is not intended to be directly compatible | extension of OAuth 2.0 and is not intended to be directly compatible | |||
with OAuth 2.0. GNAP seeks to provide functionality and solve use | with OAuth 2.0. GNAP seeks to provide functionality and solve use | |||
cases that OAuth 2.0 cannot easily or cleanly address. Appendix B | cases that OAuth 2.0 cannot easily or cleanly address. Appendix A | |||
further details the protocol rationale compared to OAuth 2.0. GNAP | further details the protocol rationale compared to OAuth 2.0. GNAP | |||
and OAuth 2.0 will likely exist in parallel for many deployments, and | and OAuth 2.0 will likely exist in parallel for many deployments, and | |||
considerations have been taken to facilitate the mapping and | considerations have been taken to facilitate the mapping and | |||
transition from existing OAuth 2.0 systems to GNAP. Some examples of | transition from existing OAuth 2.0 systems to GNAP. Some examples of | |||
these can be found in Appendix C.5. | these can be found in Appendix B.5. | |||
1.1. Terminology | 1.1. Terminology | |||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | |||
"OPTIONAL" in this document are to be interpreted as described in | "OPTIONAL" in this document are to be interpreted as described in | |||
BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all | BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all | |||
capitals, as shown here. | capitals, as shown here. | |||
This document contains non-normative examples of partial and complete | This document contains non-normative examples of partial and complete | |||
HTTP messages, JSON structures, URIs, query components, keys, and | HTTP messages, JSON structures, URIs, query components, keys, and | |||
other elements. Whenever possible, the document uses URI as a | other elements. Whenever possible, the document uses URI as a | |||
generic term, since it aligns with [RFC3986] recommendations and | generic term, since it aligns with the recommendations in [RFC3986] | |||
matches better with the intent that the identifier may be reachable | and better matches the intent that the identifier may be reachable | |||
through various/generic means (compared to URLs). Some examples use | through various/generic means (compared to URLs). Some examples use | |||
a single trailing backslash \ to indicate line wrapping for long | a single trailing backslash (\) to indicate line wrapping for long | |||
values, as per [RFC8792]. The \ character and leading spaces on | values, as per [RFC8792]. The \ character and leading spaces on | |||
wrapped lines are not part of the value. | wrapped lines are not part of the value. | |||
This document uses the term "mutual TLS" as defined by [RFC8705]. | This document uses the term "mutual TLS" as defined by [RFC8705]. | |||
The shortened form "MTLS" is used to mean the same thing. | The shortened form "MTLS" is used to mean the same thing. | |||
For brevity, the term "signature" on its own is used in this document | For brevity, the term "signature" on its own is used in this document | |||
to refer to both digital signatures (which use asymmetric | to refer to both digital signatures (which use asymmetric | |||
cryptography) and keyed MACs (which use symmetric cryptography). | cryptography) and keyed Message Authentication Codes (MACs) (which | |||
Similarly, the verb "sign" refers to the generation of either a | use symmetric cryptography). Similarly, the verb "sign" refers to | |||
digital signature or keyed MAC over a given signature base. The | the generation of either a digital signature or a keyed MAC over a | |||
qualified term "digital signature" refers specifically to the output | given signature base. The qualified term "digital signature" refers | |||
of an asymmetric cryptographic signing operation. | specifically to the output of an asymmetric cryptographic signing | |||
operation. | ||||
1.2. Roles | 1.2. Roles | |||
The parties in GNAP perform actions under different roles. Roles are | The parties in GNAP perform actions under different roles. Roles are | |||
defined by the actions taken and the expectations leveraged on the | defined by the actions taken and the expectations leveraged on the | |||
role by the overall protocol. | role by the overall protocol. | |||
+-------------+ +------------+ | +-------------+ +------------+ | |||
| | | | | | | | | | |||
|Authorization| | Resource | | |Authorization| | Resource | | |||
skipping to change at page 8, line 30 ¶ | skipping to change at line 355 ¶ | |||
║ | Instance | | ║ | Instance | | |||
║ +----+-----+ | ║ +----+-----+ | |||
║ ║ | ║ ║ | |||
.----+----. ║ .----------. | .----+----. ║ .----------. | |||
| | +=====+ | | | | +=====+ | | |||
| Resource | | End | | | Resource | | End | | |||
| Owner | ~ ~ ~ ~ ~ ~ | User | | | Owner | ~ ~ ~ ~ ~ ~ | User | | |||
| | | | | | | | | | |||
`---------` `----------` | `---------` `----------` | |||
Legend | Legend: | |||
===== indicates interaction between a human and computer | ===== indicates interaction between a human and computer | |||
----- indicates interaction between two pieces of software | ----- indicates interaction between two pieces of software | |||
~ ~ ~ indicates a potential equivalence or out-of-band | ~ ~ ~ indicates a potential equivalence or out-of-band | |||
communication between roles | communication between roles | |||
Figure 1: Figure 1: Roles in GNAP | Figure 1: Roles in GNAP | |||
Authorization Server (AS): server that grants delegated privileges | Authorization Server (AS): Server that grants delegated privileges | |||
to a particular instance of client software in the form of access | to a particular instance of client software in the form of access | |||
tokens or other information (such as subject information). The AS | tokens or other information (such as subject information). The AS | |||
is uniquely defined by the _grant endpoint URI_, which is the | is uniquely defined by the grant endpoint URI, which is the | |||
absolute URI where grant requests are started by clients. | absolute URI where grant requests are started by clients. | |||
Client: application that consumes resources from one or several RSs, | Client: Application that consumes resources from one or several | |||
possibly requiring access privileges from one or several ASs. The | resource servers, possibly requiring access privileges from one or | |||
client is operated by the end user or it runs autonomously on | several ASes. The client is operated by the end user, or it runs | |||
behalf of a resource owner. | autonomously on behalf of a resource owner. | |||
Example: a client can be a mobile application, a web application, | For example, a client can be a mobile application, a web | |||
a back-end data processor, etc. | application, a backend data processor, etc. | |||
Note: this specification differentiates between a specific | Note: This specification differentiates between a specific | |||
instance (the client instance, identified by its unique key) and | instance (the client instance, identified by its unique key) and | |||
the software running the instance (the client software). For some | the software running the instance (the client software). For some | |||
kinds of client software, there could be many instances of that | kinds of client software, there could be many instances of that | |||
software, each instance with a different key. | software, each instance with a different key. | |||
Resource Server (RS): server that provides an API on protected | Resource Server (RS): Server that provides an API on protected | |||
resources, where operations on the API require a valid access | resources, where operations on the API require a valid access | |||
token issued by a trusted AS. | token issued by a trusted AS. | |||
Resource Owner (RO): subject entity that may grant or deny | Resource Owner (RO): Subject entity that may grant or deny | |||
operations on resources it has authority upon. | operations on resources it has authority upon. | |||
Note: the act of granting or denying an operation may be manual | Note: The act of granting or denying an operation may be manual | |||
(i.e. through an interaction with a physical person) or automatic | (i.e., through an interaction with a physical person) or automatic | |||
(i.e. through predefined organizational rules). | (i.e., through predefined organizational rules). | |||
End user: natural person that operates a client instance. | End user: Natural person that operates a client instance. | |||
Note: that natural person may or may not be the same entity as the | Note: That natural person may or may not be the same entity as the | |||
RO. | RO. | |||
The design of GNAP does not assume any one deployment architecture, | The design of GNAP does not assume any one deployment architecture | |||
but instead attempts to define roles that can be fulfilled in a | but instead attempts to define roles that can be fulfilled in a | |||
number of different ways for different use cases. As long as a given | number of different ways for different use cases. As long as a given | |||
role fulfills all of its obligations and behaviors as defined by the | role fulfills all of its obligations and behaviors as defined by the | |||
protocol, GNAP does not make additional requirements on its structure | protocol, GNAP does not make additional requirements on its structure | |||
or setup. | or setup. | |||
Multiple roles can be fulfilled by the same party, and a given party | Multiple roles can be fulfilled by the same party, and a given party | |||
can switch roles in different instances of the protocol. For | can switch roles in different instances of the protocol. For | |||
example, the RO and end user in many instances are the same person, | example, in many instances, the RO and end user are the same person, | |||
where a user is authorizing the client instance to act on their own | where a user authorizes the client instance to act on their own | |||
behalf at the RS. In this case, one party fulfills both of the RO | behalf at the RS. In this case, one party fulfills the roles of both | |||
and end-user roles, but the roles themselves are still defined | RO and end user, but the roles themselves are still defined | |||
separately from each other to allow for other use cases where they | separately from each other to allow for other use cases where they | |||
are fulfilled by different parties. | are fulfilled by different parties. | |||
For another example, in some complex scenarios, an RS receiving | As another example, in some complex scenarios, an RS receiving | |||
requests from one client instance can act as a client instance for a | requests from one client instance can act as a client instance for a | |||
downstream secondary RS in order to fulfill the original request. In | downstream secondary RS in order to fulfill the original request. In | |||
this case, one piece of software is both an RS and a client instance | this case, one piece of software is both an RS and a client instance | |||
from different perspectives, and it fulfills these roles separately | from different perspectives, and it fulfills these roles separately | |||
as far as the overall protocol is concerned. | as far as the overall protocol is concerned. | |||
A single role need not be deployed as a monolithic service. For | A single role need not be deployed as a monolithic service. For | |||
example, a client instance could have front-end components that are | example, a client instance could have frontend components that are | |||
installed on the end user's device as well as a back-end system that | installed on the end user's device as well as a backend system that | |||
the front-end communicates with. If both of these components | the frontend communicates with. If both of these components | |||
participate in the delegation protocol, they are both considered part | participate in the delegation protocol, they are both considered part | |||
of the client instance. If there are several copies of the client | of the client instance. If there are several copies of the client | |||
software that run separately but all share the same key material, | software that run separately but all share the same key material, | |||
such as a deployed cluster, then this cluster is considered a single | such as a deployed cluster, then this cluster is considered a single | |||
client instance. In these cases, the distinct components of what is | client instance. In these cases, the distinct components of what is | |||
considered a GNAP client instance may use any number of different | considered a GNAP client instance may use any number of different | |||
communication mechanisms between them, all of which would be | communication mechanisms between them, all of which would be | |||
considered an implementation detail of the client instances and out | considered an implementation detail of the client instances and out | |||
of scope of GNAP. | of scope of GNAP. | |||
For another example, an AS could likewise be built out of many | As another example, an AS could likewise be built out of many | |||
constituent components in a distributed architecture. The component | constituent components in a distributed architecture. The component | |||
that the client instance calls directly could be different from the | that the client instance calls directly could be different from the | |||
component that the RO interacts with to drive consent, since API | component that the RO interacts with to drive consent, since API | |||
calls and user interaction have different security considerations in | calls and user interaction have different security considerations in | |||
many environments. Furthermore, the AS could need to collect | many environments. Furthermore, the AS could need to collect | |||
identity claims about the RO from one system that deals with user | identity claims about the RO from one system that deals with user | |||
attributes while generating access tokens at another system that | attributes while generating access tokens at another system that | |||
deals with security rights. From the perspective of GNAP, all of | deals with security rights. From the perspective of GNAP, all of | |||
these are pieces of the AS and together fulfill the role of the AS as | these are pieces of the AS and together fulfill the role of the AS as | |||
defined by the protocol. These pieces may have their own internal | defined by the protocol. These pieces may have their own internal | |||
communications mechanisms which are considered out of scope of GNAP. | communications mechanisms, which are considered out of scope of GNAP. | |||
1.3. Elements | 1.3. Elements | |||
In addition to the roles above, the protocol also involves several | In addition to the roles above, the protocol also involves several | |||
elements that are acted upon by the roles throughout the process. | elements that are acted upon by the roles throughout the process. | |||
Access Token: a data artifact representing a set of rights and/or | Access Token: A data artifact representing a set of rights and/or | |||
attributes. | attributes. | |||
Note: an access token can be first issued to a client instance | Note: An access token can be first issued to a client instance | |||
(requiring authorization by the RO) and subsequently rotated. | (requiring authorization by the RO) and subsequently rotated. | |||
Grant: (verb): to permit an instance of client software to receive | Grant: (verb): To permit an instance of client software to receive | |||
some attributes at a specific time and valid for a specific | some attributes at a specific time and with a specific duration of | |||
duration and/or to exercise some set of delegated rights to access | validity and/or to exercise some set of delegated rights to access | |||
a protected resource; | a protected resource. | |||
(noun): the act of granting permission to a client instance. | (noun): The act of granting permission to a client instance. | |||
Privilege: right or attribute associated with a subject. | Privilege: Right or attribute associated with a subject. | |||
Note: the RO defines and maintains the rights and attributes | Note: The RO defines and maintains the rights and attributes | |||
associated to the protected resource, and might temporarily | associated to the protected resource and might temporarily | |||
delegate some set of those privileges to an end user. This | delegate some set of those privileges to an end user. This | |||
process is refered to as privilege delegation. | process is referred to as "privilege delegation". | |||
Protected Resource: protected API (Application Programming | Protected Resource: Protected API that is served by an RS and that | |||
Interface) served by an RS and that can be accessed by a client, | can be accessed by a client, if and only if a valid and sufficient | |||
if and only if a valid and sufficient access token is provided. | access token is provided. | |||
Note: to avoid complex sentences, the specification document may | Note: To avoid complex sentences, the specification document may | |||
simply refer to "resource" instead of "protected resource". | simply refer to "resource" instead of "protected resource". | |||
Right: ability given to a subject to perform a given operation on a | Right: Ability given to a subject to perform a given operation on a | |||
resource under the control of an RS. | resource under the control of an RS. | |||
Subject: person or organization. The subject decides whether and | Subject: Person or organization. The subject decides whether and | |||
under which conditions its attributes can be disclosed to other | under which conditions its attributes can be disclosed to other | |||
parties. | parties. | |||
Subject Information: set of statements and attributes asserted by an | Subject Information: Set of statements and attributes asserted by an | |||
AS about a subject. These statements can be used by the client | AS about a subject. These statements can be used by the client | |||
instance as part of an authentication decision. | instance as part of an authentication decision. | |||
1.4. Trust relationships | 1.4. Trust Relationships | |||
GNAP defines its trust objective as: "the RO trusts the AS to ensure | GNAP defines its trust objective as follows: the RO trusts the AS to | |||
access validation and delegation of protected resources to end users, | ensure access validation and delegation of protected resources to end | |||
through third party clients." | users, through third party clients. | |||
This trust objective can be decomposed into trust relationships | This trust objective can be decomposed into trust relationships | |||
between software elements and roles, especially the pairs end user/ | between software elements and roles, especially the pairs end user/ | |||
RO, end user/client, client/AS, RS/RO, AS/RO, AS/RS. Trust of an | RO, end user/client, client/AS, RS/RO, AS/RO, and AS/RS. Trust of an | |||
agent by its pair can exist if the pair is informed that the agent | agent by its pair can exist if the pair is informed that the agent | |||
has made a promise to follow the protocol in the past (e.g. pre- | has made a promise to follow the protocol in the past (e.g., pre- | |||
registration, uncompromised cryptographic components) or if the pair | registration and uncompromised cryptographic components) or if the | |||
is able to infer by indirect means that the agent has made such a | pair is able to infer by indirect means that the agent has made such | |||
promise (e.g. a compliant client request). Each agent defines its | a promise (e.g., a compliant client request). Each agent defines its | |||
own valuation function of promises given or received. Examples of | own valuation function of promises given or received. Examples of | |||
such valuations can be the benefits from interacting with other | such valuations can be the benefits from interacting with other | |||
agents (e.g. safety in client access, interoperability with identity | agents (e.g., safety in client access and interoperability with | |||
standards), the cost of following the protocol (including its | identity standards), the cost of following the protocol (including | |||
security and privacy requirements and recommendations), a ranking of | its security and privacy requirements and recommendations), a ranking | |||
promise importance (e.g. a policy decision made by the AS), the | of promise importance (e.g., a policy decision made by the AS), the | |||
assessment of one's vulnerability or risk of not being able to defend | assessment of one's vulnerability or risk of not being able to defend | |||
against threats, etc. Those valuations may depend on the context of | against threats, etc. Those valuations may depend on the context of | |||
the request. For instance, the AS may decide to either take into | the request. For instance, depending on the specific case in which | |||
account or discard hints provided by the client, the RS may refuse | GNAP is used, the AS may decide to either take into account or | |||
bearer tokens, etc. depending on the specific case in which GNAP is | discard hints provided by the client, or the RS may refuse bearer | |||
used. Some promises can be affected by previous interactions (e.g., | tokens. Some promises can be affected by previous interactions | |||
repeated requests). | (e.g., repeated requests). | |||
Looking back on each trust relationship: | Below are details of each trust relationship: | |||
* end user/RO: this relationship exists only when the end user and | end user/RO: This relationship exists only when the end user and the | |||
the RO are different, in which case the end user needs some out of | RO are different, in which case the end user needs some out-of- | |||
band mechanism of getting the RO consent (see Section 4). GNAP | band mechanism of getting the RO consent (see Section 4). GNAP | |||
generally assumes that humans can be authenticated thanks to | generally assumes that humans can be authenticated, thanks to | |||
identity protocols (for instance, through an id_token assertion in | identity protocols (for instance, through an id_token assertion as | |||
Section 2.2). | described in Section 2.2). | |||
* end user/client: the client acts as a user agent. Depending on | end user/client: The client acts as a user agent. Depending on the | |||
the technology used (browser, SPA, mobile application, IoT device, | technology used (browser, single-page application (SPA), mobile | |||
etc.), some interactions may or may not be possible (as described | application, Internet of Things (IoT) device, etc.), some | |||
in Section 2.5.1). Client developers implement requirements and | interactions may or may not be possible (as described in | |||
Section 2.5.1). Client developers implement requirements and | ||||
generally some recommendations or best practices, so that the end | generally some recommendations or best practices, so that the end | |||
users may confidently use their software. However, end users | users may confidently use their software. However, end users | |||
might also be facing an attacker's client software or a poorly- | might also face an attacker's client software or a poorly | |||
implemented client, without even realizing it. | implemented client without even realizing it. | |||
* end user/AS: when the client supports the interaction feature (see | end user/AS: When the client supports the interaction feature (see | |||
Section 3.3), the end user interacts with the AS through an AS- | Section 3.3), the end user interacts with the AS through an AS- | |||
provided interface. In many cases, this happens through a front- | provided interface. In many cases, this happens through a front- | |||
channel interaction through the end user's browser. See | channel interaction through the end user's browser. See | |||
Section 13.29 for some considerations in trusting these | Section 11.29 for some considerations in trusting these | |||
interactions. | interactions. | |||
* client/AS: An honest AS may be facing an attacker's client (as | client/AS: An honest AS may face an attacker's client (as discussed | |||
discussed just above), or the reverse, and GNAP aims at making | just above), or the reverse, and GNAP aims to make common attacks | |||
common attacks impractical. The core specification makes access | impractical. This specification makes access tokens opaque to the | |||
tokens opaque to the client and defines the request/response | client and defines the request/response scheme in detail, | |||
scheme in detail, therefore avoiding extra trust hypotheses from | therefore avoiding extra trust hypotheses from this critical piece | |||
this critical piece of software. Yet the AS may further define | of software. Yet, the AS may further define cryptographic | |||
cryptographic attestations or optional rules to simplify the | attestations or optional rules to simplify the access of clients | |||
access of clients it already trusts, due to past behavior or | it already trusts, due to past behavior or organizational policies | |||
organizational policies (see Section 2.3). | (see Section 2.3). | |||
* RS/RO: the RS promises it protects its resources on behalf of the | RS/RO: On behalf of the RO, the RS promises to protect its resources | |||
RO from unauthorized access, and only accepts valid access tokens | from unauthorized access and only accepts valid access tokens | |||
issued by a trusted AS. In case tokens are key bound, proper | issued by a trusted AS. In case tokens are key bound, proper | |||
validation of the proof method is expected from the RS. | validation of the proofing method is expected from the RS. | |||
* AS/RO: the AS is expected to follow the decisions made by the RO, | AS/RO: The AS is expected to follow the decisions made by the RO, | |||
either through interactive consent requests, repeated | through either interactive consent requests, repeated | |||
interactions, or automated rules (as described in Section 1.6). | interactions, or automated rules (as described in Section 1.6). | |||
Privacy considerations aim to reduce the risk of an honest but | Privacy considerations aim to reduce the risk of an honest but | |||
too-curious AS, or the consequences of an unexpected user data | too-curious AS or the consequences of an unexpected user data | |||
exposure. | exposure. | |||
* AS/RS: the AS promises to issue valid access tokens to legitimate | AS/RS: The AS promises to issue valid access tokens to legitimate | |||
client requests (i.e. after carrying out appropriate due | client requests (i.e., after carrying out appropriate due | |||
diligence, as defined in the GNAP protocol). Some optional | diligence, as defined in the GNAP). Some optional configurations | |||
configurations are covered by [I-D.ietf-gnap-resource-servers]. | are covered by [GNAP-RS]. | |||
A global assumption made by GNAP is that authorization requests are | A global assumption made by GNAP is that authorization requests are | |||
security and privacy sensitive, and appropriate measures are | security and privacy sensitive, and appropriate measures are detailed | |||
respectively detailed in Section 13 and Section 14. | in Sections 11 and 12, respectively. | |||
A formal trust model is out of scope of this specification, but one | A formal trust model is out of scope of this specification, but one | |||
could be developed using techniques such as [promise-theory]. | could be developed using techniques such as the Promise Theory | |||
[promise-theory]. | ||||
1.5. Protocol Flow | 1.5. Protocol Flow | |||
GNAP is fundamentally designed to allow delegated access to APIs and | GNAP is fundamentally designed to allow delegated access to APIs and | |||
other information, such as subject information, using a multi-stage, | other information, such as subject information, using a multi-stage, | |||
stateful process. This process allows different parties to provide | stateful process. This process allows different parties to provide | |||
information into the system to alter and augment the state of the | information into the system to alter and augment the state of the | |||
delegated access and its artifacts. | delegated access and its artifacts. | |||
The underlying requested grant moves through several states as | The underlying requested grant moves through several states as | |||
different actions take place during the protocol: | different actions take place during the protocol, as shown in | |||
Figure 2. | ||||
.-----. | .-----. | |||
| | | | | | |||
+------+--+ | Continue | +------+--+ | Continue | |||
.---Need Interaction---->| | | | .---Need Interaction---->| | | | |||
/ | Pending |<--` | / | Pending |<--` | |||
/ .--Finish Interaction--+ | | / .--Finish Interaction--+ | | |||
/ / (approve/deny) +----+----+ | / / (approve/deny) +----+----+ | |||
/ / | | / / | | |||
/ / | Cancel | / / | Cancel | |||
skipping to change at page 14, line 5 ¶ | skipping to change at line 619 ¶ | |||
\ \ | Revoke or | \ \ | Revoke or | |||
\ \ | Finalize | \ \ | Finalize | |||
\ \ +-----+----+ | \ \ +-----+----+ | |||
\ `-----Update---------+ | | \ `-----Update---------+ | | |||
\ | Approved |<--. | \ | Approved |<--. | |||
`-----No Interaction--->| | | | `-----No Interaction--->| | | | |||
+-------+--+ | Continue | +-------+--+ | Continue | |||
| | | | | | |||
`-----` | `-----` | |||
Figure 2: Figure 2: State diagram of a grant request throughout GNAP | Figure 2: State Diagram of a Grant Request in GNAP | |||
The state of the grant request is defined and managed by the AS, | The state of the grant request is defined and managed by the AS, | |||
though the client instance also needs to manage its view of the grant | though the client instance also needs to manage its view of the grant | |||
request over time. The means by which these roles manage their state | request over time. The means by which these roles manage their state | |||
is outside the scope of this specification. | are outside the scope of this specification. | |||
_Processing_: When a request for access (Section 2) is received by | _Processing_: When a request for access (Section 2) is received by | |||
the AS, a new grant request is created and placed in the | the AS, a new grant request is created and placed in the | |||
_processing_ state by the AS. This state is also entered when an | _processing_ state by the AS. This state is also entered when an | |||
existing grant request is updated by the client instance and when | existing grant request is updated by the client instance and when | |||
interaction is completed. In this state, the AS processes the | interaction is completed. In this state, the AS processes the | |||
context of the grant request to determine whether interaction with | context of the grant request to determine whether interaction with | |||
the end user or RO is required for approval of the request. The | the end user or RO is required for approval of the request. The | |||
grant request has to exit this state before a response can be | grant request has to exit this state before a response can be | |||
returned to the client instance. If approval is required, the | returned to the client instance. If approval is required, the | |||
request moves to the _pending_ state and the AS returns a continue | request moves to the _pending_ state, and the AS returns a | |||
response (Section 3.1) along with any appropriate interaction | continuation response (Section 3.1) along with any appropriate | |||
responses (Section 3.3). If no such approval is required, such as | interaction responses (Section 3.3). If no such approval is | |||
when the client instance is acting on its own behalf or the AS can | required, such as when the client instance is acting on its own | |||
determine that access has been fulfilled, the request moves to the | behalf or the AS can determine that access has been fulfilled, the | |||
_approved_ state where access tokens for API access (Section 3.2) | request moves to the _approved_ state where access tokens for API | |||
and subject information (Section 3.4) can be issued to the client | access (Section 3.2) and subject information (Section 3.4) can be | |||
instance. If the AS determines that no additional processing can | issued to the client instance. If the AS determines that no | |||
occur (such as a timeout or an unrecoverable error), the grant | additional processing can occur (such as a timeout or an | |||
request is moved to the _finalized_ state and is terminated. | unrecoverable error), the grant request is moved to the | |||
_finalized_ state and is terminated. | ||||
_Pending_: When a request needs to be approved by a RO, or | _Pending_: When a request needs to be approved by an RO, or | |||
interaction with the end user is required, the grant request | interaction with the end user is required, the grant request | |||
enters a state of _pending_. In this state, no access tokens can | enters a state of _pending_. In this state, no access tokens can | |||
be granted and no subject information can be released to the | be granted, and no subject information can be released to the | |||
client instance. While a grant request is in this state, the AS | client instance. While a grant request is in this state, the AS | |||
seeks to gather the required consent and authorization (Section 4) | seeks to gather the required consent and authorization (Section 4) | |||
for the requested access. A grant request in this state is always | for the requested access. A grant request in this state is always | |||
associated with a _continuation access token_ bound to the client | associated with a continuation access token bound to the client | |||
instance's key (see Section 3.1 for details of the continuation | instance's key (see Section 3.1 for details of the continuation | |||
access token). If no interaction finish method (Section 2.5.2) is | access token). If no interaction finish method (Section 2.5.2) is | |||
associated with this request, the client instance can send a | associated with this request, the client instance can send a | |||
polling continue request (Section 5.2) to the AS. This returns a | polling continuation request (Section 5.2) to the AS. This | |||
continue response (Section 3.1) while the grant request remains in | returns a continuation response (Section 3.1) while the grant | |||
this state, allowing the client instance to continue to check the | request remains in this state, allowing the client instance to | |||
state of the pending grant request. If an interaction finish | continue to check the state of the pending grant request. If an | |||
method (Section 2.5.2) is specified in the grant request, the | interaction finish method (Section 2.5.2) is specified in the | |||
client instance can continue the request after interaction | grant request, the client instance can continue the request after | |||
(Section 5.1) to the AS to move this request to the _processing_ | interaction (Section 5.1) to the AS to move this request to the | |||
state to be re-evaluated by the AS. Note that this occurs whether | _processing_ state to be re-evaluated by the AS. Note that this | |||
the grant request has been approved or denied by the RO, since the | occurs whether the grant request has been approved or denied by | |||
AS needs to take into account the full context of the request | the RO, since the AS needs to take into account the full context | |||
before determining the next step for the grant request. When | of the request before determining the next step for the grant | |||
other information is made available in the context of the grant | request. When other information is made available in the context | |||
request, such as through the asynchronous actions of the RO, the | of the grant request, such as through the asynchronous actions of | |||
AS moves this request to the _processing_ state to be re- | the RO, the AS moves this request to the _processing_ state to be | |||
evaluated. If the AS determines that no additional interaction | re-evaluated. If the AS determines that no additional interaction | |||
can occur, such as all the interaction methods have timed out or a | can occur, e.g., all the interaction methods have timed out or a | |||
revocation request (Section 5.4) is received from the client | revocation request (Section 5.4) is received from the client | |||
instance, the grant request can be moved to the _finalized_ state. | instance, the grant request can be moved to the _finalized_ state. | |||
_Approved_: When a request has been approved by an RO and no further | _Approved_: When a request has been approved by an RO and no further | |||
interaction with the end user is required, the grant request | interaction with the end user is required, the grant request | |||
enters a state of _approved_. In this state, responses to the | enters a state of _approved_. In this state, responses to the | |||
client instance can include access tokens for API access | client instance can include access tokens for API access | |||
(Section 3.2) and subject information (Section 3.4). If | (Section 3.2) and subject information (Section 3.4). If | |||
continuation and updates are allowed for this grant request, the | continuation and updates are allowed for this grant request, the | |||
AS can include the continuation response (Section 3.1). In this | AS can include the continuation response (Section 3.1). In this | |||
state, post-interaction continuation requests (Section 5.1) are | state, post-interaction continuation requests (Section 5.1) are | |||
not allowed and will result in an error, since all interaction is | not allowed and will result in an error, since all interaction is | |||
assumed to have been completed. If the client instance sends a | assumed to have been completed. If the client instance sends a | |||
polling continue request (Section 5.2) while the request is in | polling continuation request (Section 5.2) while the request is in | |||
this state, new access tokens (Section 3.2) can be issued in the | this state, new access tokens (Section 3.2) can be issued in the | |||
response. Note that this always creates a new access token, but | response. Note that this always creates a new access token, but | |||
any existing access tokens could be rotated and revoked using the | any existing access tokens could be rotated and revoked using the | |||
token management API (Section 6). The client instance can send an | token management API (Section 6). The client instance can send an | |||
update continuation request (Section 5.3) to modify the requested | update continuation request (Section 5.3) to modify the requested | |||
access, causing the AS to move the request back to the | access, causing the AS to move the request back to the | |||
_processing_ state for re-evaluation. If the AS determines that | _processing_ state for re-evaluation. If the AS determines that | |||
no additional tokens can be issued, and that no additional updates | no additional tokens can be issued and that no additional updates | |||
are to be accepted (such as the continuation access tokens have | are to be accepted (e.g., the continuation access tokens have | |||
expired), the grant is moved to the _finalized_ state. | expired), the grant is moved to the _finalized_ state. | |||
_Finalized_: After the access tokens are issued, if the AS does not | _Finalized_: After the access tokens are issued, if the AS does not | |||
allow any additional updates on the grant request, the grant | allow any additional updates on the grant request, the grant | |||
request enters the _finalized_ state. This state is also entered | request enters the _finalized_ state. This state is also entered | |||
when an existing grant request is revoked by the client instance | when an existing grant request is revoked by the client instance | |||
(Section 5.4) or otherwise revoked by the AS (such as through out- | (Section 5.4) or otherwise revoked by the AS (such as through out- | |||
of-band action by the RO). This state can also be entered if the | of-band action by the RO). This state can also be entered if the | |||
AS determines that no additional processing is possible, for | AS determines that no additional processing is possible, for | |||
example if the RO has denied the requested access or if | example, if the RO has denied the requested access or if | |||
interaction is required but no compatible interaction methods are | interaction is required but no compatible interaction methods are | |||
available. Once in this state, no new access tokens can be | available. Once in this state, no new access tokens can be | |||
issued, no subject information can be returned, and no | issued, no subject information can be returned, and no | |||
interactions can take place. Once in this state, the grant | interactions can take place. Once in this state, the grant | |||
request is dead and cannot be revived. If future access is | request is dead and cannot be revived. If future access is | |||
desired by the client instance, a new grant request can be | desired by the client instance, a new grant request can be | |||
created, unrelated to this grant request. | created, unrelated to this grant request. | |||
While it is possible to deploy an AS in a stateless environment, GNAP | While it is possible to deploy an AS in a stateless environment, GNAP | |||
is a stateful protocol and such deployments will need a way to manage | is a stateful protocol, and such deployments will need a way to | |||
the current state of the grant request in a secure and deterministic | manage the current state of the grant request in a secure and | |||
fashion without relying on other components, such as the client | deterministic fashion without relying on other components, such as | |||
software, to keep track of the current state. | the client software, to keep track of the current state. | |||
1.6. Sequences | 1.6. Sequences | |||
GNAP can be used in a variety of ways to allow the core delegation | GNAP can be used in a variety of ways to allow the core delegation | |||
process to take place. Many portions of this process are | process to take place. Many portions of this process are | |||
conditionally present depending on the context of the deployments, | conditionally present depending on the context of the deployments, | |||
and not every step in this overview will happen in all circumstances. | and not every step in this overview will happen in all circumstances. | |||
Note that a connection between roles in this process does not | Note that a connection between roles in this process does not | |||
necessarily indicate that a specific protocol message is sent across | necessarily indicate that a specific protocol message is sent across | |||
the wire between the components fulfilling the roles in question, or | the wire between the components fulfilling the roles in question or | |||
that a particular step is required every time. For example, for a | that a particular step is required every time. For example, for a | |||
client instance interested in only getting subject information | client instance interested in only getting subject information | |||
directly, and not calling an RS, all steps involving the RS below do | directly and not calling an RS, all steps involving the RS below do | |||
not apply. | not apply. | |||
In some circumstances, the information needed at a given stage is | In some circumstances, the information needed at a given stage is | |||
communicated out of band or is preconfigured between the components | communicated out of band or is pre-configured between the components | |||
or entities performing the roles. For example, one entity can | or entities performing the roles. For example, one entity can | |||
fulfill multiple roles, and so explicit communication between the | fulfill multiple roles, so explicit communication between the roles | |||
roles is not necessary within the protocol flow. Additionally some | is not necessary within the protocol flow. Additionally, some | |||
components may not be involved in all use cases. For example, a | components may not be involved in all use cases. For example, a | |||
client instance could be calling the AS just to get direct user | client instance could be calling the AS just to get direct user | |||
information and have no need to get an access token to call an RS. | information and have no need to get an access token to call an RS. | |||
1.6.1. Overall Protocol Sequence | 1.6.1. Overall Protocol Sequence | |||
The following diagram provides a general overview of GNAP, including | The following diagram provides a general overview of GNAP, including | |||
many different optional phases and connections. The diagrams in the | many different optional phases and connections. The diagrams in the | |||
following sections provide views of GNAP under more specific | following sections provide views of GNAP under more specific | |||
circumstances. These additional diagrams use the same conventions as | circumstances. These additional diagrams use the same conventions as | |||
skipping to change at page 17, line 37 ¶ | skipping to change at line 785 ¶ | |||
| | | | | | | | | | | | | | |||
| +--(9)-->| | | | | | +--(9)-->| | | | | |||
| |<-(10)--+ | | | | | |<-(10)--+ | | | | |||
| | | | | | | | | | | | | | |||
| +---------------(11)------------>| | | | +---------------(11)------------>| | | |||
| | | | (12) | | | | | | | (12) | | | |||
| +--(13)->| | | | | | +--(13)->| | | | | |||
| | | | | | | | | | | | | | |||
+--------+ +---------------+ +------------+ | +--------+ +---------------+ +------------+ | |||
Legend | Legend: | |||
===== indicates a possible interaction with a human | ===== indicates a possible interaction with a human | |||
----- indicates an interaction between protocol roles | ----- indicates an interaction between protocol roles | |||
~ ~ ~ indicates a potential equivalence or out-of-band | ~ ~ ~ indicates a potential equivalence or out-of-band | |||
communication between roles | communication between roles | |||
Figure 3: Figure 3: Overall sequence of GNAP | Figure 3: Overall Sequence of GNAP | |||
* (A) The end user interacts with the client instance to indicate a | * (A) The end user interacts with the client instance to indicate a | |||
need for resources on behalf of the RO. This could identify the | need for resources on behalf of the RO. This could identify the | |||
RS the client instance needs to call, the resources needed, or the | RS that the client instance needs to call, the resources needed, | |||
RO that is needed to approve the request. Note that the RO and | or the RO that is needed to approve the request. Note that the RO | |||
end user are often the same entity in practice, but GNAP makes no | and end user are often the same entity in practice, but GNAP makes | |||
general assumption that they are. | no general assumption that they are. | |||
* (1) The client instance determines what access is needed and which | * (1) The client instance determines what access is needed and which | |||
AS to approach for access. Note that for most situations, the | AS to approach for access. Note that for most situations, the | |||
client instance is pre-configured with which AS to talk to and | client instance is pre-configured with which AS to talk to and | |||
which kinds of access it needs, but some more dynamic processes | which kinds of access it needs, but some more dynamic processes | |||
are discussed in Section 9.1. | are discussed in Section 9.1. | |||
* (2) The client instance requests access at the AS (Section 2). | * (2) The client instance requests access at the AS (Section 2). | |||
* (3) The AS processes the request and determines what is needed to | * (3) The AS processes the request and determines what is needed to | |||
fulfill the request (See Section 4). The AS sends its response to | fulfill the request (see Section 4). The AS sends its response to | |||
the client instance (Section 3). | the client instance (Section 3). | |||
* (B) If interaction is required, the AS interacts with the RO | * (B) If interaction is required, the AS interacts with the RO | |||
(Section 4) to gather authorization. The interactive component of | (Section 4) to gather authorization. The interactive component of | |||
the AS can function using a variety of possible mechanisms | the AS can function using a variety of possible mechanisms, | |||
including web page redirects, applications, challenge/response | including web page redirects, applications, challenge/response | |||
protocols, or other methods. The RO approves the request for the | protocols, or other methods. The RO approves the request for the | |||
client instance being operated by the end user. Note that the RO | client instance being operated by the end user. Note that the RO | |||
and end user are often the same entity in practice, and many of | and end user are often the same entity in practice, and many of | |||
GNAP's interaction methods allow the client instance to facilitate | GNAP's interaction methods allow the client instance to facilitate | |||
the end user interacting with the AS in order to fulfill the role | the end user interacting with the AS in order to fulfill the role | |||
of the RO. | of the RO. | |||
* (4) The client instance continues the grant at the AS (Section 5). | * (4) The client instance continues the grant at the AS (Section 5). | |||
This action could occur in response to receiving a signal that | This action could occur in response to receiving a signal that | |||
interaction has finished (Section 4.2) or through a periodic | interaction has finished (Section 4.2) or through a periodic | |||
polling mechanism, depending on the interaction capabilities of | polling mechanism, depending on the interaction capabilities of | |||
the client software and the options active in the grant request. | the client software and the options active in the grant request. | |||
* (5) If the AS determines that access can be granted, it returns a | * (5) If the AS determines that access can be granted, it returns a | |||
response to the client instance (Section 3) including an access | response to the client instance (Section 3), including an access | |||
token (Section 3.2) for calling the RS and any directly returned | token (Section 3.2) for calling the RS and any directly returned | |||
information (Section 3.4) about the RO. | information (Section 3.4) about the RO. | |||
* (6) The client instance uses the access token (Section 7.2) to | * (6) The client instance uses the access token (Section 7.2) to | |||
call the RS. | call the RS. | |||
* (7) The RS determines if the token is sufficient for the request | * (7) The RS determines if the token is sufficient for the request | |||
by examining the token. The means of the RS determining this | by examining the token. The means of the RS determining this | |||
access are out of scope of this specification, but some options | access are out of scope of this specification, but some options | |||
are discussed in [I-D.ietf-gnap-resource-servers]. | are discussed in [GNAP-RS]. | |||
* (8) The client instance calls the RS (Section 7.2) using the | * (8) The client instance calls the RS (Section 7.2) using the | |||
access token until the RS or client instance determine that the | access token until the RS or client instance determines that the | |||
token is no longer valid. | token is no longer valid. | |||
* (9) When the token no longer works, the client instance rotates | * (9) When the token no longer works, the client instance rotates | |||
the access token (Section 6.1). | the access token (Section 6.1). | |||
* (10) The AS issues a new access token (Section 3.2) to the client | * (10) The AS issues a new access token (Section 3.2) to the client | |||
instance with the same rights as the original access token | instance with the same rights as the original access token | |||
returned in (5). | returned in (5). | |||
* (11) The client instance uses the new access token (Section 7.2) | * (11) The client instance uses the new access token (Section 7.2) | |||
to call the RS. | to call the RS. | |||
* (12) The RS determines if the new token is sufficient for the | * (12) The RS determines if the new token is sufficient for the | |||
request, as in (7). | request, as in (7). | |||
* (13) The client instance disposes of the token (Section 6.2) once | * (13) The client instance disposes of the token (Section 6.2) once | |||
the client instance has completed its access of the RS and no | the client instance has completed its access of the RS and no | |||
longer needs the token. | longer needs the token. | |||
The following sections and Appendix C contain specific guidance on | The following sections and Appendix B contain specific guidance on | |||
how to use GNAP in different situations and deployments. For | how to use GNAP in different situations and deployments. For | |||
example, it is possible for the client instance to never request an | example, it is possible for the client instance to never request an | |||
access token and never call an RS, just as it is possible to have no | access token and never call an RS, just as it is possible to have no | |||
end user involved in the delegation process. | end user involved in the delegation process. | |||
1.6.2. Redirect-based Interaction | 1.6.2. Redirect-Based Interaction | |||
In this example flow, the client instance is a web application that | In this example flow, the client instance is a web application that | |||
wants access to resources on behalf of the current user, who acts as | wants access to resources on behalf of the current user, who acts as | |||
both the end user and the resource owner (RO). Since the client | both the end user and the RO. Since the client instance is capable | |||
instance is capable of directing the user to an arbitrary URI and | of directing the user to an arbitrary URI and receiving responses | |||
receiving responses from the user's browser, interaction here is | from the user's browser, interaction here is handled through front- | |||
handled through front-channel redirects using the user's browser. | channel redirects using the user's browser. The redirection URI used | |||
The redirection URI used for interaction is a service hosted by the | for interaction is a service hosted by the AS in this example. The | |||
AS in this example. The client instance uses a persistent session | client instance uses a persistent session with the user to ensure the | |||
with the user to ensure the same user that is starting the | same user that is starting the interaction is the user that returns | |||
interaction is the user that returns from the interaction. | from the interaction. | |||
+--------+ +--------+ .----. | +--------+ +--------+ .----. | |||
| Client | | AS | | End | | | Client | | AS | | End | | |||
|Instance| | | | User | | |Instance| | | | User | | |||
| |<=(1)== Start Session ===============================+ | | | |<=(1)== Start Session ===============================+ | | |||
| | | | | | | | | | | | | | |||
| +--(2)--- Request Access --------->| | | | | | +--(2)--- Request Access --------->| | | | | |||
| | | | | | | | | | | | | | |||
| |<-(3)-- Interaction Needed -------+ | | | | | |<-(3)-- Interaction Needed -------+ | | | | |||
| | | | | | | | | | | | | | |||
skipping to change at page 20, line 35 ¶ | skipping to change at line 912 ¶ | |||
| | | | | | | | | | |||
| |<-(9)----- Grant Access ----------+ | | | |<-(9)----- Grant Access ----------+ | | |||
| | | | | | | | | | |||
| | | | +--------+ | | | | | +--------+ | |||
| +--(10)-- Access API ---------------------------->| RS | | | +--(10)-- Access API ---------------------------->| RS | | |||
| | | | | | | | | | | | | | |||
| |<-(11)-- API Response ---------------------------| | | | |<-(11)-- API Response ---------------------------| | | |||
| | | | +--------+ | | | | | +--------+ | |||
+--------+ +--------+ | +--------+ +--------+ | |||
Figure 4: Figure 4: Diagram of a redirect-based interaction | Figure 4: Diagram of a Redirect-Based Interaction | |||
1. The client instance establishes a session with the user, in the | * (1) The client instance establishes a session with the user, in | |||
role of the end user. | the role of the end user. | |||
2. The client instance requests access to the resource (Section 2). | * (2) The client instance requests access to the resource | |||
The client instance indicates that it can redirect to an | (Section 2). The client instance indicates that it can redirect | |||
arbitrary URI (Section 2.5.1.1) and receive a redirect from the | to an arbitrary URI (Section 2.5.1.1) and receive a redirect from | |||
browser (Section 2.5.2.1). The client instance stores | the browser (Section 2.5.2.1). The client instance stores | |||
verification information for its redirect in the session created | verification information for its redirect in the session created | |||
in (1). | in (1). | |||
3. The AS determines that interaction is needed and responds | * (3) The AS determines that interaction is needed and responds | |||
(Section 3) with a URI to send the user to (Section 3.3.1) and | (Section 3) with a URI to send the user to (Section 3.3.1) and | |||
information needed to verify the redirect (Section 3.3.5) in | information needed to verify the redirect (Section 3.3.5) in (7). | |||
(7). The AS also includes information the client instance will | The AS also includes information the client instance will need to | |||
need to continue the request (Section 3.1) in (8). The AS | continue the request (Section 3.1) in (8). The AS associates this | |||
associates this continuation information with an ongoing request | continuation information with an ongoing request that will be | |||
that will be referenced in (4), (6), and (8). | referenced in (4), (6), and (8). | |||
4. The client instance stores the verification and continuation | * (4) The client instance stores the verification and continuation | |||
information from (3) in the session from (1). The client | information from (3) in the session from (1). The client instance | |||
instance then redirects the user to the URI (Section 4.1.1) | then redirects the user to the URI (Section 4.1.1) given by the AS | |||
given by the AS in (3). The user's browser loads the | in (3). The user's browser loads the interaction redirect URI. | |||
interaction redirect URI. The AS loads the pending request | The AS loads the pending request based on the incoming URI | |||
based on the incoming URI generated in (3). | generated in (3). | |||
5. The user authenticates at the AS, taking on the role of the RO. | * (5) The user authenticates at the AS, taking on the role of the | |||
RO. | ||||
6. As the RO, the user authorizes the pending request from the | * (6) As the RO, the user authorizes the pending request from the | |||
client instance. | client instance. | |||
7. When the AS is done interacting with the user, the AS redirects | * (7) When the AS is done interacting with the user, the AS | |||
the user back (Section 4.2.1) to the client instance using the | redirects the user back (Section 4.2.1) to the client instance | |||
redirect URI provided in (2). The redirect URI is augmented | using the redirect URI provided in (2). The redirect URI is | |||
with an interaction reference that the AS associates with the | augmented with an interaction reference that the AS associates | |||
ongoing request created in (2) and referenced in (4). The | with the ongoing request created in (2) and referenced in (4). | |||
redirect URI is also augmented with a hash of the security | The redirect URI is also augmented with a hash of the security | |||
information provided in (2) and (3). The client instance loads | information provided in (2) and (3). The client instance loads | |||
the verification information from (2) and (3) from the session | the verification information from (2) and (3) from the session | |||
created in (1). The client instance calculates a hash | created in (1). The client instance calculates a hash | |||
(Section 4.2.3) based on this information and continues only if | (Section 4.2.3) based on this information and continues only if | |||
the hash validates. Note that the client instance needs to | the hash validates. Note that the client instance needs to ensure | |||
ensure that the parameters for the incoming request match those | that the parameters for the incoming request match those that it | |||
that it is expecting from the session created in (1). The | is expecting from the session created in (1). The client instance | |||
client instance also needs to be prepared for the end user never | also needs to be prepared for the end user never being returned to | |||
being returned to the client instance and handle timeouts | the client instance and handle timeouts appropriately. | |||
appropriately. | ||||
8. The client instance loads the continuation information from (3) | * (8) The client instance loads the continuation information from | |||
and sends the interaction reference from (7) in a request to | (3) and sends the interaction reference from (7) in a request to | |||
continue the request (Section 5.1). The AS validates the | continue the request (Section 5.1). The AS validates the | |||
interaction reference ensuring that the reference is associated | interaction reference, ensuring that the reference is associated | |||
with the request being continued. | with the request being continued. | |||
9. If the request has been authorized, the AS grants access to the | * (9) If the request has been authorized, the AS grants access to | |||
information in the form of access tokens (Section 3.2) and | the information in the form of access tokens (Section 3.2) and | |||
direct subject information (Section 3.4) to the client instance. | direct subject information (Section 3.4) to the client instance. | |||
10. The client instance uses the access token (Section 7.2) to call | * (10) The client instance uses the access token (Section 7.2) to | |||
the RS. | call the RS. | |||
11. The RS validates the access token and returns an appropriate | * (11) The RS validates the access token and returns an appropriate | |||
response for the API. | response for the API. | |||
An example set of protocol messages for this method can be found in | An example set of protocol messages for this method can be found in | |||
Appendix C.1. | Appendix B.1. | |||
1.6.3. User-code Interaction | 1.6.3. User Code Interaction | |||
In this example flow, the client instance is a device that is capable | In this example flow, the client instance is a device that is capable | |||
of presenting a short, human-readable code to the user and directing | of presenting a short, human-readable code to the user and directing | |||
the user to enter that code at a known URI. The user enters the code | the user to enter that code at a known URI. The user enters the code | |||
at a URI that is an interactive service hosted by the AS in this | at a URI that is an interactive service hosted by the AS in this | |||
example. The client instance is not capable of presenting an | example. The client instance is not capable of presenting an | |||
arbitrary URI to the user, nor is it capable of accepting incoming | arbitrary URI to the user, nor is it capable of accepting incoming | |||
HTTP requests from the user's browser. The client instance polls the | HTTP requests from the user's browser. The client instance polls the | |||
AS while it is waiting for the RO to authorize the request. The | AS while it is waiting for the RO to authorize the request. The | |||
user's interaction is assumed to occur on a secondary device. In | user's interaction is assumed to occur on a secondary device. In | |||
this example it is assumed that the user is both the end user and RO. | this example, it is assumed that the user is both the end user and | |||
Note that since the user is not assumed to be interacting with the | RO. Note that since the user is not assumed to be interacting with | |||
client instance through the same web browser used for interaction at | the client instance through the same web browser used for interaction | |||
the AS, the user is not shown as being connected to the client | at the AS, the user is not shown as being connected to the client | |||
instance in this diagram. | instance in this diagram. | |||
+--------+ +--------+ .----. | +--------+ +--------+ .----. | |||
| Client | | AS | | End | | | Client | | AS | | End | | |||
|Instance+--(1)--- Request Access --------->| | | User | | |Instance+--(1)--- Request Access --------->| | | User | | |||
| | | | | | | | | | | | | | |||
| |<-(2)-- Interaction Needed -------+ | | | | | |<-(2)-- Interaction Needed -------+ | | | | |||
| | | | | | | | | | | | | | |||
| +==(3)==== Display User Code ========================>| | | | +==(3)==== Display User Code ========================>| | | |||
| | | | | | | | | | | | | | |||
skipping to change at page 23, line 39 ¶ | skipping to change at line 1031 ¶ | |||
| | | | | User | | | | | | | User | | |||
| |<-(12)----- Grant Access ---------+ | `----` | | |<-(12)----- Grant Access ---------+ | `----` | |||
| | | | | | | | | | |||
| | | | +--------+ | | | | | +--------+ | |||
| +--(13)-- Access API ---------------------------->| RS | | | +--(13)-- Access API ---------------------------->| RS | | |||
| | | | | | | | | | | | | | |||
| |<-(14)-- API Response ---------------------------+ | | | |<-(14)-- API Response ---------------------------+ | | |||
| | | | +--------+ | | | | | +--------+ | |||
+--------+ +--------+ | +--------+ +--------+ | |||
Figure 5: Figure 5: Diagram of a user-code-based interaction | Figure 5: Diagram of a User-Code-Based Interaction | |||
1. The client instance requests access to the resource (Section 2). | * (1) The client instance requests access to the resource | |||
The client instance indicates that it can display a user code | (Section 2). The client instance indicates that it can display a | |||
(Section 2.5.1.3). | user code (Section 2.5.1.3). | |||
2. The AS determines that interaction is needed and responds | * (2) The AS determines that interaction is needed and responds | |||
(Section 3) with a user code to communicate to the user | (Section 3) with a user code to communicate to the user | |||
(Section 3.3.3). The AS also includes information the client | (Section 3.3.3). The AS also includes information the client | |||
instance will need to continue the request (Section 3.1) in (8) | instance will need to continue the request (Section 3.1) in (8) | |||
and (10). The AS associates this continuation information with | and (10). The AS associates this continuation information with an | |||
an ongoing request that will be referenced in (4), (6), (8), and | ongoing request that will be referenced in (4), (6), (8), and | |||
(10). | (10). | |||
3. The client instance stores the continuation information from (2) | * (3) The client instance stores the continuation information from | |||
for use in (8) and (10). The client instance then communicates | (2) for use in (8) and (10). The client instance then | |||
the code to the user (Section 4.1.2) given by the AS in (2). | communicates the code to the user (Section 4.1.2) given by the AS | |||
in (2). | ||||
4. The users directs their browser to the user code URI. This URI | * (4) The user directs their browser to the user code URI. This URI | |||
is stable and can be communicated via the client software's | is stable and can be communicated via the client software's | |||
documentation, the AS documentation, or the client software | documentation, the AS documentation, or the client software | |||
itself. Since it is assumed that the RO will interact with the | itself. Since it is assumed that the RO will interact with the AS | |||
AS through a secondary device, the client instance does not | through a secondary device, the client instance does not provide a | |||
provide a mechanism to launch the RO's browser at this URI. | mechanism to launch the RO's browser at this URI. | |||
5. The end user authenticates at the AS, taking on the role of the | * (5) The end user authenticates at the AS, taking on the role of | |||
RO. | the RO. | |||
6. The RO enters the code communicated in (3) to the AS. The AS | * (6) The RO enters the code communicated in (3) to the AS. The AS | |||
validates this code against a current request in process. | validates this code against a current request in process. | |||
7. As the RO, the user authorizes the pending request from the | * (7) As the RO, the user authorizes the pending request from the | |||
client instance. | client instance. | |||
8. When the AS is done interacting with the user, the AS indicates | * (8) When the AS is done interacting with the user, the AS | |||
to the RO that the request has been completed. | indicates to the RO that the request has been completed. | |||
9. Meanwhile, the client instance loads the continuation | * (9) Meanwhile, the client instance loads the continuation | |||
information stored at (3) and continues the request (Section 5). | information stored at (3) and continues the request (Section 5). | |||
The AS determines which ongoing access request is referenced | The AS determines which ongoing access request is referenced here | |||
here and checks its state. | and checks its state. | |||
10. If the access request has not yet been authorized by the RO in | * (10) If the access request has not yet been authorized by the RO | |||
(6), the AS responds to the client instance to continue the | in (6), the AS responds to the client instance to continue the | |||
request (Section 3.1) at a future time through additional polled | request (Section 3.1) at a future time through additional polled | |||
continuation requests. This response can include updated | continuation requests. This response can include updated | |||
continuation information as well as information regarding how | continuation information as well as information regarding how long | |||
long the client instance should wait before calling again. The | the client instance should wait before calling again. The client | |||
client instance replaces its stored continuation information | instance replaces its stored continuation information from the | |||
from the previous response (2). Note that the AS may need to | previous response (2). Note that the AS may need to determine | |||
determine that the RO has not approved the request in a | that the RO has not approved the request in a sufficient amount of | |||
sufficient amount of time and return an appropriate error to the | time and return an appropriate error to the client instance. | |||
client instance. | ||||
11. The client instance continues to poll the AS (Section 5.2) with | * (11) The client instance continues to poll the AS (Section 5.2) | |||
the new continuation information in (9). | with the new continuation information in (9). | |||
12. If the request has been authorized, the AS grants access to the | * (12) If the request has been authorized, the AS grants access to | |||
information in the form of access tokens (Section 3.2) and | the information in the form of access tokens (Section 3.2) and | |||
direct subject information (Section 3.4) to the client instance. | direct subject information (Section 3.4) to the client instance. | |||
13. The client instance uses the access token (Section 7.2) to call | * (13) The client instance uses the access token (Section 7.2) to | |||
the RS. | call the RS. | |||
14. The RS validates the access token and returns an appropriate | * (14) The RS validates the access token and returns an appropriate | |||
response for the API. | response for the API. | |||
An example set of protocol messages for this method can be found in | An example set of protocol messages for this method can be found in | |||
Appendix C.2. | Appendix B.2. | |||
1.6.4. Asynchronous Authorization | 1.6.4. Asynchronous Authorization | |||
In this example flow, the end user and RO roles are fulfilled by | In this example flow, the end user and RO roles are fulfilled by | |||
different parties, and the RO does not interact with the client | different parties, and the RO does not interact with the client | |||
instance. The AS reaches out asynchronously to the RO during the | instance. The AS reaches out asynchronously to the RO during the | |||
request process to gather the RO's authorization for the client | request process to gather the RO's authorization for the client | |||
instance's request. The client instance polls the AS while it is | instance's request. The client instance polls the AS while it is | |||
waiting for the RO to authorize the request. | waiting for the RO to authorize the request. | |||
skipping to change at page 25, line 48 ¶ | skipping to change at line 1135 ¶ | |||
| | | | | | | | | | |||
| |<-(9)------ Grant Access ---------+ | | | |<-(9)------ Grant Access ---------+ | | |||
| | | | | | | | | | |||
| | | | +--------+ | | | | | +--------+ | |||
| +--(10)-- Access API ---------------------------->| RS | | | +--(10)-- Access API ---------------------------->| RS | | |||
| | | | | | | | | | | | | | |||
| |<-(11)-- API Response ---------------------------+ | | | |<-(11)-- API Response ---------------------------+ | | |||
| | | | +--------+ | | | | | +--------+ | |||
+--------+ +--------+ | +--------+ +--------+ | |||
Figure 6: Figure 6: Diagram of an asynchronous authorization | Figure 6: Diagram of an Asynchronous Authorization Process, with | |||
process, with no end user interaction | No End-User Interaction | |||
1. The client instance requests access to the resource (Section 2). | * (1) The client instance requests access to the resource | |||
The client instance does not send any interaction modes to the | (Section 2). The client instance does not send any interaction | |||
server, indicating that it does not expect to interact with the | modes to the server, indicating that it does not expect to | |||
RO. The client instance can also signal which RO it requires | interact with the RO. The client instance can also signal which | |||
authorization from, if known, by using the subject request | RO it requires authorization from, if known, by using the subject | |||
(Section 2.2) and user request (Section 2.4) sections. It's | request field (Section 2.2) and user request field (Section 2.4). | |||
also possible for the AS to determine which RO needs to be | It's also possible for the AS to determine which RO needs to be | |||
contacted by the nature of what access is being requested. | contacted by the nature of what access is being requested. | |||
2. The AS determines that interaction is needed, but the client | * (2) The AS determines that interaction is needed, but the client | |||
instance cannot interact with the RO. The AS responds | instance cannot interact with the RO. The AS responds (Section 3) | |||
(Section 3) with the information the client instance will need | with the information the client instance will need to continue the | |||
to continue the request (Section 3.1) in (6) and (8), including | request (Section 3.1) in (6) and (8), including a signal that the | |||
a signal that the client instance should wait before checking | client instance should wait before checking the status of the | |||
the status of the request again. The AS associates this | request again. The AS associates this continuation information | |||
continuation information with an ongoing request that will be | with an ongoing request that will be referenced in (3), (4), (5), | |||
referenced in (3), (4), (5), (6), and (8). | (6), and (8). | |||
3. The AS determines which RO to contact based on the request in | * (3) The AS determines which RO to contact based on the request in | |||
(1), through a combination of the user request (Section 2.4), | (1), through a combination of the user request (Section 2.4), the | |||
the subject request (Section 2.2), the access request | subject request (Section 2.2), the access request (Section 2.1), | |||
(Section 2.1), and other policy information. The AS contacts | and other policy information. The AS contacts the RO and | |||
the RO and authenticates them. | authenticates them. | |||
4. The RO authorizes the pending request from the client instance. | * (4) The RO authorizes the pending request from the client | |||
instance. | ||||
5. When the AS is done interacting with the RO, the AS indicates to | * (5) When the AS is done interacting with the RO, the AS indicates | |||
the RO that the request has been completed. | to the RO that the request has been completed. | |||
6. Meanwhile, the client instance loads the continuation | * (6) Meanwhile, the client instance loads the continuation | |||
information stored at (2) and continues the request (Section 5). | information stored at (2) and continues the request (Section 5). | |||
The AS determines which ongoing access request is referenced | The AS determines which ongoing access request is referenced here | |||
here and checks its state. | and checks its state. | |||
7. If the access request has not yet been authorized by the RO in | * (7) If the access request has not yet been authorized by the RO in | |||
(6), the AS responds to the client instance to continue the | (6), the AS responds to the client instance to continue the | |||
request (Section 3.1) at a future time through additional | request (Section 3.1) at a future time through additional polling. | |||
polling. Note that this response is not an error message, since | Note that this response is not an error message, since no error | |||
no error has yet occurred. This response can include refreshed | has yet occurred. This response can include refreshed credentials | |||
credentials as well as information regarding how long the client | as well as information regarding how long the client instance | |||
instance should wait before calling again. The client instance | should wait before calling again. The client instance replaces | |||
replaces its stored continuation information from the previous | its stored continuation information from the previous response | |||
response (2). Note that the AS may need to determine that the | (2). Note that the AS may need to determine that the RO has not | |||
RO has not approved the request in a sufficient amount of time | approved the request in a sufficient amount of time and return an | |||
and return an appropriate error to the client instance. | appropriate error to the client instance. | |||
8. The client instance continues to poll the AS (Section 5.2) with | * (8) The client instance continues to poll the AS (Section 5.2) | |||
the new continuation information from (7). | with the new continuation information from (7). | |||
9. If the request has been authorized, the AS grants access to the | * (9) If the request has been authorized, the AS grants access to | |||
information in the form of access tokens (Section 3.2) and | the information in the form of access tokens (Section 3.2) and | |||
direct subject information (Section 3.4) to the client instance. | direct subject information (Section 3.4) to the client instance. | |||
10. The client instance uses the access token (Section 7.2) to call | * (10) The client instance uses the access token (Section 7.2) to | |||
the RS. | call the RS. | |||
11. The RS validates the access token and returns an appropriate | * (11) The RS validates the access token and returns an appropriate | |||
response for the API. | response for the API. | |||
An example set of protocol messages for this method can be found in | An example set of protocol messages for this method can be found in | |||
Appendix C.4. | Appendix B.4. | |||
Additional considerations for asynchronous interactions like this are | Additional considerations for asynchronous interactions like this are | |||
discussed in Section 13.36. | discussed in Section 11.36. | |||
1.6.5. Software-only Authorization | 1.6.5. Software-Only Authorization | |||
In this example flow, the AS policy allows the client instance to | In this example flow, the AS policy allows the client instance to | |||
make a call on its own behalf, without the need for an RO to be | make a call on its own behalf, without the need for an RO to be | |||
involved at runtime to approve the decision. Since there is no | involved at runtime to approve the decision. Since there is no | |||
explicit RO, the client instance does not interact with an RO. | explicit RO, the client instance does not interact with an RO. | |||
+--------+ +--------+ | +--------+ +--------+ | |||
| Client | | AS | | | Client | | AS | | |||
|Instance+--(1)--- Request Access --->| | | |Instance+--(1)--- Request Access --->| | | |||
| | | | | | | | | | |||
| |<-(2)---- Grant Access -----+ | | | |<-(2)---- Grant Access -----+ | | |||
| | | | +--------+ | | | | | +--------+ | |||
| +--(3)--- Access API ------------------->| RS | | | +--(3)--- Access API ------------------->| RS | | |||
| | | | | | | | | | | | | | |||
| |<-(4)--- API Response ------------------+ | | | |<-(4)--- API Response ------------------+ | | |||
| | | | +--------+ | | | | | +--------+ | |||
+--------+ +--------+ | +--------+ +--------+ | |||
Figure 7: Figure 7: Diagram of a software-only authorization, | Figure 7: Diagram of a Software-Only Authorization, with No End | |||
with no end user or explicit resource owner | User or Explicit Resource Owner | |||
1. The client instance requests access to the resource (Section 2). | * (1) The client instance requests access to the resource | |||
The client instance does not send any interaction modes to the | (Section 2). The client instance does not send any interaction | |||
server. | modes to the server. | |||
2. The AS determines that the request has been authorized based on | * (2) The AS determines that the request has been authorized based | |||
the identity of the client instance making the request and the | on the identity of the client instance making the request and the | |||
access requested (Section 2.1). The AS grants access to the | access requested (Section 2.1). The AS grants access to the | |||
resource in the form of access tokens (Section 3.2) to the client | resource in the form of access tokens (Section 3.2) to the client | |||
instance. Note that direct subject information (Section 3.4) is | instance. Note that direct subject information (Section 3.4) is | |||
not generally applicable in this use case, as there is no user | not generally applicable in this use case, as there is no user | |||
involved. | involved. | |||
3. The client instance uses the access token (Section 7.2) to call | * (3) The client instance uses the access token (Section 7.2) to | |||
the RS. | call the RS. | |||
4. The RS validates the access token and returns an appropriate | * (4) The RS validates the access token and returns an appropriate | |||
response for the API. | response for the API. | |||
An example set of protocol messages for this method can be found in | An example set of protocol messages for this method can be found in | |||
Appendix C.3. | Appendix B.3. | |||
1.6.6. Refreshing an Expired Access Token | 1.6.6. Refreshing an Expired Access Token | |||
In this example flow, the client instance receives an access token to | In this example flow, the client instance receives an access token to | |||
access a resource server through some valid GNAP process. The client | access an RS through some valid GNAP process. The client instance | |||
instance uses that token at the RS for some time, but eventually the | uses that token at the RS for some time, but eventually the access | |||
access token expires. The client instance then gets a refreshed | token expires. The client instance then gets a refreshed access | |||
access token by rotating the expired access token's value at the AS | token by rotating the expired access token's value at the AS using | |||
using the token management API. | the token management API. | |||
+--------+ +--------+ | +--------+ +--------+ | |||
| Client | | AS | | | Client | | AS | | |||
|Instance+--(1)--- Request Access ----------------->| | | |Instance+--(1)--- Request Access ----------------->| | | |||
| | | | | | | | | | |||
| |<-(2)--- Grant Access --------------------+ | | | |<-(2)--- Grant Access --------------------+ | | |||
| | | | | | | | | | |||
| | +--------+ | | | | | +--------+ | | | |||
| +--(3)--- Access Resource --->| RS | | | | | +--(3)--- Access Resource --->| RS | | | | |||
| | | | | | | | | | | | | | |||
skipping to change at page 29, line 29 ¶ | skipping to change at line 1280 ¶ | |||
| | | | | | | | | | | | | | |||
| |<-(6)--- Error Response -----+ | | | | | |<-(6)--- Error Response -----+ | | | | |||
| | +--------+ | | | | | +--------+ | | | |||
| | | | | | | | | | |||
| +--(7)--- Rotate Token ------------------->| | | | +--(7)--- Rotate Token ------------------->| | | |||
| | | | | | | | | | |||
| |<-(8)--- Rotated Token -------------------+ | | | |<-(8)--- Rotated Token -------------------+ | | |||
| | | | | | | | | | |||
+--------+ +--------+ | +--------+ +--------+ | |||
Figure 8: Figure 8: Diagram of the process of refreshing an | Figure 8: Diagram of the Process of Refreshing an Expired Access | |||
access token | Token | |||
1. The client instance requests access to the resource (Section 2). | * (1) The client instance requests access to the resource | |||
(Section 2). | ||||
2. The AS grants access to the resource (Section 3) with an access | * (2) The AS grants access to the resource (Section 3) with an | |||
token (Section 3.2) usable at the RS. The access token response | access token (Section 3.2) usable at the RS. The access token | |||
includes a token management URI. | response includes a token management URI. | |||
3. The client instance uses the access token (Section 7.2) to call | * (3) The client instance uses the access token (Section 7.2) to | |||
the RS. | call the RS. | |||
4. The RS validates the access token and returns an appropriate | * (4) The RS validates the access token and returns an appropriate | |||
response for the API. | response for the API. | |||
5. Time passes and the client instance uses the access token to call | * (5) Time passes and the client instance uses the access token to | |||
the RS again. | call the RS again. | |||
6. The RS validates the access token and determines that the access | * (6) The RS validates the access token and determines that the | |||
token is expired. The RS responds to the client instance with an | access token is expired. The RS responds to the client instance | |||
error. | with an error. | |||
7. The client instance calls the token management URI returned in | * (7) The client instance calls the token management URI returned in | |||
(2) to rotate the access token (Section 6.1). The client | (2) to rotate the access token (Section 6.1). The client instance | |||
instance uses the access token (Section 7.2) in this call as well | uses the access token (Section 7.2) in this call as well as the | |||
as the appropriate key, see the token rotation section for | appropriate key; see Section 6.1 for details. | |||
details. | ||||
8. The AS validates the rotation request including the signature and | * (8) The AS validates the rotation request, including the signature | |||
keys presented in (7) and refreshes the access token | and keys presented in (7), and refreshes the access token | |||
(Section 3.2.1). The response includes a new version of the | (Section 3.2.1). The response includes a new version of the | |||
access token and can also include updated token management | access token and can also include updated token management | |||
information, which the client instance will store in place of the | information, which the client instance will store in place of the | |||
values returned in (2). | values returned in (2). | |||
1.6.7. Requesting Subject Information Only | 1.6.7. Requesting Subject Information Only | |||
In this scenario, the client instance does not call an RS and does | In this scenario, the client instance does not call an RS and does | |||
not request an access token. Instead, the client instance only | not request an access token. Instead, the client instance only | |||
requests and is returned direct subject information (Section 3.4). | requests and is returned direct subject information (Section 3.4). | |||
Many different interaction modes can be used in this scenario, so | Many different interaction modes can be used in this scenario, so | |||
these are shown only in the abstract as functions of the AS here. | these are shown only in the abstract as functions of the AS here. | |||
+--------+ +--------+ .----. | +--------+ +--------+ .----. | |||
skipping to change at page 30, line 49 ¶ | skipping to change at line 1346 ¶ | |||
| | | | AuthZ +------+ | | | | | AuthZ +------+ | |||
| | | | | End | | | | | | | End | | |||
| |<=(6)== Signal Continuation =========================+ User | | | |<=(6)== Signal Continuation =========================+ User | | |||
| | | | `----` | | | | | `----` | |||
| +--(7)--- Continue Request ------->| | | | +--(7)--- Continue Request ------->| | | |||
| | | | | | | | | | |||
| |<-(8)----- Grant Access ----------+ | | | |<-(8)----- Grant Access ----------+ | | |||
| | | | | | | | | | |||
+--------+ +--------+ | +--------+ +--------+ | |||
Figure 9: Figure 9: Diagram of the process of requesting and | Figure 9: Diagram of the Process of Requesting and Releasing Subject | |||
releasing subject information apart from access tokens | Information apart from Access Tokens | |||
1. The client instance requests access to subject information | * (1) The client instance requests access to subject information | |||
(Section 2). | (Section 2). | |||
2. The AS determines that interaction is needed and responds | * (2) The AS determines that interaction is needed and responds | |||
(Section 3) with appropriate information for facilitating user | (Section 3) with appropriate information for facilitating user | |||
interaction (Section 3.3). | interaction (Section 3.3). | |||
3. The client instance facilitates the user interacting with the AS | * (3) The client instance facilitates the user interacting with the | |||
(Section 4) as directed in (2). | AS (Section 4) as directed in (2). | |||
4. The user authenticates at the AS, taking on the role of the RO. | * (4) The user authenticates at the AS, taking on the role of the | |||
RO. | ||||
5. As the RO, the user authorizes the pending request from the | * (5) As the RO, the user authorizes the pending request from the | |||
client instance. | client instance. | |||
6. When the AS is done interacting with the user, the AS returns the | * (6) When the AS is done interacting with the user, the AS returns | |||
user to the client instance and signals continuation. | the user to the client instance and signals continuation. | |||
7. The client instance loads the continuation information from (2) | * (7) The client instance loads the continuation information from | |||
and calls the AS to continue the request (Section 5). | (2) and calls the AS to continue the request (Section 5). | |||
8. If the request has been authorized, the AS grants access to the | * (8) If the request has been authorized, the AS grants access to | |||
requested direct subject information (Section 3.4) to the client | the requested direct subject information (Section 3.4) to the | |||
instance. At this stage, the user is generally considered | client instance. At this stage, the user is generally considered | |||
"logged in" to the client instance based on the identifiers and | "logged in" to the client instance based on the identifiers and | |||
assertions provided by the AS. Note that the AS can restrict the | assertions provided by the AS. Note that the AS can restrict the | |||
subject information returned and it might not match what the | subject information returned, and it might not match what the | |||
client instance requested, see the section on subject information | client instance requested; see Section 3.4 for details. | |||
for details. | ||||
1.6.8. Cross-User Authentication | 1.6.8. Cross-User Authentication | |||
In this scenario, the end user and resource owner are two different | In this scenario, the end user and RO are two different people. | |||
people. Here, the client instance already knows who the end user is, | Here, the client instance already knows who the end user is, likely | |||
likely through a separate authentication process. The end user, | through a separate authentication process. The end user, operating | |||
operating the client instance, needs to get subject information about | the client instance, needs to get subject information about another | |||
another person in the system, the RO. The RO is given an opportunity | person in the system, the RO. The RO is given an opportunity to | |||
to release this information using an asynchronous interaction method | release this information using an asynchronous interaction method | |||
with the AS. This scenario would apply, for instance, when the end | with the AS. This scenario would apply, for instance, when the end | |||
user is an agent in a call-center and the resource owner is a | user is an agent in a call center and the RO is a customer | |||
customer authorizing the call center agent to access their account on | authorizing the call-center agent to access their account on their | |||
their behalf. | behalf. | |||
.----. .----. | .----. .----. | |||
| End | | RO | | | End | | RO | | |||
| User |<=================(1)== Identify RO ==================>| | | | User |<=================(1)== Identify RO ==================>| | | |||
| | | | | | | | | | |||
| | +--------+ +--------+ | | | | | +--------+ +--------+ | | | |||
| +==(2)==>| Client | | AS | | | | | +==(2)==>| Client | | AS | | | | |||
| | RO ID |Instance| | | | | | | | RO ID |Instance| | | | | | |||
| | | | | | | | | | | | | | | | | | |||
| | | +--(3)-- Req. ---->| | | | | | | | +--(3)-- Req. ---->| | | | | |||
skipping to change at page 32, line 34 ¶ | skipping to change at line 1421 ¶ | |||
| | | | | | | | | | | | | | | | | | |||
| | | +--(9)--- Cont. -->| | | | | | | | +--(9)--- Cont. -->| | | | | |||
| | | | | | | | | | | | | | | | | | |||
| | | |<-(10)-- Subj. ---+ | | | | | | | |<-(10)-- Subj. ---+ | | | | |||
| |<=(11)==+ | Info | | | | | | |<=(11)==+ | Info | | | | | |||
| | Return | | | | | | | | | Return | | | | | | | |||
| | RO | | | | | | | | | RO | | | | | | | |||
| | Info | | | | | | | | | Info | | | | | | | |||
`----` +--------+ +--------+ `----` | `----` +--------+ +--------+ `----` | |||
Figure 10: Figure 10: Diagram of cross-user authorization, where | Figure 10: Diagram of Cross-User Authorization, Where the End | |||
the end user and RO are different | User and RO Are Different | |||
Precondition: The end user is authenticated to the client instance, | Precondition: The end user is authenticated to the client instance, | |||
and the client instance has an identifier representing the end user | and the client instance has an identifier representing the end user | |||
that it can present to the AS. This identifier should be unique to | that it can present to the AS. This identifier should be unique to | |||
the particular session with the client instance and the AS. The | the particular session with the client instance and the AS. The | |||
client instance is also known to the AS and allowed to access this | client instance is also known to the AS and allowed to access this | |||
advanced functionality where the information of someone other than | advanced functionality where the information of someone other than | |||
the end user is returned to the client instance. | the end user is returned to the client instance. | |||
1. The RO communicates a human-readable identifier to the end user, | * (1) The RO communicates a human-readable identifier to the end | |||
such as an email address or account number. This communication | user, such as an email address or account number. This | |||
happens out of band from the protocol, such as over the phone | communication happens out of band from the protocol, such as over | |||
between parties. Note that the RO is not interacting with the | the phone between parties. Note that the RO is not interacting | |||
client instance. | with the client instance. | |||
2. The end user communicates the identifier to the client instance. | * (2) The end user communicates the identifier to the client | |||
The means by which the identifier is communicated to the client | instance. The means by which the identifier is communicated to | |||
instance is out of scope for this specification. | the client instance are out of scope for this specification. | |||
3. The client instance requests access to subject information | * (3) The client instance requests access to subject information | |||
(Section 2). The request includes the RO's identifier in the | (Section 2). The request includes the RO's identifier in the | |||
subject information request (Section 2.2) sub_ids field, and the | sub_ids field of the subject information request (Section 2.2) and | |||
end user's identifier in the user information field | the end user's identifier in the user field (Section 2.4). The | |||
(Section 2.4) of the request. The request includes no | request includes no interaction start methods, since the end user | |||
interaction start methods, since the end user is not expected to | is not expected to be the one interacting with the AS. The | |||
be the one interacting with the AS. The request does include | request does include the push-based interaction finish method | |||
the push based interaction finish method (Section 2.5.2.2) to | (Section 2.5.2.2) to allow the AS to signal to the client instance | |||
allow the AS to signal to the client instance when the | when the interaction with the RO has concluded. | |||
interaction with the RO has concluded. | ||||
4. The AS sees that the identifier for the end user and subject | * (4) The AS sees that the identifiers for the end user and subject | |||
being requested are different. The AS determines that it can | being requested are different. The AS determines that it can | |||
reach out to the RO asynchronously for approval. While it is | reach out to the RO asynchronously for approval. While it is | |||
doing so, the AS returns a continuation response (Section 3.1) | doing so, the AS returns a continuation response (Section 3.1) | |||
with a finish nonce to allow the client instance to continue the | with a finish nonce to allow the client instance to continue the | |||
grant request after interaction with the RO has concluded. | grant request after interaction with the RO has concluded. | |||
5. The AS contacts the RO and has them authenticate to the system. | * (5) The AS contacts the RO and has them authenticate to the | |||
The means for doing this are outside the scope of this | system. The means for doing this are outside the scope of this | |||
specification, but the identity of the RO is known from the | specification, but the identity of the RO is known from the | |||
subject identifier sent in (3). | Subject Identifier sent in (3). | |||
6. The RO is prompted to authorize the end user's request via the | * (6) The RO is prompted to authorize the end user's request via the | |||
client instance. Since the end user was identified in (3) via | client instance. Since the end user was identified in (3) via the | |||
the user field, the AS can show this information to the RO | user field, the AS can show this information to the RO during the | |||
during the authorization request. | authorization request. | |||
7. The RO completes the authorization with the AS. The AS marks | * (7) The RO completes the authorization with the AS. The AS marks | |||
the request as _approved_. | the request as _approved_. | |||
8. The RO pushes the interaction finish message (Section 4.2.2) to | * (8) The RO pushes the interaction finish message (Section 4.2.2) | |||
the client instance. Note that in the case the RO cannot be | to the client instance. Note that in the case the RO cannot be | |||
reached or the RO denies the request, the AS still sends the | reached or the RO denies the request, the AS still sends the | |||
interaction finish message to the client instance, after which | interaction finish message to the client instance, after which the | |||
the client instance can negotiate next steps if possible. | client instance can negotiate next steps if possible. | |||
9. The client instance validates the interaction finish message and | * (9) The client instance validates the interaction finish message | |||
continues the grant request (Section 5.1). | and continues the grant request (Section 5.1). | |||
10. The AS returns the RO's subject information (Section 3.4) to the | * (10) The AS returns the RO's subject information (Section 3.4) to | |||
client instance. | the client instance. | |||
11. The client instance can display or otherwise utilize the RO's | * (11) The client instance can display or otherwise utilize the RO's | |||
user information in its session with the end user. Note that | user information in its session with the end user. Note that | |||
since the client instance requested different sets of user | since the client instance requested different sets of user | |||
information in (3), the client instance does not conflate the | information in (3), the client instance does not conflate the end | |||
end user with the RO. | user with the RO. | |||
Additional considerations for asynchronous interactions like this are | Additional considerations for asynchronous interactions like this are | |||
discussed in Section 13.36. | discussed in Section 11.36. | |||
2. Requesting Access | 2. Requesting Access | |||
To start a request, the client instance sends an HTTP POST with a | To start a request, the client instance sends an HTTP POST with a | |||
JSON [RFC8259] document to the grant endpoint of the AS. The grant | JSON [RFC8259] document to the grant endpoint of the AS. The grant | |||
endpoint is a URI that uniquely identifies the AS to client instances | endpoint is a URI that uniquely identifies the AS to client instances | |||
and serves as the identifier for the AS. The document is a JSON | and serves as the identifier for the AS. The document is a JSON | |||
object where each field represents a different aspect of the client | object where each field represents a different aspect of the client | |||
instance's request. Each field is described in detail in a section | instance's request. Each field is described in detail in a | |||
below. | subsection below. | |||
access_token (object / array of objects): Describes the rights and | access_token (object / array of objects): Describes the rights and | |||
properties associated with the requested access token. REQUIRED | properties associated with the requested access token. REQUIRED | |||
if requesting an access token. See Section 2.1. | if requesting an access token. See Section 2.1. | |||
subject (object): Describes the information about the RO that the | subject (object): Describes the information about the RO that the | |||
client instance is requesting to be returned directly in the | client instance is requesting to be returned directly in the | |||
response from the AS. REQUIRED if requesting subject information. | response from the AS. REQUIRED if requesting subject information. | |||
See Section 2.2. | See Section 2.2. | |||
client (object / string): Describes the client instance that is | client (object / string): Describes the client instance that is | |||
making this request, including the key that the client instance | making this request, including the key that the client instance | |||
will use to protect this request and any continuation requests at | will use to protect this request, any continuation requests at the | |||
the AS and any user-facing information about the client instance | AS, and any user-facing information about the client instance used | |||
used in interactions. REQUIRED. See Section 2.3. | in interactions. REQUIRED. See Section 2.3. | |||
user (object / string): Identifies the end user to the AS in a | user (object / string): Identifies the end user to the AS in a | |||
manner that the AS can verify, either directly or by interacting | manner that the AS can verify, either directly or by interacting | |||
with the end user to determine their status as the RO. OPTIONAL. | with the end user to determine their status as the RO. OPTIONAL. | |||
See Section 2.4. | See Section 2.4. | |||
interact (object): Describes the modes that the client instance | interact (object): Describes the modes that the client instance | |||
supports for allowing the RO to interact with the AS and modes for | supports for allowing the RO to interact with the AS and modes for | |||
the client instance to receive updates when interaction is | the client instance to receive updates when interaction is | |||
complete. REQUIRED if interaction is supported. See Section 2.5. | complete. REQUIRED if interaction is supported. See Section 2.5. | |||
Additional members of this request object can be defined by | Additional members of this request object can be defined by | |||
extensions using the GNAP Grant Request Parameters Registry | extensions using the "GNAP Grant Request Parameters" registry | |||
(Section 11.3). | (Section 10.3). | |||
A non-normative example of a grant request is below: | A non-normative example of a grant request is below: | |||
{ | { | |||
"access_token": { | "access_token": { | |||
"access": [ | "access": [ | |||
{ | { | |||
"type": "photo-api", | "type": "photo-api", | |||
"actions": [ | "actions": [ | |||
"read", | "read", | |||
skipping to change at page 36, line 13 ¶ | skipping to change at line 1589 ¶ | |||
}, | }, | |||
"subject": { | "subject": { | |||
"sub_id_formats": ["iss_sub", "opaque"], | "sub_id_formats": ["iss_sub", "opaque"], | |||
"assertion_formats": ["id_token"] | "assertion_formats": ["id_token"] | |||
} | } | |||
} | } | |||
Sending a request to the grant endpoint creates a grant request in | Sending a request to the grant endpoint creates a grant request in | |||
the _processing_ state. The AS processes this request to determine | the _processing_ state. The AS processes this request to determine | |||
whether interaction or authorization are necessary (moving to the | whether interaction or authorization are necessary (moving to the | |||
_pending_ state), or if access can be granted immediately (moving to | _pending_ state) or if access can be granted immediately (moving to | |||
the _approved_ state). | the _approved_ state). | |||
The request MUST be sent as a JSON object in the content of the HTTP | The request MUST be sent as a JSON object in the content of the HTTP | |||
POST request with Content-Type application/json. A key proofing | POST request with Content-Type application/json. A key proofing | |||
mechanism MAY define an alternative content type, as long as the | mechanism MAY define an alternative content type, as long as the | |||
content is formed from the JSON object. For example, the attached | content is formed from the JSON object. For example, the attached | |||
JWS key proofing mechanism (see Section 7.3.4) places the JSON object | JSON Web Signature (JWS) key proofing mechanism (see Section 7.3.4) | |||
into the payload of a JWS wrapper, which is in turn sent as the | places the JSON object into the payload of a JWS wrapper, which is in | |||
message content. | turn sent as the message content. | |||
2.1. Requesting Access to Resources | 2.1. Requesting Access to Resources | |||
If the client instance is requesting one or more access tokens for | If the client instance is requesting one or more access tokens for | |||
the purpose of accessing an API, the client instance MUST include an | the purpose of accessing an API, the client instance MUST include an | |||
access_token field. This field MUST be an object (for a single | access_token field. This field MUST be an object (for a single | |||
access token (Section 2.1.1)) or an array of these objects (for | access token (Section 2.1.1)) or an array of these objects (for | |||
multiple access tokens (Section 2.1.2)), as described in the | multiple access tokens (Section 2.1.2)), as described in the | |||
following sections. | following subsections. | |||
2.1.1. Requesting a Single Access Token | 2.1.1. Requesting a Single Access Token | |||
To request a single access token, the client instance sends an | To request a single access token, the client instance sends an | |||
access_token object composed of the following fields. | access_token object composed of the following fields. | |||
access (array of objects/strings): Describes the rights that the | access (array of objects/strings): Describes the rights that the | |||
client instance is requesting for the access token to be used at | client instance is requesting for the access token to be used at | |||
the RS. REQUIRED. See Section 8. | the RS. REQUIRED. See Section 8. | |||
label (string): A unique name chosen by the client instance to refer | label (string): A unique name chosen by the client instance to refer | |||
to the resulting access token. The value of this field is opaque | to the resulting access token. The value of this field is opaque | |||
to the AS and is not intended to be exposed to or used by the end | to the AS and is not intended to be exposed to or used by the end | |||
user. If this field is included in the request, the AS MUST | user. If this field is included in the request, the AS MUST | |||
include the same label in the token response (Section 3.2). | include the same label in the token response (Section 3.2). | |||
REQUIRED if used as part of a multiple access token request | REQUIRED if used as part of a request for multiple access tokens | |||
(Section 2.1.2), OPTIONAL otherwise. | (Section 2.1.2); OPTIONAL otherwise. | |||
flags (array of strings): A set of flags that indicate desired | flags (array of strings): A set of flags that indicate desired | |||
attributes or behavior to be attached to the access token by the | attributes or behavior to be attached to the access token by the | |||
AS. OPTIONAL. | AS. OPTIONAL. | |||
The values of the flags field defined by this specification are as | The values of the flags field defined by this specification are as | |||
follows: | follows: | |||
"bearer": If this flag is included, the access token being requested | "bearer": If this flag is included, the access token being requested | |||
is a bearer token. If this flag is omitted, the access token is | is a bearer token. If this flag is omitted, the access token is | |||
bound to the key used by the client instance in this request (or | bound to the key used by the client instance in this request (or | |||
that key's most recent rotation) and the access token MUST be | that key's most recent rotation), and the access token MUST be | |||
presented using the same key and proofing method. Methods for | presented using the same key and proofing method. Methods for | |||
presenting bound and bearer access tokens are described in | presenting bound and bearer access tokens are described in | |||
Section 7.2. See Section 13.9 for additional considerations on | Section 7.2. See Section 11.9 for additional considerations on | |||
the use of bearer tokens. | the use of bearer tokens. | |||
Flag values MUST NOT be included more than once. If the request | Flag values MUST NOT be included more than once. If the request | |||
includes a flag value multiple times, the AS MUST return an | includes a flag value multiple times, the AS MUST return an | |||
invalid_flag error defined in Section 3.6. | invalid_flag error defined in Section 3.6. | |||
Additional flags can be defined by extensions using the GNAP Access | Additional flags can be defined by extensions using the "GNAP Access | |||
Token Flags Registry (Section 11.4). | Token Flags" registry (Section 10.4). | |||
In the following non-normative example, the client instance is | In the following non-normative example, the client instance is | |||
requesting access to a complex resource described by a pair of access | requesting access to a complex resource described by a pair of access | |||
request object. | request object. | |||
"access_token": { | "access_token": { | |||
"access": [ | "access": [ | |||
{ | { | |||
"type": "photo-api", | "type": "photo-api", | |||
"actions": [ | "actions": [ | |||
skipping to change at page 38, line 43 ¶ | skipping to change at line 1691 ¶ | |||
"data", | "data", | |||
"pictures", | "pictures", | |||
"walrus whiskers" | "walrus whiskers" | |||
] | ] | |||
} | } | |||
], | ], | |||
"label": "token1-23" | "label": "token1-23" | |||
} | } | |||
If access is approved, the resulting access token is valid for the | If access is approved, the resulting access token is valid for the | |||
described resource. Since the "bearer" flag is not provided in this | described resource. Since the bearer flag is not provided in this | |||
example, the token is bound to the client instance's key (or its most | example, the token is bound to the client instance's key (or its most | |||
recent rotation). The token is labeled "token1-23". The token | recent rotation). The token is labeled "token1-23". The token | |||
response structure is described in Section 3.2.1. | response structure is described in Section 3.2.1. | |||
2.1.2. Requesting Multiple Access Tokens | 2.1.2. Requesting Multiple Access Tokens | |||
To request multiple access tokens to be returned in a single | To request that multiple access tokens be returned in a single | |||
response, the client instance sends an array of objects as the value | response, the client instance sends an array of objects as the value | |||
of the access_token parameter. Each object MUST conform to the | of the access_token parameter. Each object MUST conform to the | |||
request format for a single access token request, as specified in | request format for a single access token request, as specified in | |||
requesting a single access token (Section 2.1.1). Additionally, each | Section 2.1.1. Additionally, each object in the array MUST include | |||
object in the array MUST include the label field, and all values of | the label field, and all values of these fields MUST be unique within | |||
these fields MUST be unique within the request. If the client | the request. If the client instance does not include a label value | |||
instance does not include a label value for any entry in the array, | for any entry in the array or the values of the label field are not | |||
or the values of the label field are not unique within the array, the | unique within the array, the AS MUST return an "invalid_request" | |||
AS MUST return an "invalid_request" error (Section 3.6). | error (Section 3.6). | |||
The following non-normative example shows a request for two separate | The following non-normative example shows a request for two separate | |||
access tokens, token1 and token2. | access tokens: token1 and token2. | |||
"access_token": [ | "access_token": [ | |||
{ | { | |||
"label": "token1", | "label": "token1", | |||
"access": [ | "access": [ | |||
{ | { | |||
"type": "photo-api", | "type": "photo-api", | |||
"actions": [ | "actions": [ | |||
"read", | "read", | |||
"write", | "write", | |||
skipping to change at page 41, line 4 ¶ | skipping to change at line 1757 ¶ | |||
"datatypes": [ | "datatypes": [ | |||
"data", | "data", | |||
"pictures", | "pictures", | |||
"walrus whiskers" | "walrus whiskers" | |||
] | ] | |||
} | } | |||
], | ], | |||
"flags": [ "bearer" ] | "flags": [ "bearer" ] | |||
} | } | |||
] | ] | |||
All approved access requests are returned in the multiple access | ||||
token response (Section 3.2.2) structure using the values of the | All approved access requests are returned in the response structure | |||
for multiple access tokens (Section 3.2.2) using the values of the | ||||
label fields in the request. | label fields in the request. | |||
2.2. Requesting Subject Information | 2.2. Requesting Subject Information | |||
If the client instance is requesting information about the RO from | If the client instance is requesting information about the RO from | |||
the AS, it sends a subject field as a JSON object. This object MAY | the AS, it sends a subject field as a JSON object. This object MAY | |||
contain the following fields. | contain the following fields. | |||
sub_id_formats (array of strings): An array of subject identifier | sub_id_formats (array of strings): An array of Subject Identifier | |||
subject formats requested for the RO, as defined by [RFC9493]. | subject formats requested for the RO, as defined by [RFC9493]. | |||
REQUIRED if subject identifiers are requested. | REQUIRED if Subject Identifiers are requested. | |||
assertion_formats (array of strings): An array of requested | assertion_formats (array of strings): An array of requested | |||
assertion formats. Possible values include id_token for an OpenID | assertion formats. Possible values include id_token for an OpenID | |||
Connect ID Token ([OIDC]) and saml2 for a SAML 2 assertion | Connect ID Token [OIDC] and saml2 for a Security Assertion Markup | |||
([SAML2]). Additional assertion formats are defined by the GNAP | Language (SAML) 2 assertion [SAML2]. Additional assertion formats | |||
Assertion Formats Registry (Section 11.6). REQUIRED if assertions | can be defined in the "GNAP Assertion Formats" registry | |||
are requested. | (Section 10.6). REQUIRED if assertions are requested. | |||
sub_ids (array of objects): An array of subject identifiers | sub_ids (array of objects): An array of Subject Identifiers | |||
representing the subject for which information is being requested. | representing the subject for which information is being requested. | |||
Each object is a subject identifier as defined by [RFC9493]. All | Each object is a Subject Identifier as defined by [RFC9493]. All | |||
identifiers in the sub_ids array MUST identify the same subject. | identifiers in the sub_ids array MUST identify the same subject. | |||
If omitted, the AS SHOULD assume that subject information requests | If omitted, the AS SHOULD assume that subject information requests | |||
are about the current user and SHOULD require direct interaction | are about the current user and SHOULD require direct interaction | |||
or proof of presence before releasing information. OPTIONAL. | or proof of presence before releasing information. OPTIONAL. | |||
Additional fields are defined in the GNAP Subject Information Request | Additional fields can be defined in the "GNAP Subject Information | |||
Fields Registry (Section 11.5). | Request Fields" registry (Section 10.5). | |||
"subject": { | "subject": { | |||
"sub_id_formats": [ "iss_sub", "opaque" ], | "sub_id_formats": [ "iss_sub", "opaque" ], | |||
"assertion_formats": [ "id_token", "saml2" ] | "assertion_formats": [ "id_token", "saml2" ] | |||
} | } | |||
The AS can determine the RO's identity and permission for releasing | The AS can determine the RO's identity and permission for releasing | |||
this information through interaction with the RO (Section 4), AS | this information through interaction with the RO (Section 4), AS | |||
policies, or assertions presented by the client instance | policies, or assertions presented by the client instance | |||
(Section 2.4). If this is determined positively, the AS MAY return | (Section 2.4). If this is determined positively, the AS MAY return | |||
the RO's information in its response (Section 3.4) as requested. | the RO's information in its response (Section 3.4) as requested. | |||
Subject identifier types requested by the client instance serve only | Subject Identifier types requested by the client instance serve only | |||
to identify the RO in the context of the AS and can't be used as | to identify the RO in the context of the AS and can't be used as | |||
communication channels by the client instance, as discussed in | communication channels by the client instance, as discussed in | |||
Section 3.4. | Section 3.4. | |||
2.3. Identifying the Client Instance | 2.3. Identifying the Client Instance | |||
When sending new grant request to the AS, the client instance MUST | When sending a new grant request to the AS, the client instance MUST | |||
identify itself by including its client information in the client | identify itself by including its client information in the client | |||
field of the request and by signing the request with its unique key | field of the request and by signing the request with its unique key | |||
as described in Section 7.3. Note that once a grant has been created | as described in Section 7.3. Note that once a grant has been created | |||
and is in the _pending_ or _accepted_ states, the AS can determine | and is in either the _pending_ or the _approved_ state, the AS can | |||
which client is associated with the grant by dereferencing the | determine which client is associated with the grant by dereferencing | |||
continuation access token sent in the continuation request | the continuation access token sent in the continuation request | |||
(Section 5). As a consequence, the client field is not sent or | (Section 5). As a consequence, the client field is not sent or | |||
accepted for continuation requests. | accepted for continuation requests. | |||
Client information is sent by value as an object or by reference as a | Client information is sent by value as an object or by reference as a | |||
string (see Section 2.3.1). | string (see Section 2.3.1). | |||
When client instance information is sent by value, the client field | When client instance information is sent by value, the client field | |||
of the request consists of a JSON object with the following fields. | of the request consists of a JSON object with the following fields. | |||
key (object / string): The public key of the client instance to be | key (object / string): The public key of the client instance to be | |||
used in this request as described in Section 7.1 or a reference to | used in this request as described in Section 7.1 or a reference to | |||
a key as described in Section 7.1.1. REQUIRED. | a key as described in Section 7.1.1. REQUIRED. | |||
class_id (string): An identifier string that the AS can use to | class_id (string): An identifier string that the AS can use to | |||
identify the client software comprising this client instance. The | identify the client software comprising this client instance. The | |||
contents and format of this field are up to the AS. OPTIONAL. | contents and format of this field are up to the AS. OPTIONAL. | |||
display (object): An object containing additional information that | display (object): An object containing additional information that | |||
the AS MAY display to the RO during interaction, authorization, | the AS MAY display to the RO during interaction, authorization, | |||
and management. OPTIONAL. (Section 2.3.2) | and management. OPTIONAL. See Section 2.3.2. | |||
"client": { | "client": { | |||
"key": { | "key": { | |||
"proof": "httpsig", | "proof": "httpsig", | |||
"jwk": { | "jwk": { | |||
"kty": "RSA", | "kty": "RSA", | |||
"e": "AQAB", | "e": "AQAB", | |||
"kid": "xyz-1", | "kid": "xyz-1", | |||
"alg": "RS256", | "alg": "RS256", | |||
"n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8..." | "n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8..." | |||
} | } | |||
}, | }, | |||
"class_id": "web-server-1234", | "class_id": "web-server-1234", | |||
"display": { | "display": { | |||
"name": "My Client Display Name", | "name": "My Client Display Name", | |||
"uri": "https://example.net/client" | "uri": "https://example.net/client" | |||
} | } | |||
} | } | |||
Additional fields are defined in the GNAP Client Instance Fields | ||||
Registry (Section 11.7). | Additional fields can be defined in the "GNAP Client Instance Fields" | |||
registry (Section 10.7). | ||||
Absent additional attestations, profiles, or trust mechanisms, both | Absent additional attestations, profiles, or trust mechanisms, both | |||
the display and class_id fields are self-declarative, presented by | the display and class_id fields are self-declarative, presented by | |||
the client instance. The AS needs to exercise caution in their | the client instance. The AS needs to exercise caution in their | |||
interpretation, taking them as a hint but not as absolute truth. The | interpretation, taking them as a hint but not as absolute truth. The | |||
class_id field can be used in a variety of ways to help the AS make | class_id field can be used in a variety of ways to help the AS make | |||
sense of the particular context in which the client instance is | sense of the particular context in which the client instance is | |||
operating. In corporate environments, for example, different levels | operating. In corporate environments, for example, different levels | |||
of trust might apply depending on security policies. This field aims | of trust might apply depending on security policies. This field aims | |||
to help the AS adjust its own access decisions for different classes | to help the AS adjust its own access decisions for different classes | |||
of client software. It is possible to configure a set of values and | of client software. It is possible to configure a set of values and | |||
rules during a pre-registration, and then have the client instances | rules during a pre-registration and then have the client instances | |||
provide them later in runtime as a hint to the AS. In other cases, | provide them later in runtime as a hint to the AS. In other cases, | |||
the client runs with a specific AS in mind, so a single hardcoded | the client runs with a specific AS in mind, so a single hardcoded | |||
value would acceptable (for instance, a set top box with a class_id | value would be acceptable (for instance, a set-top box with a | |||
claiming to be "FooBarTV version 4"). While the client instance may | class_id claiming to be "FooBarTV version 4"). While the client | |||
not have contacted the AS yet, the value of this class_id field can | instance may not have contacted the AS yet, the value of this | |||
be evaluated by the AS according to a broader context of dynamic use, | class_id field can be evaluated by the AS according to a broader | |||
alongside other related information available elsewhere (for | context of dynamic use, alongside other related information available | |||
instance, corresponding fields in a certificate). If the AS is not | elsewhere (for instance, corresponding fields in a certificate). If | |||
able to interpret or validate the class_id field, it MUST either | the AS is not able to interpret or validate the class_id field, it | |||
return an invalid_client error (Section 3.6) or interpret the request | MUST either return an invalid_client error (Section 3.6) or interpret | |||
as if the class_id were not present. See additional discussion of | the request as if the class_id were not present. See additional | |||
client instance impersonation in Section 13.15. | discussion of client instance impersonation in Section 11.15. | |||
The client instance MUST prove possession of any presented key by the | The client instance MUST prove possession of any presented key by the | |||
proof mechanism associated with the key in the request. Key proofing | proofing mechanism associated with the key in the request. Key | |||
methods are defined in the GNAP Key Proofing Methods Registry | proofing methods are defined in the "GNAP Key Proofing Methods" | |||
(Section 11.16) and an initial set of methods is described in | registry (Section 10.16), and an initial set of methods is described | |||
Section 7.3. | in Section 7.3. | |||
If the same public key is sent by value on different access requests, | If the same public key is sent by value on different access requests, | |||
the AS MUST treat these requests as coming from the same client | the AS MUST treat these requests as coming from the same client | |||
instance for purposes of identification, authentication, and policy | instance for purposes of identification, authentication, and policy | |||
application. | application. | |||
If the AS does not know the client instance's public key ahead of | If the AS does not know the client instance's public key ahead of | |||
time, the AS can choose how to process the unknown key. Common | time, the AS can choose how to process the unknown key. Common | |||
approaches include: | approaches include: | |||
skipping to change at page 44, line 11 ¶ | skipping to change at line 1908 ¶ | |||
* Limiting the client's requested access to only certain APIs and | * Limiting the client's requested access to only certain APIs and | |||
information | information | |||
* Denying the request entirely by returning an invalid_client error | * Denying the request entirely by returning an invalid_client error | |||
(Section 3.6) | (Section 3.6) | |||
The client instance MUST NOT send a symmetric key by value in the key | The client instance MUST NOT send a symmetric key by value in the key | |||
field of the request, as doing so would expose the key directly | field of the request, as doing so would expose the key directly | |||
instead of simply proving possession of it. See considerations on | instead of simply proving possession of it. See considerations on | |||
symmetric keys in Section 13.7. To use symmetric keys, the client | symmetric keys in Section 11.7. To use symmetric keys, the client | |||
instance can send the key by reference (Section 7.1.1) or send the | instance can send the key by reference (Section 7.1.1) or send the | |||
entire client identity by reference (Section 2.3.1). | entire client identity by reference (Section 2.3.1). | |||
The client instance's key can be pre-registered with the AS ahead of | The client instance's key can be pre-registered with the AS ahead of | |||
time and associated with a set of policies and allowable actions | time and associated with a set of policies and allowable actions | |||
pertaining to that client. If this pre-registration includes other | pertaining to that client. If this pre-registration includes other | |||
fields that can occur in the client request object described in this | fields that can occur in the client request object described in this | |||
section, such as class_id or display, the pre-registered values MUST | section, such as class_id or display, the pre-registered values MUST | |||
take precedence over any values given at runtime. Additional fields | take precedence over any values given at runtime. Additional fields | |||
sent during a request but not present in a pre-registered client | sent during a request but not present in a pre-registered client | |||
instance record at the AS SHOULD NOT be added to the client's pre- | instance record at the AS SHOULD NOT be added to the client's pre- | |||
registered record. See additional considerations regarding client | registered record. See additional considerations regarding client | |||
instance impersonation in Section 13.15. | instance impersonation in Section 11.15. | |||
A client instance that is capable of talking to multiple AS's SHOULD | A client instance that is capable of talking to multiple ASes SHOULD | |||
use a different key for each AS to prevent a class of mix-up attacks | use a different key for each AS to prevent a class of mix-up attacks | |||
as described in Section 13.31 unless other mechanisms can be used to | as described in Section 11.31, unless other mechanisms can be used to | |||
assure the identity of the AS for a given request. | assure the identity of the AS for a given request. | |||
2.3.1. Identifying the Client Instance by Reference | 2.3.1. Identifying the Client Instance by Reference | |||
If the client instance has an instance identifier that the AS can use | If the client instance has an instance identifier that the AS can use | |||
to determine appropriate key information, the client instance can | to determine appropriate key information, the client instance can | |||
send this instance identifier as a direct reference value in lieu of | send this instance identifier as a direct reference value in lieu of | |||
the client object. The instance identifier MAY be assigned to a | the client object. The instance identifier MAY be assigned to a | |||
client instance at runtime through a grant response (Section 3.5) or | client instance at runtime through a grant response (Section 3.5) or | |||
MAY be obtained in another fashion, such as a static registration | MAY be obtained in another fashion, such as a static registration | |||
skipping to change at page 45, line 17 ¶ | skipping to change at line 1959 ¶ | |||
If the client instance has additional information to display to the | If the client instance has additional information to display to the | |||
RO during any interactions at the AS, it MAY send that information in | RO during any interactions at the AS, it MAY send that information in | |||
the "display" field. This field is a JSON object that declares | the "display" field. This field is a JSON object that declares | |||
information to present to the RO during any interactive sequences. | information to present to the RO during any interactive sequences. | |||
name (string): Display name of the client software. RECOMMENDED. | name (string): Display name of the client software. RECOMMENDED. | |||
uri (string): User-facing information about the client software, | uri (string): User-facing information about the client software, | |||
such as a web page. This URI MUST be an absolute URI. OPTIONAL. | such as a web page. This URI MUST be an absolute URI. OPTIONAL. | |||
logo_uri (string) Display image to represent the client software. | logo_uri (string): Display image to represent the client software. | |||
This URI MUST be an absolute URI. The logo MAY be passed by value | This URI MUST be an absolute URI. The logo MAY be passed by value | |||
by using a data: URI [RFC2397] referencing an image mediatype. | by using a data: URI [RFC2397] referencing an image media type. | |||
OPTIONAL. | OPTIONAL. | |||
"display": { | "display": { | |||
"name": "My Client Display Name", | "name": "My Client Display Name", | |||
"uri": "https://example.net/client", | "uri": "https://example.net/client", | |||
"logo_uri": "data:image/png;base64,Eeww...=" | "logo_uri": "data:image/png;base64,Eeww...=" | |||
} | } | |||
Additional display fields are defined by the GNAP Client Instance | Additional display fields can be defined in the "GNAP Client Instance | |||
Display Fields Registry (Section 11.8). | Display Fields" registry (Section 10.8). | |||
The AS SHOULD use these values during interaction with the RO. The | The AS SHOULD use these values during interaction with the RO. The | |||
values are for informational purposes only and MUST NOT be taken as | values are for informational purposes only and MUST NOT be taken as | |||
authentic proof of the client instance's identity or source. The AS | authentic proof of the client instance's identity or source. The AS | |||
MAY restrict display values to specific client instances, as | MAY restrict display values to specific client instances, as | |||
identified by their keys in Section 2.3. See additional | identified by their keys in Section 2.3. See additional | |||
considerations for displayed client information in Section 13.15 and | considerations for displayed client information in Section 11.15 and | |||
for the logo_uri in particular in Section 13.16. | for the logo_uri in particular in Section 11.16. | |||
2.3.3. Authenticating the Client Instance | 2.3.3. Authenticating the Client Instance | |||
If the presented key is known to the AS and is associated with a | If the presented key is known to the AS and is associated with a | |||
single instance of the client software, the process of presenting a | single instance of the client software, the process of presenting a | |||
key and proving possession of that key is sufficient to authenticate | key and proving possession of that key is sufficient to authenticate | |||
the client instance to the AS. The AS MAY associate policies with | the client instance to the AS. The AS MAY associate policies with | |||
the client instance identified by this key, such as limiting which | the client instance identified by this key, such as limiting which | |||
resources can be requested and which interaction methods can be used. | resources can be requested and which interaction methods can be used. | |||
For example, only specific client instances with certain known keys | For example, only specific client instances with certain known keys | |||
might be trusted with access tokens without the AS interacting | might be trusted with access tokens without the AS interacting | |||
directly with the RO as in Appendix C.3. | directly with the RO, as in Appendix B.3. | |||
The presentation of a key allows the AS to strongly associate | The presentation of a key allows the AS to strongly associate | |||
multiple successive requests from the same client instance with each | multiple successive requests from the same client instance with each | |||
other. This is true when the AS knows the key ahead of time and can | other. This is true when the AS knows the key ahead of time and can | |||
use the key to authenticate the client instance, but also if the key | use the key to authenticate the client instance, but it is also true | |||
is ephemeral and created just for this series of requests. As such | if the key is ephemeral and created just for this series of requests. | |||
the AS MAY allow for client instances to make requests with unknown | As such, the AS MAY allow for client instances to make requests with | |||
keys. This pattern allows for ephemeral client instances, such as | unknown keys. This pattern allows for ephemeral client instances | |||
single-page applications, and client software with many individual | (such as single-page applications) and client software with many | |||
long-lived instances, such as mobile applications, to generate key | individual long-lived instances (such as mobile applications) to | |||
pairs per instance and use the keys within the protocol without | generate key pairs per instance and use the keys within the protocol | |||
having to go through a separate registration step. The AS MAY limit | without having to go through a separate registration step. The AS | |||
which capabilities are made available to client instances with | MAY limit which capabilities are made available to client instances | |||
unknown keys. For example, the AS could have a policy saying that | with unknown keys. For example, the AS could have a policy saying | |||
only previously-registered client instances can request particular | that only previously registered client instances can request | |||
resources, or that all client instances with unknown keys have to be | particular resources or that all client instances with unknown keys | |||
interactively approved by an RO. | have to be interactively approved by an RO. | |||
2.4. Identifying the User | 2.4. Identifying the User | |||
If the client instance knows the identity of the end user through one | If the client instance knows the identity of the end user through one | |||
or more identifiers or assertions, the client instance MAY send that | or more identifiers or assertions, the client instance MAY send that | |||
information to the AS in the "user" field. The client instance MAY | information to the AS in the user field. The client instance MAY | |||
pass this information by value or by reference (See Section 2.4.1). | pass this information by value or by reference (see Section 2.4.1). | |||
sub_ids (array of objects): An array of subject identifiers for the | sub_ids (array of objects): An array of Subject Identifiers for the | |||
end user, as defined by [RFC9493]. OPTIONAL. | end user, as defined by [RFC9493]. OPTIONAL. | |||
assertions (array of objects) An array containing assertions as | assertions (array of objects): An array containing assertions as | |||
objects each containing the assertion format and the assertion | objects, each containing the assertion format and the assertion | |||
value as the JSON string serialization of the assertion, as | value as the JSON string serialization of the assertion, as | |||
defined in Section 3.4. OPTIONAL. | defined in Section 3.4. OPTIONAL. | |||
"user": { | "user": { | |||
"sub_ids": [ { | "sub_ids": [ { | |||
"format": "opaque", | "format": "opaque", | |||
"id": "J2G8G8O4AZ" | "id": "J2G8G8O4AZ" | |||
} ], | } ], | |||
"assertions": [ { | "assertions": [ { | |||
"format": "id_token", | "format": "id_token", | |||
"value": "eyj..." | "value": "eyj..." | |||
} ] | } ] | |||
} | } | |||
Subject identifiers are hints to the AS in determining the RO and | Subject Identifiers are hints to the AS in determining the RO and | |||
MUST NOT be taken as authoritative statements that a particular RO is | MUST NOT be taken as authoritative statements that a particular RO is | |||
present at the client instance and acting as the end user. | present at the client instance and acting as the end user. | |||
Assertions presented by the client instance SHOULD be validated by | Assertions presented by the client instance SHOULD be validated by | |||
the AS. While the details of such validation are outside the scope | the AS. While the details of such validation are outside the scope | |||
of this specification, common validation steps include verifying the | of this specification, common validation steps include verifying the | |||
signature of the assertion against a trusted signing key, verifying | signature of the assertion against a trusted signing key, verifying | |||
the audience and issuer of the assertion map to expected values, and | the audience and issuer of the assertion map to expected values, and | |||
verifying the time window for the assertion itself. However, note | verifying the time window for the assertion itself. However, note | |||
that in many use cases, some of these common steps are relaxed. For | that in many use cases, some of these common steps are relaxed. For | |||
example, an AS acting as an identity provider (IdP) could expect that | example, an AS acting as an identity provider (IdP) could expect that | |||
assertions being presented using this mechanism were issued by the AS | assertions being presented using this mechanism were issued by the AS | |||
to the client software. The AS would verify that the AS is the | to the client software. The AS would verify that the AS is the | |||
issuer of the assertion, not the audience, and that the client | issuer of the assertion, not the audience, and that the client | |||
instance is instead the audience of the assertion. Similarly, an AS | instance is instead the audience of the assertion. Similarly, an AS | |||
might accept a recently-expired assertion in order to help bootstrap | might accept a recently expired assertion in order to help bootstrap | |||
a new session with a specific end user. | a new session with a specific end user. | |||
If the identified end user does not match the RO present at the AS | If the identified end user does not match the RO present at the AS | |||
during an interaction step, and the AS is not explicitly allowing a | during an interaction step and the AS is not explicitly allowing a | |||
cross-user authorization, the AS SHOULD reject the request with an | cross-user authorization, the AS SHOULD reject the request with an | |||
unknown_user error (Section 3.6). | unknown_user error (Section 3.6). | |||
If the AS trusts the client instance to present verifiable assertions | If the AS trusts the client instance to present verifiable assertions | |||
or known subject identifiers, such as an opaque identifier issued by | or known Subject Identifiers, such as an opaque identifier issued by | |||
the AS for this specific client instance, the AS MAY decide, based on | the AS for this specific client instance, the AS MAY decide, based on | |||
its policy, to skip interaction with the RO, even if the client | its policy, to skip interaction with the RO, even if the client | |||
instance provides one or more interaction modes in its request. | instance provides one or more interaction modes in its request. | |||
See Section 13.30 for considerations that the AS has to make when | See Section 11.30 for considerations for the AS when accepting and | |||
accepting and processing assertions from the client instance. | processing assertions from the client instance. | |||
2.4.1. Identifying the User by Reference | 2.4.1. Identifying the User by Reference | |||
The AS can identify the current end user to the client instance with | The AS can identify the current end user to the client instance with | |||
a reference which can be used by the client instance to refer to the | a reference that can be used by the client instance to refer to the | |||
end user across multiple requests. If the client instance has a | end user across multiple requests. If the client instance has a | |||
reference for the end user at this AS, the client instance MAY pass | reference for the end user at this AS, the client instance MAY pass | |||
that reference as a string. The format of this string is opaque to | that reference as a string. The format of this string is opaque to | |||
the client instance. | the client instance. | |||
"user": "XUT2MFM1XBIKJKSDU8QM" | "user": "XUT2MFM1XBIKJKSDU8QM" | |||
One means of dynamically obtaining such a user reference is from the | One means of dynamically obtaining such a user reference is from the | |||
AS returning an opaque subject identifier as described in | AS returning an opaque Subject Identifier as described in | |||
Section 3.4. Other means of configuring a client instance with a | Section 3.4. Other means of configuring a client instance with a | |||
user identifier are out of scope of this specification. The lifetime | user identifier are out of scope of this specification. The lifetime | |||
and validity of these user references is determined by the AS and | and validity of these user references are determined by the AS, and | |||
this lifetime is not exposed to the client instance in GNAP. As | this lifetime is not exposed to the client instance in GNAP. As | |||
such, a client instance using such a user reference is likely to keep | such, a client instance using such a user reference is likely to keep | |||
using that reference until such a time as it stops working. | using that reference until it stops working. | |||
User reference identifiers are not intended to be human-readable user | User reference identifiers are not intended to be human-readable user | |||
identifiers or structured assertions. For the client instance to | identifiers or structured assertions. For the client instance to | |||
send either of these, the client can use the full user request object | send either of these, the client can use the full user request object | |||
(Section 2.4) instead. | (Section 2.4) instead. | |||
If the AS does not recognize the user reference, it MUST return an | If the AS does not recognize the user reference, it MUST return an | |||
unknown_user error (Section 3.6). | unknown_user error (Section 3.6). | |||
2.5. Interacting with the User | 2.5. Interacting with the User | |||
Often, the AS will require interaction with the RO (Section 4) in | Often, the AS will require interaction with the RO (Section 4) in | |||
order to approve a requested delegation to the client instance for | order to approve a requested delegation to the client instance for | |||
both access to resources and direct subject information. Many times | both access to resources and direct subject information. Many times, | |||
the end user using the client instance is the same person as the RO, | the end user using the client instance is the same person as the RO, | |||
and the client instance can directly drive interaction with the end | and the client instance can directly drive interaction with the end | |||
user by facilitating the process through means such as redirection to | user by facilitating the process through means such as redirection to | |||
a URI or launching an application. Other times, the client instance | a URI or launching an application. Other times, the client instance | |||
can provide information to start the RO's interaction on a secondary | can provide information to start the RO's interaction on a secondary | |||
device, or the client instance will wait for the RO to approve the | device, or the client instance will wait for the RO to approve the | |||
request asynchronously. The client instance could also be signaled | request asynchronously. The client instance could also be signaled | |||
that interaction has concluded through a callback mechanism. | that interaction has concluded through a callback mechanism. | |||
The client instance declares the parameters for interaction methods | The client instance declares the parameters for interaction methods | |||
skipping to change at page 48, line 41 ¶ | skipping to change at line 2125 ¶ | |||
declare how the client can initiate and complete the request, as well | declare how the client can initiate and complete the request, as well | |||
as provide hints to the AS about user preferences such as locale. A | as provide hints to the AS about user preferences such as locale. A | |||
client instance MUST NOT declare an interaction mode it does not | client instance MUST NOT declare an interaction mode it does not | |||
support. The client instance MAY send multiple modes in the same | support. The client instance MAY send multiple modes in the same | |||
request. There is no preference order specified in this request. An | request. There is no preference order specified in this request. An | |||
AS MAY respond to any, all, or none of the presented interaction | AS MAY respond to any, all, or none of the presented interaction | |||
modes (Section 3.3) in a request, depending on its capabilities and | modes (Section 3.3) in a request, depending on its capabilities and | |||
what is allowed to fulfill the request. | what is allowed to fulfill the request. | |||
start (array of objects/strings): Indicates how the client instance | start (array of objects/strings): Indicates how the client instance | |||
can start an interaction. REQUIRED. (Section 2.5.1) | can start an interaction. REQUIRED. See Section 2.5.1. | |||
finish (object): Indicates how the client instance can receive an | finish (object): Indicates how the client instance can receive an | |||
indication that interaction has finished at the AS. OPTIONAL. | indication that interaction has finished at the AS. OPTIONAL. | |||
(Section 2.5.2) | See Section 2.5.2. | |||
hints (object): Provides additional information to inform the | hints (object): Provides additional information to inform the | |||
interaction process at the AS. OPTIONAL. (Section 2.5.3) | interaction process at the AS. OPTIONAL. See Section 2.5.3. | |||
In the following non-normative example, the client instance is | In the following non-normative example, the client instance is | |||
indicating that it can redirect (Section 2.5.1.1) the end user to an | indicating that it can redirect (Section 2.5.1.1) the end user to an | |||
arbitrary URI and can receive a redirect (Section 2.5.2.1) through a | arbitrary URI and can receive a redirect (Section 2.5.2.1) through a | |||
browser request. Note that the client instance does not accept a | browser request. Note that the client instance does not accept a | |||
push-style callback. The pattern of using a redirect for both | push-style callback. The pattern of using a redirect for both | |||
interaction start and finish is common for web-based client software. | interaction start and finish is common for web-based client software. | |||
"interact": { | "interact": { | |||
"start": ["redirect"], | "start": ["redirect"], | |||
"finish": { | "finish": { | |||
"method": "redirect", | "method": "redirect", | |||
"uri": "https://client.example.net/return/123455", | "uri": "https://client.example.net/return/123455", | |||
"nonce": "LKLTI25DK82FX4T4QFZC" | "nonce": "LKLTI25DK82FX4T4QFZC" | |||
} | } | |||
} | } | |||
In the following non-normative example, the client instance is | In the following non-normative example, the client instance is | |||
indicating that it can display a user code (Section 2.5.1.3) and | indicating that it can display a user code (Section 2.5.1.3) and | |||
direct the end user to an arbitrary URI (Section 2.5.1.1), but it | direct the end user to an arbitrary URI (Section 2.5.1.1), but it | |||
cannot accept a redirect or push callback. This pattern is common | cannot accept a redirect or push-style callback. This pattern is | |||
for devices with robust display capabilities but that expect the use | common for devices that have robust display capabilities but expect | |||
of a secondary device to facilitate end-user interaction with the AS, | the use of a secondary device to facilitate end-user interaction with | |||
such as a set-top box capable of displaying an interaction URL as a | the AS, such as a set-top box capable of displaying an interaction | |||
QR code. | URL as a QR code. | |||
"interact": { | "interact": { | |||
"start": ["redirect", "user_code"] | "start": ["redirect", "user_code"] | |||
} | } | |||
In the following non-normative example, the client instance is | In the following non-normative example, the client instance is | |||
indicating that it can not start any interaction with the end-user, | indicating that it cannot start any interaction with the end user but | |||
but that the AS can push an interaction finish message | that the AS can push an interaction finish message (Section 2.5.2.2) | |||
(Section 2.5.2.2) when authorization from the RO is received | when authorization from the RO is received asynchronously. This | |||
asynchronously. This pattern is common for scenarios where a service | pattern is common for scenarios where a service needs to be | |||
needs to be authorized, but the RO is able to be contacted separately | authorized, but the RO is able to be contacted separately from the | |||
from the GNAP transaction itself, such as through a push notification | GNAP transaction itself, such as through a push notification or | |||
or existing interactive session on a secondary device. | existing interactive session on a secondary device. | |||
"interact": { | "interact": { | |||
"start": [], | "start": [], | |||
"finish": { | "finish": { | |||
"method": "push", | "method": "push", | |||
"uri": "https://client.example.net/return/123455", | "uri": "https://client.example.net/return/123455", | |||
"nonce": "LKLTI25DK82FX4T4QFZC" | "nonce": "LKLTI25DK82FX4T4QFZC" | |||
} | } | |||
} | } | |||
If the client instance does not provide a suitable interaction | ||||
mechanism, the AS cannot contact the RO asynchronously, and the AS | If all of the following conditions are true, the AS MUST return an | |||
determines that interaction is required, then the AS MUST return an | ||||
invalid_interaction error (Section 3.6) since the client instance | invalid_interaction error (Section 3.6) since the client instance | |||
will be unable to complete the request without authorization. | will be unable to complete the request without authorization: | |||
* The client instance does not provide a suitable interaction | ||||
mechanism. | ||||
* The AS cannot contact the RO asynchronously. | ||||
* The AS determines that interaction is required. | ||||
2.5.1. Start Mode Definitions | 2.5.1. Start Mode Definitions | |||
If the client instance is capable of starting interaction with the | If the client instance is capable of starting interaction with the | |||
end user, the client instance indicates this by sending an array of | end user, the client instance indicates this by sending an array of | |||
start modes under the start key. Each interaction start modes has a | start modes under the start key. Each interaction start mode has a | |||
unique identifying name. Interaction start modes are specified in | unique identifying name. Interaction start modes are specified in | |||
the array either by a string, which consists of the start mode name | the array either by a string, which consists of the start mode name | |||
on its own, or by a JSON object with the required field mode: | on its own, or by a JSON object with the required field mode: | |||
mode: The interaction start mode. REQUIRED. | mode: The interaction start mode. REQUIRED. | |||
Interaction start modes defined as objects MAY define additional | Interaction start modes defined as objects MAY define additional | |||
parameters to be required in the object. | parameters to be required in the object. | |||
The start array can contain both string-type and object-type modes. | The start array can contain both string-type and object-type modes. | |||
This specification defines the following interaction start modes: | This specification defines the following interaction start modes: | |||
"redirect" (string): Indicates that the client instance can direct | "redirect" (string): Indicates that the client instance can direct | |||
the end user to an arbitrary URI for interaction. Section 2.5.1.1 | the end user to an arbitrary URI for interaction. See | |||
Section 2.5.1.1. | ||||
"app" (string): Indicates that the client instance can launch an | "app" (string): Indicates that the client instance can launch an | |||
application on the end user's device for interaction. | application on the end user's device for interaction. See | |||
Section 2.5.1.2 | Section 2.5.1.2. | |||
"user_code" (string): Indicates that the client instance can | "user_code" (string): Indicates that the client instance can | |||
communicate a human-readable short code to the end user for use | communicate a short, human-readable code to the end user for use | |||
with a stable URI. Section 2.5.1.3 | with a stable URI. See Section 2.5.1.3. | |||
"user_code_uri" (string): Indicates that the client instance can | "user_code_uri" (string): Indicates that the client instance can | |||
communicate a human-readable short code to the end user for use | communicate a short, human-readable code to the end user for use | |||
with a short, dynamic URI. Section 2.5.1.4 | with a short, dynamic URI. See Section 2.5.1.4. | |||
Additional start modes are defined in the GNAP Interaction Start | Additional start modes can be defined in the "GNAP Interaction Start | |||
Modes Registry (Section 11.9). | Modes" registry (Section 10.9). | |||
2.5.1.1. Redirect to an Arbitrary URI | 2.5.1.1. Redirect to an Arbitrary URI | |||
If the client instance is capable of directing the end user to a URI | If the client instance is capable of directing the end user to a URI | |||
defined by the AS at runtime, the client instance indicates this by | defined by the AS at runtime, the client instance indicates this by | |||
including redirect in the array under the start key. The means by | including redirect in the array under the start key. The means by | |||
which the client instance will activate this URI is out of scope of | which the client instance will activate this URI are out of scope of | |||
this specification, but common methods include an HTTP redirect, | this specification, but common methods include an HTTP redirect, | |||
launching a browser on the end user's device, providing a scannable | launching a browser on the end user's device, providing a scannable | |||
image encoding, and printing out a URI to an interactive console. | image encoding, and printing out a URI to an interactive console. | |||
While this URI is generally hosted at the AS, the client instance can | While this URI is generally hosted at the AS, the client instance can | |||
make no assumptions about its contents, composition, or relationship | make no assumptions about its contents, composition, or relationship | |||
to the grant endpoint URI. | to the grant endpoint URI. | |||
"interact": { | "interact": { | |||
"start": ["redirect"] | "start": ["redirect"] | |||
} | } | |||
If this interaction mode is supported for this client instance and | If this interaction mode is supported for this client instance and | |||
request, the AS returns a redirect interaction response | request, the AS returns a redirect interaction response | |||
Section 3.3.1. The client instance manages this interaction method | (Section 3.3.1). The client instance manages this interaction method | |||
as described in Section 4.1.1. | as described in Section 4.1.1. | |||
See Section 13.29 for more considerations regarding the use of front- | See Section 11.29 for more considerations regarding the use of front- | |||
channel communication techniques. | channel communication techniques. | |||
2.5.1.2. Open an Application-specific URI | 2.5.1.2. Open an Application-Specific URI | |||
If the client instance can open a URI associated with an application | If the client instance can open a URI associated with an application | |||
on the end user's device, the client instance indicates this by | on the end user's device, the client instance indicates this by | |||
including app in the array under the start key. The means by which | including app in the array under the start key. The means by which | |||
the client instance determines the application to open with this URI | the client instance determines the application to open with this URI | |||
are out of scope of this specification. | are out of scope of this specification. | |||
"interact": { | "interact": { | |||
"start": ["app"] | "start": ["app"] | |||
} | } | |||
skipping to change at page 52, line 12 ¶ | skipping to change at line 2278 ¶ | |||
payload (Section 3.3.2). The client instance manages this | payload (Section 3.3.2). The client instance manages this | |||
interaction method as described in Section 4.1.4. | interaction method as described in Section 4.1.4. | |||
2.5.1.3. Display a Short User Code | 2.5.1.3. Display a Short User Code | |||
If the client instance is capable of displaying or otherwise | If the client instance is capable of displaying or otherwise | |||
communicating a short, human-entered code to the RO, the client | communicating a short, human-entered code to the RO, the client | |||
instance indicates this by including user_code in the array under the | instance indicates this by including user_code in the array under the | |||
start key. This code is to be entered at a static URI that does not | start key. This code is to be entered at a static URI that does not | |||
change at runtime. The client instance has no reasonable means to | change at runtime. The client instance has no reasonable means to | |||
communicate a dynamic URI to the RO, and so this URI is usually | communicate a dynamic URI to the RO, so this URI is usually | |||
communicated out of band to the RO through documentation or other | communicated out of band to the RO through documentation or other | |||
messaging outside of GNAP. While this URI is generally hosted at the | messaging outside of GNAP. While this URI is generally hosted at the | |||
AS, the client instance can make no assumptions about its contents, | AS, the client instance can make no assumptions about its contents, | |||
composition, or relationship to the grant endpoint URI. | composition, or relationship to the grant endpoint URI. | |||
"interact": { | "interact": { | |||
"start": ["user_code"] | "start": ["user_code"] | |||
} | } | |||
If this interaction mode is supported for this client instance and | If this interaction mode is supported for this client instance and | |||
skipping to change at page 53, line 8 ¶ | skipping to change at line 2323 ¶ | |||
2.5.2. Interaction Finish Methods | 2.5.2. Interaction Finish Methods | |||
If the client instance is capable of receiving a message from the AS | If the client instance is capable of receiving a message from the AS | |||
indicating that the RO has completed their interaction, the client | indicating that the RO has completed their interaction, the client | |||
instance indicates this by sending the following members of an object | instance indicates this by sending the following members of an object | |||
under the finish key. | under the finish key. | |||
method (string): The callback method that the AS will use to contact | method (string): The callback method that the AS will use to contact | |||
the client instance. REQUIRED. | the client instance. REQUIRED. | |||
uri (string): Indicates the URI that the AS will either send the RO | uri (string): Indicates the URI that the AS will use to signal the | |||
to after interaction or send an HTTP POST request. This URI MAY | client instance that interaction has completed. This URI MAY be | |||
be unique per request and MUST be hosted by or accessible by the | unique per request and MUST be hosted by or accessible to the | |||
client instance. This URI MUST be an absolute URI, and MUST NOT | client instance. This URI MUST be an absolute URI and MUST NOT | |||
contain any fragment component. If the client instance needs any | contain any fragment component. If the client instance needs any | |||
state information to tie to the front channel interaction | state information to tie to the front-channel interaction | |||
response, it MUST use a unique callback URI to link to that | response, it MUST use a unique callback URI to link to that | |||
ongoing state. The allowable URIs and URI patterns MAY be | ongoing state. The allowable URIs and URI patterns MAY be | |||
restricted by the AS based on the client instance's presented key | restricted by the AS based on the client instance's presented key | |||
information. The callback URI SHOULD be presented to the RO | information. The callback URI SHOULD be presented to the RO | |||
during the interaction phase before redirect. REQUIRED for | during the interaction phase before redirect. REQUIRED for | |||
redirect and push methods. | redirect and push methods. | |||
nonce (string): Unique ASCII string value to be used in the | nonce (string): Unique ASCII string value to be used in the | |||
calculation of the "hash" query parameter sent to the callback | calculation of the "hash" query parameter sent to the callback | |||
URI, must be sufficiently random to be unguessable by an attacker. | URI. It must be sufficiently random to be unguessable by an | |||
MUST be generated by the client instance as a unique value for | attacker. It MUST be generated by the client instance as a unique | |||
this request. REQUIRED. | value for this request. REQUIRED. | |||
hash_method (string): An identifier of a hash calculation mechanism | hash_method (string): An identifier of a hash calculation mechanism | |||
to be used for the callback hash in Section 4.2.3, as defined in | to be used for the callback hash in Section 4.2.3, as defined in | |||
the IANA Named Information Hash Algorithm Registry [HASH-ALG]. If | the IANA "Named Information Hash Algorithm Registry" [HASH-ALG]. | |||
absent, the default value is sha-256. OPTIONAL. | If absent, the default value is sha-256. OPTIONAL. | |||
This specification defines the following values for the method | This specification defines the following values for the method | |||
parameter, with other values defined by the GNAP Interaction Finish | parameter; additional values can be defined in the "GNAP Interaction | |||
Methods Registry (Section 11.10): | Finish Methods" registry (Section 10.10): | |||
"redirect": Indicates that the client instance can receive a | "redirect": Indicates that the client instance can receive a | |||
redirect from the end user's device after interaction with the RO | redirect from the end user's device after interaction with the RO | |||
has concluded. Section 2.5.2.1 | has concluded. See Section 2.5.2.1. | |||
"push": Indicates that the client instance can receive an HTTP POST | "push": Indicates that the client instance can receive an HTTP POST | |||
request from the AS after interaction with the RO has concluded. | request from the AS after interaction with the RO has concluded. | |||
Section 2.5.2.2 | See Section 2.5.2.2. | |||
If interaction finishing is supported for this client instance and | If interaction finishing is supported for this client instance and | |||
request, the AS will return a nonce (Section 3.3.5) used by the | request, the AS will return a nonce (Section 3.3.5) used by the | |||
client instance to validate the callback. All interaction finish | client instance to validate the callback. All interaction finish | |||
methods MUST use this nonce to allow the client to verify the | methods MUST use this nonce to allow the client to verify the | |||
connection between the pending interaction request and the callback. | connection between the pending interaction request and the callback. | |||
GNAP does this through the use of the interaction hash, defined in | GNAP does this through the use of the interaction hash, defined in | |||
Section 4.2.3. All requests to the callback URI MUST be processed as | Section 4.2.3. All requests to the callback URI MUST be processed as | |||
described in Section 4.2. | described in Section 4.2. | |||
All interaction finish methods MUST require presentation of an | All interaction finish methods MUST require presentation of an | |||
interaction reference for continuing this grant request. This means | interaction reference for continuing this grant request. This means | |||
that the interaction reference MUST be returned by the AS and MUST be | that the interaction reference MUST be returned by the AS and MUST be | |||
presented by the client as described in Section 5.1. The means by | presented by the client as described in Section 5.1. The means by | |||
which the interaction reference is returned to the client instance is | which the interaction reference is returned to the client instance | |||
specific to the interaction finish method. | are specific to the interaction finish method. | |||
2.5.2.1. Receive an HTTP Callback Through the Browser | 2.5.2.1. Receive an HTTP Callback through the Browser | |||
A finish method value of redirect indicates that the client instance | A finish method value of redirect indicates that the client instance | |||
will expect a request from the RO's browser using the HTTP method GET | will expect a request from the RO's browser using the HTTP method GET | |||
as described in Section 4.2.1. | as described in Section 4.2.1. | |||
The client instance's URI MUST be protected by HTTPS, be hosted on a | The client instance's URI MUST be protected by HTTPS, be hosted on a | |||
server local to the RO's browser ("localhost"), or use an | server local to the RO's browser ("localhost"), or use an | |||
application-specific URI scheme that is loaded on the end user's | application-specific URI scheme that is loaded on the end user's | |||
device. | device. | |||
skipping to change at page 54, line 36 ¶ | skipping to change at line 2399 ¶ | |||
"uri": "https://client.example.net/return/123455", | "uri": "https://client.example.net/return/123455", | |||
"nonce": "LKLTI25DK82FX4T4QFZC" | "nonce": "LKLTI25DK82FX4T4QFZC" | |||
} | } | |||
} | } | |||
Requests to the callback URI MUST be processed by the client instance | Requests to the callback URI MUST be processed by the client instance | |||
as described in Section 4.2.1. | as described in Section 4.2.1. | |||
Since the incoming request to the callback URI is from the RO's | Since the incoming request to the callback URI is from the RO's | |||
browser, this method is usually used when the RO and end user are the | browser, this method is usually used when the RO and end user are the | |||
same entity. See Section 13.24 for considerations on ensuring the | same entity. See Section 11.24 for considerations on ensuring the | |||
incoming HTTP message matches the expected context of the request. | incoming HTTP message matches the expected context of the request. | |||
See Section 13.29 for more considerations regarding the use of front- | See Section 11.29 for more considerations regarding the use of front- | |||
channel communication techniques. | channel communication techniques. | |||
2.5.2.2. Receive an HTTP Direct Callback | 2.5.2.2. Receive an HTTP Direct Callback | |||
A finish method value of push indicates that the client instance will | A finish method value of push indicates that the client instance will | |||
expect a request from the AS directly using the HTTP method POST as | expect a request from the AS directly using the HTTP method POST as | |||
described in Section 4.2.2. | described in Section 4.2.2. | |||
The client instance's URI MUST be protected by HTTPS, be hosted on a | The client instance's URI MUST be protected by HTTPS, be hosted on a | |||
server local to the RO's browser ("localhost"), or use an | server local to the RO's browser ("localhost"), or use an | |||
skipping to change at page 55, line 18 ¶ | skipping to change at line 2428 ¶ | |||
"uri": "https://client.example.net/return/123455", | "uri": "https://client.example.net/return/123455", | |||
"nonce": "LKLTI25DK82FX4T4QFZC" | "nonce": "LKLTI25DK82FX4T4QFZC" | |||
} | } | |||
} | } | |||
Requests to the callback URI MUST be processed by the client instance | Requests to the callback URI MUST be processed by the client instance | |||
as described in Section 4.2.2. | as described in Section 4.2.2. | |||
Since the incoming request to the callback URI is from the AS and not | Since the incoming request to the callback URI is from the AS and not | |||
from the RO's browser, this request is not expected to have any | from the RO's browser, this request is not expected to have any | |||
shared session information from the start method. See Section 13.24 | shared session information from the start method. See Sections 11.24 | |||
and Section 13.23 for more considerations regarding the use of back- | and 11.23 for more considerations regarding the use of back-channel | |||
channel and polling mechanisms like this. | and polling mechanisms like this. | |||
2.5.3. Hints | 2.5.3. Hints | |||
The hints key is an object describing one or more suggestions from | The hints key is an object describing one or more suggestions from | |||
the client instance that the AS can use to help drive user | the client instance that the AS can use to help drive user | |||
interaction. | interaction. | |||
This specification defines the following properties under the hints | This specification defines the following property under the hints | |||
key: | key: | |||
ui_locales (array of strings): Indicates the end user's preferred | ui_locales (array of strings): Indicates the end user's preferred | |||
locales that the AS can use during interaction, particularly | locales that the AS can use during interaction, particularly | |||
before the RO has authenticated. OPTIONAL. Section 2.5.3.1 | before the RO has authenticated. OPTIONAL. Section 2.5.3.1 | |||
The following sections detail requests for interaction hints. | The following subsection details requests for interaction hints. | |||
Additional interaction hints are defined in the GNAP Interaction | Additional interaction hints can be defined in the "GNAP Interaction | |||
Hints Registry (Section 11.11). | Hints" registry (Section 10.11). | |||
2.5.3.1. Indicate Desired Interaction Locales | 2.5.3.1. Indicate Desired Interaction Locales | |||
If the client instance knows the end user's locale and language | If the client instance knows the end user's locale and language | |||
preferences, the client instance can send this information to the AS | preferences, the client instance can send this information to the AS | |||
using the ui_locales field with an array of locale strings as defined | using the ui_locales field with an array of locale strings as defined | |||
by [RFC5646]. | by [RFC5646]. | |||
"interact": { | "interact": { | |||
"hints": { | "hints": { | |||
skipping to change at page 56, line 4 ¶ | skipping to change at line 2461 ¶ | |||
If the client instance knows the end user's locale and language | If the client instance knows the end user's locale and language | |||
preferences, the client instance can send this information to the AS | preferences, the client instance can send this information to the AS | |||
using the ui_locales field with an array of locale strings as defined | using the ui_locales field with an array of locale strings as defined | |||
by [RFC5646]. | by [RFC5646]. | |||
"interact": { | "interact": { | |||
"hints": { | "hints": { | |||
"ui_locales": ["en-US", "fr-CA"] | "ui_locales": ["en-US", "fr-CA"] | |||
} | } | |||
} | } | |||
If possible, the AS SHOULD use one of the locales in the array, with | If possible, the AS SHOULD use one of the locales in the array, with | |||
preference to the first item in the array supported by the AS. If | preference to the first item in the array supported by the AS. If | |||
none of the given locales are supported, the AS MAY use a default | none of the given locales are supported, the AS MAY use a default | |||
locale. | locale. | |||
3. Grant Response | 3. Grant Response | |||
In response to a client instance's request, the AS responds with a | In response to a client instance's request, the AS responds with a | |||
JSON object as the HTTP content. Each possible field is detailed in | JSON object as the HTTP content. Each possible field is detailed in | |||
the sections below. | the subsections below. | |||
continue (object): Indicates that the client instance can continue | continue (object): Indicates that the client instance can continue | |||
the request by making one or more continuation requests. REQUIRED | the request by making one or more continuation requests. REQUIRED | |||
if continuation calls are allowed for this client instance on this | if continuation calls are allowed for this client instance on this | |||
grant request. See Section 3.1. | grant request. See Section 3.1. | |||
access_token (object / array of objects): A single access token or | access_token (object / array of objects): A single access token or | |||
set of access tokens that the client instance can use to call the | set of access tokens that the client instance can use to call the | |||
RS on behalf of the RO. REQUIRED if an access token is included. | RS on behalf of the RO. REQUIRED if an access token is included. | |||
See Section 3.2. | See Section 3.2. | |||
skipping to change at page 56, line 41 ¶ | skipping to change at line 2499 ¶ | |||
Section 3.4. | Section 3.4. | |||
instance_id (string): An identifier this client instance can use to | instance_id (string): An identifier this client instance can use to | |||
identify itself when making future requests. OPTIONAL. See | identify itself when making future requests. OPTIONAL. See | |||
Section 3.5. | Section 3.5. | |||
error (object or string): An error code indicating that something | error (object or string): An error code indicating that something | |||
has gone wrong. REQUIRED for an error condition. See | has gone wrong. REQUIRED for an error condition. See | |||
Section 3.6. | Section 3.6. | |||
Additional fields can be defined by extensions to GNAP in the GNAP | Additional fields can be defined by extensions to GNAP in the "GNAP | |||
Grant Response Parameters Registry (Section 11.12). | Grant Response Parameters" registry (Section 10.12). | |||
In the following non-normative example, the AS is returning an | In the following non-normative example, the AS is returning an | |||
interaction URI (Section 3.3.1), a callback nonce (Section 3.3.5), | interaction URI (Section 3.3.1), a callback nonce (Section 3.3.5), | |||
and a continuation response (Section 3.1). | and a continuation response (Section 3.1). | |||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
{ | { | |||
"interact": { | "interact": { | |||
"redirect": "https://server.example.com/interact/4CF492ML\ | "redirect": "https://server.example.com/interact/4CF492ML\ | |||
skipping to change at page 57, line 22 ¶ | skipping to change at line 2523 ¶ | |||
}, | }, | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "80UPRY5NM33OMUKMKSKU", | "value": "80UPRY5NM33OMUKMKSKU", | |||
}, | }, | |||
"uri": "https://server.example.com/tx" | "uri": "https://server.example.com/tx" | |||
} | } | |||
} | } | |||
In the following non-normative example, the AS is returning a bearer | In the following non-normative example, the AS is returning a bearer | |||
access token (Section 3.2.1) with a management URI and a subject | access token (Section 3.2.1) with a management URI and a Subject | |||
identifier (Section 3.4) in the form of an opaque identifier. | Identifier (Section 3.4) in the form of an opaque identifier. | |||
{ | { | |||
"access_token": { | "access_token": { | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | |||
"flags": ["bearer"], | "flags": ["bearer"], | |||
"manage": { | "manage": { | |||
"uri": "https://server.example.com/token/PRY5NM33O", | "uri": "https://server.example.com/token/PRY5NM33O", | |||
"access_token": { | "access_token": { | |||
"value": "B8CDFONP21-4TB8N6.BW7ONM" | "value": "B8CDFONP21-4TB8N6.BW7ONM" | |||
} | } | |||
} | } | |||
}, | }, | |||
"subject": { | "subject": { | |||
"sub_ids": [ { | "sub_ids": [ { | |||
"format": "opaque", | "format": "opaque", | |||
"id": "J2G8G8O4AZ" | "id": "J2G8G8O4AZ" | |||
} ] | } ] | |||
} | } | |||
} | } | |||
In following non-normative example, the AS is returning set of | In the following non-normative example, the AS is returning set of | |||
subject identifiers (Section 3.4), simultaneously as an opaque | Subject Identifiers (Section 3.4), simultaneously as an opaque | |||
identifier, an email address, and a decentralized identifier (DID), | identifier, an email address, and a decentralized identifier (DID), | |||
formatted as a set of Subject Identifiers defined in [RFC9493]. | formatted as a set of Subject Identifiers as defined in [RFC9493]. | |||
{ | { | |||
"subject": { | "subject": { | |||
"sub_ids": [ { | "sub_ids": [ { | |||
"format": "opaque", | "format": "opaque", | |||
"id": "J2G8G8O4AZ" | "id": "J2G8G8O4AZ" | |||
}, { | }, { | |||
"format": "email", | "format": "email", | |||
"email": "user@example.com" | "email": "user@example.com" | |||
}, { | }, { | |||
skipping to change at page 58, line 25 ¶ | skipping to change at line 2570 ¶ | |||
"url": "did:example:123456" | "url": "did:example:123456" | |||
} ] | } ] | |||
} | } | |||
} | } | |||
The response MUST be sent as a JSON object in the content of the HTTP | The response MUST be sent as a JSON object in the content of the HTTP | |||
response with Content-Type application/json, unless otherwise | response with Content-Type application/json, unless otherwise | |||
specified by the specific response (e.g., an empty response with no | specified by the specific response (e.g., an empty response with no | |||
Content-Type). | Content-Type). | |||
The authorization server MUST include the HTTP Cache-Control response | The AS MUST include the HTTP Cache-Control response header field | |||
header field [RFC9111] with a value set to "no-store". | [RFC9111] with a value set to "no-store". | |||
3.1. Request Continuation | 3.1. Request Continuation | |||
If the AS determines that the grant request can be continued by the | If the AS determines that the grant request can be continued by the | |||
client instance, the AS responds with the continue field. This field | client instance, the AS responds with the continue field. This field | |||
contains a JSON object with the following properties. | contains a JSON object with the following properties. | |||
uri (string): The URI at which the client instance can make | uri (string): The URI at which the client instance can make | |||
continuation requests. This URI MAY vary per request, or MAY be | continuation requests. This URI MAY vary per request or MAY be | |||
stable at the AS. This URI MUST be an absolute URI. The client | stable at the AS. This URI MUST be an absolute URI. The client | |||
instance MUST use this value exactly as given when making a | instance MUST use this value exactly as given when making a | |||
continuation request (Section 5). REQUIRED. | continuation request (Section 5). REQUIRED. | |||
wait (integer): The amount of time in integer seconds the client | wait (integer): The amount of time in integer seconds the client | |||
instance MUST wait after receiving this request continuation | instance MUST wait after receiving this request continuation | |||
response and calling the continuation URI. The value SHOULD NOT | response and calling the continuation URI. The value SHOULD NOT | |||
be less than five seconds, and omission of the value MUST be | be less than five seconds, and omission of the value MUST be | |||
interpreted as five seconds. RECOMMENDED. | interpreted as five seconds. RECOMMENDED. | |||
access_token (object): A unique access token for continuing the | access_token (object): A unique access token for continuing the | |||
request, called the "continuation access token". The value of | request, called the "continuation access token". The value of | |||
this property MUST be an object in the format specified in | this property MUST be an object in the format specified in | |||
Section 3.2.1. This access token MUST be bound to the client | Section 3.2.1. This access token MUST be bound to the client | |||
instance's key used in the request and MUST NOT be a bearer token. | instance's key used in the request and MUST NOT be a bearer token. | |||
As a consequence, the flags array of this access token MUST NOT | As a consequence, the flags array of this access token MUST NOT | |||
contain the string bearer and the key field MUST be omitted. This | contain the string bearer, and the key field MUST be omitted. | |||
access token MUST NOT have a manage field. The client instance | This access token MUST NOT have a manage field. The client | |||
MUST present the continuation access token in all requests to the | instance MUST present the continuation access token in all | |||
continuation URI as described in Section 7.2. REQUIRED. | requests to the continuation URI as described in Section 7.2. | |||
REQUIRED. | ||||
{ | { | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "80UPRY5NM33OMUKMKSKU" | "value": "80UPRY5NM33OMUKMKSKU" | |||
}, | }, | |||
"uri": "https://server.example.com/continue", | "uri": "https://server.example.com/continue", | |||
"wait": 60 | "wait": 60 | |||
} | } | |||
} | } | |||
This field is REQUIRED if the grant request is in the _pending_ | This field is REQUIRED if the grant request is in the _pending_ | |||
state, as the field contains the information needed by the client | state, as the field contains the information needed by the client | |||
request to continue the request as described in Section 5. Note that | request to continue the request as described in Section 5. Note that | |||
the continuation access token is bound to the client instance's key, | the continuation access token is bound to the client instance's key; | |||
and therefore the client instance MUST sign all continuation requests | therefore, the client instance MUST sign all continuation requests | |||
with its key as described in Section 7.3 and MUST present the | with its key as described in Section 7.3 and MUST present the | |||
continuation access token in its continuation request. | continuation access token in its continuation request. | |||
3.2. Access Tokens | 3.2. Access Tokens | |||
If the AS has successfully granted one or more access tokens to the | If the AS has successfully granted one or more access tokens to the | |||
client instance, the AS responds with the access_token field. This | client instance, the AS responds with the access_token field. This | |||
field contains either a single access token as described in | field contains either a single access token as described in | |||
Section 3.2.1 or an array of access tokens as described in | Section 3.2.1 or an array of access tokens as described in | |||
Section 3.2.2. | Section 3.2.2. | |||
skipping to change at page 60, line 8 ¶ | skipping to change at line 2651 ¶ | |||
value (string): The value of the access token as a string. The | value (string): The value of the access token as a string. The | |||
value is opaque to the client instance. The value MUST be limited | value is opaque to the client instance. The value MUST be limited | |||
to the token68 character set defined in Section 11.2 of [HTTP] to | to the token68 character set defined in Section 11.2 of [HTTP] to | |||
facilitate transmission over HTTP headers and within other | facilitate transmission over HTTP headers and within other | |||
protocols without requiring additional encoding. REQUIRED. | protocols without requiring additional encoding. REQUIRED. | |||
label (string): The value of the label the client instance provided | label (string): The value of the label the client instance provided | |||
in the associated token request (Section 2.1), if present. | in the associated token request (Section 2.1), if present. | |||
REQUIRED for multiple access tokens or if a label was included in | REQUIRED for multiple access tokens or if a label was included in | |||
the single access token request, OPTIONAL for a single access | the single access token request; OPTIONAL for a single access | |||
token where no label was included in the request. | token where no label was included in the request. | |||
manage (object): Access information for the token management API for | manage (object): Access information for the token management API for | |||
this access token. The management URI for this access token. If | this access token. If provided, the client instance MAY manage | |||
provided, the client instance MAY manage its access token as | its access token as described in Section 6. This management API | |||
described in Section 6. This management API is a function of the | is a function of the AS and is separate from the RS the client | |||
AS and is separate from the RS the client instance is requesting | instance is requesting access to. OPTIONAL. | |||
access to. OPTIONAL. | ||||
access (array of objects/strings): A description of the rights | access (array of objects/strings): A description of the rights | |||
associated with this access token, as defined in Section 8. If | associated with this access token, as defined in Section 8. If | |||
included, this MUST reflect the rights associated with the issued | included, this MUST reflect the rights associated with the issued | |||
access token. These rights MAY vary from what was requested by | access token. These rights MAY vary from what was requested by | |||
the client instance. REQUIRED. | the client instance. REQUIRED. | |||
expires_in (integer): The number of seconds in which the access will | expires_in (integer): The number of seconds in which the access will | |||
expire. The client instance MUST NOT use the access token past | expire. The client instance MUST NOT use the access token past | |||
this time. Note that the access token MAY be revoked by the AS or | this time. Note that the access token MAY be revoked by the AS or | |||
RS at any point prior to its expiration. OPTIONAL. | RS at any point prior to its expiration. OPTIONAL. | |||
key (object / string): The key that the token is bound to, if | key (object / string): The key that the token is bound to, if | |||
different from the client instance's presented key. The key MUST | different from the client instance's presented key. The key MUST | |||
be an object or string in a format described in Section 7.1. The | be an object or string in a format described in Section 7.1. The | |||
client instance MUST be able to dereference or process the key | client instance MUST be able to dereference or process the key | |||
information in order to be able to sign subsequent requests using | information in order to be able to sign subsequent requests using | |||
the access token (Section 7.2). When the key is provided by value | the access token (Section 7.2). When the key is provided by value | |||
from the AS, the token shares some security properties with bearer | from the AS, the token shares some security properties with bearer | |||
tokens as discussed in Section 13.38. It is RECOMMENDED that keys | tokens as discussed in Section 11.38. It is RECOMMENDED that keys | |||
returned for use with access tokens be key references as described | returned for use with access tokens be key references as described | |||
in Section 7.1.1 that the client instance can correlate to its | in Section 7.1.1 that the client instance can correlate to its | |||
known keys. OPTIONAL. | known keys. OPTIONAL. | |||
flags (array of strings): A set of flags that represent attributes | flags (array of strings): A set of flags that represent attributes | |||
or behaviors of the access token issued by the AS. OPTIONAL. | or behaviors of the access token issued by the AS. OPTIONAL. | |||
The value of the manage field is an object with the following | The value of the manage field is an object with the following | |||
properties: | properties: | |||
uri (string): The URI of the token management API for this access | uri (string): The URI of the token management API for this access | |||
token. This URI MUST be an absolute URI. This URI MUST NOT include | token. This URI MUST be an absolute URI. This URI MUST NOT | |||
the access token value and SHOULD be different for each access token | include the value of the access token being managed or the value | |||
issued in a request and MUST NOT include the value of the access | of the access token used to protect the URI. This URI SHOULD be | |||
token being managed. REQUIRED. | different for each access token issued in a request. REQUIRED. | |||
access_token (object): A unique access token for continuing the | access_token (object): A unique access token for continuing the | |||
request, called the "token management access token". The value of | request, called the "token management access token". The value of | |||
this property MUST be an object in the format specified in | this property MUST be an object in the format specified in | |||
Section 3.2.1. This access token MUST be bound to the client | Section 3.2.1. This access token MUST be bound to the client | |||
instance's key used in the request (or its most recent rotation) | instance's key used in the request (or its most recent rotation) | |||
and MUST NOT be a bearer token. As a consequence, the flags array | and MUST NOT be a bearer token. As a consequence, the flags array | |||
of this access token MUST NOT contain the string bearer and the | of this access token MUST NOT contain the string bearer, and the | |||
key field MUST be omitted. This access token MUST NOT have a | key field MUST be omitted. This access token MUST NOT have a | |||
manage field. This access token MUST NOT have the same value as | manage field. This access token MUST NOT have the same value as | |||
the token it is managing. The client instance MUST present the | the token it is managing. The client instance MUST present the | |||
continuation access token in all requests to the continuation URI | continuation access token in all requests to the continuation URI | |||
as described in Section 7.2. REQUIRED. | as described in Section 7.2. REQUIRED. | |||
The values of the flags field defined by this specification are as | The values of the flags field defined by this specification are as | |||
follows: | follows: | |||
"bearer": This flag indicates whether the token is a bearer token, | "bearer": Flag indicating whether the token is a bearer token, not | |||
not bound to a key and proofing mechanism. If the bearer flag is | bound to a key and proofing mechanism. If the bearer flag is | |||
present, the access token is a bearer token, and the key field in | present, the access token is a bearer token, and the key field in | |||
this response MUST be omitted. See Section 13.9 for additional | this response MUST be omitted. See Section 11.9 for additional | |||
considerations on the use of bearer tokens. | considerations on the use of bearer tokens. | |||
"durable": Flag indicating a hint of AS behavior on token rotation. | "durable": Flag indicating a hint of AS behavior on token rotation. | |||
If this flag is present, then the client instance can expect a | If this flag is present, then the client instance can expect a | |||
previously-issued access token to continue to work after it has | previously issued access token to continue to work after it has | |||
been rotated (Section 6.1) or the underlying grant request has | been rotated (Section 6.1) or the underlying grant request has | |||
been modified (Section 5.3), resulting in the issuance of new | been modified (Section 5.3), resulting in the issuance of new | |||
access tokens. If this flag is omitted, the client instance can | access tokens. If this flag is omitted, the client instance can | |||
anticipate a given access token could stop working after token | anticipate a given access token could stop working after token | |||
rotation or grant request modification. Note that a token flagged | rotation or grant request modification. Note that a token flagged | |||
as durable can still expire or be revoked through any normal | as durable can still expire or be revoked through any normal | |||
means. | means. | |||
Flag values MUST NOT be included more than once. | Flag values MUST NOT be included more than once. | |||
Additional flags can be defined by extensions using the GNAP Access | Additional flags can be defined by extensions using the "GNAP Access | |||
Token Fields Registry (Section 11.4). | Token Flags" registry (Section 10.4). | |||
If the bearer flag and the key field in this response are omitted, | If the bearer flag and the key field in this response are omitted, | |||
the token is bound the key used by the client instance (Section 2.3) | the token is bound to the key used by the client instance | |||
in its request for access. If the bearer flag is omitted, and the | (Section 2.3) in its request for access. If the bearer flag is | |||
key field is present, the token is bound to the key and proofing | omitted and the key field is present, the token is bound to the key | |||
mechanism indicated in the key field. The means by which the AS | and proofing mechanism indicated in the key field. The means by | |||
determines how to bind an access token to a key other than that | which the AS determines how to bind an access token to a key other | |||
presented by the client instance is out of scope for this | than that presented by the client instance are out of scope for this | |||
specification, but common practices include pre-registering specific | specification, but common practices include pre-registering specific | |||
keys in a static fashion. | keys in a static fashion. | |||
The client software MUST reject any access token where the flags | The client software MUST reject any access token where the flags | |||
field contains the bearer flag and the key field is present with any | field contains the bearer flag and the key field is present with any | |||
value. | value. | |||
The following non-normative example shows a single access token bound | The following non-normative example shows a single access token bound | |||
to the client instance's key used in the initial request, with a | to the client instance's key used in the initial request. The access | |||
management URI, and that has access to three described resources (one | token has a management URI and has access to three described | |||
using an object and two described by reference strings). | resources (one using an object and two described by reference | |||
strings). | ||||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
"access_token": { | "access_token": { | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | |||
"manage": { | "manage": { | |||
"uri": "https://server.example.com/token/PRY5NM33O", | "uri": "https://server.example.com/token/PRY5NM33O", | |||
"access_token": { | "access_token": { | |||
"value": "B8CDFONP21-4TB8N6.BW7ONM" | "value": "B8CDFONP21-4TB8N6.BW7ONM" | |||
} | } | |||
skipping to change at page 63, line 14 ¶ | skipping to change at line 2796 ¶ | |||
"access_token": { | "access_token": { | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | |||
"flags": ["bearer"], | "flags": ["bearer"], | |||
"access": [ | "access": [ | |||
"finance", "medical" | "finance", "medical" | |||
] | ] | |||
} | } | |||
If the client instance requested a single access token | If the client instance requested a single access token | |||
(Section 2.1.1), the AS MUST NOT respond with the multiple access | (Section 2.1.1), the AS MUST NOT respond with the structure for | |||
token structure. | multiple access tokens. | |||
3.2.2. Multiple Access Tokens | 3.2.2. Multiple Access Tokens | |||
If the client instance has requested multiple access tokens and the | If the client instance has requested multiple access tokens and the | |||
AS has granted at least one of them, the AS responds with the | AS has granted at least one of them, the AS responds with the | |||
"access_token" field. The value of this field is a JSON array, the | "access_token" field. The value of this field is a JSON array, the | |||
members of which are distinct access tokens as described in | members of which are distinct access tokens as described in | |||
Section 3.2.1. Each object MUST have a unique label field, | Section 3.2.1. Each object MUST have a unique label field, | |||
corresponding to the token labels chosen by the client instance in | corresponding to the token labels chosen by the client instance in | |||
the multiple access token request (Section 2.1.2). | the request for multiple access tokens (Section 2.1.2). | |||
In the following non-normative example, two tokens are issued under | In the following non-normative example, two tokens are issued under | |||
the names token1 and token2, and only the first token has a | the names token1 and token2, and only the first token has a | |||
management URI associated with it. | management URI associated with it. | |||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
"access_token": [ | "access_token": [ | |||
{ | { | |||
"label": "token1", | "label": "token1", | |||
skipping to change at page 64, line 4 ¶ | skipping to change at line 2833 ¶ | |||
} | } | |||
}, | }, | |||
"access": [ "finance" ] | "access": [ "finance" ] | |||
}, | }, | |||
{ | { | |||
"label": "token2", | "label": "token2", | |||
"value": "UFGLO2FDAFG7VGZZPJ3IZEMN21EVU71FHCARP4J1", | "value": "UFGLO2FDAFG7VGZZPJ3IZEMN21EVU71FHCARP4J1", | |||
"access": [ "medical" ] | "access": [ "medical" ] | |||
} | } | |||
} | } | |||
Each access token corresponds to one of the objects in the | Each access token corresponds to one of the objects in the | |||
access_token array of the client instance's request (Section 2.1.2). | access_token array of the client instance's request (Section 2.1.2). | |||
The AS MAY refuse to issue one or more of the requested access | The AS MAY refuse to issue one or more of the requested access tokens | |||
tokens, for any reason. In such cases the refused token is omitted | for any reason. In such cases, the refused token is omitted from the | |||
from the response and all of the other issued access tokens are | response, and all of the other issued access tokens are included in | |||
included in the response under their respective requested labels. If | the response under their respective requested labels. If the client | |||
the client instance requested multiple access tokens (Section 2.1.2), | instance requested multiple access tokens (Section 2.1.2), the AS | |||
the AS MUST NOT respond with a single access token structure, even if | MUST NOT respond with a single access token structure, even if only a | |||
only a single access token is granted. In such cases, the AS MUST | single access token is granted. In such cases, the AS MUST respond | |||
respond with a multiple access token structure containing one access | with a structure for multiple access tokens containing one access | |||
token. | token. | |||
"access_token": [ | "access_token": [ | |||
{ | { | |||
"label": "token2", | "label": "token2", | |||
"value": "8N6BW7OZB8CDFONP219-OS9M2PMHKUR64TBRP1LT0", | "value": "8N6BW7OZB8CDFONP219-OS9M2PMHKUR64TBRP1LT0", | |||
"manage": { | "manage": { | |||
"uri": "https://server.example.com/token/PRY5NM33O", | "uri": "https://server.example.com/token/PRY5NM33O", | |||
"access_token": { | "access_token": { | |||
"value": "B8CDFONP21-4TB8N6.BW7ONM" | "value": "B8CDFONP21-4TB8N6.BW7ONM" | |||
} | } | |||
}, | }, | |||
"access": [ "fruits" ] | "access": [ "fruits" ] | |||
} | } | |||
] | ] | |||
The parameters of each access token are separate. For example, each | The parameters of each access token are separate. For example, each | |||
access token is expected to have a unique value and (if present) | access token is expected to have a unique value and (if present) | |||
label, and likely has different access rights associated with it. | label, and each access token likely has different access rights | |||
Each access token could also be bound to different keys with | associated with it. Each access token could also be bound to | |||
different proofing mechanisms. | different keys with different proofing mechanisms. | |||
3.3. Interaction Modes | 3.3. Interaction Modes | |||
If the client instance has indicated a capability to interact with | If the client instance has indicated a capability to interact with | |||
the RO in its request (Section 2.5), and the AS has determined that | the RO in its request (Section 2.5) and the AS has determined that | |||
interaction is both supported and necessary, the AS responds to the | interaction is both supported and necessary, the AS responds to the | |||
client instance with any of the following values in the interact | client instance with any of the following values in the interact | |||
field of the response. There is no preference order for interaction | field of the response. There is no preference order for interaction | |||
modes in the response, and it is up to the client instance to | modes in the response, and it is up to the client instance to | |||
determine which ones to use. All supported interaction methods are | determine which ones to use. All supported interaction methods are | |||
included in the same interact object. | included in the same interact object. | |||
redirect (string): Redirect to an arbitrary URI. REQUIRED if the | redirect (string): Redirect to an arbitrary URI. REQUIRED if the | |||
redirect interaction start mode is possible for this request. See | redirect interaction start mode is possible for this request. See | |||
Section 3.3.1. | Section 3.3.1. | |||
skipping to change at page 65, line 26 ¶ | skipping to change at line 2903 ¶ | |||
finish (string): A unique ASCII string value provided by the AS as a | finish (string): A unique ASCII string value provided by the AS as a | |||
nonce. This is used by the client instance to verify the callback | nonce. This is used by the client instance to verify the callback | |||
after interaction is completed. REQUIRED if the interaction | after interaction is completed. REQUIRED if the interaction | |||
finish method requested by the client instance is possible for | finish method requested by the client instance is possible for | |||
this request. See Section 3.3.5. | this request. See Section 3.3.5. | |||
expires_in (integer): The number of integer seconds after which this | expires_in (integer): The number of integer seconds after which this | |||
set of interaction responses will expire and no longer be usable | set of interaction responses will expire and no longer be usable | |||
by the client instance. If the interaction methods expire, the | by the client instance. If the interaction methods expire, the | |||
client MAY re-start the interaction process for this grant request | client MAY restart the interaction process for this grant request | |||
by sending an update (Section 5.3) with a new interaction request | by sending an update (Section 5.3) with a new interaction request | |||
(Section 2.5) section. OPTIONAL. If omitted, the interaction | field (Section 2.5). OPTIONAL. If omitted, the interaction | |||
response modes returned do not expire but MAY be invalidated by | response modes returned do not expire but MAY be invalidated by | |||
the AS at any time. | the AS at any time. | |||
Additional interaction mode responses can be defined in the GNAP | Additional interaction mode responses can be defined in the "GNAP | |||
Interaction Mode Responses Registry (Section 11.13). | Interaction Mode Responses" registry (Section 10.13). | |||
The AS MUST NOT respond with any interaction mode that the client | The AS MUST NOT respond with any interaction mode that the client | |||
instance did not indicate in its request. The AS MUST NOT respond | instance did not indicate in its request, and the AS MUST NOT respond | |||
with any interaction mode that the AS does not support. Since | with any interaction mode that the AS does not support. Since | |||
interaction responses include secret or unique information, the AS | interaction responses include secret or unique information, the AS | |||
SHOULD respond to each interaction mode only once in an ongoing | SHOULD respond to each interaction mode only once in an ongoing | |||
request, particularly if the client instance modifies its request | request, particularly if the client instance modifies its request | |||
(Section 5.3). | (Section 5.3). | |||
The grant request MUST be in the _pending_ state to include this | The grant request MUST be in the _pending_ state to include this | |||
field in the response. | field in the response. | |||
3.3.1. Redirection to an arbitrary URI | 3.3.1. Redirection to an Arbitrary URI | |||
If the client instance indicates that it can redirect to an arbitrary | If the client instance indicates that it can redirect to an arbitrary | |||
URI (Section 2.5.1.1) and the AS supports this mode for the client | URI (Section 2.5.1.1) and the AS supports this mode for the client | |||
instance's request, the AS responds with the "redirect" field, which | instance's request, the AS responds with the "redirect" field, which | |||
is a string containing the URI for the end user to visit. This URI | is a string containing the URI for the end user to visit. This URI | |||
MUST be unique for the request and MUST NOT contain any security- | MUST be unique for the request and MUST NOT contain any security- | |||
sensitive information such as user identifiers or access tokens. | sensitive information such as user identifiers or access tokens. | |||
"interact": { | "interact": { | |||
"redirect": "https://interact.example.com/4CF492MLVMSW9MKMXKHQ" | "redirect": "https://interact.example.com/4CF492MLVMSW9MKMXKHQ" | |||
} | } | |||
The URI returned is a function of the AS, but the URI itself MAY be | The URI returned is a function of the AS, but the URI itself MAY be | |||
completely distinct from the grant endpoint URI that the client | completely distinct from the grant endpoint URI that the client | |||
instance uses to request access (Section 2), allowing an AS to | instance uses to request access (Section 2), allowing an AS to | |||
separate its user-interactive functionality from its back-end | separate its user-interaction functionality from its backend security | |||
security functionality. The AS will need to dereference the specific | functionality. The AS will need to dereference the specific grant | |||
grant request and its information from the URI alone. If the AS does | request and its information from the URI alone. If the AS does not | |||
not directly host the functionality accessed through the redirect | directly host the functionality accessed through the redirect URI, | |||
URI, then the means for the interaction functionality to communicate | then the means for the interaction functionality to communicate with | |||
with the rest of the AS are out of scope for this specification. | the rest of the AS are out of scope for this specification. | |||
The client instance sends the end user to the URI to interact with | The client instance sends the end user to the URI to interact with | |||
the AS. The client instance MUST NOT alter the URI in any way. The | the AS. The client instance MUST NOT alter the URI in any way. The | |||
means for the client instance to send the end user to this URI is out | means for the client instance to send the end user to this URI are | |||
of scope of this specification, but common methods include an HTTP | out of scope of this specification, but common methods include an | |||
redirect, launching the system browser, displaying a scannable code, | HTTP redirect, launching the system browser, displaying a scannable | |||
or printing out the URI in an interactive console. See details of | code, or printing out the URI in an interactive console. See details | |||
the interaction in Section 4.1.1. | of the interaction in Section 4.1.1. | |||
3.3.2. Launch of an application URI | 3.3.2. Launch of an Application URI | |||
If the client instance indicates that it can launch an application | If the client instance indicates that it can launch an application | |||
URI (Section 2.5.1.2) and the AS supports this mode for the client | URI (Section 2.5.1.2) and the AS supports this mode for the client | |||
instance's request, the AS responds with the "app" field, which is a | instance's request, the AS responds with the "app" field, which is a | |||
string containing the URI for the client instance to launch. This | string containing the URI for the client instance to launch. This | |||
URI MUST be unique for the request and MUST NOT contain any security- | URI MUST be unique for the request and MUST NOT contain any security- | |||
sensitive information such as user identifiers or access tokens. | sensitive information such as user identifiers or access tokens. | |||
"interact": { | "interact": { | |||
"app": "https://app.example.com/launch?tx=4CF492MLV" | "app": "https://app.example.com/launch?tx=4CF492MLV" | |||
} | } | |||
The means for the launched application to communicate with the AS are | The means for the launched application to communicate with the AS are | |||
out of scope for this specification. | out of scope for this specification. | |||
The client instance launches the URI as appropriate on its platform, | The client instance launches the URI as appropriate on its platform; | |||
and the means for the client instance to launch this URI is out of | the means for the client instance to launch this URI are out of scope | |||
scope of this specification. The client instance MUST NOT alter the | of this specification. The client instance MUST NOT alter the URI in | |||
URI in any way. The client instance MAY attempt to detect if an | any way. The client instance MAY attempt to detect if an installed | |||
installed application will service the URI being sent before | application will service the URI being sent before attempting to | |||
attempting to launch the application URI. See details of the | launch the application URI. See details of the interaction in | |||
interaction in Section 4.1.4. | Section 4.1.4. | |||
3.3.3. Display of a Short User Code | 3.3.3. Display of a Short User Code | |||
If the client instance indicates that it can display a short | If the client instance indicates that it can display a short, user- | |||
user-typeable code (Section 2.5.1.3) and the AS supports this mode | typeable code (Section 2.5.1.3) and the AS supports this mode for the | |||
for the client instance's request, the AS responds with a "user_code" | client instance's request, the AS responds with a "user_code" field. | |||
field. This field is string containing a unique short code that the | This field is string containing a unique short code that the user can | |||
user can type into a web page. To facilitate usability, this string | type into a web page. To facilitate usability, this string MUST | |||
MUST consist only of characters that can be easily typed by the end | consist only of characters that can be easily typed by the end user | |||
user (such as ASCII letters or numbers) and MUST be processed by the | (such as ASCII letters or numbers) and MUST be processed by the AS in | |||
AS in a case-insensitive manner (see Section 4.1.2). The string MUST | a case-insensitive manner (see Section 4.1.2). The string MUST be | |||
be randomly generated so as to be unguessable by an attacker within | randomly generated so as to be unguessable by an attacker within the | |||
the time it is accepted. The time in which this code will be | time it is accepted. The time in which this code will be accepted | |||
accepted SHOULD be short lived, such as several minutes. It is | SHOULD be short lived, such as several minutes. It is RECOMMENDED | |||
RECOMMENDED that this code be no more than eight characters in | that this code be between six and eight characters in length. | |||
length. | ||||
"interact": { | "interact": { | |||
"user_code": "A1BC3DFF" | "user_code": "A1BC3DFF" | |||
} | } | |||
The client instance MUST communicate the "user_code" value to the end | The client instance MUST communicate the "user_code" value to the end | |||
user in some fashion, such as displaying it on a screen or reading it | user in some fashion, such as displaying it on a screen or reading it | |||
out audibly. This code is used by the interaction component of the | out audibly. This code is used by the interaction component of the | |||
AS as a means of identifying the pending grant request and does not | AS as a means of identifying the pending grant request and does not | |||
function as an authentication factor for the RO. | function as an authentication factor for the RO. | |||
The URI that the end user is intended to enter the code into MUST be | The URI that the end user is intended to enter the code into MUST be | |||
stable, since the client instance is expected to have no means of | stable, since the client instance is expected to have no means of | |||
communicating a dynamic URI to the end user at runtime. | communicating a dynamic URI to the end user at runtime. | |||
As this interaction mode is designed to facilitate interaction via a | As this interaction mode is designed to facilitate interaction via a | |||
secondary device, it is not expected that the client instance | secondary device, it is not expected that the client instance | |||
redirect the end user to the URI where the code is entered. If the | redirect the end user to the URI where the code is entered. If the | |||
client instance is capable of communicating an short arbitrary URI to | client instance is capable of communicating a short arbitrary URI to | |||
the end user for use with the user code, the client instance SHOULD | the end user for use with the user code, the client instance SHOULD | |||
instead use the "user_code_uri" (Section 2.5.1.4) mode. If the | instead use the "user_code_uri" mode (Section 2.5.1.4). If the | |||
client instance is capable of communicating a long arbitrary URI to | client instance is capable of communicating a long arbitrary URI to | |||
the end user, such as through a scannable code, the client instance | the end user, such as through a scannable code, the client instance | |||
SHOULD use the "redirect" (Section 2.5.1.1) mode for this purpose | SHOULD use the "redirect" mode (Section 2.5.1.1) for this purpose, | |||
instead of or in addition to the user code mode. | instead of or in addition to the user code mode. | |||
See details of the interaction in Section 4.1.2. | See details of the interaction in Section 4.1.2. | |||
3.3.4. Display of a Short User Code and URI | 3.3.4. Display of a Short User Code and URI | |||
If the client instance indicates that it can display a short | If the client instance indicates that it can display a short, user- | |||
user-typeable code (Section 2.5.1.3) and the AS supports this mode | typeable code (Section 2.5.1.3) and the AS supports this mode for the | |||
for the client instance's request, the AS responds with a | client instance's request, the AS responds with a "user_code_uri" | |||
"user_code_uri" object that contains the following members. | object that contains the following members. | |||
code (string): A unique short code that the end user can type into a | code (string): A unique short code that the end user can type into a | |||
provided URI. To facilitate usability, this string MUST consist | provided URI. To facilitate usability, this string MUST consist | |||
only of characters that can be easily typed by the end user (such | only of characters that can be easily typed by the end user (such | |||
as ASCII letters or numbers) and MUST be processed by the AS in a | as ASCII letters or numbers) and MUST be processed by the AS in a | |||
case-insensitive manner (see Section 4.1.3). The string MUST be | case-insensitive manner (see Section 4.1.3). The string MUST be | |||
randomly generated so as to be unguessable by an attacker within | randomly generated so as to be unguessable by an attacker within | |||
the time it is accepted. The time in which this code will be | the time it is accepted. The time in which this code will be | |||
accepted SHOULD be short lived, such as several minutes. It is | accepted SHOULD be short lived, such as several minutes. It is | |||
RECOMMENDED that this code be no more than eight characters in | RECOMMENDED that this code be between six and eight characters in | |||
length. REQUIRED. | length. REQUIRED. | |||
uri (string): The interaction URI that the client instance will | uri (string): The interaction URI that the client instance will | |||
direct the RO to. This URI MUST be short enough to be | direct the RO to. This URI MUST be short enough to be | |||
communicated to the end user by the client instance. It is | communicated to the end user by the client instance. It is | |||
RECOMMENDED that this URI be short enough for an end user to type | RECOMMENDED that this URI be short enough for an end user to type | |||
in manually. The URI MUST NOT contain the code value. This URI | in manually. The URI MUST NOT contain the code value. This URI | |||
MUST be an absolute URI. REQUIRED. | MUST be an absolute URI. REQUIRED. | |||
"interact": { | "interact": { | |||
skipping to change at page 69, line 4 ¶ | skipping to change at line 3066 ¶ | |||
function as an authentication factor for the RO. | function as an authentication factor for the RO. | |||
The client instance MUST also communicate the URI to the end user. | The client instance MUST also communicate the URI to the end user. | |||
Since it is expected that the end user will continue interaction on a | Since it is expected that the end user will continue interaction on a | |||
secondary device, the URI needs to be short enough to allow the end | secondary device, the URI needs to be short enough to allow the end | |||
user to type or copy it to a secondary device without mistakes. | user to type or copy it to a secondary device without mistakes. | |||
The URI returned is a function of the AS, but the URI itself MAY be | The URI returned is a function of the AS, but the URI itself MAY be | |||
completely distinct from the grant endpoint URI that the client | completely distinct from the grant endpoint URI that the client | |||
instance uses to request access (Section 2), allowing an AS to | instance uses to request access (Section 2), allowing an AS to | |||
separate its user-interactive functionality from its back-end | separate its user-interaction functionality from its backend security | |||
security functionality. If the AS does not directly host the | functionality. If the AS does not directly host the functionality | |||
functionality accessed through the given URI, then the means for the | accessed through the given URI, then the means for the interaction | |||
interaction functionality to communicate with the rest of the AS are | functionality to communicate with the rest of the AS are out of scope | |||
out of scope for this specification. | for this specification. | |||
See details of the interaction in Section 4.1.2. | See details of the interaction in Section 4.1.2. | |||
3.3.5. Interaction Finish | 3.3.5. Interaction Finish | |||
If the client instance indicates that it can receive a | If the client instance indicates that it can receive a post- | |||
post-interaction redirect or push at a URI (Section 2.5.2) and the AS | interaction redirect or push at a URI (Section 2.5.2) and the AS | |||
supports this mode for the client instance's request, the AS responds | supports this mode for the client instance's request, the AS responds | |||
with a finish field containing a nonce that the client instance will | with a finish field containing a nonce that the client instance will | |||
use in validating the callback as defined in Section 4.2. | use in validating the callback as defined in Section 4.2. | |||
"interact": { | "interact": { | |||
"finish": "MBDOFXG4Y5CVJCX821LH" | "finish": "MBDOFXG4Y5CVJCX821LH" | |||
} | } | |||
When the interaction is completed, the interaction component of the | When the interaction is completed, the interaction component of the | |||
AS MUST contact the client instance using the means defined by the | AS MUST contact the client instance using the means defined by the | |||
skipping to change at page 69, line 44 ¶ | skipping to change at line 3106 ¶ | |||
If information about the RO is requested and the AS grants the client | If information about the RO is requested and the AS grants the client | |||
instance access to that data, the AS returns the approved information | instance access to that data, the AS returns the approved information | |||
in the "subject" response field. The AS MUST return the subject | in the "subject" response field. The AS MUST return the subject | |||
field only in cases where the AS is sure that the RO and the end user | field only in cases where the AS is sure that the RO and the end user | |||
are the same party. This can be accomplished through some forms of | are the same party. This can be accomplished through some forms of | |||
interaction with the RO (Section 4). | interaction with the RO (Section 4). | |||
This field is an object with the following properties. | This field is an object with the following properties. | |||
sub_ids (array of objects): An array of subject identifiers for the | sub_ids (array of objects): An array of Subject Identifiers for the | |||
RO, as defined by [RFC9493]. REQUIRED if returning subject | RO, as defined by [RFC9493]. REQUIRED if returning Subject | |||
identifiers. | Identifiers. | |||
assertions (array of objects): An array containing assertions as | assertions (array of objects): An array containing assertions as | |||
objects each containing the assertion object described below. | objects, each containing the assertion object described below. | |||
REQUIRED if returning assertions. | REQUIRED if returning assertions. | |||
updated_at (string): Timestamp as an [RFC3339] date string, | updated_at (string): Timestamp as a date string as described in | |||
indicating when the identified account was last updated. The | [RFC3339], indicating when the identified account was last | |||
client instance MAY use this value to determine if it needs to | updated. The client instance MAY use this value to determine if | |||
request updated profile information through an identity API. The | it needs to request updated profile information through an | |||
definition of such an identity API is out of scope for this | identity API. The definition of such an identity API is out of | |||
specification. RECOMMENDED. | scope for this specification. RECOMMENDED. | |||
Assertion objects contain the following fields: | Assertion objects contain the following fields: | |||
format (string): The assertion format. Possible formats are listed | format (string): The assertion format. Possible formats are listed | |||
in Section 3.4.1. Additional assertion formats are defined by the | in Section 3.4.1. Additional assertion formats can be defined in | |||
GNAP Assertion Formats Registry (Section 11.6). REQUIRED. | the "GNAP Assertion Formats" registry (Section 10.6). REQUIRED. | |||
value (string): The assertion value as the JSON string serialization | value (string): The assertion value as the JSON string serialization | |||
of the assertion. REQUIRED. | of the assertion. REQUIRED. | |||
The following non-normative example contains an opaque identifier and | The following non-normative example contains an opaque identifier and | |||
an OpenID Connect ID Token: | an OpenID Connect ID Token: | |||
"subject": { | "subject": { | |||
"sub_ids": [ { | "sub_ids": [ { | |||
"format": "opaque", | "format": "opaque", | |||
"id": "XUT2MFM1XBIKJKSDU8QM" | "id": "XUT2MFM1XBIKJKSDU8QM" | |||
} ], | } ], | |||
"assertions": [ { | "assertions": [ { | |||
"format": "id_token", | "format": "id_token", | |||
"value": "eyj..." | "value": "eyj..." | |||
} ] | } ] | |||
} | } | |||
Subject identifiers returned by the AS SHOULD uniquely identify the | Subject Identifiers returned by the AS SHOULD uniquely identify the | |||
RO at the AS. Some forms of subject identifier are opaque to the | RO at the AS. Some forms of Subject Identifiers are opaque to the | |||
client instance (such as the subject of an issuer and subject pair), | client instance (such as the subject of an issuer and subject pair), | |||
while others forms (such as email address and phone number) are | while other forms (such as email address and phone number) are | |||
intended to allow the client instance to correlate the identifier | intended to allow the client instance to correlate the identifier | |||
with other account information at the client instance. The client | with other account information at the client instance. The client | |||
instance MUST NOT request or use any returned subject identifiers for | instance MUST NOT request or use any returned Subject Identifiers for | |||
communication purposes (see Section 2.2). That is, a subject | communication purposes (see Section 2.2). That is, a Subject | |||
identifier returned in the format of an email address or a phone | Identifier returned in the format of an email address or a phone | |||
number only identifies the RO to the AS and does not indicate that | number only identifies the RO to the AS and does not indicate that | |||
the AS has validated that the represented email address or phone | the AS has validated that the represented email address or phone | |||
number in the identifier is suitable for communication with the | number in the identifier is suitable for communication with the | |||
current user. To get such information, the client instance MUST use | current user. To get such information, the client instance MUST use | |||
an identity protocol to request and receive additional identity | an identity protocol to request and receive additional identity | |||
claims. The details of an identity protocol and associated schema | claims. The details of an identity protocol and associated schema | |||
are outside the scope of this specification. | are outside the scope of this specification. | |||
The AS MUST ensure that the returned subject information represents | The AS MUST ensure that the returned subject information represents | |||
the RO. In most cases, the AS will also ensure that the returned | the RO. In most cases, the AS will also ensure that the returned | |||
subject information represents the end user authenticated | subject information represents the end user authenticated | |||
interactively at the AS. The AS SHOULD NOT re-use subject | interactively at the AS. The AS SHOULD NOT reuse Subject Identifiers | |||
identifiers for multiple different ROs. | for multiple different ROs. | |||
The "sub_ids" and "assertions" response fields are independent of | The "sub_ids" and "assertions" response fields are independent of | |||
each other. That is, a returned assertion MAY use a different | each other. That is, a returned assertion MAY use a different | |||
subject identifier than other assertions and subject identifiers in | Subject Identifier than other assertions and Subject Identifiers in | |||
the response. However, all subject identifiers and assertions | the response. However, all Subject Identifiers and assertions | |||
returned MUST refer to the same party. | returned MUST refer to the same party. | |||
The client instance MUST interpret all subject information in the | The client instance MUST interpret all subject information in the | |||
context of the AS from which the subject information is received, as | context of the AS from which the subject information is received, as | |||
is discussed in Section 6 of [SP80063C]. For example, one AS could | is discussed in Section 6 of [SP80063C]. For example, one AS could | |||
return an email identifier of "user@example.com" for one RO, and a | return an email identifier of "user@example.com" for one RO, and a | |||
different AS could return that same email identifier of | different AS could return that same email identifier of | |||
"user@example.com" for a completely different RO. A client instance | "user@example.com" for a completely different RO. A client instance | |||
talking to both AS's needs to differentiate between these two | talking to both ASes needs to differentiate between these two | |||
accounts by accounting for the AS source of each identifier and not | accounts by accounting for the AS source of each identifier and not | |||
assuming that either has a canonical claim on the identifier without | assuming that either has a canonical claim on the identifier without | |||
additional configuration and trust agreements. Otherwise, a rogue AS | additional configuration and trust agreements. Otherwise, a rogue AS | |||
could exploit this to take over a targeted account asserted by a | could exploit this to take over a targeted account asserted by a | |||
different AS. | different AS. | |||
Extensions to this specification MAY define additional response | Extensions to this specification MAY define additional response | |||
properties in the GNAP Subject Information Response Fields Registry | properties in the "GNAP Subject Information Response Fields" registry | |||
(Section 11.14). | (Section 10.14). | |||
The grant request MUST be in the _approved_ state to return this | The grant request MUST be in the _approved_ state to return this | |||
field in the response. | field in the response. | |||
See Section 13.30 for considerations that the client instance has to | See Section 11.30 for considerations that the client instance has to | |||
make when accepting and processing assertions from the AS. | make when accepting and processing assertions from the AS. | |||
3.4.1. Assertion Formats | 3.4.1. Assertion Formats | |||
The following assertion formats are defined in this specification: | The following assertion formats are defined in this specification: | |||
id_token: An OpenID Connect ID Token ([OIDC]), in JWT compact format | id_token: An OpenID Connect ID Token [OIDC], in JSON Web Token (JWT) | |||
as a single string. | compact format as a single string. | |||
saml2: A SAML 2 assertion ([SAML2]), encoded as a single base64url | saml2: A SAML 2.0 assertion [SAML2], encoded as a single base64url | |||
string with no padding. | string with no padding. | |||
3.5. Returning a Dynamically-bound Client Instance Identifier | 3.5. Returning a Dynamically Bound Client Instance Identifier | |||
Many parts of the client instance's request can be passed as either a | Many parts of the client instance's request can be passed as either a | |||
value or a reference. The use of a reference in place of a value | value or a reference. The use of a reference in place of a value | |||
allows for a client instance to optimize requests to the AS. | allows for a client instance to optimize requests to the AS. | |||
Some references, such as for the client instance's identity | Some references, such as for the client instance's identity | |||
(Section 2.3.1) or the requested resources (Section 8.1), can be | (Section 2.3.1) or the requested resources (Section 8.1), can be | |||
managed statically through an admin console or developer portal | managed statically through an admin console or developer portal | |||
provided by the AS or RS. The developer of the client software can | provided by the AS or RS. The developer of the client software can | |||
include these values in their code for a more efficient and compact | include these values in their code for a more efficient and compact | |||
skipping to change at page 72, line 38 ¶ | skipping to change at line 3239 ¶ | |||
information that would compromise any party if revealed. Instance | information that would compromise any party if revealed. Instance | |||
identifier values are opaque to the client instance, and their | identifier values are opaque to the client instance, and their | |||
content is determined by the AS. The instance identifier MUST be | content is determined by the AS. The instance identifier MUST be | |||
unique per client instance at the AS. | unique per client instance at the AS. | |||
instance_id (string): A string value used to represent the | instance_id (string): A string value used to represent the | |||
information in the client object that the client instance can use | information in the client object that the client instance can use | |||
in a future request, as described in Section 2.3.1. OPTIONAL. | in a future request, as described in Section 2.3.1. OPTIONAL. | |||
The following non-normative example shows an instance identifier | The following non-normative example shows an instance identifier | |||
along side an issued access token. | alongside an issued access token. | |||
{ | { | |||
"instance_id": "7C7C4AZ9KHRS6X63AJAO", | "instance_id": "7C7C4AZ9KHRS6X63AJAO", | |||
"access_token": { | "access_token": { | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0" | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0" | |||
} | } | |||
} | } | |||
3.6. Error Response | 3.6. Error Response | |||
If the AS determines that the request cannot be completed for any | If the AS determines that the request cannot be completed for any | |||
reason, it responds to the client instance with an error field in the | reason, it responds to the client instance with an error field in the | |||
response message. This field is either an object or a string. | response message. This field is either an object or a string. | |||
When returned as an object, the object contains the following fields: | When returned as an object, the object contains the following fields: | |||
code (string): A single ASCII error code defining the error. The | code (string): A single ASCII error code defining the error. The | |||
value MUST be defined in the GNAP Error Codes Registry | value MUST be defined in the "GNAP Error Codes" registry | |||
(Section 11.15). REQUIRED. | (Section 10.15). REQUIRED. | |||
description (string): A human-readable string description of the | description (string): A human-readable string description of the | |||
error intended for the developer of the client. The value is | error intended for the developer of the client. The value is | |||
chosen by the implementation. OPTIONAL. | chosen by the implementation. OPTIONAL. | |||
This specification defines the following code values: | This specification defines the following code values: | |||
"invalid_request": The request is missing a required parameter, | "invalid_request": The request is missing a required parameter, | |||
includes an invalid parameter value or is otherwise malformed. | includes an invalid parameter value, or is otherwise malformed. | |||
"invalid_client": The request was made from a client that was not | "invalid_client": The request was made from a client that was not | |||
recognized or allowed by the AS, or the client's signature | recognized or allowed by the AS, or the client's signature | |||
validation failed. | validation failed. | |||
"invalid_interaction" The client instance has provided an | "invalid_interaction": The client instance has provided an | |||
interaction reference that is incorrect for this request or the | interaction reference that is incorrect for this request, or the | |||
interaction modes in use have expired. | interaction modes in use have expired. | |||
"invalid_flag" The flag configuration is not valid. | "invalid_flag": The flag configuration is not valid. | |||
"invalid_rotation" The token rotation request is not valid. | "invalid_rotation": The token rotation request is not valid. | |||
"key_rotation_not_supported" The AS does not allow rotation of this | "key_rotation_not_supported": The AS does not allow rotation of this | |||
access token's key. | access token's key. | |||
"invalid_continuation": The continuation of the referenced grant | "invalid_continuation": The continuation of the referenced grant | |||
could not be processed. | could not be processed. | |||
"user_denied": The RO denied the request. | "user_denied": The RO denied the request. | |||
"request_denied": The request was denied for an unspecified reason. | "request_denied": The request was denied for an unspecified reason. | |||
"unknown_user": The user presented in the request is not known to | "unknown_user": The user presented in the request is not known to | |||
skipping to change at page 74, line 7 ¶ | skipping to change at line 3304 ¶ | |||
"unknown_interaction": The interaction integrity could not be | "unknown_interaction": The interaction integrity could not be | |||
established. | established. | |||
"too_fast": The client instance did not respect the timeout in the | "too_fast": The client instance did not respect the timeout in the | |||
wait response before the next call. | wait response before the next call. | |||
"too_many_attempts": A limit has been reached in the total number of | "too_many_attempts": A limit has been reached in the total number of | |||
reasonable attempts. This number is either defined statically or | reasonable attempts. This number is either defined statically or | |||
adjusted based on runtime conditions by the AS. | adjusted based on runtime conditions by the AS. | |||
Additional error codes can be defined in the GNAP Error Codes | Additional error codes can be defined in the "GNAP Error Codes" | |||
Registry (Section 11.15). | registry (Section 10.15). | |||
For example, if the RO denied the request while interacting with the | For example, if the RO denied the request while interacting with the | |||
AS, the AS would return the following error when the client instance | AS, the AS would return the following error when the client instance | |||
tries to continue the grant request: | tries to continue the grant request: | |||
{ | { | |||
"error": { | "error": { | |||
"code": "user_denied", | "code": "user_denied", | |||
"description": "The RO denied the request" | "description": "The RO denied the request" | |||
} | } | |||
skipping to change at page 74, line 34 ¶ | skipping to change at line 3331 ¶ | |||
considered functionally equivalent to the previous example for the | considered functionally equivalent to the previous example for the | |||
purposes of the client software's understanding: | purposes of the client software's understanding: | |||
{ | { | |||
"error": "user_denied" | "error": "user_denied" | |||
} | } | |||
If an error state is reached but the grant is in the _pending_ state | If an error state is reached but the grant is in the _pending_ state | |||
(and therefore the client instance can continue), the AS MAY include | (and therefore the client instance can continue), the AS MAY include | |||
the continue field in the response along with the error, as defined | the continue field in the response along with the error, as defined | |||
Section 3.1. This allows the client instance to modify its request | in Section 3.1. This allows the client instance to modify its | |||
for access, potentially leading to prompting the RO again. Other | request for access, potentially leading to prompting the RO again. | |||
fields MUST NOT be included in the response. | Other fields MUST NOT be included in the response. | |||
4. Determining Authorization and Consent | 4. Determining Authorization and Consent | |||
When the client instance makes its initial request (Section 2) to the | When the client instance makes its initial request (Section 2) to the | |||
AS for delegated access, it is capable of asking for several | AS for delegated access, it is capable of asking for several | |||
different kinds of information in response: | different kinds of information in response: | |||
* the access being requested, in the access_token request parameter | * the access being requested, in the access_token request parameter | |||
* the subject information being requested, in the subject request | * the subject information being requested, in the subject request | |||
skipping to change at page 75, line 14 ¶ | skipping to change at line 3358 ¶ | |||
When the grant request is in the _processing_ state, the AS | When the grant request is in the _processing_ state, the AS | |||
determines what authorizations and consents are required to fulfill | determines what authorizations and consents are required to fulfill | |||
this requested delegation. The details of how the AS makes this | this requested delegation. The details of how the AS makes this | |||
determination are out of scope for this document. However, there are | determination are out of scope for this document. However, there are | |||
several common patterns defined and supported by GNAP for fulfilling | several common patterns defined and supported by GNAP for fulfilling | |||
these requirements, including information sent by the client | these requirements, including information sent by the client | |||
instance, information gathered through the interaction process, and | instance, information gathered through the interaction process, and | |||
information supplied by external parties. An individual AS can | information supplied by external parties. An individual AS can | |||
define its own policies and processes for deciding when and how to | define its own policies and processes for deciding when and how to | |||
gather the necessary authorizations and consent, and how those are | gather the necessary authorizations and consent and how those are | |||
applied to the grant request. | applied to the grant request. | |||
To facilitate the AS fulfilling this request, the client instance | To facilitate the AS fulfilling this request, the client instance | |||
sends information about the actions the client software can take, | sends information about the actions the client software can take, | |||
including: | including: | |||
* starting interaction with the end user, in the interact request | * starting interaction with the end user, in the interact request | |||
parameter | parameter | |||
* receiving notification that interaction with the RO has concluded, | * receiving notification that interaction with the RO has concluded, | |||
skipping to change at page 76, line 9 ¶ | skipping to change at line 3398 ¶ | |||
determines that the information presented in the initial request is | determines that the information presented in the initial request is | |||
sufficient for granting the requested access, the AS MAY move the | sufficient for granting the requested access, the AS MAY move the | |||
grant request to the _approved_ state and return results immediately | grant request to the _approved_ state and return results immediately | |||
in its response (Section 3) with access tokens and subject | in its response (Section 3) with access tokens and subject | |||
information. | information. | |||
If the AS determines that additional runtime authorization is | If the AS determines that additional runtime authorization is | |||
required, the AS can either deny the request outright (if there is no | required, the AS can either deny the request outright (if there is no | |||
possible recovery) or move the grant request to the _pending_ state | possible recovery) or move the grant request to the _pending_ state | |||
and use a number of means at its disposal to gather that | and use a number of means at its disposal to gather that | |||
authorization from the appropriate ROs, including for example: | authorization from the appropriate ROs, including: | |||
* starting interaction with the end user facilitated by the client | * starting interaction with the end user facilitated by the client | |||
software, such as a redirection or user code | software, such as a redirection or user code | |||
* challenging the client instance through a challenge-response | * challenging the client instance through a challenge-response | |||
mechanism | mechanism | |||
* requesting that the client instance present specific additional | * requesting that the client instance present specific additional | |||
information, such as a user's credential or an assertion | information, such as a user's credential or an assertion | |||
* contacting an RO through an out-of-band mechanism, such as a push | * contacting an RO through an out-of-band mechanism, such as a push | |||
notification | notification | |||
* executing an auxiliary software process through an out-of-band | * executing an auxiliary software process through an out-of-band | |||
mechanism, such as querying a digital wallet | mechanism, such as querying a digital wallet | |||
The authorization and consent gathering process in GNAP is left | The process of gathering authorization and consent in GNAP is left | |||
deliberately flexible to allow for a wide variety of different | deliberately flexible to allow for a wide variety of different | |||
deployments, interactions, and methodologies. In this process, the | deployments, interactions, and methodologies. In this process, the | |||
AS can gather consent from the RO or apply the RO's policy as | AS can gather consent from the RO or apply the RO's policy as | |||
necessitated by the access that has been requested. The AS can | necessitated by the access that has been requested. The AS can | |||
sometimes determine which RO needs to prompt for consent based on | sometimes determine which RO needs to prompt for consent based on | |||
what has been requested by the client instance, such as a specific RS | what has been requested by the client instance, such as a specific RS | |||
record, an identified subject, or a request requiring specific access | record, an identified subject, or a request requiring specific access | |||
such as approval by an administrator. In other cases, the request is | such as approval by an administrator. In other cases, the request is | |||
applied to whichever RO is present at the time of consent gathering. | applied to whichever RO is present at the time of consent gathering. | |||
This pattern is especially prevalent when the end user is sent to the | This pattern is especially prevalent when the end user is sent to the | |||
AS for an interactive session, during which the end user takes on the | AS for an interactive session, during which the end user takes on the | |||
role of the RO. In these cases, the end user is delegating their own | role of the RO. In these cases, the end user is delegating their own | |||
access as RO to the client instance. | access as RO to the client instance. | |||
The client instance can indicate that it is capable of facilitating | The client instance can indicate that it is capable of facilitating | |||
interaction with the end user, another party, or another piece of | interaction with the end user, another party, or another piece of | |||
software through its interaction start (Section 2.5.1) request. | software through its interaction start request (Section 2.5.1). | |||
Here, the AS usually needs to interact directly with the end user to | Here, the AS usually needs to interact directly with the end user to | |||
determine their identity, determine their status as an RO, and | determine their identity, determine their status as an RO, and | |||
collect their consent. If the AS has determined that authorization | collect their consent. If the AS has determined that authorization | |||
is required and the AS can support one or more of the requested | is required and the AS can support one or more of the requested | |||
interaction start methods, the AS returns the associated interaction | interaction start methods, the AS returns the associated interaction | |||
start responses (Section 3.3). The client instance SHOULD initiate | start responses (Section 3.3). The client instance SHOULD initiate | |||
one or more of these interaction methods (Section 4.1) in order to | one or more of these interaction methods (Section 4.1) in order to | |||
facilitate the granting of the request. If more than one interaction | facilitate the granting of the request. If more than one interaction | |||
start method is available, the means by which the client chooses | start method is available, the means by which the client chooses | |||
which methods to follow is out of scope of this specification. | which methods to follow are out of scope of this specification. | |||
After starting interaction, the client instance can then make a | After starting interaction, the client instance can then make a | |||
continuation request (Section 5) either in response to a signal | continuation request (Section 5) either in response to a signal | |||
indicating the finish of the interaction (Section 4.2), after a time- | indicating the finish of the interaction (Section 4.2), after a time- | |||
based polling, or through some other method defined by an extension | based polling, or through some other method defined by an extension | |||
of this specification through the GNAP Interaction Mode Responses | of this specification through the "GNAP Interaction Mode Responses" | |||
registry (Section 11.13). | registry (Section 10.13). | |||
If the grant request is not in the _approved_ state, the client | If the grant request is not in the _approved_ state, the client | |||
instance can repeat the interaction process by sending a grant update | instance can repeat the interaction process by sending a grant update | |||
request (Section 5.3) with new interaction (Section 2.5) methods. | request (Section 5.3) with new interaction methods (Section 2.5). | |||
The client instance MUST use each interaction method at most once, if | The client instance MUST use each interaction method once at most if | |||
a response can be detected. The AS MUST handle any interact request | a response can be detected. The AS MUST handle any interact request | |||
as a one-time-use mechanism and SHOULD apply suitable timeouts to any | as a one-time-use mechanism and SHOULD apply suitable timeouts to any | |||
interaction start methods provided, including user codes and | interaction start methods provided, including user codes and | |||
redirection URIs. The client instance SHOULD apply suitable timeouts | redirection URIs. The client instance SHOULD apply suitable timeouts | |||
to any interaction finish method. | to any interaction finish method. | |||
In order to support client software deployed in disadvantaged network | In order to support client software deployed in disadvantaged network | |||
conditions, the AS MAY allow for processing of the same interaction | conditions, the AS MAY allow for processing of the same interaction | |||
method multiple times if the AS can determine that the request is | method multiple times if the AS can determine that the request is | |||
from the same party and the results are idempotent. For example, if | from the same party and the results are idempotent. For example, if | |||
skipping to change at page 78, line 6 ¶ | skipping to change at line 3479 ¶ | |||
first place. However, if the AS in question receives both requests, | first place. However, if the AS in question receives both requests, | |||
it could mistakenly process them separately, creating an undefined | it could mistakenly process them separately, creating an undefined | |||
state for the client instance. If the AS can determine that both | state for the client instance. If the AS can determine that both | |||
requests come from the same origin or under the same session, and the | requests come from the same origin or under the same session, and the | |||
requests both came before any additional state change to the grant | requests both came before any additional state change to the grant | |||
occurs, the AS can reasonably conclude that the initial response was | occurs, the AS can reasonably conclude that the initial response was | |||
not received and the same response can be returned to the client | not received and the same response can be returned to the client | |||
instance. | instance. | |||
If the AS instead has a means of contacting the RO directly, it could | If the AS instead has a means of contacting the RO directly, it could | |||
do so without involving the client instance in its consent gathering | do so without involving the client instance in its consent-gathering | |||
process. For example, the AS could push a notification to a known RO | process. For example, the AS could push a notification to a known RO | |||
and have the RO approve the pending request asynchronously. These | and have the RO approve the pending request asynchronously. These | |||
interactions can be through an interface of the AS itself (such as a | interactions can be through an interface of the AS itself (such as a | |||
hosted web page), through another application (such as something | hosted web page), through another application (such as something | |||
installed on the RO's device), through a messaging fabric, or any | installed on the RO's device), through a messaging fabric, or any | |||
other means. | other means. | |||
When interacting with an RO, the AS can do anything it needs to | When interacting with an RO, the AS can use various strategies to | |||
determine the authorization of the requested grant, including: | determine the authorization of the requested grant, including: | |||
* authenticate the RO, through a local account or some other means | * authenticate the RO through a local account or some other means, | |||
such as federated login | such as federated login | |||
* validate the RO through presentation of claims, attributes, or | * validate the RO through presentation of claims, attributes, or | |||
other information | other information | |||
* prompt the RO for consent for the requested delegation | * prompt the RO for consent for the requested delegation | |||
* describe to the RO what information is being released, to whom, | * describe to the RO what information is being released, to whom, | |||
and for what purpose | and for what purpose | |||
skipping to change at page 78, line 43 ¶ | skipping to change at line 3516 ¶ | |||
* provide the RO with artifacts such as receipts to facilitate an | * provide the RO with artifacts such as receipts to facilitate an | |||
audit trail of authorizations | audit trail of authorizations | |||
* allow the RO to deny the requested delegation | * allow the RO to deny the requested delegation | |||
The AS is also allowed to request authorization from more than one | The AS is also allowed to request authorization from more than one | |||
RO, if the AS deems fit. For example, a medical record might need to | RO, if the AS deems fit. For example, a medical record might need to | |||
be released by both an attending nurse and a physician, or both | be released by both an attending nurse and a physician, or both | |||
owners of a bank account need to sign off on a transfer request. | owners of a bank account need to sign off on a transfer request. | |||
Alternatively, the AS could require N of M possible RO's to approve a | Alternatively, the AS could require N of M possible ROs to approve a | |||
given request. In some circumstances, the AS could even determine | given request. In some circumstances, the AS could even determine | |||
that the end user present during the interaction is not the | that the end user present during the interaction is not the | |||
appropriate RO for a given request and reach out to the appropriate | appropriate RO for a given request and reach out to the appropriate | |||
RO asynchronously. | RO asynchronously. | |||
The RO is also allowed to define an automated policy at the AS to | The RO is also allowed to define an automated policy at the AS to | |||
determine which kind of end user can get access to the resource, and | determine which kind of end user can get access to the resource and | |||
under which condition. For instance, such a condition might require | under which conditions. For instance, such a condition might require | |||
the end user login and the acceptance of the RO's legal provisions. | the end user to log in and accept the RO's legal provisions. | |||
Alternatively, client software could be acting without an end user, | Alternatively, client software could be acting without an end user, | |||
and the RO's policy allows issuance of access tokens to specific | and the RO's policy allows issuance of access tokens to specific | |||
instances of that client software without human interaction. | instances of that client software without human interaction. | |||
While all of these cases are supported by GNAP, the details of their | While all of these cases are supported by GNAP, the details of their | |||
implementation, and for determining which RO's or related policies | implementation and the methods for determining which ROs or related | |||
are required for a given request, are out of scope for this | policies are required for a given request are out of scope for this | |||
specification. | specification. | |||
4.1. Starting Interaction With the End User | 4.1. Starting Interaction with the End User | |||
When a grant request is in the _pending_ state, the interaction start | When a grant request is in the _pending_ state, the interaction start | |||
methods sent by the client instance can be used to facilitate | methods sent by the client instance can be used to facilitate | |||
interaction with the end user. To initiate an interaction start | interaction with the end user. To initiate an interaction start | |||
method indicated by the interaction start responses (Section 3.3) | method indicated by the interaction start responses (Section 3.3) | |||
from the AS, the client instance follows the steps defined by that | from the AS, the client instance follows the steps defined by that | |||
interaction start mode. The actions of the client instance required | interaction start mode. The actions of the client instance required | |||
for the interaction start modes defined in this specification are | for the interaction start modes defined in this specification are | |||
described in the following sections. Interaction start modes defined | described in the following subsections. Interaction start modes | |||
in extensions to this specification MUST define the expected actions | defined in extensions to this specification MUST define the expected | |||
of the client software when that interaction start mode is used. | actions of the client software when that interaction start mode is | |||
used. | ||||
If the client instance does not start an interaction start mode | If the client instance does not start an interaction start mode | |||
within an AS-determined amount of time, the AS MUST reject attempts | within an AS-determined amount of time, the AS MUST reject attempts | |||
to use the interaction start modes. If the client instance has | to use the interaction start modes. If the client instance has | |||
already begun one interaction start mode and the interaction has been | already begun one interaction start mode and the interaction has been | |||
successfully completed, the AS MUST reject attempts to use other | successfully completed, the AS MUST reject attempts to use other | |||
interaction start modes. For example, if a user code has been | interaction start modes. For example, if a user code has been | |||
successfully entered for a grant request, the AS will need to reject | successfully entered for a grant request, the AS will need to reject | |||
requests to an arbitrary redirect URI on the same grant request in | requests to an arbitrary redirect URI on the same grant request in | |||
order to prevent an attacker from capturing and altering an active | order to prevent an attacker from capturing and altering an active | |||
authorization process. | authorization process. | |||
4.1.1. Interaction at a Redirected URI | 4.1.1. Interaction at a Redirected URI | |||
When the end user is directed to an arbitrary URI through the | When the end user is directed to an arbitrary URI through the | |||
"redirect" (Section 3.3.1) mode, the client instance facilitates | "redirect" mode (Section 3.3.1), the client instance facilitates | |||
opening the URI through the end user's web browser. The client | opening the URI through the end user's web browser. The client | |||
instance could launch the URI through the system browser, provide a | instance could launch the URI through the system browser, provide a | |||
clickable link, redirect the user through HTTP response codes, or | clickable link, redirect the user through HTTP response codes, or | |||
display the URI in a form the end user can use to launch such as a | display the URI in a form the end user can use to launch, such as a | |||
multidimensional barcode. In all cases, the URI is accessed with an | multidimensional barcode. In all cases, the URI is accessed with an | |||
HTTP GET request, and the resulting page is assumed to allow direct | HTTP GET request, and the resulting page is assumed to allow direct | |||
interaction with the end user through an HTTP user agent. With this | interaction with the end user through an HTTP user agent. With this | |||
method, it is common (though not required) for the RO to be the same | method, it is common (though not required) for the RO to be the same | |||
party as the end user, since the client instance has to communicate | party as the end user, since the client instance has to communicate | |||
the redirection URI to the end user. | the redirection URI to the end user. | |||
In many cases, the URI indicates a web page hosted at the AS, | In many cases, the URI indicates a web page hosted at the AS, | |||
allowing the AS to authenticate the end user as the RO and | allowing the AS to authenticate the end user as the RO and | |||
interactively provide consent. The URI value is used to identify the | interactively provide consent. The URI value is used to identify the | |||
grant request being authorized. If the URI cannot be associated with | grant request being authorized. If the URI cannot be associated with | |||
a currently active request, the AS MUST display an error to the RO | a currently active request, the AS MUST display an error to the RO | |||
and MUST NOT attempt to redirect the RO back to any client instance | and MUST NOT attempt to redirect the RO back to any client instance, | |||
even if a redirect finish method is supplied (Section 2.5.2.1). If | even if a redirect finish method is supplied (Section 2.5.2.1). If | |||
the URI is not hosted by the AS directly, the means of communication | the URI is not hosted by the AS directly, the means of communication | |||
between the AS and the service provided by this URI are out of scope | between the AS and the service provided by this URI are out of scope | |||
for this specification. | for this specification. | |||
The client instance MUST NOT modify the URI when launching it, in | The client instance MUST NOT modify the URI when launching it; in | |||
particular the client instance MUST NOT add any parameters to the | particular, the client instance MUST NOT add any parameters to the | |||
URI. The URI MUST be reachable from the end user's browser, though | URI. The URI MUST be reachable from the end user's browser, though | |||
the URI MAY be opened on a separate device from the client instance | the URI MAY be opened on a separate device from the client instance | |||
itself. The URI MUST be accessible from an HTTP GET request and MUST | itself. The URI MUST be accessible from an HTTP GET request, and it | |||
be protected by HTTPS, be hosted on a server local to the RO's | MUST be protected by HTTPS, be hosted on a server local to the RO's | |||
browser ("localhost"), or use an application-specific URI scheme that | browser ("localhost"), or use an application-specific URI scheme that | |||
is loaded on the end user's device. | is loaded on the end user's device. | |||
4.1.2. Interaction at the Static User Code URI | 4.1.2. Interaction at the Static User Code URI | |||
When the end user is directed to enter a short code through the | When the end user is directed to enter a short code through the | |||
"user_code" (Section 3.3.3) mode, the client instance communicates | "user_code" mode (Section 3.3.3), the client instance communicates | |||
the user code to the end user and directs the end user to enter that | the user code to the end user and directs the end user to enter that | |||
code at an associated URI. The client instance MAY format the user | code at an associated URI. The client instance MAY format the user | |||
code in such a way as to facilitate memorability and transfer of the | code in such a way as to facilitate memorability and transfer of the | |||
code, so long as this formatting does not alter the value as accepted | code, so long as this formatting does not alter the value as accepted | |||
at the user code URI. For example, a client instance receiving the | at the user code URI. For example, a client instance receiving the | |||
user code "A1BC3DFF" could choose to display this to the user as | user code "A1BC3DFF" could choose to display this to the user as | |||
"A1BC 3DFF", breaking up the long string into two shorter strings. | "A1BC 3DFF", breaking up the long string into two shorter strings. | |||
When processing input codes, the AS MUST transform the input string | When processing input codes, the AS MUST transform the input string | |||
to remove invalid characters. In the above example, the space in | to remove invalid characters. In the above example, the space in | |||
between the two parts would be removed upon its entry into the | between the two parts would be removed upon its entry into the | |||
interactive form at the user code URI. Additionally, the AS MUST | interactive form at the user code URI. Additionally, the AS MUST | |||
treat user input as case insensitive. For example, if the user | treat user input as case insensitive. For example, if the user | |||
inputs the string "a1bc 3DFF", the AS will treat the input the same | inputs the string "a1bc 3DFF", the AS will treat the input the same | |||
as "A1BC3DFF". To facilitate this, it is RECOMMENDED that the AS use | as "A1BC3DFF". To facilitate this, it is RECOMMENDED that the AS use | |||
only ASCII letters and numbers as valid characters for the user code. | only ASCII letters and numbers as valid characters for the user code. | |||
It is RECOMMENDED that the AS choose from character values that are | It is RECOMMENDED that the AS choose from character values that are | |||
easily copied and typed without ambiguity. For example, some glyphs | easily copied and typed without ambiguity. For example, some glyphs | |||
have multiple Unicode code points for the same visual character, and | have multiple Unicode code points for the same visual character, and | |||
the end-user could potentially type a different character than what | the end user could potentially type a different character than what | |||
the AS has returned. For additional considerations of | the AS has returned. For additional considerations of | |||
internationalized character strings, see [RFC8264] | internationalized character strings, see [RFC8264]. | |||
This mode is designed to be used when the client instance is not able | This mode is designed to be used when the client instance is not able | |||
to communicate or facilitate launching an arbitrary URI. The | to communicate or facilitate launching an arbitrary URI. The | |||
associated URI could be statically configured with the client | associated URI could be statically configured with the client | |||
instance or in the client software's documentation. As a | instance or in the client software's documentation. As a | |||
consequence, these URIs SHOULD be short. The user code URI MUST be | consequence, these URIs SHOULD be short. The user code URI MUST be | |||
reachable from the end user's browser, though the URI is usually | reachable from the end user's browser, though the URI is usually | |||
opened on a separate device from the client instance itself. The URI | opened on a separate device from the client instance itself. The URI | |||
MUST be accessible from an HTTP GET request and MUST be protected by | MUST be accessible from an HTTP GET request, and it MUST be protected | |||
HTTPS, be hosted on a server local to the RO's browser ("localhost"), | by HTTPS, be hosted on a server local to the RO's browser | |||
or use an application-specific URI scheme that is loaded on the end | ("localhost"), or use an application-specific URI scheme that is | |||
user's device. | loaded on the end user's device. | |||
In many cases, the URI indicates a web page hosted at the AS, | In many cases, the URI indicates a web page hosted at the AS, | |||
allowing the AS to authenticate the end user as the RO and | allowing the AS to authenticate the end user as the RO and | |||
interactively provide consent. The value of the user code is used to | interactively provide consent. The value of the user code is used to | |||
identify the grant request being authorized. If the user code cannot | identify the grant request being authorized. If the user code cannot | |||
be associated with a currently active request, the AS MUST display an | be associated with a currently active request, the AS MUST display an | |||
error to the RO and MUST NOT attempt to redirect the RO back to any | error to the RO and MUST NOT attempt to redirect the RO back to any | |||
client instance even if a redirect finish method is supplied | client instance, even if a redirect finish method is supplied | |||
(Section 2.5.2.1). If the interaction component at the user code URI | (Section 2.5.2.1). If the interaction component at the user code URI | |||
is not hosted by the AS directly, the means of communication between | is not hosted by the AS directly, the means of communication between | |||
the AS and this URI, including communication of the user code itself, | the AS and this URI, including communication of the user code itself, | |||
are out of scope for this specification. | are out of scope for this specification. | |||
When the RO enters this code at the user code URI, the AS MUST | When the RO enters this code at the user code URI, the AS MUST | |||
uniquely identify the pending request that the code was associated | uniquely identify the pending request that the code was associated | |||
with. If the AS does not recognize the entered code, the interaction | with. If the AS does not recognize the entered code, the interaction | |||
component MUST display an error to the user. If the AS detects too | component MUST display an error to the user. If the AS detects too | |||
many unrecognized code enter attempts, the interaction component | many unrecognized code enter attempts, the interaction component | |||
SHOULD display an error to the user indicating too many attempts and | SHOULD display an error to the user indicating too many attempts and | |||
MAY take additional actions such as slowing down the input | MAY take additional actions such as slowing down the input | |||
interactions. The user should be warned as such an error state is | interactions. The user should be warned as such an error state is | |||
approached, if possible. | approached, if possible. | |||
4.1.3. Interaction at a Dynamic User Code URI | 4.1.3. Interaction at a Dynamic User Code URI | |||
When the end user is directed to enter a short code through the | When the end user is directed to enter a short code through the | |||
"user_code_uri" (Section 3.3.4) mode, the client instance | "user_code_uri" mode (Section 3.3.4), the client instance | |||
communicates the user code and associated URI to the end user and | communicates the user code and associated URI to the end user and | |||
directs the end user to enter that code at the URI. The client | directs the end user to enter that code at the URI. The client | |||
instance MAY format the user code in such a way as to facilitate | instance MAY format the user code in such a way as to facilitate | |||
memorability and transfer of the code, so long as this formatting | memorability and transfer of the code, so long as this formatting | |||
does not alter the value as accepted at the user code URI. For | does not alter the value as accepted at the user code URI. For | |||
example, a client instance receiving the user code "A1BC3DFF" could | example, a client instance receiving the user code "A1BC3DFF" could | |||
choose to display this to the user as "A1BC 3DFF", breaking up the | choose to display this to the user as "A1BC 3DFF", breaking up the | |||
long string into two shorter strings. | long string into two shorter strings. | |||
When processing input codes, the AS MUST transform the input string | When processing input codes, the AS MUST transform the input string | |||
skipping to change at page 82, line 23 ¶ | skipping to change at line 3688 ¶ | |||
This mode is used when the client instance is not able to facilitate | This mode is used when the client instance is not able to facilitate | |||
launching a complex arbitrary URI but can communicate arbitrary | launching a complex arbitrary URI but can communicate arbitrary | |||
values like URIs. As a consequence, these URIs SHOULD be short | values like URIs. As a consequence, these URIs SHOULD be short | |||
enough to allow the URI to be typed by the end user, such as a total | enough to allow the URI to be typed by the end user, such as a total | |||
length of 20 characters or fewer. The client instance MUST NOT | length of 20 characters or fewer. The client instance MUST NOT | |||
modify the URI when communicating it to the end user; in particular | modify the URI when communicating it to the end user; in particular | |||
the client instance MUST NOT add any parameters to the URI. The user | the client instance MUST NOT add any parameters to the URI. The user | |||
code URI MUST be reachable from the end user's browser, though the | code URI MUST be reachable from the end user's browser, though the | |||
URI is usually be opened on a separate device from the client | URI is usually be opened on a separate device from the client | |||
instance itself. The URI MUST be accessible from an HTTP GET request | instance itself. The URI MUST be accessible from an HTTP GET | |||
and MUST be protected by HTTPS, be hosted on a server local to the | request, and it MUST be protected by HTTPS, be hosted on a server | |||
RO's browser ("localhost"), or use an application-specific URI scheme | local to the RO's browser ("localhost"), or use an application- | |||
that is loaded on the end user's device. | specific URI scheme that is loaded on the end user's device. | |||
In many cases, the URI indicates a web page hosted at the AS, | In many cases, the URI indicates a web page hosted at the AS, | |||
allowing the AS to authenticate the end user as the RO and | allowing the AS to authenticate the end user as the RO and | |||
interactively provide consent. The value of the user code is used to | interactively provide consent. The value of the user code is used to | |||
identify the grant request being authorized. If the user code cannot | identify the grant request being authorized. If the user code cannot | |||
be associated with a currently active request, the AS MUST display an | be associated with a currently active request, the AS MUST display an | |||
error to the RO and MUST NOT attempt to redirect the RO back to any | error to the RO and MUST NOT attempt to redirect the RO back to any | |||
client instance even if a redirect finish method is supplied | client instance, even if a redirect finish method is supplied | |||
(Section 2.5.2.1). If the interaction component at the user code URI | (Section 2.5.2.1). If the interaction component at the user code URI | |||
is not hosted by the AS directly, the means of communication between | is not hosted by the AS directly, the means of communication between | |||
the AS and this URI, including communication of the user code itself, | the AS and this URI, including communication of the user code itself, | |||
are out of scope for this specification. | are out of scope for this specification. | |||
When the RO enters this code at the given URI, the AS MUST uniquely | When the RO enters this code at the given URI, the AS MUST uniquely | |||
identify the pending request that the code was associated with. If | identify the pending request that the code was associated with. If | |||
the AS does not recognize the entered code, the interaction component | the AS does not recognize the entered code, the interaction component | |||
MUST display an error to the user. If the AS detects too many | MUST display an error to the user. If the AS detects too many | |||
unrecognized code enter attempts, the interaction component SHOULD | unrecognized code enter attempts, the interaction component SHOULD | |||
display an error to the user indicating too many attempts and MAY | display an error to the user indicating too many attempts and MAY | |||
take additional actions such as slowing down the input interactions. | take additional actions such as slowing down the input interactions. | |||
The user should be warned as such an error state is approached, if | The user should be warned as such an error state is approached, if | |||
possible. | possible. | |||
4.1.4. Interaction through an Application URI | 4.1.4. Interaction through an Application URI | |||
When the client instance is directed to launch an application through | When the client instance is directed to launch an application through | |||
the "app" (Section 3.3.2) mode, the client launches the URI as | the "app" mode (Section 3.3.2), the client launches the URI as | |||
appropriate to the system, such as through a deep link or custom URI | appropriate to the system, such as through a deep link or custom URI | |||
scheme registered to a mobile application. The means by which the AS | scheme registered to a mobile application. The means by which the AS | |||
and the launched application communicate with each other and perform | and the launched application communicate with each other and perform | |||
any of the required actions are out of scope for this specification. | any of the required actions are out of scope for this specification. | |||
4.2. Post-Interaction Completion | 4.2. Post-Interaction Completion | |||
If an interaction "finish" (Section 3.3.5) method is associated with | If an interaction "finish" method (Section 3.3.5) is associated with | |||
the current request, the AS MUST follow the appropriate method upon | the current request, the AS MUST follow the appropriate method upon | |||
completion of interaction in order to signal the client instance to | completion of interaction in order to signal the client instance to | |||
continue, except for some limited error cases discussed below. If a | continue, except for some limited error cases discussed below. If a | |||
finish method is not available, the AS SHOULD instruct the RO to | finish method is not available, the AS SHOULD instruct the RO to | |||
return to the client instance upon completion. In such cases, it is | return to the client instance upon completion. In such cases, it is | |||
expected that the client instance will poll the continuation endpoint | expected that the client instance will poll the continuation endpoint | |||
as described in Section 5.2. | as described in Section 5.2. | |||
The AS MUST create an interaction reference and associate that | The AS MUST create an interaction reference and associate that | |||
reference with the current interaction and the underlying pending | reference with the current interaction and the underlying pending | |||
request. The interaction reference value is an ASCII string | request. The interaction reference value is an ASCII string | |||
consisting of only unreserved characters per Section 2.3 of | consisting of only unreserved characters per Section 2.3 of | |||
[RFC3986]. The interaction reference value MUST be sufficiently | [RFC3986]. The interaction reference value MUST be sufficiently | |||
random so as not to be guessable by an attacker. The interaction | random so as not to be guessable by an attacker. The interaction | |||
reference MUST be one-time-use to prevent interception and replay | reference MUST be one-time-use to prevent interception and replay | |||
attacks. | attacks. | |||
The AS MUST calculate a hash value based on the client instance and | The AS MUST calculate a hash value based on the client instance, AS | |||
AS nonces and the interaction reference, as described in | nonces, and the interaction reference, as described in Section 4.2.3. | |||
Section 4.2.3. The client instance will use this value to validate | The client instance will use this value to validate the "finish" | |||
the "finish" call. | call. | |||
All interaction finish methods MUST define a way to convey the hash | All interaction finish methods MUST define a way to convey the hash | |||
and interaction reference back to the client instance. When an | and interaction reference back to the client instance. When an | |||
interaction finish method is used, the client instance MUST present | interaction finish method is used, the client instance MUST present | |||
the interaction reference back to the AS as part of its continuation | the interaction reference back to the AS as part of its continuation | |||
request (Section 5.1). | request (Section 5.1). | |||
Note that in many error cases, such as when the RO has denied access, | Note that in many error cases, such as when the RO has denied access, | |||
the "finish" method is still enacted by the AS. This pattern allows | the "finish" method is still enacted by the AS. This pattern allows | |||
the client instance to potentially recover from the error state by | the client instance to potentially recover from the error state by | |||
modifying its request or providing additional information directly to | modifying its request or providing additional information directly to | |||
the AS in a continuation request. The AS MUST NOT follow the | the AS in a continuation request. The AS MUST NOT follow the | |||
"finish" method in the following circumstances: | "finish" method in the following circumstances: | |||
* The AS has determined that any URIs involved with the finish | * The AS has determined that any URIs involved with the finish | |||
method are dangerous or blocked. | method are dangerous or blocked. | |||
* The AS cannot determine which ongoing grant request is being | * The AS cannot determine which ongoing grant request is being | |||
referenced. | referenced. | |||
* The ongoing grant request has been cancelled or otherwise blocked. | * The ongoing grant request has been canceled or otherwise blocked. | |||
4.2.1. Completing Interaction with a Browser Redirect to the Callback | 4.2.1. Completing Interaction with a Browser Redirect to the Callback | |||
URI | URI | |||
When using the redirect interaction finish method defined in | When using the redirect interaction finish method defined in Sections | |||
Section 2.5.2.1 and Section 3.3.5, the AS signals to the client | 2.5.2.1 and 3.3.5, the AS signals to the client instance that | |||
instance that interaction is complete and the request can be | interaction is complete and the request can be continued by directing | |||
continued by directing the RO (in their browser) back to the client | the RO (in their browser) back to the client instance's redirect URI. | |||
instance's redirect URI. | ||||
The AS secures this redirect by adding the hash and interaction | The AS secures this redirect by adding the hash and interaction | |||
reference as query parameters to the client instance's redirect URI. | reference as query parameters to the client instance's redirect URI. | |||
hash: The interaction hash value as described in Section 4.2.3. | hash: The interaction hash value as described in Section 4.2.3. | |||
REQUIRED. | REQUIRED. | |||
interact_ref: The interaction reference generated for this | interact_ref: The interaction reference generated for this | |||
interaction. REQUIRED. | interaction. REQUIRED. | |||
The means of directing the RO to this URI are outside the scope of | The means of directing the RO to this URI are outside the scope of | |||
this specification, but common options include redirecting the RO | this specification, but common options include redirecting the RO | |||
from a web page and launching the system browser with the target URI. | from a web page and launching the system browser with the target URI. | |||
See Section 13.19 for considerations on which HTTP status code to use | See Section 11.19 for considerations on which HTTP status code to use | |||
when redirecting a request that potentially contains credentials. | when redirecting a request that potentially contains credentials. | |||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
https://client.example.net/return/123455\ | https://client.example.net/return/123455\ | |||
?hash=x-gguKWTj8rQf7d7i3w3UhzvuJ5bpOlKyAlVpLxBffY\ | ?hash=x-gguKWTj8rQf7d7i3w3UhzvuJ5bpOlKyAlVpLxBffY\ | |||
&interact_ref=4IFWWIKYBC2PQ6U56NL1 | &interact_ref=4IFWWIKYBC2PQ6U56NL1 | |||
The client instance MUST be able to process a request on the URI. If | The client instance MUST be able to process a request on the URI. If | |||
the URI is HTTP, the request MUST be an HTTP GET. | the URI is HTTP, the request MUST be an HTTP GET. | |||
When receiving the request, the client instance MUST parse the query | When receiving the request, the client instance MUST parse the query | |||
parameters to extract the hash and interaction reference values. The | parameters to extract the hash and interaction reference values. The | |||
client instance MUST calculate and validate the hash value as | client instance MUST calculate and validate the hash value as | |||
described in Section 4.2.3. If the hash validates, the client | described in Section 4.2.3. If the hash validates, the client | |||
instance sends a continuation request to the AS as described in | instance sends a continuation request to the AS as described in | |||
Section 5.1 using the interaction reference value received here. If | Section 5.1, using the interaction reference value received here. If | |||
the hash does not validate, the client instance MUST NOT send the | the hash does not validate, the client instance MUST NOT send the | |||
interaction reference to the AS. | interaction reference to the AS. | |||
4.2.2. Completing Interaction with a Direct HTTP Request Callback | 4.2.2. Completing Interaction with a Direct HTTP Request Callback | |||
When using the push interaction finish method defined in | When using the push interaction finish method defined in Sections | |||
Section 2.5.2.1 and Section 3.3.5, the AS signals to the client | 2.5.2.1 and 3.3.5, the AS signals to the client instance that | |||
instance that interaction is complete and the request can be | interaction is complete and the request can be continued by sending | |||
continued by sending an HTTP POST request to the client instance's | an HTTP POST request to the client instance's callback URI. | |||
callback URI. | ||||
The HTTP message content is a JSON object consisting of the following | The HTTP message content is a JSON object consisting of the following | |||
two fields: | two fields: | |||
hash (string): The interaction hash value as described in | hash (string): The interaction hash value as described in | |||
Section 4.2.3. REQUIRED. | Section 4.2.3. REQUIRED. | |||
interact_ref (string) The interaction reference generated for this | interact_ref (string): The interaction reference generated for this | |||
interaction. REQUIRED. | interaction. REQUIRED. | |||
POST /push/554321 HTTP/1.1 | POST /push/554321 HTTP/1.1 | |||
Host: client.example.net | Host: client.example.net | |||
Content-Type: application/json | Content-Type: application/json | |||
{ | { | |||
"hash": "pjdHcrti02HLCwGU3qhUZ3wZXt8IjrV_BtE3oUyOuKNk", | "hash": "pjdHcrti02HLCwGU3qhUZ3wZXt8IjrV_BtE3oUyOuKNk", | |||
"interact_ref": "4IFWWIKYBC2PQ6U56NL1" | "interact_ref": "4IFWWIKYBC2PQ6U56NL1" | |||
} | } | |||
Since the AS is making an outbound connection to a URI supplied by an | Since the AS is making an outbound connection to a URI supplied by an | |||
outside party (the client instance), the AS MUST protect itself | outside party (the client instance), the AS MUST protect itself | |||
against SSRF attacks when making this call as discussed in | against Server-Side Request Forgery (SSRF) attacks when making this | |||
Section 13.34. | call, as discussed in Section 11.34. | |||
When receiving the request, the client instance MUST parse the JSON | When receiving the request, the client instance MUST parse the JSON | |||
object and validate the hash value as described in Section 4.2.3. If | object and validate the hash value as described in Section 4.2.3. If | |||
either fails, the client instance MUST return an unknown_interaction | either fails, the client instance MUST return an unknown_interaction | |||
error (Section 3.6). If the hash validates, the client instance | error (Section 3.6). If the hash validates, the client instance | |||
sends a continuation request to the AS as described in Section 5.1 | sends a continuation request to the AS as described in Section 5.1, | |||
using the interaction reference value received here. | using the interaction reference value received here. | |||
4.2.3. Calculating the interaction hash | 4.2.3. Calculating the Interaction Hash | |||
The "hash" parameter in the request to the client instance's callback | The "hash" parameter in the request to the client instance's callback | |||
URI ties the front channel response to an ongoing request by using | URI ties the front-channel response to an ongoing request by using | |||
values known only to the parties involved. This security mechanism | values known only to the parties involved. This security mechanism | |||
allows the client instance to protect itself against several kinds of | allows the client instance to protect itself against several kinds of | |||
session fixation and injection attacks as discussed in Section 13.25 | session fixation and injection attacks as discussed in Section 11.25. | |||
and related sections. The AS MUST always provide this hash, and the | The AS MUST always provide this hash, and the client instance MUST | |||
client instance MUST validate the hash when received. | validate the hash when received. | |||
To calculate the "hash" value, the party doing the calculation | To calculate the "hash" value, the party doing the calculation | |||
creates a hash base string by concatenating the following values in | creates a hash base string by concatenating the following values in | |||
the following order using a single newline (0x0A) character to | the following order using a single newline (0x0A) character to | |||
separate them: | separate them: | |||
* the "nonce" value sent by the client instance in the interaction | * the "nonce" value sent by the client instance in the interaction | |||
"finish" section of the initial request (Section 2.5.2) | finish field of the initial request (Section 2.5.2) | |||
* the AS's nonce value from the interaction finish response | * the AS's nonce value from the interaction finish response | |||
(Section 3.3.5) | (Section 3.3.5) | |||
* the "interact_ref" returned from the AS as part of the interaction | * the "interact_ref" returned from the AS as part of the interaction | |||
finish method (Section 4.2) | finish method (Section 4.2) | |||
* the grant endpoint URI the client instance used to make its | * the grant endpoint URI the client instance used to make its | |||
initial request (Section 2) | initial request (Section 2) | |||
There is no padding or whitespace before or after any of the lines, | There is no padding or whitespace before or after any of the lines | |||
and no trailing newline character. The following non-normative | and no trailing newline character. The following non-normative | |||
example shows a constructed hash base string consisting of these four | example shows a constructed hash base string consisting of these four | |||
elements. | elements. | |||
VJLO6A4CATR0KRO | VJLO6A4CATR0KRO | |||
MBDOFXG4Y5CVJCX821LH | MBDOFXG4Y5CVJCX821LH | |||
4IFWWIKYB2PQ6U56NL1 | 4IFWWIKYB2PQ6U56NL1 | |||
https://server.example.com/tx | https://server.example.com/tx | |||
The party then hashes the bytes of the ASCII encoding of this string | The party then hashes the bytes of the ASCII encoding of this string | |||
with the appropriate algorithm based on the "hash_method" parameter | with the appropriate algorithm based on the "hash_method" parameter | |||
under the "finish" key of the interaction finish request | under the "finish" key of the interaction finish request | |||
(Section 2.5.2). The resulting byte array from the hash function is | (Section 2.5.2). The resulting byte array from the hash function is | |||
then encoded using URL-Safe Base64 with no padding [RFC4648]. The | then encoded using URL-Safe base64 with no padding [RFC4648]. The | |||
resulting string is the hash value. | resulting string is the hash value. | |||
If provided, the "hash_method" value MUST be one of the hash name | If provided, the "hash_method" value MUST be one of the hash name | |||
strings defined in the IANA Named Information Hash Algorithm Registry | strings defined in the IANA "Named Information Hash Algorithm | |||
[HASH-ALG]. If the "hash_method" value is not present in the client | Registry" [HASH-ALG]. If the "hash_method" value is not present in | |||
instance's request, the algorithm defaults to "sha-256". | the client instance's request, the algorithm defaults to "sha-256". | |||
For example, the "sha-256" hash method consists of hashing the input | For example, the "sha-256" hash method consists of hashing the input | |||
string with the 256-bit SHA2 algorithm. The following is the encoded | string with the 256-bit SHA2 algorithm. The following is the encoded | |||
"sha-256" hash of the above example hash base string. | "sha-256" hash of the hash base string in the example above. | |||
x-gguKWTj8rQf7d7i3w3UhzvuJ5bpOlKyAlVpLxBffY | x-gguKWTj8rQf7d7i3w3UhzvuJ5bpOlKyAlVpLxBffY | |||
For another example, the "sha3-512" hash method consists of hashing | As another example, the "sha3-512" hash method consists of hashing | |||
the input string with the 512-bit SHA3 algorithm. The following is | the input string with the 512-bit SHA3 algorithm. The following is | |||
the encoded "sha3-512" hash of the above example hash base string. | the encoded "sha3-512" hash of the hash base string in the example | |||
above. | ||||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
pyUkVJSmpqSJMaDYsk5G8WCvgY91l-agUPe1wgn-cc5rUtN69gPI2-S_s-Eswed8iB4\ | pyUkVJSmpqSJMaDYsk5G8WCvgY91l-agUPe1wgn-cc5rUtN69gPI2-S_s-Eswed8iB4\ | |||
PJ_a5Hg6DNi7qGgKwSQ | PJ_a5Hg6DNi7qGgKwSQ | |||
5. Continuing a Grant Request | 5. Continuing a Grant Request | |||
While it is possible for the AS to return an approved grant response | While it is possible for the AS to return an approved grant response | |||
(Section 3) with all the client instance's requested information | (Section 3) with all the client instance's requested information | |||
skipping to change at page 87, line 43 ¶ | skipping to change at line 3936 ¶ | |||
The ability to continue an already-started request allows the client | The ability to continue an already-started request allows the client | |||
instance to perform several important functions, including presenting | instance to perform several important functions, including presenting | |||
additional information from interaction, modifying the initial | additional information from interaction, modifying the initial | |||
request, and revoking a grant request in progress. | request, and revoking a grant request in progress. | |||
To enable this ongoing negotiation, the AS provides a continuation | To enable this ongoing negotiation, the AS provides a continuation | |||
API to the client software. The AS returns a continue field in the | API to the client software. The AS returns a continue field in the | |||
response (Section 3.1) that contains information the client instance | response (Section 3.1) that contains information the client instance | |||
needs to access this API, including a URI to access as well as a | needs to access this API, including a URI to access as well as a | |||
special access token to use during the requests, called the | special access token to use during the requests, called the | |||
_continuation access token_. | "continuation access token". | |||
All requests to the continuation API are protected by a bound | All requests to the continuation API are protected by a bound | |||
continuation access token. The continuation access token is bound to | continuation access token. The continuation access token is bound to | |||
the same key and method the client instance used to make the initial | the same key and method the client instance used to make the initial | |||
request (or its most recent rotation). As a consequence, when the | request (or its most recent rotation). As a consequence, when the | |||
client instance makes any calls to the continuation URI, the client | client instance makes any calls to the continuation URI, the client | |||
instance MUST present the continuation access token as described in | instance MUST present the continuation access token as described in | |||
Section 7.2 and present proof of the client instance's key (or its | Section 7.2 and present proof of the client instance's key (or its | |||
most recent rotation) by signing the request as described in | most recent rotation) by signing the request as described in | |||
Section 7.3. The AS MUST validate the signature and ensure that it | Section 7.3. The AS MUST validate the signature and ensure that it | |||
is bound to the appropriate key for the continuation access token. | is bound to the appropriate key for the continuation access token. | |||
Access tokens other than the continuation access tokens MUST NOT be | Access tokens other than the continuation access tokens MUST NOT be | |||
usable for continuation requests. Conversely, continuation access | usable for continuation requests. Conversely, continuation access | |||
tokens MUST NOT be usable to make authorized requests to RS's, even | tokens MUST NOT be usable to make authorized requests to RSs, even if | |||
if co-located within the AS. | co-located within the AS. | |||
In the following non-normative example, the client instance makes a | In the following non-normative example, the client instance makes a | |||
POST request to a unique URI and signs the request with HTTP Message | POST request to a unique URI and signs the request with HTTP message | |||
Signatures: | signatures: | |||
POST /continue/KSKUOMUKM HTTP/1.1 | POST /continue/KSKUOMUKM HTTP/1.1 | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Host: server.example.com | Host: server.example.com | |||
Content-Length: 0 | Content-Length: 0 | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
The AS MUST be able to tell from the client instance's request which | The AS MUST be able to tell from the client instance's request which | |||
specific ongoing request is being accessed, using a combination of | specific ongoing request is being accessed, using a combination of | |||
the continuation URI and the continuation access token. If the AS | the continuation URI and the continuation access token. If the AS | |||
cannot determine a single active grant request to map the | cannot determine a single active grant request to map the | |||
continuation request to, the AS MUST return an invalid_continuation | continuation request to, the AS MUST return an invalid_continuation | |||
error (Section 3.6). | error (Section 3.6). | |||
In the following non-normative example, the client instance makes a | In the following non-normative example, the client instance makes a | |||
POST request to a stable continuation endpoint URI with the | POST request to a stable continuation endpoint URI with the | |||
interaction reference (Section 5.1), includes the access token, and | interaction reference (Section 5.1), includes the access token, and | |||
signs with HTTP Message Signatures: | signs with HTTP message signatures: | |||
POST /continue HTTP/1.1 | POST /continue HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
Content-Digest: sha-256=... | Content-Digest: sha-256=... | |||
{ | { | |||
"interact_ref": "4IFWWIKYBC2PQ6U56NL1" | "interact_ref": "4IFWWIKYBC2PQ6U56NL1" | |||
} | } | |||
In following non-normative alternative example, the client instance | In the following non-normative alternative example, the client | |||
had been provided a continuation URI unique to this ongoing grant | instance had been provided a continuation URI unique to this ongoing | |||
request: | grant request: | |||
POST /tx/rxgIIEVMBV-BQUO7kxbsp HTTP/1.1 | POST /tx/rxgIIEVMBV-BQUO7kxbsp HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Authorization: GNAP eyJhbGciOiJub25lIiwidHlwIjoiYmFkIn0 | Authorization: GNAP eyJhbGciOiJub25lIiwidHlwIjoiYmFkIn0 | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
Content-Digest: sha-256=... | Content-Digest: sha-256=... | |||
{ | { | |||
skipping to change at page 89, line 46 ¶ | skipping to change at line 4018 ¶ | |||
If a wait parameter was included in the continuation response | If a wait parameter was included in the continuation response | |||
(Section 3.1), the client instance MUST NOT call the continuation URI | (Section 3.1), the client instance MUST NOT call the continuation URI | |||
prior to waiting the number of seconds indicated. If no wait period | prior to waiting the number of seconds indicated. If no wait period | |||
is indicated, the client instance MUST NOT poll immediately and | is indicated, the client instance MUST NOT poll immediately and | |||
SHOULD wait at least 5 seconds. If the client instance does not | SHOULD wait at least 5 seconds. If the client instance does not | |||
respect the given wait period, the AS MUST return the too_fast error | respect the given wait period, the AS MUST return the too_fast error | |||
(Section 3.6). | (Section 3.6). | |||
The response from the AS is a JSON object of a grant response and MAY | The response from the AS is a JSON object of a grant response and MAY | |||
contain any of the fields described in Section 3, as described in | contain any of the fields described in Section 3, as described in | |||
more detail in the sections below. | more detail in the subsections below. | |||
If the AS determines that the client instance can make further | If the AS determines that the client instance can make further | |||
requests to the continuation API, the AS MUST include a new | requests to the continuation API, the AS MUST include a new | |||
"continue" response (Section 3.1). The new continue response MUST | continuation response (Section 3.1). The new continuation response | |||
include a continuation access token as well, and this token SHOULD be | MUST include a continuation access token as well, and this token | |||
a new access token, invalidating the previous access token. If the | SHOULD be a new access token, invalidating the previous access token. | |||
AS does not return a new continue response, the client instance MUST | If the AS does not return a new continuation response, the client | |||
NOT make an additional continuation request. If a client instance | instance MUST NOT make an additional continuation request. If a | |||
does so, the AS MUST return an invalid_continuation error | client instance does so, the AS MUST return an invalid_continuation | |||
(Section 3.6). | error (Section 3.6). | |||
For continuation functions that require the client instance to send a | For continuation functions that require the client instance to send | |||
message content, the content MUST be a JSON object. | message content, the content MUST be a JSON object. | |||
For all requests to the grant continuation API, the AS MAY make use | For all requests to the grant continuation API, the AS MAY make use | |||
of long polling mechanisms such as discussed in [RFC6202]. That is | of long polling mechanisms such as those discussed in [RFC6202]. | |||
to say, instead of returning the current status immediately, the long | That is to say, instead of returning the current status immediately, | |||
polling technique allows the AS additional time to process and | the long polling technique allows the AS additional time to process | |||
fulfill the request before returning the HTTP response to the client | and fulfill the request before returning the HTTP response to the | |||
instance. For example, when the AS receives a continuation request | client instance. For example, when the AS receives a continuation | |||
but the grant request is in the _processing_ state, the AS could wait | request but the grant request is in the _processing_ state, the AS | |||
until the grant request has moved to the _pending_ or _approved_ | could wait until the grant request has moved to the _pending_ or | |||
state before returning the response message. | _approved_ state before returning the response message. | |||
5.1. Continuing After a Completed Interaction | 5.1. Continuing after a Completed Interaction | |||
When the AS responds to the client instance's finish method as in | When the AS responds to the client instance's finish method as in | |||
Section 4.2.1, this response includes an interaction reference. The | Section 4.2.1, this response includes an interaction reference. The | |||
client instance MUST include that value as the field interact_ref in | client instance MUST include that value as the field interact_ref in | |||
a POST request to the continuation URI. | a POST request to the continuation URI. | |||
POST /continue HTTP/1.1 | POST /continue HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
skipping to change at page 91, line 6 ¶ | skipping to change at line 4072 ¶ | |||
Since the interaction reference is a one-time-use value as described | Since the interaction reference is a one-time-use value as described | |||
in Section 4.2.1, if the client instance needs to make additional | in Section 4.2.1, if the client instance needs to make additional | |||
continuation calls after this request, the client instance MUST NOT | continuation calls after this request, the client instance MUST NOT | |||
include the interaction reference in subsequent calls. If the AS | include the interaction reference in subsequent calls. If the AS | |||
detects a client instance submitting an interaction reference when | detects a client instance submitting an interaction reference when | |||
the request is not in the _pending_ state, the AS MUST return a | the request is not in the _pending_ state, the AS MUST return a | |||
too_many_attempts error (Section 3.6) and SHOULD invalidate the | too_many_attempts error (Section 3.6) and SHOULD invalidate the | |||
ongoing request by moving it to the _finalized_ state. | ongoing request by moving it to the _finalized_ state. | |||
If the grant request is in the _approved_ state, the grant response | If the grant request is in the _approved_ state, the grant response | |||
(Section 3) MAY contain any newly-created access tokens (Section 3.2) | (Section 3) MAY contain any newly created access tokens (Section 3.2) | |||
or newly-released subject information (Section 3.4). The response | or newly released subject information (Section 3.4). The response | |||
MAY contain a new "continue" response (Section 3.1) as described | MAY contain a new continuation response (Section 3.1) as described | |||
above. The response SHOULD NOT contain any interaction responses | above. The response SHOULD NOT contain any interaction responses | |||
(Section 3.3). | (Section 3.3). | |||
If the grant request is in the _pending_ state, the grant response | If the grant request is in the _pending_ state, the grant response | |||
(Section 3) MUST NOT contain access tokens or subject information, | (Section 3) MUST NOT contain access tokens or subject information and | |||
and MAY contain a new interaction responses (Section 3.3) to any | MAY contain a new interaction response (Section 3.3) to any | |||
interaction methods that have not been exhausted at the AS. | interaction methods that have not been exhausted at the AS. | |||
For example, if the request is successful in causing the AS to issue | For example, if the request is successful in causing the AS to issue | |||
access tokens and release opaque subject claims, the response could | access tokens and release opaque subject claims, the response could | |||
look like this: | look like this: | |||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
{ | { | |||
"access_token": { | "access_token": { | |||
skipping to change at page 91, line 41 ¶ | skipping to change at line 4107 ¶ | |||
} | } | |||
}, | }, | |||
"subject": { | "subject": { | |||
"sub_ids": [ { | "sub_ids": [ { | |||
"format": "opaque", | "format": "opaque", | |||
"id": "J2G8G8O4AZ" | "id": "J2G8G8O4AZ" | |||
} ] | } ] | |||
} | } | |||
} | } | |||
With the above example, the client instance can not make an | With the above example, the client instance cannot make an additional | |||
additional continuation request because a continue field is not | continuation request because a continue field is not included. | |||
included. | ||||
In the following non-normative example, the RO has denied the client | In the following non-normative example, the RO has denied the client | |||
instance's request and the AS responds with the following response: | instance's request, and the AS responds with the following response: | |||
{ | { | |||
"error": "user_denied", | "error": "user_denied", | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "33OMUKMKSKU80UPRY5NM" | "value": "33OMUKMKSKU80UPRY5NM" | |||
}, | }, | |||
"uri": "https://server.example.com/continue", | "uri": "https://server.example.com/continue", | |||
"wait": 30 | "wait": 30 | |||
} | } | |||
} | } | |||
In the preceding example, the AS includes the continue field in the | In the preceding example, the AS includes the continue field in the | |||
response. Therefore, the client instance can continue the grant | response. Therefore, the client instance can continue the grant | |||
negotiation process, perhaps modifying the request as discussed in | negotiation process, perhaps modifying the request as discussed in | |||
Section 5.3. | Section 5.3. | |||
5.2. Continuing During Pending Interaction (Polling) | 5.2. Continuing during Pending Interaction (Polling) | |||
When the client instance does not include a finish parameter, the | When the client instance does not include a finish parameter, the | |||
client instance will often need to poll the AS until the RO has | client instance will often need to poll the AS until the RO has | |||
authorized the request. To do so, the client instance makes a POST | authorized the request. To do so, the client instance makes a POST | |||
request to the continuation URI as in Section 5.1, but does not | request to the continuation URI as in Section 5.1 but does not | |||
include message content. | include message content. | |||
POST /continue HTTP/1.1 | POST /continue HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
If the grant request is in the _approved_ state, the grant response | If the grant request is in the _approved_ state, the grant response | |||
(Section 3) MAY contain any newly-created access tokens (Section 3.2) | (Section 3) MAY contain any newly created access tokens (Section 3.2) | |||
or newly-released subject claims (Section 3.4). The response MAY | or newly released subject claims (Section 3.4). The response MAY | |||
contain a new "continue" response (Section 3.1) as described above. | contain a new continuation response (Section 3.1) as described above. | |||
If a continue field is included, it SHOULD include a wait field to | If a continue field is included, it SHOULD include a wait field to | |||
facilitate a reasonable polling rate by the client instance. The | facilitate a reasonable polling rate by the client instance. The | |||
response SHOULD NOT contain interaction responses (Section 3.3). | response SHOULD NOT contain interaction responses (Section 3.3). | |||
If the grant request is in the _pending_ state, the grant response | If the grant request is in the _pending_ state, the grant response | |||
(Section 3) MUST NOT contain access tokens or subject information, | (Section 3) MUST NOT contain access tokens or subject information and | |||
and MAY contain a new interaction responses (Section 3.3) to any | MAY contain a new interaction response (Section 3.3) to any | |||
interaction methods that have not been exhausted at the AS. | interaction methods that have not been exhausted at the AS. | |||
For example, if the request has not yet been authorized by the RO, | For example, if the request has not yet been authorized by the RO, | |||
the AS could respond by telling the client instance to make another | the AS could respond by telling the client instance to make another | |||
continuation request in the future. In the following non-normative | continuation request in the future. In the following non-normative | |||
example, a new, unique access token has been issued for the call, | example, a new, unique access token has been issued for the call, | |||
which the client instance will use in its next continuation request. | which the client instance will use in its next continuation request. | |||
{ | { | |||
"continue": { | "continue": { | |||
skipping to change at page 93, line 39 ¶ | skipping to change at line 4196 ¶ | |||
} | } | |||
}, | }, | |||
"subject": { | "subject": { | |||
"sub_ids": [ { | "sub_ids": [ { | |||
"format": "opaque", | "format": "opaque", | |||
"id": "J2G8G8O4AZ" | "id": "J2G8G8O4AZ" | |||
} ] | } ] | |||
} | } | |||
} | } | |||
See Section 13.23 for considerations on polling for continuation | See Section 11.23 for considerations on polling for continuation | |||
without an interaction finish method. | without an interaction finish method. | |||
In error conditions, the AS responds to the client instance with the | In error conditions, the AS responds to the client instance with an | |||
error code as discussed in Section 3.6. For example, if the client | error code as discussed in Section 3.6. For example, if the client | |||
instance has polled too many times before the RO has approved the | instance has polled too many times before the RO has approved the | |||
request, the AS would respond with a message like the following: | request, the AS would respond with a message like the following: | |||
{ | { | |||
"error": "too_many_attempts" | "error": "too_many_attempts" | |||
} | } | |||
Since this response does not include a continue section, the client | ||||
Since this response does not include a continue field, the client | ||||
instance cannot continue to poll the AS for additional updates and | instance cannot continue to poll the AS for additional updates and | |||
the grant request is _finalized_. If the client instance still needs | the grant request is _finalized_. If the client instance still needs | |||
access to the resource, it will need to start with a new grant | access to the resource, it will need to start with a new grant | |||
request. | request. | |||
5.3. Modifying an Existing Request | 5.3. Modifying an Existing Request | |||
The client instance might need to modify an ongoing request, whether | The client instance might need to modify an ongoing request, whether | |||
or not tokens have already been issued or subject information has | or not tokens have already been issued or subject information has | |||
already been released. In such cases, the client instance makes an | already been released. In such cases, the client instance makes an | |||
skipping to change at page 94, line 27 ¶ | skipping to change at line 4231 ¶ | |||
considered unchanged from the original request. | considered unchanged from the original request. | |||
A grant request associated with a modification request MUST be in the | A grant request associated with a modification request MUST be in the | |||
_approved_ or _pending_ state. When the AS receives a valid | _approved_ or _pending_ state. When the AS receives a valid | |||
modification request, the AS MUST place the grant request into the | modification request, the AS MUST place the grant request into the | |||
_processing_ state and re-evaluate the authorization in the new | _processing_ state and re-evaluate the authorization in the new | |||
context created by the update request, since the extent and context | context created by the update request, since the extent and context | |||
of the request could have changed. | of the request could have changed. | |||
The client instance MAY include the access_token and subject fields | The client instance MAY include the access_token and subject fields | |||
as described in Section 2.1 and Section 2.2. Inclusion of these | as described in Sections 2.1 and 2.2. Inclusion of these fields | |||
fields override any values in the initial request, which MAY trigger | override any values in the initial request, which MAY trigger | |||
additional requirements and policies by the AS. For example, if the | additional requirements and policies by the AS. For example, if the | |||
client instance is asking for more access, the AS could require | client instance is asking for more access, the AS could require | |||
additional interaction with the RO to gather additional consent. If | additional interaction with the RO to gather additional consent. If | |||
the client instance is asking for more limited access, the AS could | the client instance is asking for more limited access, the AS could | |||
determine that sufficient authorization has been granted to the | determine that sufficient authorization has been granted to the | |||
client instance and return the more limited access rights | client instance and return the more limited access rights | |||
immediately. If the grant request was previously in the _approved_ | immediately. If the grant request was previously in the _approved_ | |||
state, the AS could decide to remember the larger scale of access | state, the AS could decide to remember the larger scale of access | |||
rights associated with the grant request, allowing the client | rights associated with the grant request, allowing the client | |||
instance to make subsequent requests of different subsets of granted | instance to make subsequent requests of different subsets of granted | |||
access. The details of this processing are out of scope for this | access. The details of this processing are out of scope for this | |||
specification, but a one possible approach is as follows: | specification, but a one possible approach is as follows: | |||
1. A client instance requests access to Foo, and is granted by the | 1. A client instance requests access to Foo, and this is granted by | |||
RO. This results in an access token, AT1. | the RO. This results in an access token: AT1. | |||
2. The client instance later modifies the grant request to include | 2. The client instance later modifies the grant request to include | |||
Foo and Bar together. Since the client instance was previously | Foo and Bar together. Since the client instance was previously | |||
granted Foo under this grant request, the RO is prompted to allow | granted Foo under this grant request, the RO is prompted to allow | |||
the client instance access to Foo and Bar together. This results | the client instance access to Foo and Bar together. This results | |||
in a new access token, AT2 This access token has access to both | in a new access token: AT2. This access token has access to both | |||
Foo and Bar. The rights of the original access token AT1 are not | Foo and Bar. The rights of the original access token AT1 are not | |||
modified. | modified. | |||
3. The client instance makes another grant modification to ask only | 3. The client instance makes another grant modification to ask only | |||
for Bar. Since the client instance was previously granted Foo and | for Bar. Since the client instance was previously granted Foo and | |||
Bar together under this grant request, the RO is not prompted and | Bar together under this grant request, the RO is not prompted, | |||
the access to Bar is granted in a new access token, AT3. This | and the access to Bar is granted in a new access token: AT3. | |||
new access token does not allow access to Foo. | This new access token does not allow access to Foo. | |||
4. The original access token AT1 expires and the client seeks a new | 4. The original access token AT1 expires, and the client seeks a new | |||
access token to replace it. The client instance makes another | access token to replace it. The client instance makes another | |||
grant modification to ask only for Foo. Since the client instance | grant modification to ask only for Foo. Since the client instance | |||
was previously granted Foo and Bar together under this grant | was previously granted Foo and Bar together under this grant | |||
request, the RO is not prompted and the access to Foo is granted | request, the RO is not prompted, and the access to Foo is granted | |||
in a new access token, AT4. This new access token does not allow | in a new access token: AT4. This new access token does not allow | |||
access to Bar. | access to Bar. | |||
All four access tokens are independent of each other and associated | All four access tokens are independent of each other and associated | |||
with the same underlying grant request. Each of these access tokens | with the same underlying grant request. Each of these access tokens | |||
could possibly also be rotated using token management, if available. | could possibly also be rotated using token management, if available. | |||
For example, instead of asking for a new token to replace AT1, the | For example, instead of asking for a new token to replace AT1, the | |||
client instance could ask for a refresh of AT1 using the rotation | client instance could ask for a refresh of AT1 using the rotation | |||
method of the token management API. This would result in a refreshed | method of the token management API. This would result in a refreshed | |||
AT1 with a different token value and expiration from the original AT1 | AT1 with a different token value and expiration from the original AT1 | |||
but with the same access rights of allowing only access to Foo. | but with the same access rights of allowing only access to Foo. | |||
skipping to change at page 95, line 41 ¶ | skipping to change at line 4293 ¶ | |||
this field replaces any values from a previous request. The AS MAY | this field replaces any values from a previous request. The AS MAY | |||
respond to any of the interaction responses as described in | respond to any of the interaction responses as described in | |||
Section 3.3, just like it would to a new request. | Section 3.3, just like it would to a new request. | |||
The client instance MAY include the user field as described in | The client instance MAY include the user field as described in | |||
Section 2.4 to present new assertions or information about the end | Section 2.4 to present new assertions or information about the end | |||
user. The AS SHOULD check that this presented user information is | user. The AS SHOULD check that this presented user information is | |||
consistent with any user information previously presented by the | consistent with any user information previously presented by the | |||
client instance or otherwise associated with this grant request. | client instance or otherwise associated with this grant request. | |||
The client instance MUST NOT include the client section of the | The client instance MUST NOT include the client field of the request, | |||
request, since the client instance is assumed not to have changed. | since the client instance is assumed not to have changed. | |||
Modification of client instance information, including rotation of | Modification of client instance information, including rotation of | |||
keys associated with the client instance, is outside the scope of | keys associated with the client instance, is outside the scope of | |||
this specification. | this specification. | |||
The client instance MUST NOT include post-interaction responses such | The client instance MUST NOT include post-interaction responses such | |||
as described in Section 5.1. | as those described in Section 5.1. | |||
Modification requests MUST NOT alter previously-issued access tokens. | Modification requests MUST NOT alter previously issued access tokens. | |||
Instead, any access tokens issued from a continuation are considered | Instead, any access tokens issued from a continuation are considered | |||
new, separate access tokens. The AS MAY revoke previously-issued | new, separate access tokens. The AS MAY revoke previously issued | |||
access tokens after a modification has occurred. | access tokens after a modification has occurred. | |||
If the modified request can be granted immediately by the AS (the | If the modified request can be granted immediately by the AS (the | |||
grant request is in the _approved_ state), the grant response | grant request is in the _approved_ state), the grant response | |||
(Section 3) MAY contain any newly-created access tokens (Section 3.2) | (Section 3) MAY contain any newly created access tokens (Section 3.2) | |||
or newly-released subject claims (Section 3.4). The response MAY | or newly released subject claims (Section 3.4). The response MAY | |||
contain a new "continue" response (Section 3.1) as described above. | contain a new continuation response (Section 3.1) as described above. | |||
If interaction can occur, the response SHOULD contain interaction | If interaction can occur, the response SHOULD contain interaction | |||
responses (Section 3.3) as well. | responses (Section 3.3) as well. | |||
For example, a client instance initially requests a set of resources | For example, a client instance initially requests a set of resources | |||
using references: | using references: | |||
POST /tx HTTP/1.1 | POST /tx HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
skipping to change at page 97, line 45 ¶ | skipping to change at line 4386 ¶ | |||
{ | { | |||
"access_token": { | "access_token": { | |||
"access": [ | "access": [ | |||
"read" | "read" | |||
] | ] | |||
} | } | |||
... | ... | |||
} | } | |||
The AS replaces the previous access from the first request, allowing | The AS replaces the previous access from the first request, allowing | |||
the AS to determine if any previously-granted consent already | the AS to determine if any previously granted consent already | |||
applies. In this case, the AS would determine that reducing the | applies. In this case, the AS would determine that reducing the | |||
breadth of the requested access means that new access tokens can be | breadth of the requested access means that new access tokens can be | |||
issued to the client instance without additional interaction or | issued to the client instance without additional interaction or | |||
consent. The AS would likely revoke previously-issued access tokens | consent. The AS would likely revoke previously issued access tokens | |||
that had the greater access rights associated with them, unless they | that had the greater access rights associated with them, unless they | |||
had been issued with the durable flag. | had been issued with the durable flag. | |||
{ | { | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "M33OMUK80UPRY5NMKSKU" | "value": "M33OMUK80UPRY5NMKSKU" | |||
}, | }, | |||
"uri": "https://server.example.com/continue", | "uri": "https://server.example.com/continue", | |||
"wait": 30 | "wait": 30 | |||
}, | }, | |||
"access_token": { | "access_token": { | |||
"value": "0EVKC7-2ZKwZM_6N760", | "value": "0EVKC7-2ZKwZM_6N760", | |||
"access": [ | "access": [ | |||
"read" | "read" | |||
] | ] | |||
} | } | |||
} | } | |||
For another example, the client instance initially requests read-only | As another example, the client instance initially requests read-only | |||
access but later needs to step up its access. The initial request | access but later needs to step up its access. The initial request | |||
could look like the following HTTP message. | could look like the following HTTP message: | |||
POST /tx HTTP/1.1 | POST /tx HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
Content-Digest: sha-256=... | Content-Digest: sha-256=... | |||
{ | { | |||
"access_token": { | "access_token": { | |||
skipping to change at page 99, line 25 ¶ | skipping to change at line 4461 ¶ | |||
"access": [ | "access": [ | |||
"read" | "read" | |||
] | ] | |||
} | } | |||
} | } | |||
This allows the client instance to make an eventual continuation | This allows the client instance to make an eventual continuation | |||
call. The client instance later realizes that it now needs "write" | call. The client instance later realizes that it now needs "write" | |||
access in addition to the "read" access. Since this is an expansion | access in addition to the "read" access. Since this is an expansion | |||
of what it asked for previously, the client instance also includes a | of what it asked for previously, the client instance also includes a | |||
new interaction section in case the AS needs to interact with the RO | new interaction field in case the AS needs to interact with the RO | |||
again to gather additional authorization. Note that the client | again to gather additional authorization. Note that the client | |||
instance's nonce and callback are different from the initial request. | instance's nonce and callback are different from the initial request. | |||
Since the original callback was already used in the initial exchange, | Since the original callback was already used in the initial exchange | |||
and the callback is intended for one-time-use, a new one needs to be | and the callback is intended for one-time use, a new one needs to be | |||
included in order to use the callback again. | included in order to use the callback again. | |||
PATCH /continue HTTP/1.1 | PATCH /continue HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
Content-Digest: sha-256=... | Content-Digest: sha-256=... | |||
skipping to change at page 101, line 5 ¶ | skipping to change at line 4515 ¶ | |||
place it into the _finalized_ state, the client instance makes an | place it into the _finalized_ state, the client instance makes an | |||
HTTP DELETE request to the continuation URI. | HTTP DELETE request to the continuation URI. | |||
DELETE /continue HTTP/1.1 | DELETE /continue HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
If the request is successfully revoked, the AS responds with status | If the request is successfully revoked, the AS responds with HTTP | |||
code HTTP 204 (No Content). The AS SHOULD revoke all associated | status code 204 (No Content). The AS SHOULD revoke all associated | |||
access tokens, if possible. The AS SHOULD disable all token rotation | access tokens, if possible. The AS SHOULD disable all token rotation | |||
and other token management functions on such access tokens, if | and other token management functions on such access tokens, if | |||
possible. Once the grant request is in the _finalized_ state, it | possible. Once the grant request is in the _finalized_ state, it | |||
MUST NOT be moved to any other state. | MUST NOT be moved to any other state. | |||
If the request is not revoked, the AS responds with an | If the request is not revoked, the AS responds with an | |||
invalid_continuation error (Section 3.6). | invalid_continuation error (Section 3.6). | |||
6. Token Management | 6. Token Management | |||
If an access token response includes the manage field as described in | If an access token response includes the manage field as described in | |||
Section 3.2.1, the client instance MAY call this URI to manage the | Section 3.2.1, the client instance MAY call this URI to manage the | |||
access token with the rotate and revoke actions defined in the | access token with the rotate and revoke actions defined in the | |||
following sections. Other actions are undefined by this | following subsections. Other actions are undefined by this | |||
specification. | specification. | |||
{ | { | |||
"access_token": { | "access_token": { | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | |||
"flags": ["bearer"], | "flags": ["bearer"], | |||
"manage": { | "manage": { | |||
"uri": "https://server.example.com/token/PRY5NM33O", | "uri": "https://server.example.com/token/PRY5NM33O", | |||
"access_token": { | "access_token": { | |||
"value": "B8CDFONP21-4TB8N6.BW7ONM" | "value": "B8CDFONP21-4TB8N6.BW7ONM" | |||
} | } | |||
} | } | |||
} | } | |||
} | } | |||
The token management access token issued under the manage field is | The token management access token issued under the manage field is | |||
used to protect all calls to the token management API. The client | used to protect all calls to the token management API. The client | |||
instance MUST present proof of the key associated with the token | instance MUST present proof of the key associated with the token | |||
along with the token management access token value. | along with the value of the token management access token. | |||
The AS MUST validate the proof and ensure that it is associated with | The AS MUST validate the proof and ensure that it is associated with | |||
the token management access token. | the token management access token. | |||
The AS MUST uniquely identify the token being managed from the token | The AS MUST uniquely identify the token being managed from the token | |||
management URI, the token management access token, or a combination | management URI, the token management access token, or a combination | |||
of both. | of both. | |||
6.1. Rotating the Access Token Value | 6.1. Rotating the Access Token Value | |||
skipping to change at page 102, line 26 ¶ | skipping to change at line 4579 ¶ | |||
token in the authorization header as described in Section 7.2 and | token in the authorization header as described in Section 7.2 and | |||
signing the request with the appropriate key. | signing the request with the appropriate key. | |||
POST /token/PRY5NM33O HTTP/1.1 | POST /token/PRY5NM33O HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Authorization: GNAP B8CDFONP21-4TB8N6.BW7ONM | Authorization: GNAP B8CDFONP21-4TB8N6.BW7ONM | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
Content-Digest: sha-256=... | Content-Digest: sha-256=... | |||
The client instance can not request to alter the access rights | The client instance cannot request to alter the access rights | |||
associated with the access token during a rotation request. To get | associated with the access token during a rotation request. To get | |||
an access token with different access rights for this grant request, | an access token with different access rights for this grant request, | |||
the client instance has to call the continuation API's update | the client instance has to call the continuation API's update | |||
(Section 5.3) functionality to get a new access token. The client | functionality (Section 5.3) to get a new access token. The client | |||
instance can also create a new grant request with the required access | instance can also create a new grant request with the required access | |||
rights. | rights. | |||
The AS validates that the token management access token presented is | The AS validates that the token management access token presented is | |||
associated with the management URI, that the AS issued the token to | associated with the management URI, that the AS issued the token to | |||
the given client instance, and that the presented key is the correct | the given client instance, and that the presented key is the correct | |||
key for the token management access token. The AS determines which | key for the token management access token. The AS determines which | |||
access token is being rotated from the token management URI, the | access token is being rotated from the token management URI, the | |||
token management access token, or both. | token management access token, or both. | |||
If the token is validated and the key is appropriate for the request, | If the token is validated and the key is appropriate for the request, | |||
the AS MUST invalidate the current access token value associated with | the AS MUST invalidate the current access token value associated with | |||
this URI, if possible. Note that stateless access tokens can make | this URI, if possible. Note that stateless access tokens can make | |||
proactive revocation difficult within a system, see Section 13.32. | proactive revocation difficult within a system; see Section 11.32. | |||
For successful rotations, the AS responds with an HTTP 200 with a | For successful rotations, the AS responds with an HTTP status code | |||
JSON-formatted message content consisting of the rotated access token | 200 (OK) with JSON-formatted message content consisting of the | |||
in the access_token field described in Section 3.2.1. The value of | rotated access token in the access_token field described in | |||
the access token MUST NOT be the same as the current value of the | Section 3.2.1. The value of the access token MUST NOT be the same as | |||
access token used to access the management API. The response MUST | the current value of the access token used to access the management | |||
include an access token management URI, and the value of this URI MAY | API. The response MUST include an access token management URI, and | |||
be different from the URI used by the client instance to make the | the value of this URI MAY be different from the URI used by the | |||
rotation call. The client instance MUST use this new URI to manage | client instance to make the rotation call. The client instance MUST | |||
the rotated access token. | use this new URI to manage the rotated access token. | |||
The access rights in the access array for the rotated access token | The access rights in the access array for the rotated access token | |||
MUST be included in the response and MUST be the same as the token | MUST be included in the response and MUST be the same as the token | |||
before rotation. | before rotation. | |||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
{ | { | |||
"access_token": { | "access_token": { | |||
"value": "FP6A8H6HY37MH13CK76LBZ6Y1UADG6VEUPEER5H2", | "value": "FP6A8H6HY37MH13CK76LBZ6Y1UADG6VEUPEER5H2", | |||
skipping to change at page 104, line 4 ¶ | skipping to change at line 4646 ¶ | |||
], | ], | |||
"datatypes": [ | "datatypes": [ | |||
"metadata", | "metadata", | |||
"images" | "images" | |||
] | ] | |||
}, | }, | |||
"read", "dolphin-metadata" | "read", "dolphin-metadata" | |||
] | ] | |||
} | } | |||
} | } | |||
If the AS is unable or unwilling to rotate the value of the access | If the AS is unable or unwilling to rotate the value of the access | |||
token, the AS responds with an invalid_rotation error (Section 3.6). | token, the AS responds with an invalid_rotation error (Section 3.6). | |||
Upon receiving such an error, the client instance MUST consider the | Upon receiving such an error, the client instance MUST consider the | |||
access token to not have changed its state. | access token to not have changed its state. | |||
6.1.1. Binding a New Key to the Rotated Access Token | 6.1.1. Binding a New Key to the Rotated Access Token | |||
If the client instance wishes to bind a new presentation key to an | If the client instance wishes to bind a new presentation key to an | |||
access token, the client instance MUST present both the new key and | access token, the client instance MUST present both the new key and | |||
the proof of previous key material in the access token rotation | the proof of previous key material in the access token rotation | |||
request. The client instance makes an HTTP POST as a JSON object | request. The client instance makes an HTTP POST as a JSON object | |||
with the following field: | with the following field: | |||
key: The new key value or reference in the format described in | key: The new key value or reference in the format described in | |||
Section 7.1. Note that keys passed by value are always public | Section 7.1. Note that keys passed by value are always public | |||
keys. REQUIRED when doing key rotation. | keys. REQUIRED when doing key rotation. | |||
The proof method and parameters for the new key MUST be the same as | The proofing method and parameters for the new key MUST be the same | |||
those established for the previous key. | as those established for the previous key. | |||
The client instance MUST prove possession of both the currently-bound | The client instance MUST prove possession of both the currently bound | |||
key and the newly-requested key simultaneously in the rotation | key and the newly requested key simultaneously in the rotation | |||
request. Specifically, the signature from the previous key MUST | request. Specifically, the signature from the previous key MUST | |||
cover the value or reference of the new key, and the signature of the | cover the value or reference of the new key, and the signature of the | |||
new key MUST cover the signature value of the old key. The means of | new key MUST cover the signature value of the old key. The means of | |||
doing so varies depending on the proofing method in use. For | doing so vary depending on the proofing method in use. For example, | |||
example, the HTTP Message Signatures proofing method uses multiple | the HTTP message signatures proofing method uses multiple signatures | |||
signatures in the request as described in Section 7.3.1.1, as shown | in the request as described in Section 7.3.1.1. This is shown in the | |||
in this example. | following example. | |||
POST /token/PRY5NM33O HTTP/1.1 | POST /token/PRY5NM33O HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Authorization: GNAP B8CDFONP21-4TB8N6.BW7ONM | Authorization: GNAP B8CDFONP21-4TB8N6.BW7ONM | |||
Signature-Input: \ | Signature-Input: \ | |||
sig1=("@method" "@target-uri" "content-digest" \ | sig1=("@method" "@target-uri" "content-digest" \ | |||
"authorization"),\ | "authorization"),\ | |||
sig2=("@method" "@target-uri" "content-digest" \ | sig2=("@method" "@target-uri" "content-digest" \ | |||
"authorization" "signature";key="sig1" \ | "authorization" "signature";key="sig1" \ | |||
"signature-input";key="sig1") | "signature-input";key="sig1") | |||
skipping to change at page 105, line 31 ¶ | skipping to change at line 4703 ¶ | |||
"kty": "RSA", | "kty": "RSA", | |||
"e": "AQAB", | "e": "AQAB", | |||
"kid": "xyz-2", | "kid": "xyz-2", | |||
"alg": "RS256", | "alg": "RS256", | |||
"n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8xY..." | "n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8xY..." | |||
} | } | |||
} | } | |||
} | } | |||
Failure to present the appropriate proof of either the new key or the | Failure to present the appropriate proof of either the new key or the | |||
previous key for the access token, as defined by the proof method, | previous key for the access token, as defined by the proofing method, | |||
MUST result in an invalid_rotation error code from the AS | MUST result in an invalid_rotation error code from the AS | |||
(Section 3.6). | (Section 3.6). | |||
An attempt to change the proof method or parameters, including an | An attempt to change the proofing method or parameters, including an | |||
attempt to rotate the key of a bearer token (which has no key), MUST | attempt to rotate the key of a bearer token (which has no key), MUST | |||
result in an invalid_rotation error code returned from the AS | result in an invalid_rotation error code returned from the AS | |||
(Section 3.6). | (Section 3.6). | |||
If the AS does not allow rotation of the access token's key for any | If the AS does not allow rotation of the access token's key for any | |||
reason, including but not limited to lack of permission for this | reason, including but not limited to lack of permission for this | |||
client instance or lack of capability by the AS, the AS MUST return a | client instance or lack of capability by the AS, the AS MUST return a | |||
key_rotation_not_supported error code (Section 3.6). | key_rotation_not_supported error code (Section 3.6). | |||
6.2. Revoking the Access Token | 6.2. Revoking the Access Token | |||
skipping to change at page 106, line 17 ¶ | skipping to change at line 4738 ¶ | |||
with the appropriate key. | with the appropriate key. | |||
DELETE /token/PRY5NM33O HTTP/1.1 | DELETE /token/PRY5NM33O HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Authorization: GNAP B8CDFONP21-4TB8N6.BW7ONM | Authorization: GNAP B8CDFONP21-4TB8N6.BW7ONM | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
If the key presented is associated with the token (or the client | If the key presented is associated with the token (or the client | |||
instance, in the case of a bearer token), the AS MUST invalidate the | instance, in the case of a bearer token), the AS MUST invalidate the | |||
access token, if possible, and return an HTTP 204 response code. | access token, if possible, and return an HTTP response code 204. | |||
204 No Content | 204 No Content | |||
Though the AS MAY revoke an access token at any time for any reason, | Though the AS MAY revoke an access token at any time for any reason, | |||
the token management function is specifically for the client | the token management function is specifically for the client | |||
instance's use. If the access token has already expired or has been | instance's use. If the access token has already expired or has been | |||
revoked through other means, the AS SHOULD honor the revocation | revoked through other means, the AS SHOULD honor the revocation | |||
request to the token management URI as valid, since the end result is | request to the token management URI as valid, since the end result is | |||
still the token not being usable. | that the token is still not usable. | |||
7. Securing Requests from the Client Instance | 7. Securing Requests from the Client Instance | |||
In GNAP, the client instance secures its requests to an AS and RS by | In GNAP, the client instance secures its requests to an AS and RS by | |||
presenting an access token, presenting proof of a key that it | presenting an access token, proof of a key that it possesses (aka, a | |||
possesses (aka, a "key proof"), or both an access token and key proof | "key proof"), or both an access token and key proof together. | |||
together. | ||||
* When an access token is used with a key proof, this is a bound | * When an access token is used with a key proof, this is a bound | |||
token request. This type of request is used for calls to the RS | token request. This type of request is used for calls to the RS | |||
as well as the AS during grant negotiation. | as well as the AS during grant negotiation. | |||
* When a key proof is used with no access token, this is a non- | * When a key proof is used with no access token, this is a non- | |||
authorized signed request. This type of request is used for calls | authorized signed request. This type of request is used for calls | |||
to the AS to initiate a grant negotiation. | to the AS to initiate a grant negotiation. | |||
* When an access token is used with no key proof, this is a bearer | * When an access token is used with no key proof, this is a bearer | |||
token request. This type of request is used only for calls to the | token request. This type of request is used only for calls to the | |||
RS, and only with access tokens that are not bound to any key as | RS and only with access tokens that are not bound to any key as | |||
described in Section 3.2.1. | described in Section 3.2.1. | |||
* When neither an access token nor key proof are used, this is an | * When neither an access token nor key proof are used, this is an | |||
unsecured request. This type of request is used optionally for | unsecured request. This type of request is used optionally for | |||
calls to the RS as part of an RS-first discovery process as | calls to the RS as part of an RS-first discovery process as | |||
described in Section 9.1. | described in Section 9.1. | |||
7.1. Key Formats | 7.1. Key Formats | |||
Several different places in GNAP require the presentation of key | Several different places in GNAP require the presentation of key | |||
skipping to change at page 107, line 22 ¶ | skipping to change at line 4790 ¶ | |||
All keys are associated with a specific key proofing method. The | All keys are associated with a specific key proofing method. The | |||
proofing method associated with the key is indicated using the proof | proofing method associated with the key is indicated using the proof | |||
field of the key object. | field of the key object. | |||
proof (string or object): The form of proof that the client instance | proof (string or object): The form of proof that the client instance | |||
will use when presenting the key. The valid values of this field | will use when presenting the key. The valid values of this field | |||
and the processing requirements for each are detailed in | and the processing requirements for each are detailed in | |||
Section 7.3. REQUIRED. | Section 7.3. REQUIRED. | |||
A key presented by value MUST be a public key and MUST be presented | A key presented by value MUST be a public key and MUST be presented | |||
in one and only one supported format, as discussed in Section 13.35. | in only one supported format, as discussed in Section 11.35. Note | |||
Note that while most formats present the full value of the public | that while most formats present the full value of the public key, | |||
key, some formats present a value cryptographically derived from the | some formats present a value cryptographically derived from the | |||
public key. See additional discussion of the presentation of public | public key. See additional discussion of the presentation of public | |||
keys in Section 13.7. | keys in Section 11.7. | |||
jwk (object): The public key and its properties represented as a | jwk (object): The public key and its properties represented as a | |||
JSON Web Key [RFC7517]. A JWK MUST contain the alg (Algorithm) | JSON Web Key (JWK) [RFC7517]. A JWK MUST contain the alg | |||
and kid (Key ID) parameters. The alg parameter MUST NOT be | (Algorithm) and kid (Key ID) parameters. The alg parameter MUST | |||
"none". The x5c (X.509 Certificate Chain) parameter MAY be used | NOT be "none". The x5c (X.509 Certificate Chain) parameter MAY be | |||
to provide the X.509 representation of the provided public key. | used to provide the X.509 representation of the provided public | |||
OPTIONAL. | key. OPTIONAL. | |||
cert (string): PEM serialized value of the certificate used to sign | cert (string): The Privacy-Enhanced Mail (PEM) serialized value of | |||
the request, with optional internal whitespace per [RFC7468]. The | the certificate used to sign the request, with optional internal | |||
PEM header and footer are optionally removed. OPTIONAL. | whitespace per [RFC7468]. The PEM header and footer are | |||
optionally removed. OPTIONAL. | ||||
cert#S256 (string): The certificate thumbprint calculated as per | cert#S256 (string): The certificate thumbprint calculated as per | |||
OAuth-MTLS [RFC8705] in base64 URL encoding. Note that this | MTLS for OAuth [RFC8705] in base64url encoding. Note that this | |||
format does not include the full public key. OPTIONAL. | format does not include the full public key. OPTIONAL. | |||
Additional key formats are defined in the GNAP Key Formats Registry | Additional key formats can be defined in the "GNAP Key Formats" | |||
(Section 11.17). | registry (Section 10.17). | |||
The following non-normative example shows a single key presented in | The following non-normative example shows a single key presented in | |||
two different formats. The example key is intended to be used with | two different formats. The example key is intended to be used with | |||
the HTTP Message Signatures (Section 7.3.1) proofing mechanism, as | the HTTP message signatures proofing mechanism (Section 7.3.1), as | |||
indicated by the httpsig value of the proof field. | indicated by the httpsig value of the proof field. | |||
As a JSON Web Key: | As a JWK: | |||
"key": { | "key": { | |||
"proof": "httpsig", | "proof": "httpsig", | |||
"jwk": { | "jwk": { | |||
"kty": "RSA", | "kty": "RSA", | |||
"e": "AQAB", | "e": "AQAB", | |||
"kid": "xyz-1", | "kid": "xyz-1", | |||
"alg": "RS256", | "alg": "RS256", | |||
"n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8xY..." | "n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8xY..." | |||
} | } | |||
skipping to change at page 108, line 25 ¶ | skipping to change at line 4842 ¶ | |||
As a certificate in PEM format: | As a certificate in PEM format: | |||
"key": { | "key": { | |||
"proof": "httpsig", | "proof": "httpsig", | |||
"cert": "MIIEHDCCAwSgAwIBAgIBATANBgkqhkiG9w0BAQsFA..." | "cert": "MIIEHDCCAwSgAwIBAgIBATANBgkqhkiG9w0BAQsFA..." | |||
} | } | |||
When the key is presented in GNAP, proof of this key material MUST be | When the key is presented in GNAP, proof of this key material MUST be | |||
used to bind the request, the nature of which varies with the | used to bind the request, the nature of which varies with the | |||
location in the protocol the key is used. For a key used as part of | location in the protocol where the key is used. For a key used as | |||
a client instance's initial request in Section 2.3, the key value | part of a client instance's initial request in Section 2.3, the key | |||
represents the client instance's public key, and proof of that key | value represents the client instance's public key, and proof of that | |||
MUST be presented in that request. For a key used as part of an | key MUST be presented in that request. For a key used as part of an | |||
access token response in Section 3.2.1, the proof of that key MUST be | access token response in Section 3.2.1, the proof of that key MUST be | |||
used when the client instance later presents the access token to the | used when the client instance later presents the access token to the | |||
RS. | RS. | |||
7.1.1. Key References | 7.1.1. Key References | |||
Keys in GNAP can also be passed by reference such that the party | Keys in GNAP can also be passed by reference such that the party | |||
receiving the reference will be able to determine the appropriate | receiving the reference will be able to determine the appropriate | |||
keying material for use in that part of the protocol. Key references | keying material for use in that part of the protocol. A key | |||
are a single opaque string. | reference is a single opaque string. | |||
"key": "S-P4XJQ_RYJCRTSU1.63N3E" | "key": "S-P4XJQ_RYJCRTSU1.63N3E" | |||
Keys referenced in this manner MAY be shared symmetric keys. See the | Keys referenced in this manner MAY be shared symmetric keys. See the | |||
additional considerations for symmetric keys in Section 13.7. The | additional considerations for symmetric keys in Section 11.7. The | |||
key reference MUST NOT contain any unencrypted private or shared | key reference MUST NOT contain any unencrypted private or shared | |||
symmetric key information. | symmetric key information. | |||
Keys referenced in this manner MUST be bound to a single proofing | Keys referenced in this manner MUST be bound to a single proofing | |||
mechanism. | mechanism. | |||
The means of dereferencing this reference to a key value and proofing | The means of dereferencing this reference to a key value and proofing | |||
mechanism are out of scope for this specification. Commonly, key | mechanism are out of scope for this specification. Commonly, key | |||
references are created by the AS and are not necessarily needed to be | references are created by the AS and do not necessarily need to be | |||
understood by the client. These types of key references are an | understood by the client. These types of key references are an | |||
internal reference to the AS, such as an identifier of a record in a | internal reference to the AS, such as an identifier of a record in a | |||
database. In other applications, it can be useful to use key | database. In other applications, it can be useful to use key | |||
references that are resolvable by both clients and AS, which could be | references that are resolvable by both clients and the AS, which | |||
accomplished by a client publishing a public key at a URI, for | could be accomplished by a client publishing a public key at a URI, | |||
example. For interoperability, this method could later be described | for example. For interoperability, this method could later be | |||
as an extension, but doing so is out of scope for this specification. | described as an extension, but doing so is out of scope for this | |||
specification. | ||||
7.1.2. Key Protection | 7.1.2. Key Protection | |||
The security of GNAP relies on the cryptographic security of the keys | The security of GNAP relies on the cryptographic security of the keys | |||
themselves. When symmetric keys are used in GNAP, a key management | themselves. When symmetric keys are used in GNAP, a key management | |||
system or secure key derivation mechanism MUST be used to supply the | system or secure key derivation mechanism MUST be used to supply the | |||
keys. Symmetric keys MUST NOT be a human memorable password or a | keys. Symmetric keys MUST NOT be a human-memorable password or a | |||
value derived from one. Symmetric keys MUST NOT be passed by value | value derived from one. Symmetric keys MUST NOT be passed by value | |||
from the client instance to the AS. | from the client instance to the AS. | |||
Additional security considerations apply when rotating keys | Additional security considerations apply when rotating keys (see | |||
(Section 13.22). | Section 11.22). | |||
7.2. Presenting Access Tokens | 7.2. Presenting Access Tokens | |||
Access tokens are issued to client instances in GNAP to allow the | Access tokens are issued to client instances in GNAP to allow the | |||
client instance to make an authorized call to an API. The method the | client instance to make an authorized call to an API. The method the | |||
client instance uses to send an access token depends on whether the | client instance uses to send an access token depends on whether the | |||
token is bound to a key, and if so which proofing method is | token is bound to a key and, if so, which proofing method is | |||
associated with the key. This information is conveyed by the key | associated with the key. This information is conveyed by the key | |||
parameter and the bearer flag in the access token response structure | parameter and the bearer flag in the access token response structure | |||
(Section 3.2.1). | (Section 3.2.1). | |||
If the flags field does not contain the bearer flag and the key is | If the flags field does not contain the bearer flag and the key is | |||
absent, the access token MUST be sent using the same key and proofing | absent, the access token MUST be sent using the same key and proofing | |||
mechanism that the client instance used in its initial request (or | mechanism that the client instance used in its initial request (or | |||
its most recent rotation). | its most recent rotation). | |||
If the flags field does not contain the bearer flag and the key value | If the flags field does not contain the bearer flag and the key value | |||
is an object as described in Section 7.1, the access token MUST be | is an object as described in Section 7.1, the access token MUST be | |||
sent using the key and proofing mechanism defined by the value of the | sent using the key and proofing mechanism defined by the value of the | |||
proof field within the key object. | proof field within the key object. | |||
The access token MUST be sent using the HTTP "Authorization" request | The access token MUST be sent using the HTTP Authorization request | |||
header field and the "GNAP" authorization scheme along with a key | header field and the "GNAP" authorization scheme along with a key | |||
proof as described in Section 7.3 for the key bound to the access | proof as described in Section 7.3 for the key bound to the access | |||
token. For example, an access token bound using HTTP Message | token. For example, an access token bound using HTTP message | |||
Signatures would be sent as follows: | signatures would be sent as follows: | |||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
GET /stuff HTTP/1.1 | GET /stuff HTTP/1.1 | |||
Host: resource.example.com | Host: resource.example.com | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Signature-Input: sig1=("@method" "@target-uri" "authorization")\ | Signature-Input: sig1=("@method" "@target-uri" "authorization")\ | |||
;created=1618884473;keyid="gnap-rsa";nonce="NAOEJF12ER2";tag="gnap" | ;created=1618884473;keyid="gnap-rsa";nonce="NAOEJF12ER2";tag="gnap" | |||
Signature: sig1=:FQ+EjWqc38uLFByKa5y+c4WyYYwCTGUhidWKfr5L1Cha8FiPEw\ | Signature: sig1=:FQ+EjWqc38uLFByKa5y+c4WyYYwCTGUhidWKfr5L1Cha8FiPEw\ | |||
DxG7nWttpBLS/B6VLfkZJogPbclySs9MDIsAIJwHnzlcJjwXWR2lfvm2z3X7EkJHm\ | DxG7nWttpBLS/B6VLfkZJogPbclySs9MDIsAIJwHnzlcJjwXWR2lfvm2z3X7EkJHm\ | |||
Zp4SmyKOS34luAiKR1xwf32NYFolHmZf/SbHZJuWvQuS4U33C+BbsXz8MflFH1Dht\ | Zp4SmyKOS34luAiKR1xwf32NYFolHmZf/SbHZJuWvQuS4U33C+BbsXz8MflFH1Dht\ | |||
H/C1E5i244gSbdLCPxzABc/Q0NHVSLo1qaouYIvnxXB8OT3K7mwWjsLh1GC5vFThb\ | H/C1E5i244gSbdLCPxzABc/Q0NHVSLo1qaouYIvnxXB8OT3K7mwWjsLh1GC5vFThb\ | |||
3XQ363r6f0OPRa4qWHhubR/d/J/lNOjbBdjq9AJ69oqNJ+A2XT+ZCrVasEJE0OBvD\ | 3XQ363r6f0OPRa4qWHhubR/d/J/lNOjbBdjq9AJ69oqNJ+A2XT+ZCrVasEJE0OBvD\ | |||
auQoiywhb8BMB7+PEINsPk5/8UvaNxbw==: | auQoiywhb8BMB7+PEINsPk5/8UvaNxbw==: | |||
If the flags field contains the bearer flag, the access token is a | If the flags field contains the bearer flag, the access token is a | |||
bearer token that MUST be sent using the Authorization Request Header | bearer token that MUST be sent using the Authorization request header | |||
Field method defined in [RFC6750]. | field method defined in [RFC6750]. | |||
Authorization: Bearer OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0 | Authorization: Bearer OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0 | |||
The Form-Encoded Body Parameter and URI Query Parameter methods of | The Form-Encoded Body Parameter and URI Query Parameter methods of | |||
[RFC6750] MUST NOT be used for GNAP access tokens. | [RFC6750] MUST NOT be used for GNAP access tokens. | |||
7.3. Proving Possession of a Key with a Request | 7.3. Proving Possession of a Key with a Request | |||
Any keys presented by the client instance to the AS or RS MUST be | Any keys presented by the client instance to the AS or RS MUST be | |||
validated as part of the request in which they are presented. The | validated as part of the request in which they are presented. The | |||
type of binding used is indicated by the proof parameter of the key | type of binding used is indicated by the proof parameter of the key | |||
object in Section 7.1. Key proof methods are specified either by a | object in Section 7.1. Key proofing methods are specified either by | |||
string, which consists of the key proof method name on its own, or by | a string, which consists of the key proofing method name on its own, | |||
a JSON object with the required field method: | or by a JSON object with the required field method: | |||
method: The name of the key proofing method to be used. REQUIRED. | method: The name of the key proofing method to be used. REQUIRED. | |||
Individual methods defined as objects MAY define additional | Individual methods defined as objects MAY define additional | |||
parameters as members in this object. | parameters as members in this object. | |||
Values for the method defined by this specification are as follows: | Values for the method defined by this specification are as follows: | |||
"httpsig" (string or object): HTTP Signing signature headers. See | "httpsig" (string or object): HTTP message signing. See | |||
Section 7.3.1. | Section 7.3.1. | |||
"mtls" (string): Mutual TLS certificate verification. See | "mtls" (string): MTLS certificate verification. See Section 7.3.2. | |||
Section 7.3.2. | ||||
"jwsd" (string): A detached JWS signature header. See | "jwsd" (string): A detached JWS signature header. See | |||
Section 7.3.3. | Section 7.3.3. | |||
"jws" (string): Attached JWS payload. See Section 7.3.4. | "jws" (string): Attached JWS Payload. See Section 7.3.4. | |||
Additional proofing methods are defined by the GNAP Key Proofing | Additional proofing methods can be defined in the "GNAP Key Proofing | |||
Methods Registry (Section 11.16). | Methods" registry (Section 10.16). | |||
Proof methods MAY be defined as both an object and a string. For | Proofing methods MAY be defined as both an object and a string. For | |||
example, the httpsig method can be specified as an object with its | example, the httpsig method can be specified as an object with its | |||
parameters explicitly declared, such as: | parameters explicitly declared, such as: | |||
{ | { | |||
"proof": { | "proof": { | |||
"method": "httpsig", | "method": "httpsig", | |||
"alg": "ecdsa-p384-sha384", | "alg": "ecdsa-p384-sha384", | |||
"content-digest-alg": "sha-256" | "content-digest-alg": "sha-256" | |||
} | } | |||
} | } | |||
skipping to change at page 111, line 40 ¶ | skipping to change at line 4999 ¶ | |||
} | } | |||
All key binding methods used by this specification MUST cover all | All key binding methods used by this specification MUST cover all | |||
relevant portions of the request, including anything that would | relevant portions of the request, including anything that would | |||
change the nature of the request, to allow for secure validation of | change the nature of the request, to allow for secure validation of | |||
the request. Relevant aspects include the URI being called, the HTTP | the request. Relevant aspects include the URI being called, the HTTP | |||
method being used, any relevant HTTP headers and values, and the HTTP | method being used, any relevant HTTP headers and values, and the HTTP | |||
message content itself. The verifier of the signed message MUST | message content itself. The verifier of the signed message MUST | |||
validate all components of the signed message to ensure that nothing | validate all components of the signed message to ensure that nothing | |||
has been tampered with or substituted in a way that would change the | has been tampered with or substituted in a way that would change the | |||
nature of the request. Key binding method definitions MUST enumerate | nature of the request. Definitions of key binding methods MUST | |||
how these requirements are fulfilled. | enumerate how these requirements are fulfilled. | |||
When a key proofing mechanism is bound to an access token, the key | When a key proofing mechanism is bound to an access token, the key | |||
being presented MUST be the key associated with the access token and | being presented MUST be the key associated with the access token, and | |||
the access token MUST be covered by the signature method of the | the access token MUST be covered by the signature method of the | |||
proofing mechanism. | proofing mechanism. | |||
The key binding methods in this section MAY be used by other | The key binding methods in this section MAY be used by other | |||
components making calls as part of GNAP, such as the extensions | components making calls as part of GNAP, such as the extensions | |||
allowing the RS to make calls to the AS defined in | allowing the RS to make calls to the AS defined in [GNAP-RS]. To | |||
[I-D.ietf-gnap-resource-servers]. To facilitate this extended use, | facilitate this extended use, "signer" and "verifier" are used as | |||
the sections below are defined in generic terms of the "signer" and | generic terms in the subsections below. In the core functions of | |||
"verifier" of the HTTP message. In the core functions of GNAP | GNAP specified in this document, the "signer" is the client instance, | |||
specified in this document, the "signer" is the client instance and | and the "verifier" is the AS (for grant requests) or RS (for resource | |||
the "verifier" is the AS (for grant requests) or RS (for resource | ||||
requests), as appropriate. | requests), as appropriate. | |||
When used for delegation in GNAP, these key binding mechanisms allow | When used for delegation in GNAP, these key binding mechanisms allow | |||
the AS to ensure that the keys presented by the client instance in | the AS to ensure that the keys presented by the client instance in | |||
the initial request are in control of the party calling any follow-up | the initial request are in control of the party calling any follow-up | |||
or continuation requests. To facilitate this requirement, the | or continuation requests. To facilitate this requirement, the | |||
continuation response (Section 3.1) includes an access token bound to | continuation response (Section 3.1) includes an access token bound to | |||
the client instance's key (Section 2.3), and that key (or its most | the client instance's key (Section 2.3), and that key (or its most | |||
recent rotation) MUST be proved in all continuation requests | recent rotation) MUST be proved in all continuation requests | |||
(Section 5). Token management requests (Section 6) are similarly | (Section 5). Token management requests (Section 6) are similarly | |||
bound to either the access token's own key or, in the case of bearer | bound to either the access token's own key or, in the case of bearer | |||
tokens, the client instance's key. | tokens, the client instance's key. | |||
In the following sections, unless otherwise noted, the RS256 JOSE | In the following subsections, unless otherwise noted, the RS256 JSON | |||
Signature Algorithm (defined in Section 3.3 of [RFC7518]) is applied | Object Signing and Encryption (JOSE) signature algorithm (defined in | |||
using the following RSA key (presented here in JWK format): | Section 3.3 of [RFC7518]) is applied using the following RSA key | |||
(presented here in JWK format): | ||||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
{ | { | |||
"kid": "gnap-rsa", | "kid": "gnap-rsa", | |||
"p": "xS4-YbQ0SgrsmcA7xDzZKuVNxJe3pCYwdAe6efSy4hdDgF9-vhC5gjaRk\ | "p": "xS4-YbQ0SgrsmcA7xDzZKuVNxJe3pCYwdAe6efSy4hdDgF9-vhC5gjaRk\ | |||
i1wWuERSMW4Tv44l5HNrL-Bbj_nCJxr_HAOaesDiPn2PnywwEfg3Nv95Nn-\ | i1wWuERSMW4Tv44l5HNrL-Bbj_nCJxr_HAOaesDiPn2PnywwEfg3Nv95Nn-\ | |||
eilhqXRaW-tJKEMjDHu_fmJBeemHNZI412gBnXdGzDVo22dvYoxd6GM", | eilhqXRaW-tJKEMjDHu_fmJBeemHNZI412gBnXdGzDVo22dvYoxd6GM", | |||
"kty": "RSA", | "kty": "RSA", | |||
"q": "rVdcT_uy-CD0GKVLGpEGRR7k4JO6Tktc8MEHkC6NIFXihk_6vAIOCzCD6\ | "q": "rVdcT_uy-CD0GKVLGpEGRR7k4JO6Tktc8MEHkC6NIFXihk_6vAIOCzCD6\ | |||
skipping to change at page 113, line 48 ¶ | skipping to change at line 5075 ¶ | |||
zywzwPTuq-cVQDyEN7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQ" | zywzwPTuq-cVQDyEN7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQ" | |||
} | } | |||
Key proofing methods SHOULD define a mechanism to allow the rotation | Key proofing methods SHOULD define a mechanism to allow the rotation | |||
of keys discussed in Section 6.1.1. Key rotation mechanisms MUST | of keys discussed in Section 6.1.1. Key rotation mechanisms MUST | |||
define a way for presenting proof of two keys simultaneously with the | define a way for presenting proof of two keys simultaneously with the | |||
following attributes: | following attributes: | |||
* The value of or reference to the new key material MUST be signed | * The value of or reference to the new key material MUST be signed | |||
by the existing key. Generally speaking, this amounts to using | by the existing key. Generally speaking, this amounts to using | |||
the existing key to sign the content of the message which contains | the existing key to sign the content of the message that contains | |||
the new key. | the new key. | |||
* The signature of the old key MUST be signed by the new key. | * The signature of the old key MUST be signed by the new key. | |||
Generally speaking, this means including the signature value of | Generally speaking, this means including the signature value of | |||
the old key under the coverage of the new key. | the old key under the coverage of the new key. | |||
7.3.1. HTTP Message Signatures | 7.3.1. HTTP Message Signatures | |||
This method is indicated by the method value httpsig and can be | This method is indicated by the method value httpsig and can be | |||
declared in either object form or string form. | declared in either object form or string form. | |||
When the proof method is specified in object form, the following | When the proofing method is specified in object form, the following | |||
parameters are defined: | parameters are defined: | |||
alg: The HTTP signature algorithm, from the HTTP Signature Algorithm | alg: The HTTP signature algorithm, from the "HTTP Signature | |||
registry. REQUIRED. | Algorithms" registry. REQUIRED. | |||
content-digest-alg: The algorithm used for the Content-Digest field, | content-digest-alg: The algorithm used for the Content-Digest field, | |||
used to protect the content when present in the message. | used to protect the content when present in the message. | |||
REQUIRED. | REQUIRED. | |||
This example uses the ECDSA signing algorithm over the P384 curve and | This example uses the Elliptic Curve Digital Signature Algorithm | |||
the SHA-512 hashing algorithm for the content digest. | (ECDSA) signing algorithm over the P384 curve and the SHA-512 hashing | |||
algorithm for the content digest. | ||||
{ | { | |||
"proof": { | "proof": { | |||
"method": "httpsig", | "method": "httpsig", | |||
"alg": "ecdsa-p384-sha384", | "alg": "ecdsa-p384-sha384", | |||
"content-digest-alg": "sha-512" | "content-digest-alg": "sha-512" | |||
} | } | |||
} | } | |||
When the proof method is specified in string form, the signing | When the proofing method is specified in string form, the signing | |||
algorithm MUST be derived from the key material (such as using the | algorithm MUST be derived from the key material (such as using the | |||
JWS algorithm in a JWK formatted key), and the content digest | JWS algorithm in a JWK formatted key), and the content digest | |||
algorithm MUST be sha-256. | algorithm MUST be sha-256. | |||
{ | { | |||
"proof": "httpsig" | "proof": "httpsig" | |||
} | } | |||
When using this method, the signer creates an HTTP Message Signature | When using this method, the signer creates an HTTP message signature | |||
as described in [RFC9421]. The covered components of the signature | as described in [RFC9421]. The covered components of the signature | |||
MUST include the following: | MUST include the following: | |||
"@method": The method used in the HTTP request. | "@method": The method used in the HTTP request. | |||
"@target-uri": The full request URI of the HTTP request. | "@target-uri": The full request URI of the HTTP request. | |||
When the message contains request content, the covered components | When the message contains request content, the covered components | |||
MUST also include the following: | MUST also include the following: | |||
skipping to change at page 115, line 34 ¶ | skipping to change at line 5155 ¶ | |||
this value. The signer MUST include the created signature parameter | this value. The signer MUST include the created signature parameter | |||
with a timestamp of when the signature was created, and the verifier | with a timestamp of when the signature was created, and the verifier | |||
MUST ensure that the creation timestamp is sufficiently close to the | MUST ensure that the creation timestamp is sufficiently close to the | |||
current time given expected network delay and clock skew. The signer | current time given expected network delay and clock skew. The signer | |||
SHOULD include the nonce parameter with a unique and unguessable | SHOULD include the nonce parameter with a unique and unguessable | |||
value. When included, the verifier MUST determine that the nonce | value. When included, the verifier MUST determine that the nonce | |||
value is unique within a reasonably short time period such as several | value is unique within a reasonably short time period such as several | |||
minutes. | minutes. | |||
If the signer's key presented is a JWK, the keyid parameter of the | If the signer's key presented is a JWK, the keyid parameter of the | |||
signature MUST be set to the kid value of the JWK, the signing | signature MUST be set to the kid value of the JWK, and the signing | |||
algorithm used MUST be the JWS algorithm denoted by the key's alg | algorithm used MUST be the JWS algorithm denoted by the key's alg | |||
field of the JWK. | field of the JWK. | |||
The explicit alg signature parameter MUST NOT be included in the | The explicit alg signature parameter MUST NOT be included in the | |||
signature, since the algorithm will be derived either from the key | signature, since the algorithm will be derived from either the key | |||
material or from the proof value. | material or the proof value. | |||
In the following non-normative example, the message content is the | In the following non-normative example, the message content is a JSON | |||
following JSON object: | object: | |||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
{ | { | |||
"access_token": { | "access_token": { | |||
"access": [ | "access": [ | |||
"dolphin-metadata" | "dolphin-metadata" | |||
] | ] | |||
}, | }, | |||
"interact": { | "interact": { | |||
skipping to change at page 118, line 26 ¶ | skipping to change at line 5283 ¶ | |||
} | } | |||
} | } | |||
"display": { | "display": { | |||
"name": "My Client Display Name", | "name": "My Client Display Name", | |||
"uri": "https://client.foo/" | "uri": "https://client.foo/" | |||
}, | }, | |||
} | } | |||
} | } | |||
The verifier MUST ensure that the signature covers all required | The verifier MUST ensure that the signature covers all required | |||
message components. If the HTTP Message includes content, the | message components. If the HTTP message includes content, the | |||
verifier MUST calculate and verify the value of the Content-Digest | verifier MUST calculate and verify the value of the Content-Digest | |||
header. The verifier MUST validate the signature against the | header. The verifier MUST validate the signature against the | |||
expected key of the signer. | expected key of the signer. | |||
A received message MAY include multiple signatures, each with its own | A received message MAY include multiple signatures, each with its own | |||
label. The verifier MUST examine all included signatures until it | label. The verifier MUST examine all included signatures until it | |||
finds (at least) one that's acceptable according to its policy and | finds (at least) one that is acceptable according to its policy and | |||
meets the requirements in this section. | meets the requirements in this section. | |||
7.3.1.1. Key Rotation using HTTP Message Signatures | 7.3.1.1. Key Rotation Using HTTP Message Signatures | |||
When rotating a key using HTTP Message Signatures, the message, which | When rotating a key using HTTP message signatures, the message, which | |||
includes the new public key value or reference, is first signed with | includes the new public key value or reference, is first signed with | |||
the old key following all of the requirements in Section 7.3.1. The | the old key following all of the requirements in Section 7.3.1. The | |||
message is then signed again with the new key by following all of the | message is then signed again with the new key by following all of the | |||
requirements in Section 7.3.1 again with the following additional | requirements in Section 7.3.1 again, with the following additional | |||
requirements: | requirements: | |||
* The covered components MUST include the Signature and Signature- | * The covered components MUST include the Signature and Signature- | |||
Input values from the signature generated with the old key | Input values from the signature generated with the old key. | |||
* The tag value MUST be gnap-rotate. | ||||
* The tag value MUST be gnap-rotate | ||||
For example, the following request to the token management endpoint | For example, the following request to the token management endpoint | |||
for rotating a token value contains the new key in the request. The | for rotating a token value contains the new key in the request. The | |||
message is first signed using the old key and the resulting signature | message is first signed using the old key, and the resulting | |||
is placed in "old-key": | signature is placed in "old-key": | |||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
POST /token/PRY5NM33 HTTP/1.1 | POST /token/PRY5NM33 HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Authorization: GNAP 4398.34-12-asvDa.a | Authorization: GNAP 4398.34-12-asvDa.a | |||
Content-Digest: sha-512=:Fb/A5vnawhuuJ5xk2RjGrbbxr6cvinZqd4+JPY85u/\ | Content-Digest: sha-512=:Fb/A5vnawhuuJ5xk2RjGrbbxr6cvinZqd4+JPY85u/\ | |||
JNyTlmRmCOtyVhZ1Oz/cSS4tsYen6fzpCwizy6UQxNBQ==: | JNyTlmRmCOtyVhZ1Oz/cSS4tsYen6fzpCwizy6UQxNBQ==: | |||
Signature-Input: old-key=("@method" "@target-uri" "content-digest" \ | Signature-Input: old-key=("@method" "@target-uri" "content-digest" \ | |||
"authorization");created=1618884475;keyid="test-key-ecc-p256"\ | "authorization");created=1618884475;keyid="test-key-ecc-p256"\ | |||
skipping to change at page 123, line 32 ¶ | skipping to change at line 5482 ¶ | |||
"name": "My Client Display Name", | "name": "My Client Display Name", | |||
"uri": "https://client.foo/" | "uri": "https://client.foo/" | |||
}, | }, | |||
}, | }, | |||
"subject": { | "subject": { | |||
"formats": ["iss_sub", "opaque"] | "formats": ["iss_sub", "opaque"] | |||
} | } | |||
} | } | |||
The verifier compares the TLS client certificate presented during | The verifier compares the TLS client certificate presented during | |||
mutual TLS negotiation to the expected key of the signer. Since the | MTLS negotiation to the expected key of the signer. Since the TLS | |||
TLS connection covers the entire message, there are no additional | connection covers the entire message, there are no additional | |||
requirements to check. | requirements to check. | |||
Note that in many instances, the verifier will not do a full | Note that in many instances, the verifier will not do a full | |||
certificate chain validation of the presented TLS client certificate, | certificate chain validation of the presented TLS client certificate, | |||
as the means of trust for this certificate could be in something | as the means of trust for this certificate could be in something | |||
other than a PKI system, such as a static registration or trust-on- | other than a PKI system, such as a static registration or trust-on- | |||
first-use. See Section 13.3 and Section 13.4 for some additional | first-use. See Sections 11.3 and 11.4 for some additional | |||
considerations for this key proofing method. | considerations for this key proofing method. | |||
7.3.2.1. Key Rotation using MTLS | 7.3.2.1. Key Rotation Using MTLS | |||
Since it is not possible to present two client authenticated | Since it is not possible to present two client authenticated | |||
certificates to a mutual TLS connection simultaneously, dynamic key | certificates to a MTLS connection simultaneously, dynamic key | |||
rotation for this proofing method is not defined. Instead, key | rotation for this proofing method is not defined. Instead, key | |||
rotation for MTLS-based client instances is expected to be managed | rotation for MTLS-based client instances is expected to be managed | |||
through deployment practices, as discussed in Section 13.4. | through deployment practices, as discussed in Section 11.4. | |||
7.3.3. Detached JWS | 7.3.3. Detached JWS | |||
This method is indicated by the method value jwsd in string form. | This method is indicated by the method value jwsd in string form. | |||
{ | { | |||
"proof": "jwsd" | "proof": "jwsd" | |||
} | } | |||
The signer creates a JSON Web Signature (JWS) [RFC7515] object as | The signer creates a JSON Web Signature (JWS) [RFC7515] object as | |||
follows: | follows. | |||
To protect the request, the JOSE header of the signature contains the | To protect the request, the JOSE header of the signature contains the | |||
following claims: | following claims: | |||
kid (string): The key identifier. REQUIRED if the key is presented | kid (string): The key identifier. REQUIRED if the key is presented | |||
in JWK format, this MUST be the value of the kid field of the key. | in JWK format. This MUST be the value of the kid field of the | |||
key. | ||||
alg (string): The algorithm used to sign the request. MUST be | alg (string): The algorithm used to sign the request. The algorithm | |||
appropriate to the key presented. If the key is presented as a | MUST be appropriate to the key presented. If the key is presented | |||
JWK, this MUST be equal to the alg parameter of the key. MUST NOT | as a JWK, this MUST be equal to the alg parameter of the key. The | |||
be none. REQUIRED. | algorithm MUST NOT be none. REQUIRED. | |||
typ (string): The type header, value "gnap-binding-jwsd". REQUIRED. | typ (string): The type header, value "gnap-binding-jwsd". REQUIRED. | |||
htm (string): The HTTP Method used to make this request, as a case- | htm (string): The HTTP method used to make this request, as a case- | |||
sensitive ASCII string. Note that most public HTTP methods are in | sensitive ASCII string. Note that most public HTTP methods are in | |||
uppercase ASCII by convention. REQUIRED. | uppercase ASCII by convention. REQUIRED. | |||
uri (string): The HTTP URI used for this request. This value MUST | uri (string): The HTTP URI used for this request. This value MUST | |||
be an absolute URI, including all path and query components and no | be an absolute URI, including all path and query components and no | |||
fragment component. REQUIRED. | fragment components. REQUIRED. | |||
created (integer): A timestamp of when the signature was created, in | created (integer): A timestamp of when the signature was created, in | |||
integer seconds since UNIX Epoch. REQUIRED. | integer seconds since UNIX Epoch. REQUIRED. | |||
When the request is bound to an access token, the JOSE header MUST | When the request is bound to an access token, the JOSE header MUST | |||
also include the following: | also include the following: | |||
ath (string): The hash of the access token. The value MUST be the | ath (string): The hash of the access token. The value MUST be the | |||
result of Base64url encoding (with no padding) the SHA-256 digest | result of base64url encoding (with no padding) the SHA-256 digest | |||
of the ASCII encoding of the associated access token's value. | of the ASCII encoding of the associated access token's value. | |||
REQUIRED. | REQUIRED. | |||
If the HTTP request has content, such as an HTTP POST or PUT method, | If the HTTP request has content (such as an HTTP POST or PUT method), | |||
the payload of the JWS object is the Base64url encoding (without | the payload of the JWS object is the base64url encoding (without | |||
padding) of the SHA256 digest of the bytes of the content. If the | padding) of the SHA-256 digest of the bytes of the content. If the | |||
request being made does not have content, such as an HTTP GET, | request being made does not have content (such as an HTTP GET, | |||
OPTIONS, or DELETE method, the JWS signature is calculated over an | OPTIONS, or DELETE method), the JWS signature is calculated over an | |||
empty payload. | empty payload. | |||
The signer presents the signed object in compact form [RFC7515] in | The signer presents the signed object in compact form [RFC7515] in | |||
the Detached-JWS HTTP Header field. | the Detached-JWS header field. | |||
In the following non-normative example, the JOSE Header contains the | In the following non-normative example, the JOSE header contains the | |||
following parameters: | following parameters: | |||
{ | { | |||
"alg": "RS256", | "alg": "RS256", | |||
"kid": "gnap-rsa", | "kid": "gnap-rsa", | |||
"uri": "https://server.example.com/gnap", | "uri": "https://server.example.com/gnap", | |||
"htm": "POST", | "htm": "POST", | |||
"typ": "gnap-binding-jwsd", | "typ": "gnap-binding-jwsd", | |||
"created": 1618884475 | "created": 1618884475 | |||
} | } | |||
skipping to change at page 126, line 44 ¶ | skipping to change at line 5608 ¶ | |||
N7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQ" | N7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQ" | |||
} | } | |||
} | } | |||
"display": { | "display": { | |||
"name": "My Client Display Name", | "name": "My Client Display Name", | |||
"uri": "https://client.foo/" | "uri": "https://client.foo/" | |||
}, | }, | |||
} | } | |||
} | } | |||
This is hashed to the following Base64 encoded value: | This is hashed to the following base64-encoded value: | |||
PGiVuOZUcN1tRtUS6tx2b4cBgw9mPgXG3IPB3wY7ctc | PGiVuOZUcN1tRtUS6tx2b4cBgw9mPgXG3IPB3wY7ctc | |||
This leads to the following full HTTP request message: | This leads to the following full HTTP request message: | |||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
POST /gnap HTTP/1.1 | POST /gnap HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
skipping to change at page 128, line 15 ¶ | skipping to change at line 5672 ¶ | |||
"uri": "https://client.foo/" | "uri": "https://client.foo/" | |||
}, | }, | |||
} | } | |||
} | } | |||
When the verifier receives the Detached-JWS header, it MUST parse and | When the verifier receives the Detached-JWS header, it MUST parse and | |||
validate the JWS object. The signature MUST be validated against the | validate the JWS object. The signature MUST be validated against the | |||
expected key of the signer. If the HTTP message request contains | expected key of the signer. If the HTTP message request contains | |||
content, the verifier MUST calculate the hash of the content just as | content, the verifier MUST calculate the hash of the content just as | |||
the signer does, with no normalization or transformation of the | the signer does, with no normalization or transformation of the | |||
request. All required fields MUST be present and their values MUST | request. All required fields MUST be present, and their values MUST | |||
be valid. All fields MUST match the corresponding portions of the | be valid. All fields MUST match the corresponding portions of the | |||
HTTP message. For example, the htm field of the JWS header has to be | HTTP message. For example, the htm field of the JWS header has to be | |||
the same as the HTTP verb used in the request. | the same as the HTTP verb used in the request. | |||
Note that this proof method depends on a specific cryptographic | Note that this proofing method depends on a specific cryptographic | |||
algorithm, SHA-256, in two ways: the ath hash algorithm is hardcoded, | algorithm, SHA-256, in two ways: 1) the ath hash algorithm is | |||
and computing the payload of the detached/attached signature also | hardcoded and 2) the payload of the detached/attached signature is | |||
uses a hardcoded hash. A future version of this document may address | computed using a hardcoded hash. A future version of this document | |||
crypto-agility for both these uses by replacing ath with a new header | may address crypto-agility for both these uses by replacing ath with | |||
that upgrades the algorithm, and possibly defining a new JWS header | a new header that upgrades the algorithm and possibly defining a new | |||
that indicates the HTTP content's hash method. | JWS header that indicates the HTTP content's hash method. | |||
7.3.3.1. Key Rotation using Detached JWS | 7.3.3.1. Key Rotation Using Detached JWS | |||
When rotating a key using Detached JWS, the message, which includes | When rotating a key using detached JWS, the message, which includes | |||
the new public key value or reference, is first signed with the old | the new public key value or reference, is first signed with the old | |||
key as described above using a JWS object with typ header value | key as described above using a JWS object with typ header value | |||
"gnap-binding-rotation-jwsd". The value of the JWS object is then | "gnap-binding-rotation-jwsd". The value of the JWS object is then | |||
taken as the payload of a new JWS object, to be signed by the new key | taken as the payload of a new JWS object, to be signed by the new key | |||
using the parameters above. | using the parameters above. | |||
The value of the new JWS object is sent in the Detached-JWS header. | The value of the new JWS object is sent in the Detached-JWS header. | |||
7.3.4. Attached JWS | 7.3.4. Attached JWS | |||
This method is indicated by the method value jws in string form. | This method is indicated by the method value jws in string form. | |||
{ | { | |||
"proof": "jws" | "proof": "jws" | |||
} | } | |||
The signer creates a JWS [RFC7515] object as follows: | The signer creates a JWS [RFC7515] object as follows. | |||
To protect the request, the JWS header contains the following claims. | To protect the request, the JWS header contains the following claims: | |||
kid (string): The key identifier. REQUIRED if the key is presented | kid (string): The key identifier. REQUIRED if the key is presented | |||
in JWK format, this MUST be the value of the kid field of the key. | in JWK format. This MUST be the value of the kid field of the | |||
key. | ||||
alg (string): The algorithm used to sign the request. MUST be | alg (string): The algorithm used to sign the request. MUST be | |||
appropriate to the key presented. If the key is presented as a | appropriate to the key presented. If the key is presented as a | |||
JWK, this MUST be equal to the alg parameter of the key. MUST NOT | JWK, this MUST be equal to the alg parameter of the key. MUST NOT | |||
be none. REQUIRED. | be none. REQUIRED. | |||
typ (string): The type header, value "gnap-binding-jws". REQUIRED. | typ (string): The type header, value "gnap-binding-jws". REQUIRED. | |||
htm (string): The HTTP Method used to make this request, as a case- | htm (string): The HTTP method used to make this request, as a case- | |||
sensitive ASCII string. (Note that most public HTTP methods are | sensitive ASCII string. (Note that most public HTTP methods are | |||
in uppercase.) REQUIRED. | in uppercase.) REQUIRED. | |||
uri (string): The HTTP URI used for this request, including all path | uri (string): The HTTP URI used for this request, including all path | |||
and query components and no fragment component. REQUIRED. | and query components and no fragment components. REQUIRED. | |||
created (integer): A timestamp of when the signature was created, in | created (integer): A timestamp of when the signature was created, in | |||
integer seconds since UNIX Epoch. REQUIRED. | integer seconds since UNIX Epoch. REQUIRED. | |||
When the request is bound to an access token, the JOSE header MUST | When the request is bound to an access token, the JOSE header MUST | |||
also include the following: | also include the following: | |||
ath (string): The hash of the access token. The value MUST be the | ath (string): The hash of the access token. The value MUST be the | |||
result of Base64url encoding (with no padding) the SHA-256 digest | result of base64url encoding (with no padding) the SHA-256 digest | |||
of the ASCII encoding of the associated access token's value. | of the ASCII encoding of the associated access token's value. | |||
REQUIRED. | REQUIRED. | |||
If the HTTP request has content, such as an HTTP POST or PUT method, | If the HTTP request has content (such as an HTTP POST or PUT method), | |||
the payload of the JWS object is the JSON serialized content of the | the payload of the JWS object is the JSON serialized content of the | |||
request, and the object is signed according to JWS and serialized | request, and the object is signed according to JWS and serialized | |||
into compact form [RFC7515]. The signer presents the JWS as the | into compact form [RFC7515]. The signer presents the JWS as the | |||
content of the request along with a content type of application/jose. | content of the request along with a content type of application/jose. | |||
The verifier MUST extract the payload of the JWS and treat it as the | The verifier MUST extract the payload of the JWS and treat it as the | |||
request content for further processing. | request content for further processing. | |||
If the request being made does not have content, such as an HTTP GET, | If the request being made does not have content (such as an HTTP GET, | |||
OPTIONS, or DELETE method, the JWS signature is calculated over an | OPTIONS, or DELETE method), the JWS signature is calculated over an | |||
empty payload and passed in the Detached-JWS header as described in | empty payload and passed in the Detached-JWS header as described in | |||
Section 7.3.3. | Section 7.3.3. | |||
In the following non-normative example, the JOSE header contains the | In the following non-normative example, the JOSE header contains the | |||
following parameters: | following parameters: | |||
{ | { | |||
"alg": "RS256", | "alg": "RS256", | |||
"kid": "gnap-rsa", | "kid": "gnap-rsa", | |||
"uri": "https://server.example.com/gnap", | "uri": "https://server.example.com/gnap", | |||
skipping to change at page 132, line 44 ¶ | skipping to change at line 5848 ¶ | |||
AogICAgfSwKICAgICJzdWJqZWN0IjogewogICAgICAgICJmb3JtYXRzIjogWyJpc3Nf\ | AogICAgfSwKICAgICJzdWJqZWN0IjogewogICAgICAgICJmb3JtYXRzIjogWyJpc3Nf\ | |||
c3ViIiwgIm9wYXF1ZSJdCiAgICB9Cn0K.MwNoVMQp5hVxI0mCs9LlOUdFtkDXaA1_eT\ | c3ViIiwgIm9wYXF1ZSJdCiAgICB9Cn0K.MwNoVMQp5hVxI0mCs9LlOUdFtkDXaA1_eT\ | |||
vOXq7DOGrtDKH7q4vP2xUq3fH2jRAZqnobo0WdPP3eM3NH5QUjW8pa6_QpwdIWkK7r-\ | vOXq7DOGrtDKH7q4vP2xUq3fH2jRAZqnobo0WdPP3eM3NH5QUjW8pa6_QpwdIWkK7r-\ | |||
u_52puE0lPBp7J4U2w4l9gIbg8iknsmWmXeY5F6wiGT8ptfuEYGgmloAJd9LIeNvD3U\ | u_52puE0lPBp7J4U2w4l9gIbg8iknsmWmXeY5F6wiGT8ptfuEYGgmloAJd9LIeNvD3U\ | |||
LW2h2dz1Pn2eDnbyvgB0Ugae0BoZB4f69fKWj8Z9wvTIjk1LZJN1PcL7_zT8Lrlic9a\ | LW2h2dz1Pn2eDnbyvgB0Ugae0BoZB4f69fKWj8Z9wvTIjk1LZJN1PcL7_zT8Lrlic9a\ | |||
PyzT7Q9ovkd1s-4whE7TrnGUzFc5mgWUn_gsOpsP5mIIljoEEv-FqOW2RyNYulOZl0Q\ | PyzT7Q9ovkd1s-4whE7TrnGUzFc5mgWUn_gsOpsP5mIIljoEEv-FqOW2RyNYulOZl0Q\ | |||
8EnnDHV_vPzrHlUarbGg4YffgtwkQhdK72-JOxYQ | 8EnnDHV_vPzrHlUarbGg4YffgtwkQhdK72-JOxYQ | |||
When the verifier receives an attached JWS request, it MUST parse and | When the verifier receives an attached JWS request, it MUST parse and | |||
validate the JWS object. The signature MUST be validated against the | validate the JWS object. The signature MUST be validated against the | |||
expected key of the signer. All required fields MUST be present and | expected key of the signer. All required fields MUST be present, and | |||
their values MUST be valid. All fields MUST match the corresponding | their values MUST be valid. All fields MUST match the corresponding | |||
portions of the HTTP message. For example, the htm field of the JWS | portions of the HTTP message. For example, the htm field of the JWS | |||
header has to be the same as the HTTP verb used in the request. | header has to be the same as the HTTP verb used in the request. | |||
Note that this proof method depends on a specific cryptographic | Note that this proofing method depends on a specific cryptographic | |||
algorithm, SHA-256, in two ways: the ath hash algorithm is hardcoded, | algorithm, SHA-256, in two ways: the ath hash algorithm is hardcoded, | |||
and computing the payload of the detached/attached signature also | and computing the payload of the detached/attached signature also | |||
uses a hardcoded hash. A future version of this document may address | uses a hardcoded hash. A future version of this document may address | |||
crypto-agility for both these uses by replacing ath with a new header | crypto-agility for both these uses by replacing ath with a new header | |||
that upgrades the algorithm, and possibly defining a new header that | that upgrades the algorithm and possibly defining a new header that | |||
indicates the HTTP content's hash method. | indicates the HTTP content's hash method. | |||
7.3.4.1. Key Rotation using Attached JWS | 7.3.4.1. Key Rotation Using Attached JWS | |||
When rotating a key using Attached JWS, the message, which includes | When rotating a key using attached JWS, the message, which includes | |||
the new public key value or reference, is first signed with the old | the new public key value or reference, is first signed with the old | |||
key using a JWS object with typ header value "gnap-binding-rotation- | key using a JWS object with typ header value "gnap-binding-rotation- | |||
jws". The value of the JWS object is then taken as the payload of a | jws". The value of the JWS object is then taken as the payload of a | |||
new JWS object, to be signed by the new key. | new JWS object, to be signed by the new key. | |||
8. Resource Access Rights | 8. Resource Access Rights | |||
GNAP provides a rich structure for describing the protected resources | GNAP provides a rich structure for describing the protected resources | |||
hosted by RSs and accessed by client software. This structure is | hosted by RSs and accessed by client software. This structure is | |||
used when the client instance requests an access token (Section 2.1) | used when the client instance requests an access token (Section 2.1) | |||
and when an access token is returned (Section 3.2). GNAP's structure | and when an access token is returned (Section 3.2). GNAP's structure | |||
is designed to be analogous to the OAuth 2.0 Rich Authorization | is designed to be analogous to the OAuth 2.0 Rich Authorization | |||
Request data structure defined in [RFC9396]. | Requests data structure defined in [RFC9396]. | |||
The root of this structure is a JSON array. The elements of the JSON | The root of this structure is a JSON array. The elements of the JSON | |||
array represent rights of access that are associated with the access | array represent rights of access that are associated with the access | |||
token. Individual rights of access can be defined by the RS as | token. Individual rights of access can be defined by the RS as | |||
either an object or a string. The resulting access is the union of | either an object or a string. The resulting access is the union of | |||
all elements within the array. | all elements within the array. | |||
The access associated with the access token is described using | The access associated with the access token is described using | |||
objects that each contain multiple dimensions of access. Each object | objects that each contain multiple dimensions of access. Each object | |||
contains a REQUIRED type property that determines the type of API | contains a REQUIRED type property that determines the type of API | |||
skipping to change at page 134, line 15 ¶ | skipping to change at line 5914 ¶ | |||
While it is expected that many APIs will have their own properties, | While it is expected that many APIs will have their own properties, | |||
this specification defines a set of common data fields that are | this specification defines a set of common data fields that are | |||
designed to be usable across different types of APIs. This | designed to be usable across different types of APIs. This | |||
specification does not require the use of these common fields by an | specification does not require the use of these common fields by an | |||
API definition but, instead, provides them as reusable generic | API definition but, instead, provides them as reusable generic | |||
components for API designers to make use of. The allowable values of | components for API designers to make use of. The allowable values of | |||
all fields are determined by the API being protected, as defined by a | all fields are determined by the API being protected, as defined by a | |||
particular type value. | particular type value. | |||
actions (array of strings): The types of actions the client instance | actions (array of strings): The types of actions the client instance | |||
will take at the RS as an array of strings. For example, a client | will take at the RS as an array of strings (for example, a client | |||
instance asking for a combination of "read" and "write" access. | instance asking for a combination of "read" and "write" access). | |||
locations (array of strings): The location of the RS as an array of | locations (array of strings): The location of the RS as an array of | |||
strings. These strings are typically URIs identifying the | strings. These strings are typically URIs identifying the | |||
location of the RS. | location of the RS. | |||
datatypes (array of strings): The kinds of data available to the | datatypes (array of strings): The kinds of data available to the | |||
client instance at the RS's API as an array of strings. For | client instance at the RS's API as an array of strings (for | |||
example, a client instance asking for access to raw "image" data | example, a client instance asking for access to raw "image" data | |||
and "metadata" at a photograph API. | and "metadata" at a photograph API). | |||
identifier (string): A string identifier indicating a specific | identifier (string): A string identifier indicating a specific | |||
resource at the RS. For example, a patient identifier for a | resource at the RS (for example, a patient identifier for a | |||
medical API or a bank account number for a financial API. | medical API or a bank account number for a financial API). | |||
privileges (array of strings): The types or levels of privilege | privileges (array of strings): The types or levels of privilege | |||
being requested at the resource. For example, a client instance | being requested at the resource (for example, a client instance | |||
asking for administrative level access, or access when the | asking for administrative-level access or access when the RO is no | |||
resource owner is no longer online. | longer online). | |||
The following non-normative example is describing three kinds of | The following non-normative example describes three kinds of access | |||
access (read, write, delete) to each of two different locations and | (read, write, and delete) to each of two different locations and two | |||
two different data types (metadata, images) for a single access token | different data types (metadata and images) for a single access token | |||
using the fictitious photo-api type definition. | using the fictitious photo-api type definition. | |||
"access": [ | "access": [ | |||
{ | { | |||
"type": "photo-api", | "type": "photo-api", | |||
"actions": [ | "actions": [ | |||
"read", | "read", | |||
"write", | "write", | |||
"delete" | "delete" | |||
], | ], | |||
skipping to change at page 135, line 25 ¶ | skipping to change at line 5960 ¶ | |||
"https://resource.local/other" | "https://resource.local/other" | |||
], | ], | |||
"datatypes": [ | "datatypes": [ | |||
"metadata", | "metadata", | |||
"images" | "images" | |||
] | ] | |||
} | } | |||
] | ] | |||
While the exact semantics of interpreting the fields of an access | While the exact semantics of interpreting the fields of an access | |||
request object is subject to the definition of the type, it is | request object are subject to the definition of the type, it is | |||
expected that the access requested for each object in the array is | expected that the access requested for each object in the array is | |||
the cross-product of all fields of the object. That is to say, the | the cross-product of all fields of the object. That is to say, the | |||
object represents a request for all actions listed to be used at all | object represents a request for all actions listed to be used at all | |||
locations listed for all possible datatypes listed within the object. | locations listed for all possible datatypes listed within the object. | |||
Assuming the request above was granted, the client instance could | Assuming the request above was granted, the client instance could | |||
assume that it would be able to do a read action against the images | assume that it would be able to do a read action against the images | |||
on the first server as well as a delete action on the metadata of the | on the first server as well as a delete action on the metadata of the | |||
second server, or any other combination of these fields, using the | second server, or any other combination of these fields, using the | |||
same access token. | same access token. | |||
To request a different combination of access, such as requesting one | To request a different combination of access, such as requesting one | |||
of the possible actions against one of the possible locations and a | of the possible actions against one of the possible locations and a | |||
different choice of possible actions against a different one of the | different choice of possible actions against a different one of the | |||
possible locations, the client instance can include multiple separate | possible locations, the client instance can include multiple separate | |||
objects in the resources array. The total access rights for the | objects in the resources array. The total access rights for the | |||
resulting access token is the union of all objects. The following | resulting access token are the union of all objects. The following | |||
non-normative example uses the same fictitious photo-api type | non-normative example uses the same fictitious photo-api type | |||
definition to request a single access token with more specifically | definition to request a single access token with more specifically | |||
targeted access rights by using two discrete objects within the | targeted access rights by using two discrete objects within the | |||
request. | request. | |||
"access": [ | "access": [ | |||
{ | { | |||
"type": "photo-api", | "type": "photo-api", | |||
"actions": [ | "actions": [ | |||
"read" | "read" | |||
skipping to change at page 136, line 34 ¶ | skipping to change at line 6011 ¶ | |||
"locations": [ | "locations": [ | |||
"https://resource.local/other" | "https://resource.local/other" | |||
], | ], | |||
"datatypes": [ | "datatypes": [ | |||
"metadata" | "metadata" | |||
] | ] | |||
} | } | |||
] | ] | |||
The access requested here is for read access to images on one server | The access requested here is for read access to images on one server | |||
while simultaneously requesting write and delete access for metadata | as well as write and delete access for metadata on a different server | |||
on a different server, but importantly without requesting write or | (importantly, without requesting write or delete access to images on | |||
delete access to images on the first server. | the first server). | |||
It is anticipated that API designers will use a combination of common | It is anticipated that API designers will use a combination of common | |||
fields defined in this specification as well as fields specific to | fields defined in this specification as well as fields specific to | |||
the API itself. The following non-normative example shows the use of | the API itself. The following non-normative example shows the use of | |||
both common and API-specific fields as part of two different | both common and API-specific fields as part of two different | |||
fictitious API type values. The first access request includes the | fictitious API type values. The first access request includes the | |||
actions, locations, and datatypes fields specified here as well as | actions, locations, and datatypes fields specified here as well as | |||
the API-specific geolocation field. The second access request | the API-specific geolocation field. The second access request | |||
includes the actions and identifier fields specified here as well as | includes the actions and identifier fields specified here as well as | |||
the API-specific currency field. | the API-specific currency field. | |||
skipping to change at page 137, line 39 ¶ | skipping to change at line 6059 ¶ | |||
], | ], | |||
"identifier": "account-14-32-32-3", | "identifier": "account-14-32-32-3", | |||
"currency": "USD" | "currency": "USD" | |||
} | } | |||
] | ] | |||
If this request is approved, the resulting access token's access | If this request is approved, the resulting access token's access | |||
rights will be the union of the requested types of access for each of | rights will be the union of the requested types of access for each of | |||
the two APIs, just as above. | the two APIs, just as above. | |||
8.1. Requesting Resources By Reference | 8.1. Requesting Resources by Reference | |||
Instead of sending an object describing the requested resource | Instead of sending an object describing the requested resource | |||
(Section 8), access rights MAY be communicated as a string known to | (Section 8), access rights MAY be communicated as a string known to | |||
the AS representing the access being requested. Just like access | the AS representing the access being requested. Just like access | |||
rights communicated as an object, access rights communicated as | rights communicated as an object, access rights communicated as | |||
reference strings indicate a specific access at a protected resource. | reference strings indicate a specific access at a protected resource. | |||
In the following non-normative example, three distinct resource | In the following non-normative example, three distinct resource | |||
access rights are being requested. | access rights are being requested. | |||
"access": [ | "access": [ | |||
skipping to change at page 138, line 4 ¶ | skipping to change at line 6072 ¶ | |||
(Section 8), access rights MAY be communicated as a string known to | (Section 8), access rights MAY be communicated as a string known to | |||
the AS representing the access being requested. Just like access | the AS representing the access being requested. Just like access | |||
rights communicated as an object, access rights communicated as | rights communicated as an object, access rights communicated as | |||
reference strings indicate a specific access at a protected resource. | reference strings indicate a specific access at a protected resource. | |||
In the following non-normative example, three distinct resource | In the following non-normative example, three distinct resource | |||
access rights are being requested. | access rights are being requested. | |||
"access": [ | "access": [ | |||
"read", "dolphin-metadata", "some other thing" | "read", "dolphin-metadata", "some other thing" | |||
] | ] | |||
This value is opaque to the client instance and MAY be any valid JSON | This value is opaque to the client instance and MAY be any valid JSON | |||
string, and therefore could include spaces, unicode characters, and | string; therefore, it could include spaces, Unicode characters, and | |||
properly escaped string sequences. However, in some situations the | properly escaped string sequences. However, in some situations, the | |||
value is intended to be seen and understood by the client software's | value is intended to be seen and understood by the client software's | |||
developer. In such cases, the API designer choosing any such human- | developer. In such cases, the API designer choosing any such human- | |||
readable strings SHOULD take steps to ensure the string values are | readable strings SHOULD take steps to ensure the string values are | |||
not easily confused by a developer, such as by limiting the strings | not easily confused by a developer, such as by limiting the strings | |||
to easily disambiguated characters. | to easily disambiguated characters. | |||
This functionality is similar in practice to OAuth 2.0's scope | This functionality is similar in practice to OAuth 2.0's scope | |||
parameter [RFC6749], where a single string represents the set of | parameter [RFC6749], where a single string represents the set of | |||
access rights requested by the client instance. As such, the | access rights requested by the client instance. As such, the | |||
reference string could contain any valid OAuth 2.0 scope value as in | reference string could contain any valid OAuth 2.0 scope value, as in | |||
Appendix C.5. Note that the reference string here is not bound to | Appendix B.5. Note that the reference string here is not bound to | |||
the same character restrictions as in OAuth 2.0's scope definition. | the same character restrictions as OAuth 2.0's scope definition. | |||
A single access array MAY include both object-type and string-type | A single access array MAY include both object-type and string-type | |||
resource items. In this non-normative example, the client instance | resource items. In this non-normative example, the client instance | |||
is requesting access to a photo-api and financial-transaction API | is requesting access to a photo-api and financial-transaction API | |||
type as well as the reference values of read, dolphin-metadata, and | type as well as the reference values of read, dolphin-metadata, and | |||
some other thing. | some other thing. | |||
"access": [ | "access": [ | |||
{ | { | |||
"type": "photo-api", | "type": "photo-api", | |||
skipping to change at page 139, line 42 ¶ | skipping to change at line 6132 ¶ | |||
"some other thing" | "some other thing" | |||
] | ] | |||
The requested access is the union of all elements of the array, | The requested access is the union of all elements of the array, | |||
including both objects and reference strings. | including both objects and reference strings. | |||
In order to facilitate the use of both object and reference strings | In order to facilitate the use of both object and reference strings | |||
to access the same kind of APIs, the API designer can define a clear | to access the same kind of APIs, the API designer can define a clear | |||
mapping between these forms. One possible approach for choosing | mapping between these forms. One possible approach for choosing | |||
reference string values is to use the same value as the type | reference string values is to use the same value as the type | |||
parameter from the fully-specified object, with the API defining a | parameter from the fully specified object, with the API defining a | |||
set of default behaviors in this case. For example, an API | set of default behaviors in this case. For example, an API | |||
definition could declare the following string: | definition could declare the following string: | |||
"access": [ | "access": [ | |||
"photo-api" | "photo-api" | |||
] | ] | |||
As being equivalent to the following fully-defined object: | As being equivalent to the following fully defined object: | |||
"access": [ | "access": [ | |||
{ | { | |||
"type": "photo-api", | "type": "photo-api", | |||
"actions": [ "read", "write", "delete" ], | "actions": [ "read", "write", "delete" ], | |||
"datatypes": [ "metadata", "image" ] | "datatypes": [ "metadata", "image" ] | |||
} | } | |||
] | ] | |||
The exact mechanisms for relating reference strings is up to the API | The exact mechanisms for relating reference strings is up to the API | |||
skipping to change at page 140, line 35 ¶ | skipping to change at line 6172 ¶ | |||
However, the AS can have limits on its allowed functionality. If the | However, the AS can have limits on its allowed functionality. If the | |||
client instance wants to optimize its calls to the AS before making a | client instance wants to optimize its calls to the AS before making a | |||
request, it MAY send an HTTP OPTIONS request to the grant request | request, it MAY send an HTTP OPTIONS request to the grant request | |||
endpoint to retrieve the server's discovery information. The AS MUST | endpoint to retrieve the server's discovery information. The AS MUST | |||
respond with a JSON document with Content-Type application/json | respond with a JSON document with Content-Type application/json | |||
containing a single object with the following fields: | containing a single object with the following fields: | |||
grant_request_endpoint (string): The location of the AS's grant | grant_request_endpoint (string): The location of the AS's grant | |||
request endpoint. The location MUST be an absolute URL [RFC3986] | request endpoint. The location MUST be an absolute URL [RFC3986] | |||
with a scheme component (which MUST be "https"), a host component, | with a scheme component (which MUST be "https"), a host component, | |||
and optionally, port, path and query components and no fragment | and optionally port, path, and query components and no fragment | |||
components. This URL MUST match the URL the client instance used | components. This URL MUST match the URL the client instance used | |||
to make the discovery request. REQUIRED. | to make the discovery request. REQUIRED. | |||
interaction_start_modes_supported (array of strings): A list of the | interaction_start_modes_supported (array of strings): A list of the | |||
AS's interaction start methods. The values of this list | AS's interaction start methods. The values of this list | |||
correspond to the possible values for the interaction start | correspond to the possible values for the interaction start field | |||
section (Section 2.5.1) of the request and MUST be values from the | of the request (Section 2.5.1) and MUST be values from the "GNAP | |||
GNAP Interaction Start Modes Registry (Section 11.9). OPTIONAL. | Interaction Start Modes" registry (Section 10.9). OPTIONAL. | |||
interaction_finish_methods_supported (array of strings): A list of | interaction_finish_methods_supported (array of strings): A list of | |||
the AS's interaction finish methods. The values of this list | the AS's interaction finish methods. The values of this list | |||
correspond to the possible values for the method element of the | correspond to the possible values for the method element of the | |||
interaction finish section (Section 2.5.2) of the request and MUST | interaction finish field of the request (Section 2.5.2) and MUST | |||
be values from the GNAP Interaction Finish Methods Registry | be values from the "GNAP Interaction Finish Methods" registry | |||
(Section 11.10). OPTIONAL. | (Section 10.10). OPTIONAL. | |||
key_proofs_supported (array of strings): A list of the AS's | key_proofs_supported (array of strings): A list of the AS's | |||
supported key proofing mechanisms. The values of this list | supported key proofing mechanisms. The values of this list | |||
correspond to possible values of the proof field of the key | correspond to possible values of the proof field of the key | |||
section (Section 7.1) of the request and MUST be values from the | section of the request (Section 7.1) and MUST be values from the | |||
GNAP Key Proofing Methods Registry (Section 11.16). OPTIONAL. | "GNAP Key Proofing Methods" registry (Section 10.16). OPTIONAL. | |||
sub_id_formats_supported (array of strings): A list of the AS's | sub_id_formats_supported (array of strings): A list of the AS's | |||
supported subject identifier formats. The values of this list | supported Subject Identifier formats. The values of this list | |||
correspond to possible values of the subject identifier section | correspond to possible values of the Subject Identifier field of | |||
(Section 2.2) of the request and MUST be values from the Subject | the request (Section 2.2) and MUST be values from the "Subject | |||
Identifier Formats Registry established by [RFC9493]. OPTIONAL. | Identifier Formats" registry [Subj-ID-Formats]. OPTIONAL. | |||
assertion_formats_supported (array of strings): A list of the AS's | assertion_formats_supported (array of strings): A list of the AS's | |||
supported assertion formats. The values of this list correspond | supported assertion formats. The values of this list correspond | |||
to possible values of the subject assertion section (Section 2.2) | to possible values of the subject assertion field of the request | |||
of the request and MUST be values from the GNAP Assertion Formats | (Section 2.2) and MUST be values from the "GNAP Assertion Formats" | |||
Registry (Section 11.6). OPTIONAL. | registry (Section 10.6). OPTIONAL. | |||
key_rotation_supported (boolean): The boolean "true" indicates that | key_rotation_supported (boolean): The boolean "true" indicates that | |||
rotation of access token bound keys by the client (Section 6.1.1) | rotation of access token bound keys by the client (Section 6.1.1) | |||
is supported by the AS. The absence of this field or a boolean | is supported by the AS. The absence of this field or a boolean | |||
"false" value indicates that this feature is not supported. | "false" value indicates that this feature is not supported. | |||
The information returned from this method is for optimization | The information returned from this method is for optimization | |||
purposes only. The AS MAY deny any request, or any portion of a | purposes only. The AS MAY deny any request, or any portion of a | |||
request, even if it lists a capability as supported. For example, a | request, even if it lists a capability as supported. For example, if | |||
given client instance can be registered with the mtls key proofing | a given client instance can be registered with the mtls key proofing | |||
mechanism, but the AS also returns other proofing methods from the | mechanism but the AS also returns other proofing methods from the | |||
discovery document, then the AS will still deny a request from that | discovery document, then the AS will still deny a request from that | |||
client instance using a different proofing mechanism. Similarly, an | client instance using a different proofing mechanism. Similarly, an | |||
AS with key_rotation_supported set to "true" can still deny any | AS with key_rotation_supported set to "true" can still deny any | |||
request for rotating any access token's key for a variety of reasons. | request for rotating any access token's key for a variety of reasons. | |||
Additional fields can be defined the GNAP Authorization Server | Additional fields can be defined in the "GNAP Authorization Server | |||
Discovery Fields Registry (Section 11.18). | Discovery Fields" registry (Section 10.18). | |||
9.1. RS-first Method of AS Discovery | 9.1. RS-First Method of AS Discovery | |||
If the client instance calls an RS without an access token, or with | If the client instance calls an RS without an access token or with an | |||
an invalid access token, the RS SHOULD be explicit about the fact | invalid access token, the RS SHOULD be explicit about the fact that | |||
that GNAP needs to be used to access the resource by responding with | GNAP needs to be used to access the resource by responding with the | |||
the WWW-Authenticate header field and a GNAP challenge. | WWW-Authenticate header field and a GNAP challenge. | |||
In some situations, the client instance might want to know with which | In some situations, the client instance might want to know with which | |||
specific AS it needs to negotiate for access to that RS. The RS MAY | specific AS it needs to negotiate for access to that RS. The RS MAY | |||
additionally return the following OPTIONAL parameters: | additionally return the following OPTIONAL parameters: | |||
as_uri: The URI of the grant endpoint of the GNAP AS. Used by the | as_uri: The URI of the grant endpoint of the GNAP AS. Used by the | |||
client instance to call the AS to request an access token. | client instance to call the AS to request an access token. | |||
referrer: The URI of the GNAP RS. Sent by the client instance in | referrer: The URI of the GNAP RS. Sent by the client instance in | |||
the Referer header as part of the grant request. | the Referer header as part of the grant request. | |||
skipping to change at page 142, line 21 ¶ | skipping to change at line 6255 ¶ | |||
rights as well. Sent by the client as an access right in the | rights as well. Sent by the client as an access right in the | |||
grant request. | grant request. | |||
The client instance SHOULD then use both the referrer and access | The client instance SHOULD then use both the referrer and access | |||
parameters in its access token request. The client instance MUST | parameters in its access token request. The client instance MUST | |||
check that the referrer parameter is equal to the URI of the RS using | check that the referrer parameter is equal to the URI of the RS using | |||
the simple string comparison method in Section 6.2.1 of [RFC3986]. | the simple string comparison method in Section 6.2.1 of [RFC3986]. | |||
The means for the RS to determine the value for the access reference | The means for the RS to determine the value for the access reference | |||
are out of scope of this specification, but some dynamic methods are | are out of scope of this specification, but some dynamic methods are | |||
discussed in [I-D.ietf-gnap-resource-servers]. | discussed in [GNAP-RS]. | |||
When receiving the following response from the RS: | When receiving the following response from the RS: | |||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
WWW-Authenticate: \ | WWW-Authenticate: \ | |||
GNAP as_uri=https://as.example/tx\ | GNAP as_uri=https://as.example/tx\ | |||
;access=FWWIKYBQ6U56NL1\ | ;access=FWWIKYBQ6U56NL1\ | |||
;referrer=https://rs.example | ;referrer=https://rs.example | |||
skipping to change at page 143, line 31 ¶ | skipping to change at line 6304 ¶ | |||
} | } | |||
The client instance includes the Referer header field as a way for | The client instance includes the Referer header field as a way for | |||
the AS to know that the process is initiated through a discovery | the AS to know that the process is initiated through a discovery | |||
process at the RS. | process at the RS. | |||
If issued, the resulting access token would contain sufficient access | If issued, the resulting access token would contain sufficient access | |||
to be used at both referenced resources. | to be used at both referenced resources. | |||
Security considerations, especially related to the potential of a | Security considerations, especially related to the potential of a | |||
compromised RS (Section 13.37) redirecting the requests of an | compromised RS (Section 11.37) redirecting the requests of an | |||
otherwise properly authenticated client, need to be carefully | otherwise properly authenticated client, need to be carefully | |||
considered when allowing such a discovery process. This risk can be | considered when allowing such a discovery process. This risk can be | |||
mitigated by an alternative pre-registration process so that the | mitigated by an alternative pre-registration process so that the | |||
client knows which AS protects which RS. There are also privacy | client knows which AS protects which RS. There are also privacy | |||
considerations related to revealing which AS is protecting a given | considerations related to revealing which AS is protecting a given | |||
resource, discussed in Section 14.4.1. | resource; these are discussed in Section 12.4.1. | |||
9.2. Dynamic grant endpoint discovery | 9.2. Dynamic Grant Endpoint Discovery | |||
Additional methods of discovering the appropriate grant endpoint for | Additional methods of discovering the appropriate grant endpoint for | |||
a given application are outside the scope of this specification. | a given application are outside the scope of this specification. | |||
This limitation is intentional, as many applications rely on static | This limitation is intentional, as many applications rely on static | |||
configuration between the client instance and AS, as is common in | configuration between the client instance and AS, as is common in | |||
OAuth 2.0. However, the dynamic nature of GNAP makes it a prime | OAuth 2.0. However, the dynamic nature of GNAP makes it a prime | |||
candidate for other extensions defining methods for discovery of the | candidate for other extensions defining methods for discovery of the | |||
appropriate AS grant endpoint at runtime. Advanced use cases could | appropriate AS grant endpoint at runtime. Advanced use cases could | |||
define contextual methods for contextually providing this endpoint to | define contextual methods for securely providing this endpoint to the | |||
the client instance securely. Furthermore, GNAP's design | client instance. Furthermore, GNAP's design intentionally requires | |||
intentionally requires the client instance to only know the grant | the client instance to only know the grant endpoint and not | |||
endpoint and not additional parameters, since other functions and | additional parameters, since other functions and values can be | |||
values can be disclosed and negotiated during the grant process. | disclosed and negotiated during the grant process. | |||
10. Acknowledgements | ||||
The editors would like to thank the feedback of the following | ||||
individuals for their reviews, implementations, and contributions: | ||||
Åke Axeland, Aaron Parecki, Adam Omar Oueidat, Andrii Deinega, | ||||
Annabelle Backman, Dick Hardt, Dmitri Zagidulin, Dmitry Barinov, | ||||
Fabien Imbault, Florian Helmschmidt, Francis Pouatcha, George | ||||
Fletcher, Haardik Haardik, Hamid Massaoud, Jacky Yuan, Joseph Heenan, | ||||
Justin Richer, Kathleen Moriarty, Leif Johansson, Mike Jones, Mike | ||||
Varley, Nat Sakimura, Takahiko Kawasaki, Takahiro Tsuchiya, Yaron | ||||
Sheffer. | ||||
The editors would also like to thank the GNAP working group design | ||||
team of Kathleen Moriarty, Fabien Imbault, Dick Hardt, Mike Jones, | ||||
and Justin Richer, who incorporated elements from the XAuth and XYZ | ||||
proposals to create the first version of this document. | ||||
In addition, the editors would like to thank Aaron Parecki and Mike | ||||
Jones for insights into how to integrate identity and authentication | ||||
systems into the core protocol, and Justin Richer and Dick Hardt for | ||||
the use cases, diagrams, and insights provided in the XYZ and XAuth | ||||
proposals that have been incorporated here. The editors would like | ||||
to especially thank Mike Varley and the team at SecureKey for | ||||
feedback and development of early versions of the XYZ protocol that | ||||
fed into this standards work. | ||||
Finally, the editors want to acknowledge the immense contributions of | ||||
Aaron Parecki to the content of this document. We thank him for his | ||||
insight, input, and hard work, without which GNAP would not have | ||||
grown to what it is. | ||||
11. IANA Considerations | 10. IANA Considerations | |||
IANA is requested to add values to existing registries and to create | IANA has added values to existing registries as well as created 16 | |||
16 registries for the Grant Negotiation and Authorization Protocol | registries for GNAP [GNAP-REG] and populated those registries with | |||
and to populate those registries with initial values as described in | initial values as described in this section. | |||
this section. | ||||
All use of value typing is based on [RFC8259] data types and MUST be | All use of value typing is based on data types in [RFC8259] and MUST | |||
one of the following: number, object, string, boolean, or array. | be one of the following: number, object, string, boolean, or array. | |||
When the type is array, the contents of the array MUST be specified, | When the type is array, the contents of the array MUST be specified, | |||
as in "array of objects" when one subtype is allowed or "array of | as in "array of objects" when one subtype is allowed or "array of | |||
strings/objects" when multiple simultaneous subtypes are allowed. | strings/objects" when multiple simultaneous subtypes are allowed. | |||
When the type is object, the structure of the object MUST be | When the type is object, the structure of the object MUST be | |||
specified in the definition. If a parameter is available in | specified in the definition. If a parameter is available in | |||
different types, each type SHOULD be registered separately. | different types, each type SHOULD be registered separately. | |||
General guidance for extension parameters is found in Appendix E. | General guidance for extension parameters is found in Appendix D. | |||
11.1. HTTP Authentication Scheme Registration | ||||
This specification requests registration of the following scheme in | ||||
the "Hypertext Transfer Protocol (HTTP) Authentication Scheme | ||||
Registry" defined be Section 18.5 of [HTTP]: | ||||
* Authentication Scheme Name: GNAP | 10.1. HTTP Authentication Scheme Registration | |||
* Reference: Section 7.2 of RFC nnnn | IANA has registered of the following scheme in the "HTTP | |||
Authentication Schemes" registry [Auth-Schemes] defined in | ||||
Section 18.5 of [HTTP]: | ||||
11.2. Media Type Registration | Authentication Scheme Name: GNAP | |||
This section requests registration of the following media types | Reference: Section 7.2 of RFC 9635 | |||
[RFC2046] in the "Media Types" registry [IANA.MediaTypes] in the | ||||
manner described in [RFC6838]. | ||||
To indicate that the content is a GNAP message to be bound with a | 10.2. Media Type Registration | |||
detached JWS mechanism: | ||||
* Type name: application | Per this section, IANA has registered the following media types | |||
[RFC2046] in the "Media Types" registry [MediaTypes] as described in | ||||
[RFC6838]. | ||||
* Subtype name: gnap-binding-jwsd | 10.2.1. application/gnap-binding-jwsd | |||
* Required parameters: n/a | This media type indicates that the content is a GNAP message to be | |||
bound with a detached JWS mechanism. | ||||
* Optional parameters: n/a | Type name: application | |||
* Encoding considerations: binary | Subtype name: gnap-binding-jwsd | |||
* Security considerations: See Section 13 of RFC nnnn | Required parameters: N/A | |||
* Interoperability considerations: n/a | Optional parameters: N/A | |||
* Published specification: RFC nnnn | Encoding considerations: binary | |||
* Applications that use this media type: GNAP | Security considerations: See Section 11 of RFC 9635. | |||
* Fragment identifier considerations: n/a | Interoperability considerations: N/A | |||
* Additional information: | Published specification: RFC 9635 | |||
- Magic number(s): n/a | Applications that use this media type: GNAP | |||
- File extension(s): n/a | Fragment identifier considerations: N/A | |||
- Macintosh file type code(s): n/a | Additional information: | |||
* Person & email address to contact for further information: IETF | Deprecated alias names for this type: N/A | |||
GNAP Working Group, txauth@ietf.org | Magic number(s): N/A | |||
File extension(s): N/A | ||||
Macintosh file type code(s): N/A | ||||
* Intended usage: COMMON | Person & email address to contact for further information: IETF GNAP | |||
Working Group (txauth@ietf.org) | ||||
* Restrictions on usage: none | Intended usage: COMMON | |||
* Author: IETF GNAP Working Group, txauth@ietf.org | Restrictions on usage: none | |||
* Change Controller: IETF | Author: IETF GNAP Working Group (txauth@ietf.org) | |||
* Provisional registration? No | Change Controller: IETF | |||
To indicate that the content is a GNAP message to be bound with an | 10.2.2. application/gnap-binding-jws | |||
attached JWS mechanism: | ||||
* Type name: application | This media type indicates that the content is a GNAP message to be | |||
bound with an attached JWS mechanism. | ||||
* Subtype name: gnap-binding-jws | Type name: application | |||
* Required parameters: n/a | Subtype name: gnap-binding-jws | |||
* Optional parameters: n/a | Required parameters: N/A | |||
* Encoding considerations: binary | Optional parameters: N/A | |||
* Security considerations: See Section 13 of RFC nnnn | Encoding considerations: binary | |||
* Interoperability considerations: n/a | Security considerations: See Section 11 of RFC 9635. | |||
* Published specification: RFC nnnn | Interoperability considerations: N/A | |||
* Applications that use this media type: GNAP | Published specification: RFC 9635 | |||
* Fragment identifier considerations: n/a | Applications that use this media type: GNAP | |||
* Additional information: | Fragment identifier considerations: N/A | |||
- Magic number(s): n/a | Additional information: | |||
- File extension(s): n/a | Deprecated alias names for this type: N/A | |||
Magic number(s): N/A | ||||
File extension(s): N/A | ||||
Macintosh file type code(s): N/A | ||||
- Macintosh file type code(s): n/a | Person & email address to contact for further information: IETF GNAP | |||
Working Group (txauth@ietf.org) | ||||
* Person & email address to contact for further information: IETF | Intended usage: COMMON | |||
GNAP Working Group, txauth@ietf.org | ||||
* Intended usage: COMMON | Restrictions on usage: none | |||
* Restrictions on usage: none | ||||
* Author: IETF GNAP Working Group, txauth@ietf.org | Author: IETF GNAP Working Group (txauth@ietf.org) | |||
* Change Controller: IETF | Change Controller: IETF | |||
* Provisional registration? No | 10.2.3. application/gnap-binding-rotation-jwsd | |||
To indicate that the content is a GNAP token rotation message to be | This media type indicates that the content is a GNAP token rotation | |||
bound with a detached JWS mechanism: | message to be bound with a detached JWS mechanism. | |||
* Type name: application | Type name: application | |||
* Subtype name: gnap-binding-rotation-jwsd | Subtype name: gnap-binding-rotation-jwsd | |||
* Required parameters: n/a | Required parameters: N/A | |||
* Optional parameters: n/a | Optional parameters: N/A | |||
* Encoding considerations: binary | Encoding considerations: binary | |||
* Security considerations: See Section 13 of RFC nnnn | Security considerations: See Section 11 of RFC 9635. | |||
* Interoperability considerations: n/a | Interoperability considerations: N/A | |||
* Published specification: RFC nnnn | Published specification: RFC 9635 | |||
* Applications that use this media type: GNAP | Applications that use this media type: GNAP | |||
* Fragment identifier considerations: n/a | Fragment identifier considerations: N/A | |||
* Additional information: | Additional information: | |||
- Magic number(s): n/a | Deprecated alias names for this type: N/A | |||
Magic number(s): N/A | ||||
File extension(s): N/A | ||||
Macintosh file type code(s): N/A | ||||
- File extension(s): n/a | Person & email address to contact for further information: IETF GNAP | |||
Working Group (txauth@ietf.org) | ||||
- Macintosh file type code(s): n/a | Intended usage: COMMON | |||
* Person & email address to contact for further information: IETF | Restrictions on usage: none | |||
GNAP Working Group, txauth@ietf.org | ||||
* Intended usage: COMMON | Author: IETF GNAP Working Group (txauth@ietf.org) | |||
* Restrictions on usage: none | Change Controller: IETF | |||
* Author: IETF GNAP Working Group, txauth@ietf.org | 10.2.4. application/gnap-binding-rotation-jws | |||
* Change Controller: IETF | ||||
* Provisional registration? No | This media type indicates that the content is a GNAP token rotation | |||
message to be bound with an attached JWS mechanism. | ||||
To indicate that the content is a GNAP token rotation message to be | Type name: application | |||
bound with an attached JWS mechanism: | ||||
* Type name: application | Subtype name: gnap-binding-rotation-jws | |||
* Subtype name: gnap-binding-rotation-jws | Required parameters: N/A | |||
* Required parameters: n/a | Optional parameters: N/A | |||
* Optional parameters: n/a | Encoding considerations: binary | |||
* Encoding considerations: binary | Security considerations: See Section 11 of RFC 9635. | |||
* Security considerations: See Section 13 of RFC nnnn | Interoperability considerations: N/A | |||
* Interoperability considerations: n/a | Published specification: RFC 9635 | |||
* Published specification: RFC nnnn | Applications that use this media type: GNAP | |||
* Applications that use this media type: GNAP | Fragment identifier considerations: N/A | |||
* Fragment identifier considerations: n/a | Additional information: | |||
* Additional information: | Deprecated alias names for this type: N/A | |||
Magic number(s): N/A | ||||
File extension(s): N/A | ||||
Macintosh file type code(s): N/A | ||||
- Magic number(s): n/a | Person & email address to contact for further information: IETF GNAP | |||
Working Group (txauth@ietf.org) | ||||
- File extension(s): n/a | Intended usage: COMMON | |||
- Macintosh file type code(s): n/a | Restrictions on usage: none | |||
* Person & email address to contact for further information: IETF | Author: IETF GNAP Working Group (txauth@ietf.org) | |||
GNAP Working Group, txauth@ietf.org | ||||
* Intended usage: COMMON | Change Controller: IETF | |||
* Restrictions on usage: none | 10.3. GNAP Grant Request Parameters | |||
* Author: IETF GNAP Working Group, txauth@ietf.org | This document defines a GNAP grant request, for which IANA has | |||
created and maintains a new registry titled "GNAP Grant Request | ||||
Parameters". Initial values for this registry are given in | ||||
Section 10.3.2. Future assignments and modifications to existing | ||||
assignments are to be made through the Specification Required | ||||
registration policy [RFC8126]. | ||||
* Change Controller: IETF | The designated expert (DE) is expected to ensure the following: | |||
* Provisional registration? No | * All registrations follow the template presented in Section 10.3.1. | |||
11.3. GNAP Grant Request Parameters | * The request parameter's definition is sufficiently orthogonal to | |||
existing functionality provided by existing parameters. | ||||
This document defines a GNAP grant request, for which IANA is asked | * Registrations for the same name with different types are | |||
to create and maintain a new registry titled "GNAP Grant Request | sufficiently close in functionality so as not to cause confusion | |||
Parameters". Initial values for this registry are given in | for developers. | |||
Section 11.3.2. Future assignments and modifications to existing | ||||
assignment are to be made through the Specification Required | ||||
registration policy [RFC8126]. | ||||
The Designated Expert (DE) is expected to ensure that all | * The request parameter's definition specifies the expected behavior | |||
registrations follow the template presented in Section 11.3.1. The | of the AS in response to the request parameter for each potential | |||
DE is expected to ensure that the request parameter's definition is | state of the grant request. | |||
sufficiently orthogonal to existing functionality provided by | ||||
existing parameters. The DE is expected to ensure that registrations | ||||
for the same name with different types are sufficiently close in | ||||
functionality so as not to cause confusion for developers. The DE is | ||||
expected to ensure that the request parameter's definition specifies | ||||
the expected behavior of the AS in response to the request parameter | ||||
for each potential state of the grant request. | ||||
11.3.1. Registration Template | 10.3.1. Registration Template | |||
Name: | Name: | |||
An identifier for the parameter. | An identifier for the parameter. | |||
Type: | Type: | |||
The JSON type allowed for the value. | The JSON type allowed for the value. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.3.2. Initial Contents | 10.3.2. Initial Contents | |||
+==============+==================+===========================+ | +==============+==================+===========================+ | |||
| Name | Type | Specification document(s) | | | Name | Type | Reference | | |||
+==============+==================+===========================+ | +==============+==================+===========================+ | |||
| access_token | object | Section 2.1.1 of RFC nnnn | | | access_token | object | Section 2.1.1 of RFC 9635 | | |||
+--------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
| access_token | array of objects | Section 2.1.2 of RFC nnnn | | | access_token | array of objects | Section 2.1.2 of RFC 9635 | | |||
+--------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
| subject | object | Section 2.2 of RFC nnnn | | | subject | object | Section 2.2 of RFC 9635 | | |||
+--------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
| client | object | Section 2.3 of RFC nnnn | | | client | object | Section 2.3 of RFC 9635 | | |||
+--------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
| client | string | Section 2.3.1 of RFC nnnn | | | client | string | Section 2.3.1 of RFC 9635 | | |||
+--------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
| user | object | Section 2.4 of RFC nnnn | | | user | object | Section 2.4 of RFC 9635 | | |||
+--------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
| user | string | Section 2.4.1 of RFC nnnn | | | user | string | Section 2.4.1 of RFC 9635 | | |||
+--------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
| interact | object | Section 2.5 of RFC nnnn | | | interact | object | Section 2.5 of RFC 9635 | | |||
+--------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
| interact_ref | string | Section 5.1 of RFC nnnn | | | interact_ref | string | Section 5.1 of RFC 9635 | | |||
+--------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
Table 1 | Table 1 | |||
11.4. GNAP Access Token Flags | 10.4. GNAP Access Token Flags | |||
This document defines a GNAP access token flags, for which IANA is | This document defines GNAP access token flags, for which IANA has | |||
asked to create and maintain a new registry titled "GNAP Access Token | created and maintains a new registry titled "GNAP Access Token | |||
Flags". Initial values for this registry are given in | Flags". Initial values for this registry are given in | |||
Section 11.4.2. Future assignments and modifications to existing | Section 10.4.2. Future assignments and modifications to existing | |||
assignment are to be made through the Specification Required | assignments are to be made through the Specification Required | |||
registration policy [RFC8126]. | registration policy [RFC8126]. | |||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.4.1. The DE is expected to ensure | ||||
that the flag specifies whether it applies to requests for tokens to | ||||
the AS, responses with tokens from the AS, or both. | ||||
11.4.1. Registration Template | * All registrations follow the template presented in Section 10.4.1. | |||
* The flag specifies whether it applies to requests for tokens to | ||||
the AS, responses with tokens from the AS, or both. | ||||
10.4.1. Registration Template | ||||
Name: | Name: | |||
An identifier for the parameter. | An identifier for the parameter. | |||
Allowed Use: | Allowed Use: | |||
Where the flag is allowed to occur. Possible values are | Where the flag is allowed to occur. Possible values are | |||
"Request", "Response", and "Request, Response". | "Request", "Response", and "Request, Response". | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.4.2. Initial Contents | 10.4.2. Initial Contents | |||
+=========+===================+===========================+ | +=========+===================+====================+ | |||
| Name | Allowed Use | Specification document(s) | | | Name | Allowed Use | Reference | | |||
+=========+===================+===========================+ | +=========+===================+====================+ | |||
| bearer | Request, Response | Section 2.1.1 and | | | bearer | Request, Response | Sections 2.1.1 and | | |||
| | | Section 3.2.1 of RFC nnnn | | | | | 3.2.1 of RFC 9635 | | |||
+---------+-------------------+---------------------------+ | +---------+-------------------+--------------------+ | |||
| durable | Response | Section 3.2.1 of RFC nnnn | | | durable | Response | Section 3.2.1 of | | |||
+---------+-------------------+---------------------------+ | | | | RFC 9635 | | |||
+---------+-------------------+--------------------+ | ||||
Table 2 | Table 2 | |||
11.5. GNAP Subject Information Request Fields | 10.5. GNAP Subject Information Request Fields | |||
This document defines a means to request subject information from the | This document defines a means to request subject information from the | |||
AS to the client instance, for which IANA is asked to create and | AS to the client instance, for which IANA has created and maintains a | |||
maintain a new registry titled "GNAP Subject Information Request | new registry titled "GNAP Subject Information Request Fields". | |||
Fields". Initial values for this registry are given in | Initial values for this registry are given in Section 10.5.2. Future | |||
Section 11.5.2. Future assignments and modifications to existing | assignments and modifications to existing assignments are to be made | |||
assignment are to be made through the Specification Required | through the Specification Required registration policy [RFC8126]. | |||
registration policy [RFC8126]. | ||||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.5.1. The DE is expected to ensure | ||||
that registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion for | ||||
developers. | ||||
11.5.1. Registration Template | * All registrations follow the template presented in Section 10.5.1. | |||
* Registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion | ||||
for developers. | ||||
10.5.1. Registration Template | ||||
Name: | Name: | |||
An identifier for the parameter. | An identifier for the parameter. | |||
Type: | Type: | |||
The JSON type allowed for the value. | The JSON type allowed for the value. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.5.2. Initial Contents | 10.5.2. Initial Contents | |||
+===================+==================+===========================+ | +===================+==================+=========================+ | |||
| Name | Type | Specification document(s) | | | Name | Type | Reference | | |||
+===================+==================+===========================+ | +===================+==================+=========================+ | |||
| sub_id_formats | array of strings | Section 2.2 of RFC nnnn | | | sub_id_formats | array of strings | Section 2.2 of RFC 9635 | | |||
+-------------------+------------------+---------------------------+ | +-------------------+------------------+-------------------------+ | |||
| assertion_formats | array of strings | Section 2.2 of RFC nnnn | | | assertion_formats | array of strings | Section 2.2 of RFC 9635 | | |||
+-------------------+------------------+---------------------------+ | +-------------------+------------------+-------------------------+ | |||
| sub_ids | array of objects | Section 2.2 of RFC nnnn | | | sub_ids | array of objects | Section 2.2 of RFC 9635 | | |||
+-------------------+------------------+---------------------------+ | +-------------------+------------------+-------------------------+ | |||
Table 3 | Table 3 | |||
11.6. GNAP Assertion Formats | 10.6. GNAP Assertion Formats | |||
This document defines a means to pass identity assertions between the | This document defines a means to pass identity assertions between the | |||
AS and client instance, for which IANA is asked to create and | AS and client instance, for which IANA has created and maintains a | |||
maintain a new registry titled "GNAP Assertion Formats". Initial | new registry titled "GNAP Assertion Formats". Initial values for | |||
values for this registry are given in Section 11.6.2. Future | this registry are given in Section 10.6.2. Future assignments and | |||
assignments and modifications to existing assignment are to be made | modifications to existing assignments are to be made through the | |||
through the Specification Required registration policy [RFC8126]. | Specification Required registration policy [RFC8126]. | |||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.6.1. The DE is expected to ensure | ||||
that the definition specifies the serialization format of the | ||||
assertion value as used within GNAP. | ||||
11.6.1. Registration Template | * All registrations follow the template presented in Section 10.6.1. | |||
* The definition specifies the serialization format of the assertion | ||||
value as used within GNAP. | ||||
10.6.1. Registration Template | ||||
Name: | Name: | |||
An identifier for the assertion format. | An identifier for the assertion format. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.6.2. Initial Contents | 10.6.2. Initial Contents | |||
+==========+===========================+ | +==========+===========================+ | |||
| Name | Specification document(s) | | | Name | Reference | | |||
+==========+===========================+ | +==========+===========================+ | |||
| id_token | Section 3.4.1 of RFC nnnn | | | id_token | Section 3.4.1 of RFC 9635 | | |||
+----------+---------------------------+ | +----------+---------------------------+ | |||
| saml2 | Section 3.4.1 of RFC nnnn | | | saml2 | Section 3.4.1 of RFC 9635 | | |||
+----------+---------------------------+ | +----------+---------------------------+ | |||
Table 4 | Table 4 | |||
11.7. GNAP Client Instance Fields | 10.7. GNAP Client Instance Fields | |||
This document defines a means to send information about the client | This document defines a means to send information about the client | |||
instance, for which IANA is asked to create and maintain a new | instance, for which IANA has created and maintains a new registry | |||
registry titled "GNAP Client Instance Fields". Initial values for | titled "GNAP Client Instance Fields". Initial values for this | |||
this registry are given in Section 11.7.2. Future assignments and | registry are given in Section 10.7.2. Future assignments and | |||
modifications to existing assignment are to be made through the | modifications to existing assignments are to be made through the | |||
Specification Required registration policy [RFC8126]. | Specification Required registration policy [RFC8126]. | |||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.7.1. The DE is expected to ensure | ||||
that registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion for | ||||
developers. | ||||
11.7.1. Registration Template | * All registrations follow the template presented in Section 10.7.1. | |||
* Registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion | ||||
for developers. | ||||
10.7.1. Registration Template | ||||
Name: | Name: | |||
An identifier for the parameter. | An identifier for the parameter. | |||
Type: | Type: | |||
The JSON type allowed for the value. | The JSON type allowed for the value. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.7.2. Initial Contents | 10.7.2. Initial Contents | |||
+==========+========+===========================+ | +==========+========+===========================+ | |||
| Name | Type | Specification document(s) | | | Name | Type | Reference | | |||
+==========+========+===========================+ | +==========+========+===========================+ | |||
| key | object | Section 7.1 of RFC nnnn | | | key | object | Section 7.1 of RFC 9635 | | |||
+----------+--------+---------------------------+ | +----------+--------+---------------------------+ | |||
| key | string | Section 7.1.1 of RFC nnnn | | | key | string | Section 7.1.1 of RFC 9635 | | |||
+----------+--------+---------------------------+ | +----------+--------+---------------------------+ | |||
| class_id | string | Section 2.3 of RFC nnnn | | | class_id | string | Section 2.3 of RFC 9635 | | |||
+----------+--------+---------------------------+ | +----------+--------+---------------------------+ | |||
| display | object | Section 2.3.2 of RFC nnnn | | | display | object | Section 2.3.2 of RFC 9635 | | |||
+----------+--------+---------------------------+ | +----------+--------+---------------------------+ | |||
Table 5 | Table 5 | |||
11.8. GNAP Client Instance Display Fields | 10.8. GNAP Client Instance Display Fields | |||
This document defines a means to send end-user facing displayable | This document defines a means to send end-user-facing displayable | |||
information about the client instance, for which IANA is asked to | information about the client instance, for which IANA has created and | |||
create and maintain a new registry titled "GNAP Client Instance | maintains a new registry titled "GNAP Client Instance Display | |||
Display Fields". Initial values for this registry are given in | Fields". Initial values for this registry are given in | |||
Section 11.8.2. Future assignments and modifications to existing | Section 10.8.2. Future assignments and modifications to existing | |||
assignment are to be made through the Specification Required | assignments are to be made through the Specification Required | |||
registration policy [RFC8126]. | registration policy [RFC8126]. | |||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.8.1. The DE is expected to ensure | ||||
that registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion for | ||||
developers. | ||||
11.8.1. Registration Template | * All registrations follow the template presented in Section 10.8.1. | |||
* Registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion | ||||
for developers. | ||||
10.8.1. Registration Template | ||||
Name: | Name: | |||
An identifier for the parameter. | An identifier for the parameter. | |||
Type: | Type: | |||
The JSON type allowed for the value. | The JSON type allowed for the value. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.8.2. Initial Contents | 10.8.2. Initial Contents | |||
+==========+========+===========================+ | +==========+========+===========================+ | |||
| Name | Type | Specification document(s) | | | Name | Type | Reference | | |||
+==========+========+===========================+ | +==========+========+===========================+ | |||
| name | string | Section 2.3.2 of RFC nnnn | | | name | string | Section 2.3.2 of RFC 9635 | | |||
+----------+--------+---------------------------+ | +----------+--------+---------------------------+ | |||
| uri | string | Section 2.3.2 of RFC nnnn | | | uri | string | Section 2.3.2 of RFC 9635 | | |||
+----------+--------+---------------------------+ | +----------+--------+---------------------------+ | |||
| logo_uri | string | Section 2.3.2 of RFC nnnn | | | logo_uri | string | Section 2.3.2 of RFC 9635 | | |||
+----------+--------+---------------------------+ | +----------+--------+---------------------------+ | |||
Table 6 | Table 6 | |||
11.9. GNAP Interaction Start Modes | 10.9. GNAP Interaction Start Modes | |||
This document defines a means for the client instance to begin | This document defines a means for the client instance to begin | |||
interaction between the end-user and the AS, for which IANA is asked | interaction between the end user and the AS, for which IANA has | |||
to create and maintain a new registry titled "GNAP Interaction Start | created and maintains a new registry titled "GNAP Interaction Start | |||
Modes". Initial values for this registry are given in | Modes". Initial values for this registry are given in | |||
Section 11.9.2. Future assignments and modifications to existing | Section 10.9.2. Future assignments and modifications to existing | |||
assignment are to be made through the Specification Required | assignments are to be made through the Specification Required | |||
registration policy [RFC8126]. | registration policy [RFC8126]. | |||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.9.1. The DE is expected to ensure | ||||
that registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion for | ||||
developers. The DE is expected to ensure that any registration using | ||||
an "object" type declares all additional parameters, their | ||||
optionality, and purpose. The DE is expected to ensure that the | ||||
start mode clearly defines what actions the client is expected to | ||||
take to begin interaction, what the expected user experience is, and | ||||
any security considerations for this communication from either party. | ||||
The DE is expected to ensure that the start mode documents | ||||
incompatibilities with other start modes or finish methods, if | ||||
applicable. The DE is expected to ensure that the start mode | ||||
provides enough information to uniquely identify the grant request | ||||
during the interaction. For example, tn the redirect and app modes, | ||||
this is done using a unique URI (including its parameters). In the | ||||
user_code and user_code_uri mode, this is done using the value of the | ||||
user code. | ||||
11.9.1. Registration Template | * All registrations follow the template presented in Section 10.9.1. | |||
* Registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion | ||||
for developers. | ||||
* Any registration using an "object" type declares all additional | ||||
parameters, their optionality, and their purpose. | ||||
* The start mode clearly defines what actions the client is expected | ||||
to take to begin interaction, what the expected user experience | ||||
is, and any security considerations for this communication from | ||||
either party. | ||||
* The start mode documents incompatibilities with other start modes | ||||
or finish methods, if applicable. | ||||
* The start mode provides enough information to uniquely identify | ||||
the grant request during the interaction. For example, in the | ||||
redirect and app modes, this is done using a unique URI (including | ||||
its parameters). In the user_code and user_code_uri modes, this | ||||
is done using the value of the user code. | ||||
10.9.1. Registration Template | ||||
Mode: | Mode: | |||
An identifier for the interaction start mode. | An identifier for the interaction start mode. | |||
Type: | Type: | |||
The JSON type for the value, either "string" or "object", as | The JSON type for the value, either "string" or "object", as | |||
described in Section 2.5.1. | described in Section 2.5.1. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.9.2. Initial Contents | 10.9.2. Initial Contents | |||
+===============+========+=============================+ | +===============+========+=============================+ | |||
| Mode | Type | Specification document(s) | | | Mode | Type | Reference | | |||
+===============+========+=============================+ | +===============+========+=============================+ | |||
| redirect | string | Section 2.5.1.1 of RFC nnnn | | | redirect | string | Section 2.5.1.1 of RFC 9635 | | |||
+---------------+--------+-----------------------------+ | +---------------+--------+-----------------------------+ | |||
| app | string | Section 2.5.1.2 of RFC nnnn | | | app | string | Section 2.5.1.2 of RFC 9635 | | |||
+---------------+--------+-----------------------------+ | +---------------+--------+-----------------------------+ | |||
| user_code | string | Section 2.5.1.3 of RFC nnnn | | | user_code | string | Section 2.5.1.3 of RFC 9635 | | |||
+---------------+--------+-----------------------------+ | +---------------+--------+-----------------------------+ | |||
| user_code_uri | string | Section 2.5.1.4 of RFC nnnn | | | user_code_uri | string | Section 2.5.1.4 of RFC 9635 | | |||
+---------------+--------+-----------------------------+ | +---------------+--------+-----------------------------+ | |||
Table 7 | Table 7 | |||
11.10. GNAP Interaction Finish Methods | 10.10. GNAP Interaction Finish Methods | |||
This document defines a means for the client instance to be notified | This document defines a means for the client instance to be notified | |||
of the end of interaction between the end-user and the AS, for which | of the end of interaction between the end user and the AS, for which | |||
IANA is asked to create and maintain a new registry titled "GNAP | IANA has created and maintains a new registry titled "GNAP | |||
Interaction Finish Methods". Initial values for this registry are | Interaction Finish Methods". Initial values for this registry are | |||
given in Section 11.10.2. Future assignments and modifications to | given in Section 10.10.2. Future assignments and modifications to | |||
existing assignment are to be made through the Specification Required | existing assignments are to be made through the Specification | |||
registration policy [RFC8126]. | Required registration policy [RFC8126]. | |||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.10.1. The DE is expected to ensure | ||||
that all finish methods clearly define what actions the AS is | ||||
expected to take, what listening methods the client instance needs to | ||||
enable, and any security considerations for this communication from | ||||
either party. The DE is expected to ensure that all finish methods | ||||
document incompatibilities with any start modes, if applicable. | ||||
11.10.1. Registration Template | * All registrations follow the template presented in | |||
Section 10.10.1. | ||||
* All finish methods clearly define what actions the AS is expected | ||||
to take, what listening methods the client instance needs to | ||||
enable, and any security considerations for this communication | ||||
from either party. | ||||
* All finish methods document incompatibilities with any start | ||||
modes, if applicable. | ||||
10.10.1. Registration Template | ||||
Method: | Method: | |||
An identifier for the interaction finish method. | An identifier for the interaction finish method. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.10.2. Initial Contents | 10.10.2. Initial Contents | |||
+==========+=============================+ | +==========+=============================+ | |||
| Mode | Specification document(s) | | | Method | Reference | | |||
+==========+=============================+ | +==========+=============================+ | |||
| redirect | Section 2.5.2.1 of RFC nnnn | | | redirect | Section 2.5.2.1 of RFC 9635 | | |||
+----------+-----------------------------+ | +----------+-----------------------------+ | |||
| push | Section 2.5.2.2 of RFC nnnn | | | push | Section 2.5.2.2 of RFC 9635 | | |||
+----------+-----------------------------+ | +----------+-----------------------------+ | |||
Table 8 | Table 8 | |||
11.11. GNAP Interaction Hints | 10.11. GNAP Interaction Hints | |||
This document defines a set of hints that a client instance can | This document defines a set of hints that a client instance can | |||
provide to the AS to facilitate interaction with the end user, for | provide to the AS to facilitate interaction with the end user, for | |||
which IANA is asked to create and maintain a new registry titled | which IANA has created and maintains a new registry titled "GNAP | |||
"GNAP Interaction Hints". Initial values for this registry are given | Interaction Hints". Initial values for this registry are given in | |||
in Section 11.11.2. Future assignments and modifications to existing | Section 10.11.2. Future assignments and modifications to existing | |||
assignment are to be made through the Specification Required | assignments are to be made through the Specification Required | |||
registration policy [RFC8126]. | registration policy [RFC8126]. | |||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.11.1. The DE is expected to ensure | ||||
that all interaction hints clearly document the expected behaviors of | ||||
the AS in response to the hint, and that an AS not processing the | ||||
hint does not impede the operation of the AS or client instance. | ||||
11.11.1. Registration Template | * All registrations follow the template presented in | |||
Section 10.11.1. | ||||
* All interaction hints clearly document the expected behaviors of | ||||
the AS in response to the hint, and an AS not processing the hint | ||||
does not impede the operation of the AS or client instance. | ||||
10.11.1. Registration Template | ||||
Name: | Name: | |||
An identifier for the parameter. | An identifier for the parameter. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.11.2. Initial Contents | 10.11.2. Initial Contents | |||
+============+===========================+ | +============+===========================+ | |||
| Mode | Specification document(s) | | | Name | Reference | | |||
+============+===========================+ | +============+===========================+ | |||
| ui_locales | Section 2.5.3 of RFC nnnn | | | ui_locales | Section 2.5.3 of RFC 9635 | | |||
+------------+---------------------------+ | +------------+---------------------------+ | |||
Table 9 | Table 9 | |||
11.12. GNAP Grant Response Parameters | 10.12. GNAP Grant Response Parameters | |||
This document defines a GNAP grant response, for which IANA is asked | This document defines a GNAP grant response, for which IANA has | |||
to create and maintain a new registry titled "GNAP Grant Response | created and maintains a new registry titled "GNAP Grant Response | |||
Parameters". Initial values for this registry are given in | Parameters". Initial values for this registry are given in | |||
Section 11.12.2. Future assignments and modifications to existing | Section 10.12.2. Future assignments and modifications to existing | |||
assignment are to be made through the Specification Required | assignments are to be made through the Specification Required | |||
registration policy [RFC8126]. | registration policy [RFC8126]. | |||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.12.1. The DE is expected to ensure | ||||
that the response parameter's definition is sufficiently orthogonal | ||||
to existing functionality provided by existing parameters. The DE is | ||||
expected to ensure that registrations for the same name with | ||||
different types are sufficiently close in functionality so as not to | ||||
cause confusion for developers. The DE is expected to ensure that | ||||
the response parameter's definition specifies grant states for which | ||||
the client instance can expect this parameter to appear in a response | ||||
message. | ||||
11.12.1. Registration Template | * All registrations follow the template presented in | |||
Section 10.12.1. | ||||
* The response parameter's definition is sufficiently orthogonal to | ||||
existing functionality provided by existing parameters. | ||||
* Registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion | ||||
for developers. | ||||
* The response parameter's definition specifies grant states for | ||||
which the client instance can expect this parameter to appear in a | ||||
response message. | ||||
10.12.1. Registration Template | ||||
Name: | Name: | |||
An identifier for the parameter. | An identifier for the parameter. | |||
Type: | Type: | |||
The JSON type allowed for the value. | The JSON type allowed for the value. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.12.2. Initial Contents | 10.12.2. Initial Contents | |||
+=============+==================+===========================+ | +==============+==================+===========================+ | |||
| Name | Type | Specification document(s) | | | Name | Type | Reference | | |||
+=============+==================+===========================+ | +==============+==================+===========================+ | |||
| continue | object | Section 3.1 of RFC nnnn | | | continue | object | Section 3.1 of RFC 9635 | | |||
+-------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
| acces_token | object | Section 3.2.1 of RFC nnnn | | | access_token | object | Section 3.2.1 of RFC 9635 | | |||
+-------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
| acces_token | array of objects | Section 3.2.2 of RFC nnnn | | | access_token | array of objects | Section 3.2.2 of RFC 9635 | | |||
+-------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
| interact | object | Section 3.3 of RFC nnnn | | | interact | object | Section 3.3 of RFC 9635 | | |||
+-------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
| subject | object | Section 3.4 of RFC nnnn | | | subject | object | Section 3.4 of RFC 9635 | | |||
+-------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
| instance_id | string | Section 3.5 of RFC nnnn | | | instance_id | string | Section 3.5 of RFC 9635 | | |||
+-------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
| error | object | Section 3.6 of RFC nnnn | | | error | object | Section 3.6 of RFC 9635 | | |||
+-------------+------------------+---------------------------+ | +--------------+------------------+---------------------------+ | |||
Table 10 | Table 10 | |||
11.13. GNAP Interaction Mode Responses | 10.13. GNAP Interaction Mode Responses | |||
This document defines a means for the AS to provide to the client | This document defines a means for the AS to provide the client | |||
instance information that is required to complete a particular | instance with information that is required to complete a particular | |||
interaction mode, for which IANA is asked to create and maintain a | interaction mode, for which IANA has created and maintains a new | |||
new registry titled "GNAP Interaction Mode Responses". Initial | registry titled "GNAP Interaction Mode Responses". Initial values | |||
values for this registry are given in Section 11.13.2. Future | for this registry are given in Section 10.13.2. Future assignments | |||
assignments and modifications to existing assignment are to be made | and modifications to existing assignments are to be made through the | |||
through the Specification Required registration policy [RFC8126]. | Specification Required registration policy [RFC8126]. | |||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.13.1. If the name of the | ||||
registration matches the name of an interaction start mode, the DE is | ||||
expected to ensure that the response parameter is unambiguously | ||||
associated with the interaction start mode of the same name. | ||||
11.13.1. Registration Template | * All registrations follow the template presented in | |||
Section 10.13.1. | ||||
* If the name of the registration matches the name of an interaction | ||||
start mode, the response parameter is unambiguously associated | ||||
with the interaction start mode of the same name. | ||||
10.13.1. Registration Template | ||||
Name: | Name: | |||
An identifier for the parameter. | An identifier for the parameter. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.13.2. Initial Contents | 10.13.2. Initial Contents | |||
+===============+===========================+ | +===============+=========================+ | |||
| Name | Specification document(s) | | | Name | Reference | | |||
+===============+===========================+ | +===============+=========================+ | |||
| redirect | Section 3.3 of RFC nnnn | | | redirect | Section 3.3 of RFC 9635 | | |||
+---------------+---------------------------+ | +---------------+-------------------------+ | |||
| app | Section 3.3 of RFC nnnn | | | app | Section 3.3 of RFC 9635 | | |||
+---------------+---------------------------+ | +---------------+-------------------------+ | |||
| user_code | Section 3.3 of RFC nnnn | | | user_code | Section 3.3 of RFC 9635 | | |||
+---------------+---------------------------+ | +---------------+-------------------------+ | |||
| user_code_uri | Section 3.3 of RFC nnnn | | | user_code_uri | Section 3.3 of RFC 9635 | | |||
+---------------+---------------------------+ | +---------------+-------------------------+ | |||
| finish | Section 3.3 of RFC nnnn | | | finish | Section 3.3 of RFC 9635 | | |||
+---------------+---------------------------+ | +---------------+-------------------------+ | |||
| expires_in | Section 3.3 of RFC nnnn | | | expires_in | Section 3.3 of RFC 9635 | | |||
+---------------+---------------------------+ | +---------------+-------------------------+ | |||
Table 11 | Table 11 | |||
11.14. GNAP Subject Information Response Fields | 10.14. GNAP Subject Information Response Fields | |||
This document defines a means to return subject information from the | This document defines a means to return subject information from the | |||
AS to the client instance, for which IANA is asked to create and | AS to the client instance, for which IANA has created and maintains a | |||
maintain a new registry titled "GNAP Subject Information Response | new registry titled "GNAP Subject Information Response Fields". | |||
Fields". Initial values for this registry are given in | Initial values for this registry are given in Section 10.14.2. | |||
Section 11.14.2. Future assignments and modifications to existing | Future assignments and modifications to existing assignments are to | |||
assignment are to be made through the Specification Required | be made through the Specification Required registration policy | |||
registration policy [RFC8126]. | [RFC8126]. | |||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.14.1. The DE is expected to ensure | ||||
that registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion for | ||||
developers. | ||||
11.14.1. Registration Template | * All registrations follow the template presented in | |||
Section 10.14.1. | ||||
* Registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion | ||||
for developers. | ||||
10.14.1. Registration Template | ||||
Name: | Name: | |||
An identifier for the parameter. | An identifier for the parameter. | |||
Type: | Type: | |||
The JSON type allowed for the value. | The JSON type allowed for the value. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.14.2. Initial Contents | 10.14.2. Initial Contents | |||
+============+==================+=========================+ | ||||
| Name | Type | Reference | | ||||
+============+==================+=========================+ | ||||
| sub_ids | array of objects | Section 3.4 of RFC 9635 | | ||||
+------------+------------------+-------------------------+ | ||||
| assertions | array of objects | Section 3.4 of RFC 9635 | | ||||
+------------+------------------+-------------------------+ | ||||
| updated_at | string | Section 3.4 of RFC 9635 | | ||||
+------------+------------------+-------------------------+ | ||||
+============+==================+===========================+ | ||||
| Name | Type | Specification document(s) | | ||||
+============+==================+===========================+ | ||||
| sub_ids | array of objects | Section 3.4 of RFC nnnn | | ||||
+------------+------------------+---------------------------+ | ||||
| assertions | array of objects | Section 3.4 of RFC nnnn | | ||||
+------------+------------------+---------------------------+ | ||||
| updated_at | string | Section 3.4 of RFC nnnn | | ||||
+------------+------------------+---------------------------+ | ||||
Table 12 | Table 12 | |||
11.15. GNAP Error Codes | 10.15. GNAP Error Codes | |||
This document defines a set of errors that the AS can return to the | This document defines a set of errors that the AS can return to the | |||
client instance, for which IANA is asked to create and maintain a new | client instance, for which IANA has created and maintains a new | |||
registry titled "GNAP Error Codes". Initial values for this registry | registry titled "GNAP Error Codes". Initial values for this registry | |||
are given in Section 11.15.2. Future assignments and modifications | are given in Section 10.15.2. Future assignments and modifications | |||
to existing assignment are to be made through the Specification | to existing assignments are to be made through the Specification | |||
Required registration policy [RFC8126]. | Required registration policy [RFC8126]. | |||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.15.1. The DE is expected to ensure | ||||
that the error response is sufficiently unique from other errors to | ||||
provide actionable information to the client instance. The DE is | ||||
expected to ensure that the definition of the error response | ||||
specifies all conditions in which the error response is returned, and | ||||
what the client instance's expected action is. | ||||
11.15.1. Registration Template | * All registrations follow the template presented in | |||
Section 10.15.1. | ||||
* The error response is sufficiently unique from other errors to | ||||
provide actionable information to the client instance. | ||||
* The definition of the error response specifies all conditions in | ||||
which the error response is returned and the client instance's | ||||
expected action. | ||||
10.15.1. Registration Template | ||||
Error: | Error: | |||
A unique string code for the error. | A unique string code for the error. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.15.2. Initial Contents | 10.15.2. Initial Contents | |||
+============================+===========================+ | +============================+=========================+ | |||
| Error | Specification document(s) | | | Error | Reference | | |||
+============================+===========================+ | +============================+=========================+ | |||
| invalid_request | Section 3.6 of RFC nnnn | | | invalid_request | Section 3.6 of RFC 9635 | | |||
+----------------------------+---------------------------+ | +----------------------------+-------------------------+ | |||
| invalid_client | Section 3.6 of RFC nnnn | | | invalid_client | Section 3.6 of RFC 9635 | | |||
+----------------------------+---------------------------+ | +----------------------------+-------------------------+ | |||
| invalid_interaction | Section 3.6 of RFC nnnn | | | invalid_interaction | Section 3.6 of RFC 9635 | | |||
+----------------------------+---------------------------+ | +----------------------------+-------------------------+ | |||
| invalid_flag | Section 3.6 of RFC nnnn | | | invalid_flag | Section 3.6 of RFC 9635 | | |||
+----------------------------+---------------------------+ | +----------------------------+-------------------------+ | |||
| invalid_rotation | Section 3.6 of RFC nnnn | | | invalid_rotation | Section 3.6 of RFC 9635 | | |||
+----------------------------+---------------------------+ | +----------------------------+-------------------------+ | |||
| key_rotation_not_supported | Section 3.6 of RFC nnnn | | | key_rotation_not_supported | Section 3.6 of RFC 9635 | | |||
+----------------------------+---------------------------+ | +----------------------------+-------------------------+ | |||
| invalid_continuation | Section 3.6 of RFC nnnn | | | invalid_continuation | Section 3.6 of RFC 9635 | | |||
+----------------------------+---------------------------+ | +----------------------------+-------------------------+ | |||
| user_denied | Section 3.6 of RFC nnnn | | | user_denied | Section 3.6 of RFC 9635 | | |||
+----------------------------+---------------------------+ | +----------------------------+-------------------------+ | |||
| request_denied | Section 3.6 of RFC nnnn | | | request_denied | Section 3.6 of RFC 9635 | | |||
+----------------------------+---------------------------+ | +----------------------------+-------------------------+ | |||
| unknown_interaction | Section 3.6 of RFC nnnn | | | unknown_user | Section 3.6 of RFC 9635 | | |||
+----------------------------+---------------------------+ | +----------------------------+-------------------------+ | |||
| too_fast | Section 3.6 of RFC nnnn | | | unknown_interaction | Section 3.6 of RFC 9635 | | |||
+----------------------------+---------------------------+ | +----------------------------+-------------------------+ | |||
| too_many_attempts | Section 3.6 of RFC nnnn | | | too_fast | Section 3.6 of RFC 9635 | | |||
+----------------------------+---------------------------+ | +----------------------------+-------------------------+ | |||
| too_many_attempts | Section 3.6 of RFC 9635 | | ||||
+----------------------------+-------------------------+ | ||||
Table 13 | Table 13 | |||
11.16. GNAP Key Proofing Methods | 10.16. GNAP Key Proofing Methods | |||
This document defines methods that the client instance can use to | This document defines methods that the client instance can use to | |||
prove possession of a key, for which IANA is asked to create and | prove possession of a key, for which IANA has created and maintains a | |||
maintain a new registry titled "GNAP Key Proofing Methods". Initial | new registry titled "GNAP Key Proofing Methods". Initial values for | |||
values for this registry are given in Section 11.16.2. Future | this registry are given in Section 10.16.2. Future assignments and | |||
assignments and modifications to existing assignment are to be made | modifications to existing assignments are to be made through the | |||
through the Specification Required registration policy [RFC8126]. | Specification Required registration policy [RFC8126]. | |||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.16.1. The DE is expected to ensure | ||||
that registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion for | ||||
developers. The DE is expected to ensure that the proofing method | ||||
provides sufficient coverage of and binding to the protocol messages | ||||
to which it is applied. The DE is expected to ensure that the | ||||
proofing method definition clearly enumerates how all requirements in | ||||
Section 7.3 are fulfilled by the definition. | ||||
11.16.1. Registration Template | * All registrations follow the template presented in | |||
Section 10.16.1. | ||||
* Registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion | ||||
for developers. | ||||
* The proofing method provides sufficient coverage of and binding to | ||||
the protocol messages to which it is applied. | ||||
* The proofing method definition clearly enumerates how all | ||||
requirements in Section 7.3 are fulfilled by the definition. | ||||
10.16.1. Registration Template | ||||
Method: | Method: | |||
A unique string code for the key proofing method. | A unique string code for the key proofing method. | |||
Type: | Type: | |||
The JSON type allowed for the value. | The JSON type allowed for the value. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.16.2. Initial Contents | 10.16.2. Initial Contents | |||
+=========+========+===========================+ | +=========+========+===========================+ | |||
| Method | Type | Specification document(s) | | | Method | Type | Reference | | |||
+=========+========+===========================+ | +=========+========+===========================+ | |||
| httpsig | string | Section 7.3.1 of RFC nnnn | | | httpsig | string | Section 7.3.1 of RFC 9635 | | |||
+---------+--------+---------------------------+ | +---------+--------+---------------------------+ | |||
| httpsig | object | Section 7.3.1 of RFC nnnn | | | httpsig | object | Section 7.3.1 of RFC 9635 | | |||
+---------+--------+---------------------------+ | +---------+--------+---------------------------+ | |||
| mtls | string | Section 7.3.2 of RFC nnnn | | | mtls | string | Section 7.3.2 of RFC 9635 | | |||
+---------+--------+---------------------------+ | +---------+--------+---------------------------+ | |||
| jwsd | string | Section 7.3.3 of RFC nnnn | | | jwsd | string | Section 7.3.3 of RFC 9635 | | |||
+---------+--------+---------------------------+ | +---------+--------+---------------------------+ | |||
| jws | string | Section 7.3.4 of RFC nnnn | | | jws | string | Section 7.3.4 of RFC 9635 | | |||
+---------+--------+---------------------------+ | +---------+--------+---------------------------+ | |||
Table 14 | Table 14 | |||
11.17. GNAP Key Formats | 10.17. GNAP Key Formats | |||
This document defines formats for a public key value, for which IANA | This document defines formats for a public key value, for which IANA | |||
is asked to create and maintain a new registry titled "GNAP Key | has created and maintains a new registry titled "GNAP Key Formats". | |||
Formats". Initial values for this registry are given in | Initial values for this registry are given in Section 10.17.2. | |||
Section 11.17.2. Future assignments and modifications to existing | Future assignments and modifications to existing assignments are to | |||
assignment are to be made through the Specification Required | be made through the Specification Required registration policy | |||
registration policy [RFC8126]. | [RFC8126]. | |||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.17.1. The DE is expected to ensure | ||||
the key format specifies the structure and serialization of the key | ||||
material. | ||||
11.17.1. Registration Template | * All registrations follow the template presented in | |||
Section 10.17.1. | ||||
* The key format specifies the structure and serialization of the | ||||
key material. | ||||
10.17.1. Registration Template | ||||
Format: | Format: | |||
A unique string code for the key format. | A unique string code for the key format. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.17.2. Initial Contents | 10.17.2. Initial Contents | |||
+===========+===========================+ | +===========+=========================+ | |||
| Format | Specification document(s) | | | Format | Reference | | |||
+===========+===========================+ | +===========+=========================+ | |||
| jwk | Section 7.1 of RFC nnnn | | | jwk | Section 7.1 of RFC 9635 | | |||
+-----------+---------------------------+ | +-----------+-------------------------+ | |||
| cert | Section 7.1 of RFC nnnn | | | cert | Section 7.1 of RFC 9635 | | |||
+-----------+---------------------------+ | +-----------+-------------------------+ | |||
| cert#S256 | Section 7.1 of RFC nnnn | | | cert#S256 | Section 7.1 of RFC 9635 | | |||
+-----------+---------------------------+ | +-----------+-------------------------+ | |||
Table 15 | Table 15 | |||
11.18. GNAP Authorization Server Discovery Fields | 10.18. GNAP Authorization Server Discovery Fields | |||
This document defines a discovery document for an AS, for which IANA | This document defines a discovery document for an AS, for which IANA | |||
is asked to create and maintain a new registry titled "GNAP | has created and maintains a new registry titled "GNAP Authorization | |||
Authorization Server Discovery Fields". Initial values for this | Server Discovery Fields". Initial values for this registry are given | |||
registry are given in Section 11.18.2. Future assignments and | in Section 10.18.2. Future assignments and modifications to existing | |||
modifications to existing assignment are to be made through the | assignments are to be made through the Specification Required | |||
Specification Required registration policy [RFC8126]. | registration policy [RFC8126]. | |||
The DE is expected to ensure that all registrations follow the | The DE is expected to ensure the following: | |||
template presented in Section 11.18.1. The DE is expected to ensure | ||||
that registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion for | ||||
developers. The DE is expected to ensure that the values in the | ||||
discovery document are sufficient to provide optimization and hints | ||||
to the client instance, but that knowledge of the discovered value is | ||||
not required for starting a transaction with the AS. | ||||
11.18.1. Registration Template | * All registrations follow the template presented in | |||
Section 10.18.1. | ||||
* Registrations for the same name with different types are | ||||
sufficiently close in functionality so as not to cause confusion | ||||
for developers. | ||||
* The values in the discovery document are sufficient to provide | ||||
optimization and hints to the client instance, but knowledge of | ||||
the discovered value is not required for starting a transaction | ||||
with the AS. | ||||
10.18.1. Registration Template | ||||
Name: | Name: | |||
An identifier for the parameter. | An identifier for the parameter. | |||
Type: | Type: | |||
The JSON type allowed for the value. | The JSON type allowed for the value. | |||
Specification document(s): | Reference: | |||
Reference to the document(s) that specify the value, preferably | Reference to one or more documents that specify the value, | |||
including a URI that can be used to retrieve a copy of the | preferably including a URI that can be used to retrieve a copy of | |||
document(s). An indication of the relevant sections may also be | the document(s). An indication of the relevant sections may also | |||
included but is not required. | be included but is not required. | |||
11.18.2. Initial Contents | 10.18.2. Initial Contents | |||
+======================================+==========+===============+ | +======================================+==========+=============+ | |||
| Name | Type | Specification | | | Name | Type | Reference | | |||
| | | document(s) | | +======================================+==========+=============+ | |||
+======================================+==========+===============+ | | grant_request_endpoint | string | Section 9 | | |||
| grant_request_endpoint | string | Section 9 of | | | | | of RFC 9635 | | |||
| | | RFC nnnn | | +--------------------------------------+----------+-------------+ | |||
+--------------------------------------+----------+---------------+ | | interaction_start_modes_supported | array of | Section 9 | | |||
| interaction_start_modes_supported | array of | Section 9 of | | | | strings | of RFC 9635 | | |||
| | strings | RFC nnnn | | +--------------------------------------+----------+-------------+ | |||
+--------------------------------------+----------+---------------+ | | interaction_finish_methods_supported | array of | Section 9 | | |||
| interaction_finish_methods_supported | array of | Section 9 of | | | | strings | of RFC 9635 | | |||
| | strings | RFC nnnn | | +--------------------------------------+----------+-------------+ | |||
+--------------------------------------+----------+---------------+ | | key_proofs_supported | array of | Section 9 | | |||
| key_proofs_supported | array of | Section 9 of | | | | strings | of RFC 9635 | | |||
| | strings | RFC nnnn | | +--------------------------------------+----------+-------------+ | |||
+--------------------------------------+----------+---------------+ | | sub_id_formats_supported | array of | Section 9 | | |||
| sub_id_formats_supported | array of | Section 9 of | | | | strings | of RFC 9635 | | |||
| | strings | RFC nnnn | | +--------------------------------------+----------+-------------+ | |||
+--------------------------------------+----------+---------------+ | | assertion_formats_supported | array of | Section 9 | | |||
| assertion_formats_supported | array of | Section 9 of | | | | strings | of RFC 9635 | | |||
| | strings | RFC nnnn | | +--------------------------------------+----------+-------------+ | |||
+--------------------------------------+----------+---------------+ | | key_rotation_supported | boolean | Section 9 | | |||
| key_rotation_supported | boolean | Section 9 of | | | | | of RFC 9635 | | |||
| | | RFC nnnn | | +--------------------------------------+----------+-------------+ | |||
+--------------------------------------+----------+---------------+ | ||||
Table 16 | Table 16 | |||
12. Implementation Status | 11. Security Considerations | |||
Note: To be removed by RFC editor before publication. | ||||
*GNAP Authorization Service in Rust* implementation by David Skyberg. | ||||
https://github.com/dskyberg/gnap (https://github.com/dskyberg/gnap) | ||||
Prototype implementation of AS and client in Rust. MIT license. | ||||
*GNAP JS Client* from Interop Alliance, implementation by Dmitri | ||||
Zagidulin. https://github.com/interop-alliance/gnap-client-js | ||||
(https://github.com/interop-alliance/gnap-client-js) Prototype | ||||
implementation of client in JavaScript. MIT License. | ||||
*Rafiki* from Interledger Foundation. https://github.com/interledger/ | ||||
rafiki (https://github.com/interledger/rafiki) Production | ||||
implementation of AS in JavaScript. Apache 2.0 license. | ||||
*Sample GNAP Client in PHP* implementation by Aaron Parecki. | ||||
https://github.com/aaronpk/gnap-client-php | ||||
(https://github.com/aaronpk/gnap-client-php) Prototype implementation | ||||
of web application client and CLI client in PHP, with common support | ||||
library. CC0 license. | ||||
*SUNET Auth Server* from SUNET. https://github.com/SUNET/sunet-auth- | ||||
server (https://github.com/SUNET/sunet-auth-server) Production | ||||
implementation of AS in Python. BSD license. | ||||
*Trustbloc* from Gen Digital. | ||||
https://github.com/trustbloc/docs/blob/main/readthedocs/designs/ | ||||
auth.md | ||||
(https://github.com/trustbloc/docs/blob/main/readthedocs/designs/ | ||||
auth.md) Production implementation of AS and client in Go. Apache | ||||
2.0 license. | ||||
*Verified.ME* from SecureKey. https://verified.me/ | ||||
(https://verified.me/) Production implementation of AS, client and | ||||
RS. Proprietary license. | ||||
*XYZ* from Bespoke Engineering, implementation by Justin Richer. | ||||
https://github.com/bspk/oauth.xyz-java (https://github.com/bspk/ | ||||
oauth.xyz-java) Advanced prototype implementation of AS, client, and | ||||
RS in Java, with common support library. Prototype implementation of | ||||
SPA client in JavaScript. Apache 2.0 license. | ||||
13. Security Considerations | ||||
In addition to the normative requirements in this document, | In addition to the normative requirements in this document, | |||
implementors are strongly encouraged to consider these additional | implementors are strongly encouraged to consider these additional | |||
security considerations in implementations and deployments of GNAP. | security considerations in implementations and deployments of GNAP. | |||
13.1. TLS Protection in Transit | 11.1. TLS Protection in Transit | |||
All requests in GNAP made over untrusted network connections have to | All requests in GNAP made over untrusted network connections have to | |||
be made over TLS as outlined in [BCP195] to protect the contents of | be made over TLS as outlined in [BCP195] to protect the contents of | |||
the request and response from manipulation and interception by an | the request and response from manipulation and interception by an | |||
attacker. This includes all requests from a client instance to the | attacker. This includes all requests from a client instance to the | |||
AS, all requests from the client instance to an RS, and any requests | AS, all requests from the client instance to an RS, and any requests | |||
back to a client instance such as the push-based interaction finish | back to a client instance such as the push-based interaction finish | |||
method. Additionally, all requests between a browser and other | method. Additionally, all requests between a browser and other | |||
components, such as during redirect-based interaction, need to be | components, such as during redirect-based interaction, need to be | |||
made over TLS or use equivalent protection such as a network | made over TLS or use equivalent protection such as a network | |||
connection local to the browser ("localhost"). | connection local to the browser ("localhost"). | |||
Even though requests from the client instance to the AS are signed, | Even though requests from the client instance to the AS are signed, | |||
the signature method alone does not protect the request from | the signature method alone does not protect the request from | |||
interception by an attacker. TLS protects the response as well as | interception by an attacker. TLS protects the response as well as | |||
the request, preventing an attacker from intercepting requested | the request, preventing an attacker from intercepting requested | |||
information as it is returned. This is particularly important in the | information as it is returned. This is particularly important in | |||
core protocol for security artifacts such as nonces and for personal | this specification for security artifacts such as nonces and for | |||
information such as subject information. | personal information such as subject information. | |||
The use of key-bound access tokens does not negate the requirement | The use of key-bound access tokens does not negate the requirement | |||
for protecting calls to the RS with TLS. While the keys and | for protecting calls to the RS with TLS. The keys and signatures | |||
signatures associated a bound access token will prevent an attacker | associated with a bound access token will prevent an attacker from | |||
from using a stolen token, without TLS an attacker would be able to | using a stolen token; however, without TLS, an attacker would be able | |||
watch the data being sent to the RS and returned from the RS during | to watch the data being sent to the RS and returned from the RS | |||
legitimate use of the client instance under attack. Additionally, | during legitimate use of the client instance under attack. | |||
without TLS an attacker would be able to profile the calls made | Additionally, without TLS, an attacker would be able to profile the | |||
between the client instance and RS, possibly gaining information | calls made between the client instance and RS, possibly gaining | |||
about the functioning of the API between the client software and RS | information about the functioning of the API between the client | |||
software that would be otherwise unknown to the attacker. | software and RS software that would otherwise be unknown to the | |||
attacker. | ||||
Note that connections from the end user and RO's browser also need to | Note that connections from the end user and RO's browser also need to | |||
be be protected with TLS. This applies during initial redirects to | be protected with TLS. This applies during initial redirects to an | |||
an AS's components during interaction, during any interaction with | AS's components during interaction, during any interaction with the | |||
the resource owner, and during any redirect back to the client | RO, and during any redirect back to the client instance. Without TLS | |||
instance. Without TLS protection on these portions of the process, | protection on these portions of the process, an attacker could wait | |||
an attacker could wait for a valid request to start and then take | for a valid request to start and then take over the RO's interaction | |||
over the resource owner's interaction session. | session. | |||
13.2. Signing Requests from the Client Software | 11.2. Signing Requests from the Client Software | |||
Even though all requests in GNAP need to be transmitted over TLS or | Even though all requests in GNAP need to be transmitted over TLS or | |||
its equivalent, the use of TLS alone is not sufficient to protect all | its equivalent, the use of TLS alone is not sufficient to protect all | |||
parts of a multi-party and multi-stage protocol like GNAP, and TLS is | parts of a multi-party and multi-stage protocol like GNAP, and TLS is | |||
not targeted at tying multiple requests to each other over time. To | not targeted at tying multiple requests to each other over time. To | |||
account for this, GNAP makes use of message-level protection and key | account for this, GNAP makes use of message-level protection and key | |||
presentation mechanisms that strongly associate a request with a key | presentation mechanisms that strongly associate a request with a key | |||
held by the client instance (see Section 7). | held by the client instance (see Section 7). | |||
During the initial request from a client instance to the AS, the | During the initial request from a client instance to the AS, the | |||
client instance has to identify and prove possession of a | client instance has to identify and prove possession of a | |||
cryptographic key. If the key is known to the AS, such as if it is | cryptographic key. If the key is known to the AS, e.g., previously | |||
previously registered or dereferenceable to a trusted source, the AS | registered or dereferenceable to a trusted source, the AS can | |||
can associate a set of policies to the client instance identified by | associate a set of policies to the client instance identified by the | |||
the key. Without the requirement that the client instance prove that | key. Without the requirement that the client instance prove that it | |||
it holds that key, the AS could not trust that the connection came | holds that key, the AS could not trust that the connection came from | |||
from any particular client and could not apply any associated | any particular client and could not apply any associated policies. | |||
policies. | ||||
Even more importantly, the client instance proving possession of a | Even more importantly, the client instance proving possession of a | |||
key on the first request allows the AS to associate future requests | key on the first request allows the AS to associate future requests | |||
with each other by binding all future requests in that transaction to | with each other by binding all future requests in that transaction to | |||
the same key. The access token used for grant continuation is bound | the same key. The access token used for grant continuation is bound | |||
to the same key and proofing mechanism used by the client instance in | to the same key and proofing mechanism used by the client instance in | |||
its initial request, which means that the client instance needs to | its initial request; this means that the client instance needs to | |||
prove possession of that same key in future requests allowing the AS | prove possession of that same key in future requests, which allows | |||
to be sure that the same client instance is executing the follow-ups | the AS to be sure that the same client instance is executing the | |||
for a given ongoing grant request. Therefore, the AS has to ensure | follow-ups for a given ongoing grant request. Therefore, the AS has | |||
that all subsequent requests for a grant are associated with the same | to ensure that all subsequent requests for a grant are associated | |||
key that started the grant, or the most recent rotation of that key. | with the same key that started the grant or with the most recent | |||
This need holds true even if the initial key is previously unknown to | rotation of that key. This need holds true even if the initial key | |||
the AS, such as would be the case when a client instance creates an | is previously unknown to the AS, such as would be the case when a | |||
ephemeral key for its request. Without this ongoing association, an | client instance creates an ephemeral key for its request. Without | |||
attacker would be able to impersonate a client instance in the midst | this ongoing association, an attacker would be able to impersonate a | |||
of a grant request, potentially stealing access tokens and subject | client instance in the midst of a grant request, potentially stealing | |||
information with impunity. | access tokens and subject information with impunity. | |||
Additionally, all access tokens in GNAP default to be associated with | Additionally, all access tokens in GNAP default to be associated with | |||
the key that was presented during the grant request that created the | the key that was presented during the grant request that created the | |||
access token. This association allows an RS to know that the | access token. This association allows an RS to know that the | |||
presenter of the access token is the same party that the token was | presenter of the access token is the same party that the token was | |||
issued to, as identified by their keys. While non-bound bearer | issued to, as identified by their keys. While non-bound bearer | |||
tokens are an option in GNAP, these types of tokens have their own | tokens are an option in GNAP, these types of tokens have their own | |||
tradeoffs discussed in Section 13.9. | trade-offs, which are discussed in Section 11.9. | |||
TLS functions at the transport layer, ensuring that only the parties | TLS functions at the transport layer, ensuring that only the parties | |||
on either end of that connection can read the information passed | on either end of that connection can read the information passed | |||
along that connection. Each time a new connection is made, such as | along that connection. Each time a new connection is made, such as | |||
for a new HTTP request, a new trust is re-established that is mostly | for a new HTTP request, a new trust that is mostly unrelated to | |||
unrelated to previous connections. While modern TLS does make use of | previous connections is re-established. While modern TLS does make | |||
session resumption, this still needs to be augmented with | use of session resumption, this still needs to be augmented with | |||
authentication methods to determine the identity of parties on the | authentication methods to determine the identity of parties on the | |||
connections. In other words, it is not possible with TLS alone to | connections. In other words, it is not possible with TLS alone to | |||
know that the same party is making a set of calls over time, since | know that the same party is making a set of calls over time, since | |||
each time a new TLS connection is established, both the client and | each time a new TLS connection is established, both the client and | |||
the server (or the server only when using Section 7.3.2) have to | the server (or the server only when using MTLS (Section 7.3.2)) have | |||
validate the other party's identity. Such a verification can be | to validate the other party's identity. Such a verification can be | |||
achieved via methods described in [RFC9525], but these are not enough | achieved via methods described in [RFC9525], but these are not enough | |||
to establish the identity of the client instance in many cases. | to establish the identity of the client instance in many cases. | |||
To counter this, GNAP defines a set of key binding methods in | To counter this, GNAP defines a set of key binding methods in | |||
Section 7.3 that allow authentication and proof of possession by the | Section 7.3 that allows authentication and proof of possession by the | |||
caller, which is usually the client instance. These methods are | caller, which is usually the client instance. These methods are | |||
intended to be used in addition to TLS on all connections. | intended to be used in addition to TLS on all connections. | |||
13.3. MTLS Message Integrity | 11.3. MTLS Message Integrity | |||
The MTLS key proofing mechanism (Section 7.3.2) provides a means for | The MTLS key proofing mechanism (Section 7.3.2) provides a means for | |||
a client instance to present a key using a certificate at the TLS | a client instance to present a key using a certificate at the TLS | |||
layer. Since TLS protects the entire HTTP message in transit, | layer. Since TLS protects the entire HTTP message in transit, | |||
verification of the TLS client certificate presented with the message | verification of the TLS client certificate presented with the message | |||
provides a sufficient binding between the two. However, since TLS is | provides a sufficient binding between the two. However, since TLS is | |||
functioning at a separate layer from HTTP, there is no direct | functioning at a separate layer from HTTP, there is no direct | |||
connection between the TLS key presentation and the message itself, | connection between the TLS key presentation and the message itself, | |||
other than the fact that the message was presented over the TLS | other than the fact that the message was presented over the TLS | |||
channel. That is to say, any HTTP message can be presented over the | channel. That is to say, any HTTP message can be presented over the | |||
TLS channel in question with the same level of trust. The verifier | TLS channel in question with the same level of trust. The verifier | |||
is responsible for ensuring the key in the TLS client certificate is | is responsible for ensuring the key in the TLS client certificate is | |||
the one expected for a particular request. For example, if the | the one expected for a particular request. For example, if the | |||
request is a grant request (Section 2), the AS needs to compare the | request is a grant request (Section 2), the AS needs to compare the | |||
TLS client certificate presented at the TLS layer to the key | TLS client certificate presented at the TLS layer to the key | |||
identified in the request content itself (either by value or through | identified in the request content itself (either by value or through | |||
a referenced identifier). | a referenced identifier). | |||
Furthermore, the prevalence of the TLS-terminating reverse proxy | Furthermore, the prevalence of the TLS terminating reverse proxy | |||
(TTRP) pattern in deployments adds a wrinkle to the situation. In | (TTRP) pattern in deployments adds a wrinkle to the situation. In | |||
this common pattern, the TTRP validates the TLS connection and then | this common pattern, the TTRP validates the TLS connection and then | |||
forwards the HTTP message contents onward to an internal system for | forwards the HTTP message contents onward to an internal system for | |||
processing. The system processing the HTTP message no longer has | processing. The system processing the HTTP message no longer has | |||
access to the original TLS connection's information and context. To | access to the original TLS connection's information and context. To | |||
compensate for this, the TTRP could inject the TLS client certificate | compensate for this, the TTRP could inject the TLS client certificate | |||
into the forwarded request as a header parameter using [RFC9111], | into the forwarded request using the HTTP Client-Cert header field | |||
giving the downstream system access to the certificate information. | [RFC9111], giving the downstream system access to the certificate | |||
The TTRP has to be trusted to provide accurate certificate | information. The TTRP has to be trusted to provide accurate | |||
information, and the connection between the TTRP and the downstream | certificate information, and the connection between the TTRP and the | |||
system also has to be protected. The TTRP could provide some | downstream system also has to be protected. The TTRP could provide | |||
additional assurance, for example, by adding its own signature to the | some additional assurance, for example, by adding its own signature | |||
Client-Cert header field using [RFC9421]. This signature would be | to the Client-Cert header field using HTTP message signatures | |||
effectively ignored by GNAP (since it would not use GNAP's tag | [RFC9421]. This signature would be effectively ignored by GNAP | |||
parameter value) but would be understood by the downstream service as | (since it would not use GNAP's tag parameter value) but would be | |||
part of its deployment. | understood by the downstream service as part of its deployment. | |||
Additional considerations for different types of deployment patterns | Additional considerations for different types of deployment patterns | |||
and key distribution mechanisms for MTLS are found in Section 13.4. | and key distribution mechanisms for MTLS are found in Section 11.4. | |||
13.4. MTLS Deployment Patterns | 11.4. MTLS Deployment Patterns | |||
GNAP does not specify how a client instance's keys could be made | GNAP does not specify how a client instance's keys could be made | |||
known to the AS ahead of time. Public Key Infrastructure (PKI) can | known to the AS ahead of time. The Public Key Infrastructure (PKI) | |||
be used to manage the keys used by client instances when calling the | can be used to manage the keys used by client instances when calling | |||
AS, allowing the AS to trust a root key from a trusted authority. | the AS, allowing the AS to trust a root key from a trusted authority. | |||
This method is particularly relevant to the MTLS key proofing method, | This method is particularly relevant to the MTLS key proofing method, | |||
where the client instance presents its certificate to the AS as part | where the client instance presents its certificate to the AS as part | |||
of the TLS connection. An AS using PKI to validate the MTLS | of the TLS connection. An AS using PKI to validate the MTLS | |||
connection would need to ensure that the presented certificate was | connection would need to ensure that the presented certificate was | |||
issued by a trusted certificate authority before allowing the | issued by a trusted certificate authority before allowing the | |||
connection to continue. PKI-based certificates would allow a key to | connection to continue. PKI-based certificates would allow a key to | |||
be revoked and rotated through management at the certificate | be revoked and rotated through management at the certificate | |||
authority without requiring additional registration or management at | authority without requiring additional registration or management at | |||
the AS. The PKI required to manage mutually-authenticated TLS has | the AS. The PKI required to manage mutually authenticated TLS has | |||
historically been difficult to deploy, especially at scale, but it | historically been difficult to deploy, especially at scale, but it | |||
remains an appropriate solution for systems where the required | remains an appropriate solution for systems where the required | |||
management overhead is not an impediment. | management overhead is not an impediment. | |||
MTLS in GNAP need not use a PKI backing, as self-signed certificates | MTLS in GNAP need not use a PKI backing, as self-signed certificates | |||
and certificates from untrusted authorities can still be presented as | and certificates from untrusted authorities can still be presented as | |||
part of a TLS connection. In this case, the verifier would validate | part of a TLS connection. In this case, the verifier would validate | |||
the connection but accept whatever certificate was presented by the | the connection but accept whatever certificate was presented by the | |||
client software. This specific certificate can then be bound to all | client software. This specific certificate can then be bound to all | |||
future connections from that client software by being bound to the | future connections from that client software by being bound to the | |||
resulting access tokens, in a trust-on-first-use pattern. See | resulting access tokens, in a trust-on-first-use pattern. See | |||
Section 13.3 for more considerations on MTLS as a key proofing | Section 11.3 for more considerations on MTLS as a key proofing | |||
mechanism. | mechanism. | |||
13.5. Protection of Client Instance Key Material | 11.5. Protection of Client Instance Key Material | |||
Client instances are identified by their unique keys, and anyone with | Client instances are identified by their unique keys, and anyone with | |||
access to a client instance's key material will be able to | access to a client instance's key material will be able to | |||
impersonate that client instance to all parties. This is true for | impersonate that client instance to all parties. This is true for | |||
both calls to the AS as well as calls to an RS using an access token | both calls to the AS as well as calls to an RS using an access token | |||
bound to the client instance's unique key. As a consequence, it is | bound to the client instance's unique key. As a consequence, it is | |||
of utmost importance for a client instance to protect its private key | of utmost importance for a client instance to protect its private key | |||
material. | material. | |||
Different types of client software have different methods for | Different types of client software have different methods for | |||
creating, managing, and registering keys. GNAP explicitly allows for | creating, managing, and registering keys. GNAP explicitly allows for | |||
ephemeral clients such as single-page applications (SPAs) and single- | ephemeral clients such as single-page applications (SPAs) and single- | |||
user clients (such as mobile applications) to create and present | user clients (such as mobile applications) to create and present | |||
their own keys during the initial grant request without any explicit | their own keys during the initial grant request without any explicit | |||
pre-registration step. The client software can securely generate a | pre-registration step. The client software can securely generate a | |||
keypair on-device and present the public key, along with proof of | key pair on the device and present the public key, along with proof | |||
holding the associated private key, to the AS as part of the initial | of holding the associated private key, to the AS as part of the | |||
request. To facilitate trust in these ephemeral keys, GNAP further | initial request. To facilitate trust in these ephemeral keys, GNAP | |||
allows for an extensible set of client information to be passed with | further allows for an extensible set of client information to be | |||
the request. This information can include device posture and third- | passed with the request. This information can include device posture | |||
party attestations of the client software's provenance and | and third-party attestations of the client software's provenance and | |||
authenticity, depending on the needs and capabilities of the client | authenticity, depending on the needs and capabilities of the client | |||
software and its deployment. | software and its deployment. | |||
From GNAP's perspective, each distinct key is a different client | From GNAP's perspective, each distinct key is a different client | |||
instance. However, multiple client instances can be grouped together | instance. However, multiple client instances can be grouped together | |||
by an AS policy and treated similarly to each other. For instance, | by an AS policy and treated similarly to each other. For instance, | |||
if an AS knows of several different keys for different servers within | if an AS knows of several different keys for different servers within | |||
a cluster, the AS can decide that authorization of one of these | a cluster, the AS can decide that authorization of one of these | |||
servers applies to all other servers within the cluster. An AS that | servers applies to all other servers within the cluster. An AS that | |||
chooses to do this needs to be careful with how it groups different | chooses to do this needs to be careful with how it groups different | |||
skipping to change at page 171, line 25 ¶ | skipping to change at line 7584 ¶ | |||
Additionally, if an end user controls multiple instances of a single | Additionally, if an end user controls multiple instances of a single | |||
type of client software, such as having an application installed on | type of client software, such as having an application installed on | |||
multiple devices, each of these instances is expected to have a | multiple devices, each of these instances is expected to have a | |||
separate key and be issued separate access tokens. However, if the | separate key and be issued separate access tokens. However, if the | |||
AS is able to group these separate instances together as described | AS is able to group these separate instances together as described | |||
above, it can streamline the authorization process for new instances | above, it can streamline the authorization process for new instances | |||
of the same client software. For example, if two client instances | of the same client software. For example, if two client instances | |||
can present proof of a valid installation of a piece of client | can present proof of a valid installation of a piece of client | |||
software, the AS would be able to associate the approval of the first | software, the AS would be able to associate the approval of the first | |||
instance of this software to all related instances. The AS could | instance of this software to all related instances. The AS could | |||
then choose to bypass an explicit prompt of the resource owner for | then choose to bypass an explicit prompt of the RO for approval | |||
approval during authorization, since such approval has already been | during authorization, since such approval has already been given. An | |||
given. An AS doing such a process would need to take assurance | AS doing such a process would need to take assurance measures that | |||
measures that the different instances are in fact correlated and | the different instances are in fact correlated and authentic, as well | |||
authentic, as well as ensuring the expected resource owner is in | as ensure that the expected RO is in control of the client instance. | |||
control of the client instance. | ||||
Finally, if multiple instances of client software each have the same | Finally, if multiple instances of client software each have the same | |||
key, then from GNAP's perspective, these are functionally the same | key, then from GNAP's perspective, these are functionally the same | |||
client instance as GNAP has no reasonable way to differentiate | client instance as GNAP has no reasonable way to differentiate | |||
between them. This situation could happen if multiple instances | between them. This situation could happen if multiple instances | |||
within a cluster can securely share secret information among | within a cluster can securely share secret information among | |||
themselves. Even though there are multiple copies of the software, | themselves. Even though there are multiple copies of the software, | |||
the shared key makes these copies all present as a single instance. | the shared key makes these copies all present as a single instance. | |||
It is considered bad practice to share keys between copies of | It is considered bad practice to share keys between copies of | |||
software unless they are very tightly integrated with each other and | software unless they are very tightly integrated with each other and | |||
can be closely managed. It is particularly bad practice to allow an | can be closely managed. It is particularly bad practice to allow an | |||
end user to copy keys between client instances and to willingly use | end user to copy keys between client instances and to willingly use | |||
the same key in multiple instances. | the same key in multiple instances. | |||
13.6. Protection of Authorization Server | 11.6. Protection of Authorization Server | |||
The AS performs critical functions in GNAP, including authenticating | The AS performs critical functions in GNAP, including authenticating | |||
client software, managing interactions with end users to gather | client software, managing interactions with end users to gather | |||
consent and provide notice, and issuing access tokens for client | consent and provide notice, and issuing access tokens for client | |||
instances to present to resource servers. As such, protecting the AS | instances to present to RSs. As such, protecting the AS is central | |||
is central to any GNAP deployment. | to any GNAP deployment. | |||
If an attacker is able to gain control over an AS, they would be able | If an attacker is able to gain control over an AS, they would be able | |||
to create fraudulent tokens and manipulate registration information | to create fraudulent tokens and manipulate registration information | |||
to allow for malicious clients. These tokens and clients would be | to allow for malicious clients. These tokens and clients would be | |||
trusted by other components in the ecosystem under the protection of | trusted by other components in the ecosystem under the protection of | |||
the AS. | the AS. | |||
If the AS is using signed access tokens, an attacker in control of | If the AS uses signed access tokens, an attacker in control of the | |||
the AS's signing keys would be able to manufacture fraudulent tokens | AS's signing keys would be able to manufacture fraudulent tokens for | |||
for use at RS's under the protection of the AS. | use at RSs under the protection of the AS. | |||
If an attacker is able to impersonate an AS, they would be able to | If an attacker is able to impersonate an AS, they would be able to | |||
trick legitimate client instances into making signed requests for | trick legitimate client instances into making signed requests for | |||
information which could potentially be proxied to a real AS. To | information that could potentially be proxied to a real AS. To | |||
combat this, all communications to the AS need to be made over TLS or | combat this, all communications to the AS need to be made over TLS or | |||
its equivalent, and the software making the connection has to | its equivalent, and the software making the connection has to | |||
validate the certificate chain of the host it is connecting to. | validate the certificate chain of the host it is connecting to. | |||
Consequently, protecting, monitoring, and auditing the AS is | Consequently, protecting, monitoring, and auditing the AS is | |||
paramount to preserving the security of a GNAP-protected ecosystem. | paramount to preserving the security of a GNAP-protected ecosystem. | |||
The AS presents attackers with a valuable target for attack. | The AS presents attackers with a valuable target for attack. | |||
Fortunately, the core focus and function of the AS is to provide | Fortunately, the core focus and function of the AS is to provide | |||
security for the ecosystem, unlike the RS whose focus is to provide | security for the ecosystem, unlike the RS whose focus is to provide | |||
an API or the client software whose focus is to access the API. | an API or the client software whose focus is to access the API. | |||
13.7. Symmetric and Asymmetric Client Instance Keys | 11.7. Symmetric and Asymmetric Client Instance Keys | |||
Many of the cryptographic methods used by GNAP for key-proofing can | Many of the cryptographic methods used by GNAP for key proofing can | |||
support both asymmetric and symmetric cryptography, and can be | support both asymmetric and symmetric cryptography, and they can be | |||
extended to use a wide variety of mechanisms. Implementers will find | extended to use a wide variety of mechanisms. Implementors will find | |||
useful the available guidelines on cryptographic key management | the available guidelines on cryptographic key management provided in | |||
provided in [RFC4107]. While symmetric cryptographic systems have | [RFC4107] useful. While symmetric cryptographic systems have some | |||
some benefits in speed and simplicity, they have a distinct drawback | benefits in speed and simplicity, they have a distinct drawback -- | |||
that both parties need access to the same key in order to do both | both parties need access to the same key in order to do both signing | |||
signing and verification of the message. When more than two parties | and verification of the message. When more than two parties share | |||
share the same symmetric key, data origin authentication is not | the same symmetric key, data origin authentication is not provided. | |||
provided. Any party that knows the symmetric key can compute a valid | Any party that knows the symmetric key can compute a valid MAC; | |||
MAC; therefore, the contents could originate from any one of the | therefore, the contents could originate from any one of the parties. | |||
parties. | ||||
Use of symmetric cryptography means that when the client instance | Use of symmetric cryptography means that when the client instance | |||
calls the AS to request a token, the AS needs to know the exact value | calls the AS to request a token, the AS needs to know the exact value | |||
of the client instance's key (or be able to derive it) in order to | of the client instance's key (or be able to derive it) in order to | |||
validate the key proof signature. With asymmetric keys, the client | validate the key proof signature. With asymmetric keys, the client | |||
needs only to send its public key to the AS to allow for verification | needs to only send its public key to the AS to allow for verification | |||
that the client holds the associated private key, regardless of | that the client holds the associated private key, regardless of | |||
whether that key was pre-registered or not with the AS. | whether or not that key was pre-registered with the AS. | |||
Symmetric keys also have the expected advantage of providing better | Symmetric keys also have the expected advantage of providing better | |||
protection against quantum threats in the future. Also, these types | protection against quantum threats in the future. Also, these types | |||
of keys (and their secure derivations) are widely supported among | of keys (and their secure derivations) are widely supported among | |||
many cloud-based key management systems. | many cloud-based key management systems. | |||
When used to bind to an access token, a key value must be known by | When used to bind to an access token, a key value must be known by | |||
the RS in order to validate the proof signature on the request. | the RS in order to validate the proof signature on the request. | |||
Common methods for communicating these proofing keys include putting | Common methods for communicating these proofing keys include putting | |||
information in a structured access token and allowing the RS to look | information in a structured access token and allowing the RS to look | |||
up the associated key material against the value of the access token. | up the associated key material against the value of the access token. | |||
With symmetric cryptography, both of these methods would expose the | With symmetric cryptography, both of these methods would expose the | |||
signing key to the RS, and in the case of an structured access token, | signing key to the RS and, in the case of a structured access token, | |||
potentially to any party that can see the access token itself unless | potentially to any party that can see the access token itself unless | |||
the token's payload has been encrypted. Any of these parties would | the token's payload has been encrypted. Any of these parties would | |||
then be able to make calls using the access token by creating a valid | then be able to make calls using the access token by creating a valid | |||
signature using the shared key. With asymmetric cryptography, the RS | signature using the shared key. With asymmetric cryptography, the RS | |||
needs to know only the public key associated with the token in order | needs to only know the public key associated with the token in order | |||
to validate the request, and therefore the RS cannot create any new | to validate the request; therefore, the RS cannot create any new | |||
signed calls. | signed calls. | |||
While both signing approaches are allowed, GNAP treats these two | While both signing approaches are allowed, GNAP treats these two | |||
classes of keys somewhat differently. Only the public portion of | classes of keys somewhat differently. Only the public portion of | |||
asymmetric keys are allowed to be sent by value in requests to the AS | asymmetric keys are allowed to be sent by value in requests to the AS | |||
when establishing a connection. Since sending a symmetric key (or | when establishing a connection. Since sending a symmetric key (or | |||
the private portion of an asymmetric key) would expose the signing | the private portion of an asymmetric key) would expose the signing | |||
material to any parties on the request path, including any attackers, | material to any parties on the request path, including any attackers, | |||
sending these kinds of keys by value is prohibited. Symmetric keys | sending these kinds of keys by value is prohibited. Symmetric keys | |||
can still be used by client instances, but only if the client | can still be used by client instances, but only if the client | |||
instance can send a reference to the key and not its value. This | instance can send a reference to the key and not its value. This | |||
approach allows the AS to use pre-registered symmetric keys as well | approach allows the AS to use pre-registered symmetric keys as well | |||
as key derivation schemes to take advantage of symmetric cryptography | as key derivation schemes to take advantage of symmetric cryptography | |||
but without requiring key distribution at runtime, which would expose | without requiring key distribution at runtime, which would expose the | |||
the keys in transit. | keys in transit. | |||
Both the AS and client software can use systems such as hardware | Both the AS and client software can use systems such as hardware | |||
security modules to strengthen their key security storage and | security modules to strengthen their key security storage and | |||
generation for both asymmetric and symmetric keys (see also | generation for both asymmetric and symmetric keys (see also | |||
Section 7.1.2). | Section 7.1.2). | |||
13.8. Generation of Access Tokens | 11.8. Generation of Access Tokens | |||
The content of access tokens need to be such that only the generating | The contents of access tokens need to be such that only the | |||
AS would be able to create them, and the contents cannot be | generating AS would be able to create them, and the contents cannot | |||
manipulated by an attacker to gain different or additional access | be manipulated by an attacker to gain different or additional access | |||
rights. | rights. | |||
One method for accomplishing this is to use a cryptographically | One method for accomplishing this is to use a cryptographically | |||
random value for the access token, generated by the AS using a secure | random value for the access token, generated by the AS using a secure | |||
randomization function with sufficiently high entropy. The odds of | randomization function with sufficiently high entropy. The odds of | |||
an attacker guessing the output of the randomization function to | an attacker guessing the output of the randomization function to | |||
collide with a valid access token are exceedingly small, and even | collide with a valid access token are exceedingly small, and even | |||
then the attacker would not have any control over what the access | then, the attacker would not have any control over what the access | |||
token would represent since that information would be held close by | token would represent since that information would be held close by | |||
the AS. | the AS. | |||
Another method for accomplishing this is to use a structured token | Another method for accomplishing this is to use a structured token | |||
that is cryptographically signed. In this case, the payload of the | that is cryptographically signed. In this case, the payload of the | |||
access token declares to the RS what the token is good for, but the | access token declares to the RS what the token is good for, but the | |||
signature applied by the AS during token generation covers this | signature applied by the AS during token generation covers this | |||
payload. Only the AS can create such a signature and therefore only | payload. Only the AS can create such a signature; therefore, only | |||
the AS can create such a signed token. The odds of an attacker being | the AS can create such a signed token. The odds of an attacker being | |||
able to guess a signature value with a useful payload are exceedingly | able to guess a signature value with a useful payload are exceedingly | |||
small. This technique only works if all targeted RS's check the | small. This technique only works if all targeted RSs check the | |||
signature of the access token. Any RS that does not validate the | signature of the access token. Any RS that does not validate the | |||
signature of all presented tokens would be susceptible to injection | signature of all presented tokens would be susceptible to injection | |||
of a modified or falsified token. Furthermore, an AS has to | of a modified or falsified token. Furthermore, an AS has to | |||
carefully protect the keys used to sign access tokens, since anyone | carefully protect the keys used to sign access tokens, since anyone | |||
with access to these signing keys would be able to create seemingly- | with access to these signing keys would be able to create seemingly | |||
valid access tokens using them. | valid access tokens using them. | |||
13.9. Bearer Access Tokens | 11.9. Bearer Access Tokens | |||
Bearer access tokens can be used by any party that has access to the | Bearer access tokens can be used by any party that has access to the | |||
token itself, without any additional information. As a natural | token itself, without any additional information. As a natural | |||
consequence, any RS that a bearer token is presented to has the | consequence, any RS that a bearer token is presented to has the | |||
technical capability of presenting that bearer token to another RS, | technical capability of presenting that bearer token to another RS, | |||
as long as the token is valid. It also means that any party that is | as long as the token is valid. It also means that any party that is | |||
able capture of the token value in storage or in transit is able to | able to capture the token value in storage or in transit is able to | |||
use the access token. While bearer tokens are inherently simpler, | use the access token. While bearer tokens are inherently simpler, | |||
this simplicity has been misapplied and abused in making needlessly | this simplicity has been misapplied and abused in making needlessly | |||
insecure systems. The downsides of bearer tokens have become more | insecure systems. The downsides of bearer tokens have become more | |||
pertinent lately as stronger authentication systems have caused some | pertinent lately as stronger authentication systems have caused some | |||
attacks to shift to target tokens and APIs. | attacks to shift to target tokens and APIs. | |||
In GNAP, key-bound access tokens are the default due to their higher | In GNAP, key-bound access tokens are the default due to their higher | |||
security properties. While bearer tokens can be used in GNAP, their | security properties. While bearer tokens can be used in GNAP, their | |||
use should be limited to cases where the simplicity benefits outweigh | use should be limited to cases where the simplicity benefits outweigh | |||
the significant security downsides. One common deployment pattern is | the significant security downsides. One common deployment pattern is | |||
to use a gateway that takes in key-bound tokens on the outside, and | to use a gateway that takes in key-bound tokens on the outside and | |||
verifies the signatures on the incoming requests, but translates the | verifies the signatures on the incoming requests but translates the | |||
requests to a bearer token for use by trusted internal systems. The | requests to a bearer token for use by trusted internal systems. The | |||
bearer tokens are never issued or available outside of the internal | bearer tokens are never issued or available outside of the internal | |||
systems, greatly limiting the exposure of the less secure tokens but | systems, greatly limiting the exposure of the less-secure tokens but | |||
allowing the internal deployment to benefit from the advantages of | allowing the internal deployment to benefit from the advantages of | |||
bearer tokens. | bearer tokens. | |||
13.10. Key-Bound Access Tokens | 11.10. Key-Bound Access Tokens | |||
Key-bound access tokens, as the name suggests, are bound to a | Key-bound access tokens, as the name suggests, are bound to a | |||
specific key and must be presented along with proof of that key | specific key and must be presented along with proof of that key | |||
during use. The key itself is not presented at the same time as the | during use. The key itself is not presented at the same time as the | |||
token, so even if a token value is captured, it cannot be used to | token, so even if a token value is captured, it cannot be used to | |||
make a new request. This is particularly true for an RS, which will | make a new request. This is particularly true for an RS, which will | |||
see the token value but will not see the keys used to make the | see the token value but will not see the keys used to make the | |||
request (assuming asymmetric cryptography is in use, see | request (assuming asymmetric cryptography is in use, see | |||
Section 13.7). | Section 11.7). | |||
Key-bound access tokens provide this additional layer of protection | Key-bound access tokens provide this additional layer of protection | |||
only when the RS checks the signature of the message presented with | only when the RS checks the signature of the message presented with | |||
the token. Acceptance of an invalid presentation signature, or | the token. Acceptance of an invalid presentation signature, or | |||
failure to check the signature entirely, would allow an attacker to | failure to check the signature entirely, would allow an attacker to | |||
make calls with a captured access token without having access to the | make calls with a captured access token without having access to the | |||
related signing key material. | related signing key material. | |||
In addition to validating the signature of the presentation message | In addition to validating the signature of the presentation message | |||
itself, the RS also needs to ensure that the signing key used is | itself, the RS also needs to ensure that the signing key used is | |||
appropriate for the presented token. If an RS does not ensure that | appropriate for the presented token. If an RS does not ensure that | |||
the right keys were used to sign a message with a specific token, an | the right keys were used to sign a message with a specific token, an | |||
attacker would be able to capture an access token and sign the | attacker would be able to capture an access token and sign the | |||
request with their own keys, thereby negating the benefits of using | request with their own keys, thereby negating the benefits of using | |||
key-bound access tokens. | key-bound access tokens. | |||
The RS also needs to ensure that sufficient portions of the message | The RS also needs to ensure that sufficient portions of the message | |||
are covered by the signature. Any items outside the signature could | are covered by the signature. Any items outside the signature could | |||
still affect the API's processing decisions, but these items would | still affect the API's processing decisions, but these items would | |||
not be strongly bound to the token presentation. As such, an | not be strongly bound to the token presentation. As such, an | |||
attacker could capture a valid request, then manipulate portions of | attacker could capture a valid request and then manipulate portions | |||
the request outside of the signature envelope in order to cause | of the request outside of the signature envelope in order to cause | |||
unwanted actions at the protected API. | unwanted actions at the protected API. | |||
Some key-bound tokens are susceptible to replay attacks, depending on | Some key-bound tokens are susceptible to replay attacks, depending on | |||
the details of the signing method used. Key proofing mechanisms used | the details of the signing method used. Therefore, key proofing | |||
with access tokens therefore need to use replay protection mechanisms | mechanisms used with access tokens need to use replay-protection | |||
covered under the signature such as a per-message nonce, a reasonably | mechanisms covered under the signature such as a per-message nonce, a | |||
short time validity window, or other uniqueness constraints. The | reasonably short time validity window, or other uniqueness | |||
details of using these will vary depending on the key proofing | constraints. The details of using these will vary depending on the | |||
mechanism in use, but for example, HTTP Message Signatures has both a | key proofing mechanism in use. For example, HTTP message signatures | |||
created and nonce signature parameter as well as the ability to cover | have both a created and nonce signature parameter as well as the | |||
significant portions of the HTTP message. All of these can be used | ability to cover significant portions of the HTTP message. All of | |||
to limit the attack surface. | these can be used to limit the attack surface. | |||
13.11. Exposure of End-user Credentials to Client Instance | 11.11. Exposure of End-User Credentials to Client Instance | |||
As a delegation protocol, one of the main goals of GNAP is to prevent | As a delegation protocol, one of the main goals of GNAP is to prevent | |||
the client software from being exposed to any credentials or | the client software from being exposed to any credentials or | |||
information about the end user or resource owner as a requirement of | information about the end user or RO as a requirement of the | |||
the delegation process. By using the variety of interaction | delegation process. By using the variety of interaction mechanisms, | |||
mechanisms, the resource owner can interact with the AS without ever | the RO can interact with the AS without ever authenticating to the | |||
authenticating to the client software, and without the client | client software and without the client software having to impersonate | |||
software having to impersonate the resource owner through replay of | the RO through replay of their credentials. | |||
their credentials. | ||||
Consequently, no interaction methods defined in the GNAP core require | Consequently, no interaction methods defined in this specification | |||
the end user to enter their credentials, but it is technologically | require the end user to enter their credentials, but it is | |||
possible for an extension to be defined to carry such values. Such | technologically possible for an extension to be defined to carry such | |||
an extension would be dangerous as it would allow rogue client | values. Such an extension would be dangerous as it would allow rogue | |||
software to directly collect, store, and replay the end user's | client software to directly collect, store, and replay the end user's | |||
credentials outside of any legitimate use within a GNAP request. | credentials outside of any legitimate use within a GNAP request. | |||
The concerns of such an extension could be mitigated through use of a | The concerns of such an extension could be mitigated through use of a | |||
challenge and response unlocked by the end user's credentials. For | challenge and response unlocked by the end user's credentials. For | |||
example, the AS presents a challenge as part of an interaction start | example, the AS presents a challenge as part of an interaction start | |||
method, and the client instance signs that challenge using a key | method, and the client instance signs that challenge using a key | |||
derived from a password presented by the end user. It would be | derived from a password presented by the end user. It would be | |||
possible for the client software to collect this password in a secure | possible for the client software to collect this password in a secure | |||
software enclave without exposing the password to the rest of the | software enclave without exposing the password to the rest of the | |||
client software or putting it across the wire to the AS. The AS can | client software or putting it across the wire to the AS. The AS can | |||
validate this challenge response against a known password for the | validate this challenge response against a known password for the | |||
identified end user. While an approach such as this does not remove | identified end user. While an approach such as this does not remove | |||
all of the concerns surrounding such a password-based scheme, it is | all of the concerns surrounding such a password-based scheme, it is | |||
at least possible to implement in a more secure fashion than simply | at least possible to implement in a more secure fashion than simply | |||
collecting and replaying the password. Even so, such schemes should | collecting and replaying the password. Even so, such schemes should | |||
only ever be used by trusted clients due to the ease of abusing them. | only ever be used by trusted clients due to the ease of abusing them. | |||
13.12. Mixing Up Authorization Servers | 11.12. Mixing Up Authorization Servers | |||
If a client instance is able to work with multiple AS's | If a client instance is able to work with multiple ASes | |||
simultaneously, it is possible for an attacker to add a compromised | simultaneously, it is possible for an attacker to add a compromised | |||
AS to the client instance's configuration and cause the client | AS to the client instance's configuration and cause the client | |||
software to start a request at the compromised AS. This AS could | software to start a request at the compromised AS. This AS could | |||
then proxy the client's request to a valid AS in order to attempt to | then proxy the client's request to a valid AS in order to attempt to | |||
get the resource owner to approve access for the legitimate client | get the RO to approve access for the legitimate client instance. | |||
instance. | ||||
A client instance needs to always be aware of which AS it is talking | A client instance needs to always be aware of which AS it is talking | |||
to throughout a grant process, and ensure that any callback for one | to throughout a grant process and ensure that any callback for one AS | |||
AS does not get conflated with the callback to different AS. The | does not get conflated with the callback to different AS. The | |||
interaction finish hash calculation in Section 4.2.3 allows a client | interaction finish hash calculation in Section 4.2.3 allows a client | |||
instance to protect against this kind of substitution, but only if | instance to protect against this kind of substitution, but only if | |||
the client instance validates the hash. If the client instance does | the client instance validates the hash. If the client instance does | |||
not use an interaction finish method or does not check the | not use an interaction finish method or does not check the | |||
interaction finish hash value, the compromised AS can be granted a | interaction finish hash value, the compromised AS can be granted a | |||
valid access token on behalf of the resource owner. See | valid access token on behalf of the RO. See Sections 4.5.5 and 5.5 | |||
[AXELAND2021] for details of one such attack, which has been since | of [AXELAND2021] for details of one such attack, which has been | |||
addressed in this document by including the grant endpoint in the | addressed in this document by including the grant endpoint in the | |||
interaction hash calculation. Note that the client instance still | interaction hash calculation. Note that the client instance still | |||
needs to validate the hash for the attack to be prevented. | needs to validate the hash for the attack to be prevented. | |||
13.13. Processing of Client-Presented User Information | 11.13. Processing of Client-Presented User Information | |||
GNAP allows the client instance to present assertions and identifiers | GNAP allows the client instance to present assertions and identifiers | |||
of the current user to the AS as part of the initial request. This | of the current user to the AS as part of the initial request. This | |||
information should only ever be taken by the AS as a hint, since the | information should only ever be taken by the AS as a hint, since the | |||
AS has no way to tell if the represented person is present at the | AS has no way to tell if the represented person is present at the | |||
client software, without using an interaction mechanism. This | client software without using an interaction mechanism. This | |||
information does not guarantee the given user is there, but it does | information does not guarantee the given user is there, but it does | |||
constitute a statement by the client software that the AS can take | constitute a statement by the client software that the AS can take | |||
into account. | into account. | |||
For example, if a specific user is claimed to be present prior to | For example, if a specific user is claimed to be present prior to | |||
interaction, but a different user is shown to be present during | interaction, but a different user is shown to be present during | |||
interaction, the AS can either determine this to be an error or | interaction, the AS can either determine this to be an error or | |||
signal to the client instance through returned subject information | signal to the client instance through returned subject information | |||
that the current user has changed from what the client instance | that the current user has changed from what the client instance | |||
thought. This user information can also be used by the AS to | thought. This user information can also be used by the AS to | |||
streamline the interaction process when the user is present. For | streamline the interaction process when the user is present. For | |||
example, instead of having the user type in their account identifier | example, instead of having the user type in their account identifier | |||
during interaction at a redirected URI, the AS can immediately | during interaction at a redirected URI, the AS can immediately | |||
challenge the user for their account credentials. Alternatively, if | challenge the user for their account credentials. Alternatively, if | |||
an existing session is detected, the AS can determine that it matches | an existing session is detected, the AS can determine that it matches | |||
the identifier provided by the client and subsequently skip an | the identifier provided by the client and subsequently skip an | |||
explicit authentication event by the resource owner. | explicit authentication event by the RO. | |||
In cases where the AS trusts the client software more completely, due | In cases where the AS trusts the client software more completely, due | |||
to policy or by previous approval of a given client instance, the AS | to policy or previous approval of a given client instance, the AS can | |||
can take this user information as a statement that the user is | take this user information as a statement that the user is present | |||
present and could issue access tokens and release subject information | and could issue access tokens and release subject information without | |||
without interaction. The AS should only take such action in very | interaction. The AS should only take such action in very limited | |||
limited circumstances, as a client instance could assert whatever it | circumstances, as a client instance could assert whatever it likes | |||
likes for the user's identifiers in its request. The AS can limit | for the user's identifiers in its request. The AS can limit the | |||
the possibility of this by issuing randomized opaque identifiers to | possibility of this by issuing randomized opaque identifiers to | |||
client instances to represent different end user accounts after an | client instances to represent different end-user accounts after an | |||
initial login. | initial login. | |||
When a client instance presents an assertion to the AS, the AS needs | When a client instance presents an assertion to the AS, the AS needs | |||
to evaluate that assertion. Since the AS is unlikely to be the | to evaluate that assertion. Since the AS is unlikely to be the | |||
intended audience of an assertion held by the client software, the AS | intended audience of an assertion held by the client software, the AS | |||
will need to evaluate the assertion in a different context. Even in | will need to evaluate the assertion in a different context. Even in | |||
this case, the AS can still evaluate that the assertion was generated | this case, the AS can still evaluate that the assertion was generated | |||
by a trusted party, was appropriately signed, and is within any time | by a trusted party, was appropriately signed, and is within any time | |||
validity windows stated by the assertion. If the client instance's | validity windows stated by the assertion. If the client instance's | |||
audience identifier is known to the AS and can be associated with the | audience identifier is known to the AS and can be associated with the | |||
client instance's presented key, the AS can also evaluate that the | client instance's presented key, the AS can also evaluate that the | |||
appropriate client instance is presenting the claimed assertion. All | appropriate client instance is presenting the claimed assertion. All | |||
of this will prevent an attacker from presenting a manufactured | of this will prevent an attacker from presenting a manufactured | |||
assertion, or one captured from an untrusted system. However, | assertion or one captured from an untrusted system. However, without | |||
without validating the audience of the assertion, a captured | validating the audience of the assertion, a captured assertion could | |||
assertion could be presented by the client instance to impersonate a | be presented by the client instance to impersonate a given end user. | |||
given end user. In such cases, the assertion offers little more | In such cases, the assertion offers little more protection than a | |||
protection than a simple identifier would. | simple identifier would. | |||
A special case exists where the AS is the generator of the assertion | A special case exists where the AS is the generator of the assertion | |||
being presented by the client instance. In these cases, the AS can | being presented by the client instance. In these cases, the AS can | |||
validate that it did issue the assertion and it is associated with | validate that it did issue the assertion and it is associated with | |||
the client instance presenting the assertion. | the client instance presenting the assertion. | |||
13.14. Client Instance Pre-registration | 11.14. Client Instance Pre-registration | |||
Each client instance is identified by its own unique key, and for | Each client instance is identified by its own unique key, and for | |||
some kinds of client software such as a web server or backend system, | some kinds of client software such as a web server or backend system, | |||
this identification can be facilitated by registering a single key | this identification can be facilitated by registering a single key | |||
for a piece of client software ahead of time. This registration can | for a piece of client software ahead of time. This registration can | |||
be associated with a set of display attributes to be used during the | be associated with a set of display attributes to be used during the | |||
authorization process, identifying the client software to the user. | authorization process to identify the client software to the user. | |||
In these cases, it can be assumed that only one instance of client | In these cases, it can be assumed that only one instance of client | |||
software will exist, likely to serve many different users. | software will exist, likely to serve many different users. | |||
A client's registration record needs to include its identifying key. | A client's registration record needs to include its identifying key. | |||
Furthermore, it is the case that any clients using symmetric | Furthermore, it is the case that any clients using symmetric | |||
cryptography for key proofing mechanisms need to have their keys pre- | cryptography for key proofing mechanisms need to have their keys pre- | |||
registered. The registration should also include any information | registered. The registration should also include any information | |||
that would aid in the authorization process, such as a display name | that would aid in the authorization process, such as a display name | |||
and logo. The registration record can also limit a given client to | and logo. The registration record can also limit a given client to | |||
ask for certain kinds of information and access, or be limited to | ask for certain kinds of information or use specific interaction | |||
specific interaction mechanisms at runtime. | mechanisms at runtime. | |||
It also is sensible to pre-register client instances when the | It also is sensible to pre-register client instances when the | |||
software is acting autonomously, without the need for a runtime | software is acting autonomously, without the need for a runtime | |||
approval by a resource owner or any interaction with an end user. In | approval by an RO or any interaction with an end user. In these | |||
these cases, an AS needs to rest on the trust decisions that have | cases, an AS needs to rely on the trust decisions that have been | |||
been determined prior to runtime in determining what rights and | determined prior to runtime to determine what rights and tokens to | |||
tokens to grant to a given client instance. | grant to a given client instance. | |||
However, it does not make sense to pre-register many types of | However, it does not make sense to pre-register many types of | |||
clients. Single-page applications (SPAs) and mobile/desktop | clients. Single-page applications (SPAs) and mobile/desktop | |||
applications in particular present problems with pre-registration. | applications in particular present problems with pre-registration. | |||
For SPAs, the instances are ephemeral in nature and long-term | For SPAs, the instances are ephemeral in nature, and long-term | |||
registration of a single instance leads to significant storage and | registration of a single instance leads to significant storage and | |||
management overhead at the AS. For mobile applications, each | management overhead at the AS. For mobile applications, each | |||
installation of the client software is a separate instance, and | installation of the client software is a separate instance, and | |||
sharing a key among all instances would be detrimental to security as | sharing a key among all instances would be detrimental to security as | |||
the compromise of any single installation would compromise all copies | the compromise of any single installation would compromise all copies | |||
for all users. | for all users. | |||
An AS can treat these classes of client software differently from | An AS can treat these classes of client software differently from | |||
each other, perhaps by allowing access to certain high-value APIs | each other, perhaps by allowing access to certain high-value APIs | |||
only to pre-registered known clients, or by requiring an active end | only to pre-registered known clients or by requiring an active end- | |||
user delegation of authority to any client software not pre- | user delegation of authority to any client software not pre- | |||
registered. | registered. | |||
An AS can also provide warnings and caveats to resource owners during | An AS can also provide warnings and caveats to ROs during the | |||
the authorization process, allowing the user to make an informed | authorization process, allowing the user to make an informed decision | |||
decision regarding the software they are authorizing. For example, | regarding the software they are authorizing. For example, if the AS | |||
if the AS has done vetting of the client software and this specific | has vetted the client software and this specific instance, it can | |||
instance, it can present a different authorization screen compared to | present a different authorization screen compared to a client | |||
a client instance that is presenting all of its information at | instance that is presenting all of its information at runtime. | |||
runtime. | ||||
Finally, an AS can use platform attestations and other signals from | Finally, an AS can use platform attestations and other signals from | |||
the client instance at runtime to determine whether the software | the client instance at runtime to determine whether or not the | |||
making the request is legitimate or not. The details of such | software making the request is legitimate. The details of such | |||
attestations are outside the scope of the core protocol, but the | attestations are outside the scope of this specification, but the | |||
client portion of a grant request provides a natural extension point | client portion of a grant request provides a natural extension point | |||
to such information through the Client Instance Fields registry | to such information through the "GNAP Client Instance Fields" | |||
(Section 11.7). | registry (Section 10.7). | |||
13.15. Client Instance Impersonation | 11.15. Client Instance Impersonation | |||
If client instances are allowed to set their own user-facing display | If client instances are allowed to set their own user-facing display | |||
information, such as a display name and website URL, a malicious | information, such as a display name and website URL, a malicious | |||
client instance could impersonate legitimate client software for the | client instance could impersonate legitimate client software for the | |||
purposes of tricking users into authorizing the malicious client. | purposes of tricking users into authorizing the malicious client. | |||
Requiring clients to pre-register does not fully mitigate this | Requiring clients to pre-register does not fully mitigate this | |||
problem since many pre-registration systems have self-service portals | problem since many pre-registration systems have self-service portals | |||
for management of client registration, allowing authenticated | for management of client registration, allowing authenticated | |||
developers to enter self-asserted information into the management | developers to enter self-asserted information into the management | |||
portal. | portal. | |||
An AS can mitigate this by actively filtering all self-asserted | An AS can mitigate this by actively filtering all self-asserted | |||
values presented by client software, both dynamically as part of GNAP | values presented by client software, both dynamically as part of GNAP | |||
and through a registration portal, to limit the kinds of | and through a registration portal, to limit the kinds of | |||
impersonation that would be done. | impersonation that could be done. | |||
An AS can also warn the resource owner about the provenance of the | An AS can also warn the RO about the provenance of the information it | |||
information it is displaying, allowing the resource owner to make a | is displaying, allowing the RO to make a more informed delegation | |||
more informed delegation decision. For example, an AS can visually | decision. For example, an AS can visually differentiate between a | |||
differentiate between a client instance that can be traced back to a | client instance that can be traced back to a specific developer's | |||
specific developer's registration and an instance that has self- | registration and an instance that has self-asserted its own display | |||
asserted its own display information. | information. | |||
13.16. Client-Hosted Logo URI | 11.16. Client-Hosted Logo URI | |||
The logo_uri client display field defined in Section 2.3.2 allows the | The logo_uri client display field defined in Section 2.3.2 allows the | |||
client instance to specify a URI from which an image can be fetched | client instance to specify a URI from which an image can be fetched | |||
for display during authorization decisions. When the URI points to | for display during authorization decisions. When the URI points to | |||
an externally hosted resource (as opposed to a data: URI), the | an externally hosted resource (as opposed to a data: URI), the | |||
logo_uri field presents challenges in addition to the considerations | logo_uri field presents challenges in addition to the considerations | |||
in Section 13.15. | in Section 11.15. | |||
When a logo_uri is externally hosted, the client software (or the | When a logo_uri is externally hosted, the client software (or the | |||
host of the asset) can change the contents of the logo without | host of the asset) can change the contents of the logo without | |||
informing the AS. Since the logo is considered an aspect of the | informing the AS. Since the logo is considered an aspect of the | |||
client software's identity, this flexibility allows for a more | client software's identity, this flexibility allows for a more | |||
dynamically-managed client instance that makes use of the distributed | dynamically managed client instance that makes use of the distributed | |||
systems. | systems. | |||
However, this same flexibility allows the host of the asset to change | However, this same flexibility allows the host of the asset to change | |||
the hosted file in a malicious way, such as replacing the image | the hosted file in a malicious way, such as replacing the image | |||
content with malicious software for download or imitating a different | content with malicious software for download or imitating a different | |||
piece of client software. Additionally, the act of fetching the URI | piece of client software. Additionally, the act of fetching the URI | |||
could accidentally leak information to the image host in the HTTP | could accidentally leak information to the image host in the HTTP | |||
Referer header field, if one is sent. Even though GNAP intentionally | Referer header field, if one is sent. Even though GNAP intentionally | |||
does not include security parameters in front-channel URI's wherever | does not include security parameters in front-channel URIs wherever | |||
possible, the AS still should take steps to ensure that this | possible, the AS still should take steps to ensure that this | |||
information does not leak accidentally, such as setting a referrer | information does not leak accidentally, such as setting a referrer | |||
policy on image links or displaying images only from paged served | policy on image links or displaying images only from pages served | |||
from a URI with no sensitive security or identity information. | from a URI with no sensitive security or identity information. | |||
To avoid these issues, the AS can insist on the use of data: URIs, | To avoid these issues, the AS can insist on the use of data: URIs, | |||
though that might not be practical for all types of client software. | though that might not be practical for all types of client software. | |||
Alternatively, the AS could pre-fetch the content of the URI and | Alternatively, the AS could pre-fetch the content of the URI and | |||
present its own copy to the resource owner instead. This practice | present its own copy to the RO instead. This practice opens the AS | |||
opens the AS to potential SSRF attacks, as discussed in | to potential SSRF attacks, as discussed in Section 11.34. | |||
Section 13.34. | ||||
13.17. Interception of Information in the Browser | 11.17. Interception of Information in the Browser | |||
Most information passed through the web-browser is susceptible to | Most information passed through the web browser is susceptible to | |||
interception and possible manipulation by elements within the browser | interception and possible manipulation by elements within the browser | |||
such as scripts loaded within pages. Information in the URI is | such as scripts loaded within pages. Information in the URI is | |||
exposed through browser and server logs, and can also leak to other | exposed through browser and server logs, and it can also leak to | |||
parties through HTTP Referer headers. | other parties through HTTP Referer headers. | |||
GNAP's design limits the information passed directly through the | GNAP's design limits the information passed directly through the | |||
browser, allowing for opaque URIs in most circumstances. For the | browser, allowing for opaque URIs in most circumstances. For the | |||
redirect-based interaction finish mechanism, named query parameters | redirect-based interaction finish mechanism, named query parameters | |||
are used to carry unguessable opaque values. For these, GNAP | are used to carry unguessable opaque values. For these, GNAP | |||
requires creation and validation of a cryptographic hash to protect | requires creation and validation of a cryptographic hash to protect | |||
the query parameters added to the URI and associate them with an | the query parameters added to the URI and associate them with an | |||
ongoing grant process and values not passed in the URI. The client | ongoing grant process and values not passed in the URI. The client | |||
instance has to properly validate this hash to prevent an attacker | instance has to properly validate this hash to prevent an attacker | |||
from injecting an interaction reference intended for a different AS | from injecting an interaction reference intended for a different AS | |||
or client instance. | or client instance. | |||
Several interaction start mechanisms use URIs created by the AS and | Several interaction start mechanisms use URIs created by the AS and | |||
passed to the client instance. While these URIs are opaque to the | passed to the client instance. While these URIs are opaque to the | |||
client instance, it's possible for the AS to include parameters, | client instance, it's possible for the AS to include parameters, | |||
paths, and other pieces of information that could leak security data | paths, and other pieces of information that could leak security data | |||
or be manipulated by a party in the middle of the transaction. An AS | or be manipulated by a party in the middle of the transaction. An AS | |||
implementation can avoid this problem by creating URIs using | implementation can avoid this problem by creating URIs using | |||
unguessable values that are randomized for each new grant request. | unguessable values that are randomized for each new grant request. | |||
13.18. Callback URI Manipulation | 11.18. Callback URI Manipulation | |||
The callback URI used in interaction finish mechanisms is defined by | The callback URI used in interaction finish mechanisms is defined by | |||
the client instance. This URI is opaque to the AS, but can contain | the client instance. This URI is opaque to the AS but can contain | |||
information relevant to the client instance's operations. In | information relevant to the client instance's operations. In | |||
particular, the client instance can include state information to | particular, the client instance can include state information to | |||
allow the callback request to be associated with an ongoing grant | allow the callback request to be associated with an ongoing grant | |||
request. | request. | |||
Since this URI is exposed to the end user's browser, it is | Since this URI is exposed to the end user's browser, it is | |||
susceptible to both logging and manipulation in transit before the | susceptible to both logging and manipulation in transit before the | |||
request is made to the client software. As such, a client instance | request is made to the client software. As such, a client instance | |||
should never put security-critical or private information into the | should never put security-critical or private information into the | |||
callback URI in a cleartext form. For example, if the client | callback URI in a cleartext form. For example, if the client | |||
software includes a post-redirect target URI in its callback URI to | software includes a post-redirect target URI in its callback URI to | |||
the AS, this target URI could be manipulated by an attacker, creating | the AS, this target URI could be manipulated by an attacker, creating | |||
an open redirector at the client. Instead, a client instance can use | an open redirector at the client. Instead, a client instance can use | |||
an unguessable identifier in the URI that can then be used by the | an unguessable identifier in the URI that can then be used by the | |||
client software to look up the details of the pending request. Since | client software to look up the details of the pending request. Since | |||
this approach requires some form of statefulness by the client | this approach requires some form of statefulness by the client | |||
software during the redirection process, clients that are not capable | software during the redirection process, clients that are not capable | |||
of holding state through a redirect should not use redirect-based | of holding state through a redirect should not use redirect-based | |||
interaction mechanisms. | interaction mechanisms. | |||
13.19. Redirection Status Codes | 11.19. Redirection Status Codes | |||
As already described in [I-D.ietf-oauth-security-topics], a server | As described in [OAUTH-SEC-TOPICS], a server should never use HTTP | |||
should never use the HTTP 307 status code to redirect a request that | status code 307 (Temporary Redirect) to redirect a request that | |||
potentially contains user credentials. If an HTTP redirect is used | potentially contains user credentials. If an HTTP redirect is used | |||
for such a request, the HTTP status code 303 "See Other" should be | for such a request, HTTP status code 303 (See Other) should be used | |||
used instead. | instead. | |||
The status code 307, as defined in the HTTP standard [HTTP], requires | Status code 307 (Temporary Redirect), as defined in the HTTP standard | |||
the user agent to preserve the method and content of a request, thus | [HTTP], requires the user agent to preserve the method and content of | |||
submitting the content of the POST request to the redirect target. | a request, thus submitting the content of the POST request to the | |||
In the HTTP standard [HTTP], only the status code 303 unambiguously | redirect target. In the HTTP standard [HTTP], only status code 303 | |||
enforces rewriting the HTTP POST request to an HTTP GET request, | (See Other) unambiguously enforces rewriting the HTTP POST request to | |||
which eliminates the POST content from the redirected request. For | an HTTP GET request, which eliminates the POST content from the | |||
all other status codes, including status code 302, user agents are | redirected request. For all other status codes, including status | |||
allowed not to rewrite a POST request into a GET request and thus to | code 302 (Found), user agents are allowed to keep a redirected POST | |||
resubmit the contents. | request as a POST and thus can resubmit the content. | |||
The use of status code 307 results in a vulnerability when using the | The use of status code 307 (Temporary Redirect) results in a | |||
redirect interaction finish method (Section 3.3.5). With this | vulnerability when using the redirect interaction finish method | |||
method, the AS potentially prompts the RO to enter their credentials | (Section 3.3.5). With this method, the AS potentially prompts the RO | |||
in a form that is then submitted back to the AS (using an HTTP POST | to enter their credentials in a form that is then submitted back to | |||
request). The AS checks the credentials and, if successful, may | the AS (using an HTTP POST request). The AS checks the credentials | |||
directly redirect the RO to the client instance's redirect URI. Due | and, if successful, may immediately redirect the RO to the client | |||
to the use of status code 307, the RO's user agent now transmits the | instance's redirect URI. Due to the use of status code 307 | |||
RO's credentials to the client instance. A malicious client instance | (Temporary Redirect), the RO's user agent now transmits the RO's | |||
can then use the obtained credentials to impersonate the RO at the | credentials to the client instance. A malicious client instance can | |||
AS. | then use the obtained credentials to impersonate the RO at the AS. | |||
Redirection away from the initial URI in an interaction session could | Redirection away from the initial URI in an interaction session could | |||
also leak information found in that initial URI through the HTTP | also leak information found in that initial URI through the HTTP | |||
Referer header field, which would be sent by the user agent to the | Referer header field, which would be sent by the user agent to the | |||
redirect target. To avoid such leakage, a server can first redirect | redirect target. To avoid such leakage, a server can first redirect | |||
to an internal interstitial page without any identifying or sensitive | to an internal interstitial page without any identifying or sensitive | |||
information on the URI before processing the request. When the user | information on the URI before processing the request. When the user | |||
agent is ultimately redirected from this page, no part of the | agent is ultimately redirected from this page, no part of the | |||
original interaction URI will be found in the Referer header. | original interaction URI will be found in the Referer header. | |||
13.20. Interception of Responses from the AS | 11.20. Interception of Responses from the AS | |||
Responses from the AS contain information vital to both the security | Responses from the AS contain information vital to both the security | |||
and privacy operations of GNAP. This information includes nonces | and privacy operations of GNAP. This information includes nonces | |||
used in cryptographic calculations, subject identifiers, assertions, | used in cryptographic calculations, Subject Identifiers, assertions, | |||
public keys, and information about what client software is requesting | public keys, and information about what client software is requesting | |||
and was granted. | and was granted. | |||
In addition, if bearer tokens are used or keys are issued alongside a | In addition, if bearer tokens are used or keys are issued alongside a | |||
bound access token, the response from the AS contains all information | bound access token, the response from the AS contains all information | |||
necessary for use of the contained access token. Any party that is | necessary for use of the contained access token. Any party that is | |||
capable of viewing such a response, such as an intermediary proxy, | capable of viewing such a response, such as an intermediary proxy, | |||
would be able to exfiltrate and use this token. If the access token | would be able to exfiltrate and use this token. If the access token | |||
is instead bound to the client instance's presented key, | is instead bound to the client instance's presented key, | |||
intermediaries no longer have sufficient information to use the | intermediaries no longer have sufficient information to use the | |||
token. They can still, however, gain information about the end user | token. They can still, however, gain information about the end user | |||
as well as the actions of the client software. | as well as the actions of the client software. | |||
13.21. Key Distribution | 11.21. Key Distribution | |||
GNAP does not define ways for the client instances keys to be | GNAP does not define ways for the client instances keys to be | |||
provided to the client instances, particularly in light of how those | provided to the client instances, particularly in light of how those | |||
keys are made known to the AS. These keys could be generated | keys are made known to the AS. These keys could be generated | |||
dynamically on the client software or pre-registered at the AS in a | dynamically on the client software or pre-registered at the AS in a | |||
static developer portal. The keys for client instances could also be | static developer portal. The keys for client instances could also be | |||
distributed as part of the deployment process of instances of the | distributed as part of the deployment process of instances of the | |||
client software. For example, an application installation framework | client software. For example, an application installation framework | |||
could generate a keypair for each copy of client software, then both | could generate a key pair for each copy of client software and then | |||
install it into the client software upon installation and registering | both install it into the client software upon installation and | |||
that instance with the AS. | register that instance with the AS. | |||
Alternatively, it's possible for the AS to generate keys to be used | Alternatively, it's possible for the AS to generate keys to be used | |||
with access tokens that are separate from the keys used by the client | with access tokens that are separate from the keys used by the client | |||
instance to request tokens. In this method, the AS would generate | instance to request tokens. In this method, the AS would generate | |||
the asymmetric keypair or symmetric key and return the public key or | the asymmetric key pair or symmetric key and return the public key or | |||
key reference, to the client instance alongside the access token | key reference to the client instance alongside the access token | |||
itself. The means for the AS to return generated key values to the | itself. The means for the AS to return generated key values to the | |||
client instance are out of scope, since GNAP does not allow the | client instance are out of scope, since GNAP does not allow the | |||
transmission of private or shared key information within the protocol | transmission of private or shared key information within the protocol | |||
itself. | itself. | |||
Additionally, if the token is bound to a key other than the client | Additionally, if the token is bound to a key other than the client | |||
instance's presented key, this opens a possible attack surface for an | instance's presented key, this opens a possible attack surface for an | |||
attacker's AS to request an access token then substitute their own | attacker's AS to request an access token and then substitute their | |||
key material in the response to the client instance. The attacker's | own key material in the response to the client instance. The | |||
AS would need to be able to use the same key as the client instance, | attacker's AS would need to be able to use the same key as the client | |||
but this setup would allow an attacker's AS to make use of a | instance, but this setup would allow an attacker's AS to make use of | |||
compromised key within a system. This attack can be prevented by | a compromised key within a system. This attack can be prevented by | |||
only binding access tokens to the client instance's presented keys, | only binding access tokens to the client instance's presented keys | |||
and by having client instances have a strong association between | and by having client instances have a strong association between | |||
which keys they expect to use and the AS they expect to use them on. | which keys they expect to use and the AS they expect to use them on. | |||
This attack is also only able to be propagated on client instances | This attack is also only able to be propagated on client instances | |||
that talk to more than one AS at runtime, which can be limited by the | that talk to more than one AS at runtime, which can be limited by the | |||
client software. | client software. | |||
13.22. Key Rotation Policy | 11.22. Key Rotation Policy | |||
When keys are rotated, there could be a delay in the propagation of | When keys are rotated, there could be a delay in the propagation of | |||
that rotation to various components in the AS's ecosystem. The AS | that rotation to various components in the AS's ecosystem. The AS | |||
can define its own policy regarding the timeout of the previously- | can define its own policy regarding the timeout of the previously | |||
bound key, either making it immediately obsolete or allowing for a | bound key, either making it immediately obsolete or allowing for a | |||
limited grace period during which both the previously-bound key and | limited grace period during which both the previously bound key and | |||
the current key can be used for signing requests. Such a grace | the current key can be used for signing requests. Such a grace | |||
period can be useful when there are multiple running copies of the | period can be useful when there are multiple running copies of the | |||
client that are coordinated with each other. For example, the client | client that are coordinated with each other. For example, the client | |||
software could be deployed as a cloud service with multiple | software could be deployed as a cloud service with multiple | |||
orchestrated nodes. Each of these copies is deployed using the same | orchestrated nodes. Each of these copies is deployed using the same | |||
key and therefore all the nodes represent the same client instance to | key; therefore, all the nodes represent the same client instance to | |||
the AS. In such cases, it can be difficult, or even impossible, to | the AS. In such cases, it can be difficult, or even impossible, to | |||
update the keys on all these copies in the same instant. | update the keys on all these copies in the same instant. | |||
The need for accommodating such known delays in the system needs to | The need to accommodate such known delays in the system needs to be | |||
be balanced with the risk of allowing an old key to still be used. | balanced with the risk of allowing an old key to still be used. | |||
Narrowly restricting the exposure opportunities for exploit at the AS | Narrowly restricting the exposure opportunities for exploit at the AS | |||
in terms of time, place, and method makes exploit significantly more | in terms of time, place, and method makes exploit significantly more | |||
difficult, especially if the exception happens only once. For | difficult, especially if the exception happens only once. For | |||
example, the AS can reject requests from the previously-bound key (or | example, the AS can reject requests from the previously bound key (or | |||
any previous one before it) to cause rotation to a new key, or at | any previous one before it) to cause rotation to a new key or at | |||
least ensure that the rotation happens in an idempotent way to the | least ensure that the rotation happens in an idempotent way to the | |||
same new key. | same new key. | |||
See also the related considerations for token values in | See also the related considerations for token values in | |||
Section 13.33. | Section 11.33. | |||
13.23. Interaction Finish Modes and Polling | 11.23. Interaction Finish Modes and Polling | |||
During the interaction process, the client instance usually hands | During the interaction process, the client instance usually hands | |||
control of the user experience over to another component, be it the | control of the user experience over to another component, be it the | |||
system browser, another application, or some action the resource | system browser, another application, or some action the RO is | |||
owner is instructed to take on another device. By using an | instructed to take on another device. By using an interaction finish | |||
interaction finish method, the client instance can be securely | method, the client instance can be securely notified by the AS when | |||
notified by the AS when the interaction is completed and the next | the interaction is completed and the next phase of the protocol | |||
phase of the protocol should occur. This process includes | should occur. This process includes information that the client | |||
information that the client instance can use to validate the finish | instance can use to validate the finish call from the AS and prevent | |||
call from the AS and prevent some injection, session hijacking, and | some injection, session hijacking, and phishing attacks. | |||
phishing attacks. | ||||
Some types of client deployment are unable to receive an interaction | Some types of client deployment are unable to receive an interaction | |||
finish message. Without an interaction finish method to notify it, | finish message. Without an interaction finish method to notify it, | |||
the client instance will need to poll the grant continuation API | the client instance will need to poll the grant continuation API | |||
while waiting for the resource owner to approve or deny the request. | while waiting for the RO to approve or deny the request. An attacker | |||
An attacker could take advantage of this situation by capturing the | could take advantage of this situation by capturing the interaction | |||
interaction start parameters and phishing a legitimate user into | start parameters and phishing a legitimate user into authorizing the | |||
authorizing the attacker's waiting client instance, which would in | attacker's waiting client instance, which would in turn have no way | |||
turn have no way of associating the completed interaction from the | of associating the completed interaction from the targeted user with | |||
targeted user with the start of the request from the attacker. | the start of the request from the attacker. | |||
However, it is important to note that this pattern is practically | However, it is important to note that this pattern is practically | |||
indistinguishable from some legitimate use cases. For example, a | indistinguishable from some legitimate use cases. For example, a | |||
smart device emits a code for the resource owner to enter on a | smart device emits a code for the RO to enter on a separate device. | |||
separate device. The smart device has to poll because the expected | The smart device has to poll because the expected behavior is that | |||
behavior is that the interaction will take place on the separate | the interaction will take place on the separate device, without a way | |||
device, without a way to return information to the original device's | to return information to the original device's context. | |||
context. | ||||
As such, developers need to weigh the risks of forgoing an | As such, developers need to weigh the risks of forgoing an | |||
interaction finish method against the deployment capabilities of the | interaction finish method against the deployment capabilities of the | |||
client software and its environment. Due to the increased security, | client software and its environment. Due to the increased security, | |||
an interaction finish method should be employed whenever possible. | an interaction finish method should be employed whenever possible. | |||
13.24. Session Management for Interaction Finish Methods | 11.24. Session Management for Interaction Finish Methods | |||
When using an interaction finish method such as redirect or push, the | When using an interaction finish method such as redirect or push, the | |||
client instance receives an unsolicited inbound request from an | client instance receives an unsolicited inbound request from an | |||
unknown party over HTTPS. The client instance needs to be able to | unknown party over HTTPS. The client instance needs to be able to | |||
successfully associate this incoming request with a specific pending | successfully associate this incoming request with a specific pending | |||
grant request being managed by the client instance. If the client | grant request being managed by the client instance. If the client | |||
instance is not careful and precise about this, an attacker could | instance is not careful and precise about this, an attacker could | |||
associate their own session at the client instance with a stolen | associate their own session at the client instance with a stolen | |||
interaction response. The means of preventing this varies by the | interaction response. The means of preventing this vary by the type | |||
type of client software and interaction methods in use. Some common | of client software and interaction methods in use. Some common | |||
patterns are enumerated here. | patterns are enumerated here. | |||
If the end user interacts with the client instance through a web | If the end user interacts with the client instance through a web | |||
browser and the redirect interaction finish method is used, the | browser and the redirect interaction finish method is used, the | |||
client instance can ensure that the incoming HTTP request from the | client instance can ensure that the incoming HTTP request from the | |||
finish method is presented in the same browser session that the grant | finish method is presented in the same browser session that the grant | |||
request was started in. This technique is particularly useful when | request was started in. This technique is particularly useful when | |||
the redirect interaction start mode is used as well, since in many | the redirect interaction start mode is used as well, since in many | |||
cases the end user will follow the redirection with the same browser | cases, the end user will follow the redirection with the same browser | |||
that they are using to interact with the client instance. The client | that they are using to interact with the client instance. The client | |||
instance can then store the relevant pending grant information in the | instance can then store the relevant pending grant information in the | |||
session, either in the browser storage directly (such as with a | session, either in the browser storage directly (such as with a | |||
single-page application) or in an associated session store on a back- | single-page application) or in an associated session store on a | |||
end server. In both cases, when the incoming request reaches the | backend server. In both cases, when the incoming request reaches the | |||
client instance, the session information can be used to ensure that | client instance, the session information can be used to ensure that | |||
the same party that started the request is present as the request | the same party that started the request is present as the request | |||
finishes. | finishes. | |||
Ensuring that the same party that started a request is present when | Ensuring that the same party that started a request is present when | |||
that request finishes can prevent phishing attacks, where an attacker | that request finishes can prevent phishing attacks, where an attacker | |||
starts a request at an honest client instance and tricks an honest RO | starts a request at an honest client instance and tricks an honest RO | |||
into authorizing it. For example, if an honest end user (that also | into authorizing it. For example, if an honest end user (that also | |||
acts as the RO) wants to start a request through a client instance | acts as the RO) wants to start a request through a client instance | |||
controlled by the attacker, the attacker can start a request at an | controlled by the attacker, the attacker can start a request at an | |||
honest client instance and then redirect the honest end user to the | honest client instance and then redirect the honest end user to the | |||
interaction URI from the attackers session with the honest client | interaction URI from the attackers session with the honest client | |||
instance. If the honest end user then fails to realize that they are | instance. If the honest end user then fails to realize that they are | |||
not authorizing the attacker-controlled client instance (with which | not authorizing the attacker-controlled client instance (with which | |||
it started its request) but instead the honest client instance when | it started its request) but instead the honest client instance when | |||
interacting with the AS, the attacker's session with the honest | interacting with the AS, the attacker's session with the honest | |||
client instance would be authorized. This would give the attacker | client instance would be authorized. This would give the attacker | |||
access to the honest end user's resources that the honest client | access to the honest end user's resources that the honest client | |||
instance is authorized to access. However, if after the interaction | instance is authorized to access. However, if after the interaction, | |||
the AS redirects the honest end user back to the client instance | the AS redirects the honest end user back to the client instance | |||
whose grant request the end user just authorized, the honest end user | whose grant request the end user just authorized, the honest end user | |||
is redirected to the honest client instance. The honest client | is redirected to the honest client instance. The honest client | |||
instance can then detect that the end user is not the party that | instance can then detect that the end user is not the party that | |||
started the request, since the request at the honest client instance | started the request, since the request at the honest client instance | |||
was started by the attacker. This detection can prevent the attack. | was started by the attacker. This detection can prevent the attack. | |||
This is related to the discussion in Section 13.15, because again the | This is related to the discussion in Section 11.15, because again the | |||
attack can be prevented by the AS informing the user as much as | attack can be prevented by the AS informing the user as much as | |||
possible about the client instance that is to be authorized. | possible about the client instance that is to be authorized. | |||
If the end user does not interact with the client instance through a | If the end user does not interact with the client instance through a | |||
web browser or the interaction start method does not use the same | web browser or the interaction start method does not use the same | |||
browser or device that the end user is interacting through (such as | browser or device that the end user is interacting through (such as | |||
the launch of a second device through a scannable code or | the launch of a second device through a scannable code or | |||
presentation of a user code) the client instance will not be able to | presentation of a user code), the client instance will not be able to | |||
strongly associate an incoming HTTP request with an established | strongly associate an incoming HTTP request with an established | |||
session with the end user. This is also true when the push | session with the end user. This is also true when the push | |||
interaction finish method is used, since the HTTP request comes | interaction finish method is used, since the HTTP request comes | |||
directly from the interaction component of the AS. In these | directly from the interaction component of the AS. In these | |||
circumstances, the client instance can at least ensure that the | circumstances, the client instance can at least ensure that the | |||
incoming HTTP request can be uniquely associated with an ongoing | incoming HTTP request can be uniquely associated with an ongoing | |||
grant request by making the interaction finish callback URI unique | grant request by making the interaction finish callback URI unique | |||
for the grant when making the interaction request (Section 2.5.2). | for the grant when making the interaction request (Section 2.5.2). | |||
Mobile applications and other client instances that generally serve | Mobile applications and other client instances that generally serve | |||
only a single end user at a time can use this unique incoming URL to | only a single end user at a time can use this unique incoming URL to | |||
differentiate between a legitimate incoming request and an attacker's | differentiate between a legitimate incoming request and an attacker's | |||
stolen request. | stolen request. | |||
13.25. Calculating Interaction Hash | 11.25. Calculating Interaction Hash | |||
While the use of GNAP's signing mechanisms and token-protected grant | While the use of GNAP's signing mechanisms and token-protected grant | |||
API provides significant security protections to the protocol, the | API provides significant security protections to the protocol, the | |||
interaction reference mechanism is susceptible to monitoring, | interaction reference mechanism is susceptible to monitoring, | |||
capture, and injection by an attacker. To combat this, GNAP requires | capture, and injection by an attacker. To combat this, GNAP requires | |||
the calculation and verification of an interaction hash. A client | the calculation and verification of an interaction hash. A client | |||
instance might be tempted to skip this step, but doing so leaves the | instance might be tempted to skip this step, but doing so leaves the | |||
client instance open to injection and manipulation by an attacker | client instance open to injection and manipulation by an attacker | |||
that could lead to additional issues. | that could lead to additional issues. | |||
skipping to change at page 188, line 32 ¶ | skipping to change at line 8358 ¶ | |||
| | | | | | | | | | | | | | | | | | |||
| +==(E)================================>| | | | +==(E)================================>| | | |||
| | | | | | | | | | | | | | | | | | |||
| |<=(7)=+ | | | | | | | |<=(7)=+ | | | | | | |||
| | | | | | | | | | | | | | | | | | |||
| +==(F)================>| | | | | | +==(F)================>| | | | | |||
| | | | | +-(G)->| | | | | | | | +-(G)->| | | |||
| | | | | | | | | | | | | | | | | | |||
`----` `------` +--------+ +--------+ | `----` `------` +--------+ +--------+ | |||
Figure 11: Figure 11: Interaction hash attack | Figure 11: Interaction Hash Attack | |||
* Prerequisites: The client instance can allow multiple end users to | Prerequisites: The client instance can allow multiple end users to | |||
access the same AS. The attacker is attempting to associate their | access the same AS. The attacker is attempting to associate their | |||
rights with the target user's session. | rights with the target user's session. | |||
* (1) The attacker starts a session at the client instance. | * (1) The attacker starts a session at the client instance. | |||
* (2) The client instance creates a grant request with nonce CN1. | * (2) The client instance creates a grant request with nonce CN1. | |||
* (3) The AS responds to the grant request with a need to interact, | * (3) The AS responds to the grant request with a need to interact, | |||
nonce SN1, and a continuation token, CT1. | nonce SN1, and a continuation token, CT1. | |||
* (4) The client instructs the attacker to interact at the AS. | * (4) The client instructs the attacker to interact at the AS. | |||
* (5) The attacker interacts at the AS. | * (5) The attacker interacts at the AS. | |||
* (6) The AS completes the interact finish with interact ref IR1 and | * (6) The AS completes the interact finish with interact reference | |||
interact hash IH1 calculated from (CN1 + SN1 + IR1 + AS). The | IR1 and interact hash IH1 calculated from (CN1 + SN1 + IR1 + AS). | |||
attacker prevents IR1 from returning to the client instance. | The attacker prevents IR1 from returning to the client instance. | |||
* (A) The target user starts a session at the client instance. | * (A) The target user starts a session at the client instance. | |||
* (B) The client instance creates a grant request with nonce CN2. | * (B) The client instance creates a grant request with nonce CN2. | |||
* (C) The AS responds to the grant request with a need to interact, | * (C) The AS responds to the grant request with a need to interact, | |||
nonce SN2, and a continuation token, CT2. | nonce SN2, and a continuation token, CT2. | |||
* (D) The client instance instructs the user to interact at the AS. | * (D) The client instance instructs the user to interact at the AS. | |||
* (E) The target user interacts at the AS. | * (E) The target user interacts at the AS. | |||
* (7) Before the target user can complete their interaction, the | * (7) Before the target user can complete their interaction, the | |||
attacker delivers their own interact ref IR1 into the user's | attacker delivers their own interact reference IR1 into the user's | |||
session. The attacker cannot calculate the appropriate hash | session. The attacker cannot calculate the appropriate hash | |||
because the attacker does not have access to CN2 and SN2. | because the attacker does not have access to CN2 and SN2. | |||
* (F) The target user triggers the interaction finish in their own | * (F) The target user triggers the interaction finish in their own | |||
session with the attacker's IR1. | session with the attacker's IR1. | |||
* (G) If the client instance is checking the interaction hash, the | * (G) If the client instance is checking the interaction hash, the | |||
attack stops here because the hash calculation of (CN2 + SN2 + IR1 | attack stops here because the hash calculation of (CN2 + SN2 + IR1 | |||
+ AS) will fail. If the client instance does not check the | + AS) will fail. If the client instance does not check the | |||
interaction hash, the client instance will be tricked into | interaction hash, the client instance will be tricked into | |||
submitting the interaction reference to the AS. Here, the AS will | submitting the interaction reference to the AS. Here, the AS will | |||
reject the interaction request because it is presented against CT2 | reject the interaction request because it is presented against CT2 | |||
and not CT1 as expected. However, an attacker who has potentially | and not CT1 as expected. However, an attacker who has potentially | |||
injected CT1 as the value of CT2 would be able to continue the | injected CT1 as the value of CT2 would be able to continue the | |||
attack. | attack. | |||
Even with additional checks in place, client instances using | Even with additional checks in place, client instances using | |||
interaction finish mechanisms are responsible for checking the | interaction finish mechanisms are responsible for checking the | |||
interaction hash to provide security to the overall system. | interaction hash to provide security to the overall system. | |||
13.26. Storage of Information During Interaction and Continuation | 11.26. Storage of Information during Interaction and Continuation | |||
When starting an interactive grant request, a client application has | When starting an interactive grant request, a client application has | |||
a number of protocol elements that it needs to manage, including | a number of protocol elements that it needs to manage, including | |||
nonces, references, keys, access tokens, and other elements. During | nonces, references, keys, access tokens, and other elements. During | |||
the interaction process, the client instance usually hands control of | the interaction process, the client instance usually hands control of | |||
the user experience over to another component, be it the system | the user experience over to another component, be it the system | |||
browser, another application, or some action the resource owner is | browser, another application, or some action the RO is instructed to | |||
instructed to take on another device. In order for the client | take on another device. In order for the client instance to make its | |||
instance to make its continuation call, it will need to recall all of | continuation call, it will need to recall all of these protocol | |||
these protocol elements at a future time. Usually this means the | elements at a future time. Usually, this means the client instance | |||
client instance will need to store these protocol elements in some | will need to store these protocol elements in some retrievable | |||
retrievable fashion. | fashion. | |||
If the security protocol elements are stored on the end user's | If the security protocol elements are stored on the end user's | |||
device, such as in browser storage or in local application data | device, such as in browser storage or in local application data | |||
stores, capture and exfiltration of this information could allow an | stores, capture and exfiltration of this information could allow an | |||
attacker to continue a pending transaction instead of the client | attacker to continue a pending transaction instead of the client | |||
instance. Client software can make use of secure storage mechanisms, | instance. Client software can make use of secure storage mechanisms, | |||
including hardware-based key and data storage, to prevent such | including hardware-based key and data storage, to prevent such | |||
exfiltration. | exfiltration. | |||
Note that in GNAP, the client instance has to choose its interaction | Note that in GNAP, the client instance has to choose its interaction | |||
finish URI prior to making the first call to the AS. As such, the | finish URI prior to making the first call to the AS. As such, the | |||
interaction finish URI will often have a unique identifier for the | interaction finish URI will often have a unique identifier for the | |||
ongoing request, allowing the client instance to access the correct | ongoing request, allowing the client instance to access the correct | |||
portion of its storage. Since this URI is passed to other parties | portion of its storage. Since this URI is passed to other parties | |||
and often used through a browser, this URI should not contain any | and often used through a browser, this URI should not contain any | |||
security-sensitive information that would be valuable to an attacker, | security-sensitive information that would be valuable to an attacker, | |||
such as any token identifier, nonce, or user information. Instead, a | such as any token identifier, nonce, or user information. Instead, a | |||
cryptographically random value is suggested, and that value should be | cryptographically random value is suggested, and that value should be | |||
used to index into a secure session or storage mechanism. | used to index into a secure session or storage mechanism. | |||
13.27. Denial of Service (DoS) through Grant Continuation | 11.27. Denial of Service (DoS) through Grant Continuation | |||
When a client instance starts off an interactive process, it will | When a client instance starts off an interactive process, it will | |||
eventually need to continue the grant request in a subsequent message | eventually need to continue the grant request in a subsequent message | |||
to the AS. It's possible for a naive client implementation to | to the AS. It's possible for a naive client implementation to | |||
continuously send continuation requests to the AS while waiting for | continuously send continuation requests to the AS while waiting for | |||
approval, especially if no interaction finish method is used. Such | approval, especially if no interaction finish method is used. Such | |||
constant requests could overwhelm the AS's ability to respond to both | constant requests could overwhelm the AS's ability to respond to both | |||
these and other requests. | these and other requests. | |||
To mitigate this for well-behaved client software, the continuation | To mitigate this for well-behaved client software, the continuation | |||
response contains a wait parameter that is intended to tell the | response contains a wait parameter that is intended to tell the | |||
client instance how long it should wait until making its next | client instance how long it should wait until making its next | |||
request. This value can be used to back off client software that is | request. This value can be used to back off client software that is | |||
checking too quickly by returning increasing wait times for a single | checking too quickly by returning increasing wait times for a single | |||
client instance. | client instance. | |||
If client software ignores the wait value and makes its continuation | If client software ignores the wait value and makes its continuation | |||
calls too quickly, or if the client software assumes the absence of | calls too quickly or if the client software assumes the absence of | |||
the wait values means it should poll immediately, the AS can choose | the wait values means it should poll immediately, the AS can choose | |||
to return errors to the offending client instance, including possibly | to return errors to the offending client instance, including possibly | |||
canceling the ongoing grant request. With well-meaning client | canceling the ongoing grant request. With well-meaning client | |||
software these errors can indicate a need to change the client | software, these errors can indicate a need to change the client | |||
software's programmed behavior. | software's programmed behavior. | |||
13.28. Exhaustion of Random Value Space | 11.28. Exhaustion of Random Value Space | |||
Several parts of the GNAP process make use of unguessable randomized | Several parts of the GNAP process make use of unguessable randomized | |||
values, such as nonces, tokens, user codes, and randomized URIs. | values, such as nonces, tokens, user codes, and randomized URIs. | |||
Since these values are intended to be unique, a sufficiently powerful | Since these values are intended to be unique, a sufficiently powerful | |||
attacker could make a large number of requests to trigger generation | attacker could make a large number of requests to trigger generation | |||
of randomized values in an attempt to exhaust the random number | of randomized values in an attempt to exhaust the random number | |||
generation space. While this attack is particularly applicable to | generation space. While this attack is particularly applicable to | |||
the AS, client software could likewise be targeted by an attacker | the AS, client software could likewise be targeted by an attacker | |||
triggering new grant requests against an AS. | triggering new grant requests against an AS. | |||
To mitigate this, software can ensure that its random values are | To mitigate this, software can ensure that its random values are | |||
chosen from a significantly large pool that exhaustion of that pool | chosen from a significantly large pool so that exhaustion of that | |||
is prohibitive for an attacker. Additionally, the random values can | pool is prohibitive for an attacker. Additionally, the random values | |||
be time-boxed in such a way as their validity windows are reasonably | can be time-boxed in such a way that their validity windows are | |||
short. Since many of the random values used within GNAP are used | reasonably short. Since many of the random values used within GNAP | |||
within limited portions of the protocol, it is reasonable for a | are used within limited portions of the protocol, it is reasonable | |||
particular random value to be valid for only a small amount of time. | for a particular random value to be valid for only a small amount of | |||
For example, the nonces used for interaction finish hash calculation | time. For example, the nonces used for interaction finish hash | |||
need only to be valid while the client instance is waiting for the | calculation need only to be valid while the client instance is | |||
finish callback and can be functionally expired when the interaction | waiting for the finish callback and can be functionally expired when | |||
has completed. Similarly, artifacts like access tokens and the | the interaction has completed. Similarly, artifacts like access | |||
interaction reference can be limited to have lifetimes tied to their | tokens and the interaction reference can be limited to have lifetimes | |||
functional utility. Finally, each different category of artifact | tied to their functional utility. Finally, each different category | |||
(nonce, token, reference, identifier, etc.) can be generated from a | of artifact (nonce, token, reference, identifier, etc.) can be | |||
separate random pool of values instead of a single global value | generated from a separate random pool of values instead of a single | |||
space. | global value space. | |||
13.29. Front-channel URIs | 11.29. Front-Channel URIs | |||
Some interaction methods in GNAP make use of URIs accessed through | Some interaction methods in GNAP make use of URIs accessed through | |||
the end user's browser, known collectively as front-channel | the end user's browser, known collectively as front-channel | |||
communication. These URIs are most notably present in the redirect | communication. These URIs are most notably present in the redirect | |||
interaction start method and the redirect interaction finish mode. | interaction start method and the redirect interaction finish mode. | |||
Since these URIs are intended to be given to the end user, the end | Since these URIs are intended to be given to the end user, the end | |||
user and their browser will be subjected to anything hosted at that | user and their browser will be subjected to anything hosted at that | |||
URI including viruses, malware, and phishing scams. This kind of | URI including viruses, malware, and phishing scams. This kind of | |||
risk is inherent to all redirection-based protocols, including GNAP | risk is inherent to all redirection-based protocols, including GNAP, | |||
when used in this way. | when used in this way. | |||
When talking to a new or unknown AS, a client instance might want to | When talking to a new or unknown AS, a client instance might want to | |||
check the URI from the interaction start against a blocklist and warn | check the URI from the interaction start against a blocklist and warn | |||
the end user before redirecting them. Many client instances will | the end user before redirecting them. Many client instances will | |||
provide an interstitial message prior to redirection in order to | provide an interstitial message prior to redirection in order to | |||
prepare the user for control of the user experience being handed to | prepare the user for control of the user experience being handed to | |||
the domain of the AS, and such a method could be used to warn the | the domain of the AS, and such a method could be used to warn the | |||
user of potential threats. For instance, a rogue AS impersonating a | user of potential threats (for instance, a rogue AS impersonating a | |||
well-known service provider. Client software can also prevent this | well-known service provider). Client software can also prevent this | |||
by managing an allowlist of known and trusted AS's. | by managing an allowlist of known and trusted ASes. | |||
Alternatively, an attacker could start a GNAP request with a known | Alternatively, an attacker could start a GNAP request with a known | |||
and trusted AS but include their own attack site URI as the callback | and trusted AS but include their own attack site URI as the callback | |||
for the redirect finish method. The attacker would then send the | for the redirect finish method. The attacker would then send the | |||
interaction start URI to the victim and get them to click on it. | interaction start URI to the victim and get them to click on it. | |||
Since the URI is at the known AS, the victim is inclined to do so. | Since the URI is at the known AS, the victim is inclined to do so. | |||
The victim will then be prompted to approve the attacker's | The victim will then be prompted to approve the attacker's | |||
application, and in most circumstances the victim will then be | application, and in most circumstances, the victim will then be | |||
redirected to the attacker's site whether or not the user approved | redirected to the attacker's site whether or not the user approved | |||
the request. The AS could mitigate this partially by using a | the request. The AS could mitigate this partially by using a | |||
blocklist and allowlist of interaction finish URIs during the client | blocklist and allowlist of interaction finish URIs during the client | |||
instance's initial request, but this approach can be especially | instance's initial request, but this approach can be especially | |||
difficult if the URI has any dynamic portion chosen by the client | difficult if the URI has any dynamic portion chosen by the client | |||
software. The AS can couple these checks with policies associated | software. The AS can couple these checks with policies associated | |||
with the client instance that has been authenticated in the request. | with the client instance that has been authenticated in the request. | |||
If the AS has any doubt about the interaction finish URI, the AS can | If the AS has any doubt about the interaction finish URI, the AS can | |||
provide an interstitial warning to the end user before processing the | provide an interstitial warning to the end user before processing the | |||
redirect. | redirect. | |||
Ultimately, all protocols that use redirect-based communication | Ultimately, all protocols that use redirect-based communication | |||
through the user's browser are susceptible to having an attacker try | through the user's browser are susceptible to having an attacker try | |||
to co-opt one or more of those URIs in order to harm the user. It is | to co-opt one or more of those URIs in order to harm the user. It is | |||
the responsibility of the AS and the client software to provide | the responsibility of the AS and the client software to provide | |||
appropriate warnings, education, and mitigation to protect end users. | appropriate warnings, education, and mitigation to protect end users. | |||
13.30. Processing Assertions | 11.30. Processing Assertions | |||
Identity assertions can be used in GNAP to convey subject | Identity assertions can be used in GNAP to convey subject | |||
information, both from the AS to the client instance in a response | information, both from the AS to the client instance in a response | |||
(Section 3.4) and from the client instance to the AS in a request | (Section 3.4) and from the client instance to the AS in a request | |||
(Section 2.2). In both of these circumstances, when an assertion is | (Section 2.2). In both of these circumstances, when an assertion is | |||
passed in GNAP, the receiver of the assertion needs to parse and | passed in GNAP, the receiver of the assertion needs to parse and | |||
process the assertion. As assertions are complex artifacts with | process the assertion. As assertions are complex artifacts with | |||
their own syntax and security, special care needs to be taken to | their own syntax and security, special care needs to be taken to | |||
prevent the assertion values from being used as an attack vector. | prevent the assertion values from being used as an attack vector. | |||
All assertion processing needs to account for the security aspects of | All assertion processing needs to account for the security aspects of | |||
the assertion format in use. In particular, the processor needs to | the assertion format in use. In particular, the processor needs to | |||
parse the assertion from a JSON string object, and apply the | parse the assertion from a JSON string object and apply the | |||
appropriate cryptographic processes to ensure the integrity of the | appropriate cryptographic processes to ensure the integrity of the | |||
assertion. | assertion. | |||
For example, when SAML 2 assertions are used, the receiver has to | For example, when SAML 2.0 assertions are used, the receiver has to | |||
parse an XML document. There are many well-known security | parse an XML document. There are many well-known security | |||
vulnerabilities in XML parsers, and the XML standard itself can be | vulnerabilities in XML parsers, and the XML standard itself can be | |||
attacked through the use of processing instructions and entity | attacked through the use of processing instructions and entity | |||
expansions to cause problems with the processor. Therefore, any | expansions to cause problems with the processor. Therefore, any | |||
system capable of processing SAML 2 assertions also needs to have a | system capable of processing SAML 2.0 assertions also needs to have a | |||
secure and correct XML parser. In addition to this, the SAML 2 | secure and correct XML parser. In addition to this, the SAML 2.0 | |||
specification uses XML Signatures, which have their own | specification uses XML Signatures, which have their own | |||
implementation problems that need to be accounted for. Similar | implementation problems that need to be accounted for. Similar | |||
requirements exist for OpenID Connect's ID token, which is based on | requirements exist for OpenID Connect ID Token, which is based on the | |||
the JSON Web Token (JWT) format and the related JSON Object Signing | JWT format and the related JOSE cryptography suite. | |||
And Encryption (JOSE) cryptography suite. | ||||
13.31. Stolen Token Replay | 11.31. Stolen Token Replay | |||
If a client instance can request tokens at multiple AS's, and the | If a client instance can request tokens at multiple ASes and the | |||
client instance uses the same keys to make its requests across those | client instance uses the same keys to make its requests across those | |||
different AS's, then it is possible for an attacker to replay a | different ASes, then it is possible for an attacker to replay a | |||
stolen token issued by an honest AS from a compromised AS, thereby | stolen token issued by an honest AS from a compromised AS, thereby | |||
binding the stolen token to the client instance's key in a different | binding the stolen token to the client instance's key in a different | |||
context. The attacker can manipulate the client instance into using | context. The attacker can manipulate the client instance into using | |||
the stolen token at an RS, particularly at an RS that is expecting a | the stolen token at an RS, particularly at an RS that is expecting a | |||
token from the honest AS. Since the honest AS issued the token and | token from the honest AS. Since the honest AS issued the token and | |||
the client instance presents the token with its expected bound key, | the client instance presents the token with its expected bound key, | |||
the attack succeeds. | the attack succeeds. | |||
This attack has several preconditions. In this attack, the attacker | This attack has several preconditions. In this attack, the attacker | |||
does not need access to the client instance's key and cannot use the | does not need access to the client instance's key and cannot use the | |||
stolen token directly at the RS, but the attacker is able to get the | stolen token directly at the RS, but the attacker is able to get the | |||
access token value in some fashion. The client instance also needs | access token value in some fashion. The client instance also needs | |||
to be configured to talk to multiple AS's, including the attacker's | to be configured to talk to multiple ASes, including the attacker's | |||
controlled AS. Finally, the client instance needs to be able to be | controlled AS. Finally, the client instance needs to be able to be | |||
manipulated by the attacker to call the RS while using a token issued | manipulated by the attacker to call the RS while using a token issued | |||
from the stolen AS. The RS does not need to be compromised or made | from the stolen AS. The RS does not need to be compromised or made | |||
to trust the attacker's AS. | to trust the attacker's AS. | |||
To protect against this attack, the client instance can use a | To protect against this attack, the client instance can use a | |||
different key for each AS that it talks to. Since the replayed token | different key for each AS that it talks to. Since the replayed token | |||
will be bound to the key used at the honest AS, the uncompromised RS | will be bound to the key used at the honest AS, the uncompromised RS | |||
will reject the call since the client instance will be using the key | will reject the call since the client instance will be using the key | |||
used at the attacker's AS instead with the same token. When the MTLS | used at the attacker's AS instead with the same token. When the MTLS | |||
key proofing method is used, a client instance can use self-signed | key proofing method is used, a client instance can use self-signed | |||
certificates to use a different key for each AS that it talks to, as | certificates to use a different key for each AS that it talks to, as | |||
discussed in Section 13.4. | discussed in Section 11.4. | |||
Additionally, the client instance can keep a strong association | Additionally, the client instance can keep a strong association | |||
between the RS and a specific AS that it trusts to issue tokens for | between the RS and a specific AS that it trusts to issue tokens for | |||
that RS. This strong binding also helps against some forms of AS | that RS. This strong binding also helps against some forms of AS | |||
mix-up attacks (Section 13.12). Managing this binding is outside the | mix-up attacks (Section 11.12). Managing this binding is outside the | |||
scope of GNAP core, but it can be managed either as a configuration | scope of this specification, but it can be managed either as a | |||
element for the client instance or dynamically through discovering | configuration element for the client instance or dynamically through | |||
the AS from the RS (Section 9.1). | discovering the AS from the RS (Section 9.1). | |||
The details of this attack are available in [HELMSCHMIDT2022] with | The details of this attack, with additional discussion and | |||
additional discussion and considerations. | considerations, are available in Section 3.2 of [HELMSCHMIDT2022]. | |||
13.32. Self-contained Stateless Access Tokens | 11.32. Self-Contained Stateless Access Tokens | |||
The contents and format of the access token are at the discretion of | The contents and format of the access token are at the discretion of | |||
the AS, and are opaque to the client instance within GNAP. As | the AS and are opaque to the client instance within GNAP. As | |||
discussed in the companion document, | discussed in [GNAP-RS], the AS and RS can make use of stateless | |||
[I-D.ietf-gnap-resource-servers], the AS and RS can make use of | access tokens with an internal structure and format. These access | |||
stateless access tokens with an internal structure and format. These | tokens allow an RS to validate the token without having to make any | |||
access tokens allow an RS to validate the token without having to | external calls at runtime, allowing for benefits in some deployments, | |||
make any external calls at runtime, allowing for benefits in some | the discussion of which is outside the scope of this specification. | |||
deployments, the discussion of which are outside the scope of this | ||||
specification. | ||||
However, the use of such self-contained access tokens has an effect | However, the use of such self-contained access tokens has an effect | |||
on the ability of the AS to provide certain functionality defined | on the ability of the AS to provide certain functionality defined | |||
within this specification. Specifically, since the access token is | within this specification. Specifically, since the access token is | |||
self-contained, it is difficult or impossible for an AS to signal to | self-contained, it is difficult or impossible for an AS to signal to | |||
all RS's within an ecosystem when a specific access token has been | all RSs within an ecosystem when a specific access token has been | |||
revoked. Therefore, an AS in such an ecosystem should probably not | revoked. Therefore, an AS in such an ecosystem should probably not | |||
offer token revocation functionality to client instances, since the | offer token revocation functionality to client instances, since the | |||
client instance's calls to such an endpoint is effectively | client instance's calls to such an endpoint are effectively | |||
meaningless. However, a client instance calling the token revocation | meaningless. However, a client instance calling the token revocation | |||
function will also throw out its copy of the token, so such a placebo | function will also throw out its copy of the token, so such a placebo | |||
endpoint might not be completely meaningless. Token rotation | endpoint might not be completely meaningless. Token rotation is | |||
similarly difficult because the AS has to revoke the old access token | similarly difficult because the AS has to revoke the old access token | |||
after a rotation call has been made. If the access tokens are | after a rotation call has been made. If the access tokens are | |||
completely self-contained and non-revocable, this means that there | completely self-contained and non-revocable, this means that there | |||
will be a period of time during which both the old and new access | will be a period of time during which both the old and new access | |||
tokens are valid and usable, which is an increased security risk for | tokens are valid and usable, which is an increased security risk for | |||
the environment. | the environment. | |||
These problems can be mitigated by keeping the validity time windows | These problems can be mitigated by keeping the validity time windows | |||
of self-contained access tokens reasonably short, limiting the time | of self-contained access tokens reasonably short, limiting the time | |||
after a revocation event that a revoked token could be used. | after a revocation event that a revoked token could be used. | |||
Additionally, the AS could proactively signal to RS's under its | Additionally, the AS could proactively signal to RSs under its | |||
control identifiers for revoked tokens that have yet to expire. This | control identifiers for revoked tokens that have yet to expire. This | |||
type of information push would be expected to be relatively small and | type of information push would be expected to be relatively small and | |||
infrequent, and its implementation is outside the scope of this | infrequent, and its implementation is outside the scope of this | |||
specification. | specification. | |||
13.33. Network Problems and Token and Grant Management | 11.33. Network Problems and Token and Grant Management | |||
If a client instance makes a call to rotate an access token but the | If a client instance makes a call to rotate an access token but the | |||
network connection is dropped before the client instance receives the | network connection is dropped before the client instance receives the | |||
response with the new access token, the system as a whole can end up | response with the new access token, the system as a whole can end up | |||
in an inconsistent state, where the AS has already rotated the old | in an inconsistent state, where the AS has already rotated the old | |||
access token and invalidated it, but the client instance only has | access token and invalidated it, but the client instance only has | |||
access to the invalidated access token and not the newly rotated | access to the invalidated access token and not the newly rotated | |||
token value. If the client instance retries the rotation request, it | token value. If the client instance retries the rotation request, it | |||
would fail because the client is no longer presenting a valid and | would fail because the client is no longer presenting a valid and | |||
current access token. A similar situation can occur during grant | current access token. A similar situation can occur during grant | |||
continuation, where the same client instance calls to continue or | continuation, where the same client instance calls to continue or | |||
update a grant request without successfully receiving the results of | update a grant request without successfully receiving the results of | |||
the update. | the update. | |||
To combat this, both grant Management (Section 5) and token | To combat this, both grant management (Section 5) and token | |||
management (Section 6) can be designed to be idempotent, where | management (Section 6) can be designed to be idempotent, where | |||
subsequent calls to the same function with the same credentials are | subsequent calls to the same function with the same credentials are | |||
meant to produce the same results. For example, multiple calls to | meant to produce the same results. For example, multiple calls to | |||
rotate the same access token need to result in the same rotated token | rotate the same access token need to result in the same rotated token | |||
value, within a reasonable time window. | value, within a reasonable time window. | |||
In practice, an AS can hold on to an old token value for such limited | In practice, an AS can hold onto an old token value for such limited | |||
purposes. For example, to support rotating access tokens over | purposes. For example, to support rotating access tokens over | |||
unreliable networks, the AS receives the initial request to rotate an | unreliable networks, the AS receives the initial request to rotate an | |||
access token and creates a new token value and returns it. The AS | access token and creates a new token value and returns it. The AS | |||
also marks the old token value as having been used to create the | also marks the old token value as having been used to create the | |||
newly-rotated token value. If the AS sees the old token value within | newly rotated token value. If the AS sees the old token value within | |||
a small enough time window, such as a few seconds since the first | a small enough time window, such as a few seconds since the first | |||
rotation attempt, the AS can return the same rotated access token | rotation attempt, the AS can return the same rotated access token | |||
value. Furthermore, once the system has seen the newly-rotated token | value. Furthermore, once the system has seen the newly rotated token | |||
in use, the original token can be discarded because the client | in use, the original token can be discarded because the client | |||
instance has proved that it did receive the token. The result of | instance has proved that it did receive the token. The result of | |||
this is a system that is eventually self-consistent without placing | this is a system that is eventually self-consistent without placing | |||
an undue complexity burden on the client instance to manage | an undue complexity burden on the client instance to manage | |||
problematic networks. | problematic networks. | |||
13.34. Server-side Request Forgery (SSRF) | 11.34. Server-Side Request Forgery (SSRF) | |||
There are several places within GNAP where a URI can be given to a | There are several places within GNAP where a URI can be given to a | |||
party causing it to fetch that URI during normal operation of the | party, causing it to fetch that URI during normal operation of the | |||
protocol. If an attacker is able to control the value of one of | protocol. If an attacker is able to control the value of one of | |||
these URIs within the protocol, the attacker could cause the target | these URIs within the protocol, the attacker could cause the target | |||
system to execute a request on a URI that is within reach of the | system to execute a request on a URI that is within reach of the | |||
target system but normally unavailable to the attacker. For example, | target system but normally unavailable to the attacker. Examples | |||
an attacker sending a URL of http://localhost/admin to cause the | include an attacker sending a URL of http://localhost/admin to cause | |||
server to access an internal function on itself, or | the server to access an internal function on itself or | |||
https://192.168.0.14/ to call a service behind a firewall. Even if | https://192.168.0.14/ to call a service behind a firewall. Even if | |||
the attacker does not gain access to the results of the call, the | the attacker does not gain access to the results of the call, the | |||
side effects of such requests coming from a trusted host can be | side effects of such requests coming from a trusted host can be | |||
problematic to the security and sanctity of such otherwise unexposed | problematic to the security and sanctity of such otherwise unexposed | |||
endpoints. This can be particularly problematic if such a URI is | endpoints. This can be particularly problematic if such a URI is | |||
used to call non-HTTP endpoints, such as remote code execution | used to call non-HTTP endpoints, such as remote code execution | |||
services local to the AS. | services local to the AS. | |||
In GNAP, the most vulnerable place in the core protocol is the | The most vulnerable place in this specification is the push-based | |||
push-based post-interaction finish method (Section 4.2.2), as the | post-interaction finish method (Section 4.2.2), as the client | |||
client instance is less trusted than the AS and can use this method | instance is less trusted than the AS and can use this method to make | |||
to make the AS call an arbitrary URI. While it is not required by | the AS call an arbitrary URI. While it is not required by the | |||
the protocol, the AS can fetch other client-instance provided URIs | protocol, the AS can fetch other URIs provided by the client | |||
such as the logo image or home page, for verification or privacy- | instance, such as the logo image or home page, for verification or | |||
preserving purposes before displaying them to the resource owner as | privacy-preserving purposes before displaying them to the RO as part | |||
part of a consent screen. Even if the AS does not fetch these URIs, | of a consent screen. Even if the AS does not fetch these URIs, their | |||
their use in GNAP's normal operation could cause an attack against | use in GNAP's normal operation could cause an attack against the end | |||
the end user's browser as it fetches these same attack URIs. | user's browser as it fetches these same attack URIs. Furthermore, | |||
Furthermore, extensions to GNAP that allow or require URI fetch could | extensions to GNAP that allow or require URI fetch could also be | |||
also be similarly susceptible, such as a system for having the AS | similarly susceptible, such as a system for having the AS fetch a | |||
fetch a client instance's keys from a presented URI instead of the | client instance's keys from a presented URI instead of the client | |||
client instance presenting the key by value. Such extensions are | instance presenting the key by value. Such extensions are outside | |||
outside the scope of this specification, but any system deploying | the scope of this specification, but any system deploying such an | |||
such an extension would need to be aware of this issue. | extension would need to be aware of this issue. | |||
To help mitigate this problem, similar approaches to protecting | To help mitigate this problem, similar approaches that protect | |||
parties against malicious redirects (Section 13.29) can be used. For | parties against malicious redirects (Section 11.29) can be used. For | |||
example, all URIs that can result in a direct request being made by a | example, all URIs that can result in a direct request being made by a | |||
party in the protocol can be filtered through an allowlist or | party in the protocol can be filtered through an allowlist or | |||
blocklist. For example, an AS that supports the push based | blocklist. For example, an AS that supports the push-based | |||
interaction finish can compare the callback URI in the interaction | interaction finish method can compare the callback URI in the | |||
request to a known URI for a pre-registered client instance, or it | interaction request to a known URI for a pre-registered client | |||
can ensure that the URI is not on a blocklist of sensitive URLs such | instance, or it can ensure that the URI is not on a blocklist of | |||
as internal network addresses. However, note that because these | sensitive URLs such as internal network addresses. However, note | |||
types of calls happen outside of the view of human interaction, it is | that because these types of calls happen outside of the view of human | |||
not usually feasible to provide notification and warning to someone | interaction, it is not usually feasible to provide notification and | |||
before the request needs to be executed, as is the case with | warning to someone before the request needs to be executed, as is the | |||
redirection URLs. As such, SSRF is somewhat more difficult to manage | case with redirection URLs. As such, SSRF is somewhat more difficult | |||
at runtime, and systems should generally refuse to fetch a URI if | to manage at runtime, and systems should generally refuse to fetch a | |||
unsure. | URI if unsure. | |||
13.35. Multiple Key Formats | 11.35. Multiple Key Formats | |||
All keys presented by value are allowed to be in only a single | All keys presented by value are only allowed to be in a single | |||
format. While it would seem beneficial to allow keys to be sent in | format. While it would seem beneficial to allow keys to be sent in | |||
multiple formats, in case the receiver doesn't understand one or more | multiple formats in case the receiver doesn't understand one or more | |||
of the formats used, there would be security issues with such a | of the formats used, there are security issues with such a feature. | |||
feature. If multiple keys formats were allowed, receivers of these | If multiple keys formats are allowed, receivers of these key | |||
key definitions would need to be able to make sure that it's the same | definitions would need to be able to make sure that it's the same key | |||
key represented in each field and not simply use one of the key | represented in each field and not simply use one of the key formats | |||
formats without checking for equivalence. If equivalence were not | without checking for equivalence. If equivalence is not carefully | |||
carefully checked, it is possible for an attacker to insert their own | checked, it is possible for an attacker to insert their own key into | |||
key into one of the formats without needing to have control over the | one of the formats without needing to have control over the other | |||
other formats. This could potentially lead to a situation where one | formats. This could potentially lead to a situation where one key is | |||
key is used by part of the system (such as identifying the client | used by part of the system (such as identifying the client instance) | |||
instance) and a different key in a different format in the same | and a different key in a different format in the same message is used | |||
message is used for other things (such as calculating signature | for other things (such as calculating signature validity). However, | |||
validity). However, in such cases, it is impossible for the receiver | in such cases, it is impossible for the receiver to ensure that all | |||
to ensure that all formats contain the same key information since it | formats contain the same key information since it is assumed that the | |||
is assumed that the receiver cannot understand all of the formats. | receiver cannot understand all of the formats. | |||
To combat this, all keys presented by value have to be in exactly one | To combat this, all keys presented by value have to be in exactly one | |||
supported format known by the receiver as discussed in Section 7.1. | supported format known by the receiver as discussed in Section 7.1. | |||
In most cases, a client instance is going to be configured with its | In most cases, a client instance is going to be configured with its | |||
keys in a single format, and it will simply present that format as-is | keys in a single format, and it will simply present that format as is | |||
to the AS in its request. A client instance capable of multiple | to the AS in its request. A client instance capable of multiple | |||
formats can use AS discovery (Section 9) to determine which formats | formats can use AS discovery (Section 9) to determine which formats | |||
are supported, if desired. An AS should be generous in supporting | are supported, if desired. An AS should be generous in supporting | |||
many different key formats to allow different types of client | many different key formats to allow different types of client | |||
software and client instance deployments. An AS implementation | software and client instance deployments. An AS implementation | |||
should try to support multiple formats to allow a variety of client | should try to support multiple formats to allow a variety of client | |||
software to connect. | software to connect. | |||
13.36. Asynchronous Interactions | 11.36. Asynchronous Interactions | |||
GNAP allows the RO to be contacted by the AS asynchronously, outside | GNAP allows the RO to be contacted by the AS asynchronously, outside | |||
the regular flow of the protocol. This allows for some advanced use | the regular flow of the protocol. This allows for some advanced use | |||
cases, such as cross-user authentication or information release, but | cases, such as cross-user authentication or information release, but | |||
such advanced use cases have some distinct issues that implementors | such advanced use cases have some distinct issues that implementors | |||
need to be fully aware of before using these features. | need to be fully aware of before using these features. | |||
First, in many applications, the return of a subject information to | First, in many applications, the return of subject information to the | |||
the client instance could indicate to the client instance that the | client instance could indicate to the client instance that the end | |||
end-user is the party represented by that information, functionally | user is the party represented by that information, functionally | |||
allowing the end-user to authenticate to the client application. | allowing the end user to authenticate to the client application. | |||
While the details of a fully functional authentication protocol are | While the details of a fully functional authentication protocol are | |||
outside the scope of GNAP, it is a common exercise for a client | outside the scope of GNAP, it is a common exercise for a client | |||
instance to be requesting information about the end user. This is | instance to request information about the end user. This is | |||
facilitated by the several interaction methods (Section 4.1) defined | facilitated by several interaction methods (Section 4.1) defined in | |||
in GNAP that allow the end user to begin interaction directly with | GNAP that allow the end user to begin interaction directly with the | |||
the AS. However, when the subject of the information is | AS. However, when the subject of the information is intentionally | |||
intentionally not the end-user, the client application will need some | not the end user, the client application will need some way to | |||
way to differentiate between requests for authentication of the end | differentiate between requests for authentication of the end user and | |||
user and requests for information about a different user. Confusing | requests for information about a different user. Confusing these | |||
these states could lead to an attacker having their account | states could lead to an attacker having their account associated with | |||
associated with a privileged user. Client instances can mitigate | a privileged user. Client instances can mitigate this by having | |||
this by having distinct code paths for primary end user | distinct code paths for primary end-user authentication and for | |||
authentication and requesting subject information about secondary | requesting subject information about secondary users, such as in a | |||
users, such as in a call center. In such use cases, the client | call center. In such use cases, the client software used by the RO | |||
software used by the resource owner (the caller) and the end-user | (the caller) and the end user (the agent) are generally distinct, | |||
(the agent) are generally distinct, allowing the AS to differentiate | allowing the AS to differentiate between the agent's corporate device | |||
between the agent's corporate device making the request and the | making the request and the caller's personal device approving the | |||
caller's personal device approving the request. | request. | |||
Second, RO's interacting asynchronously do not usually have the same | Second, ROs that interact asynchronously do not usually have the same | |||
context as an end user in an application attempting to perform the | context as an end user in an application attempting to perform the | |||
task needing authorization. As such, the asynchronous requests for | task needing authorization. As such, the asynchronous requests for | |||
authorization coming to the RO from the AS might have very little to | authorization coming to the RO from the AS might have very little to | |||
do with what the RO is doing at the time. This situation can | do with what the RO is doing at the time. This situation can | |||
consequently lead to authorization fatigue on the part of the RO, | consequently lead to authorization fatigue on the part of the RO, | |||
where any incoming authorization request is quickly approved and | where any incoming authorization request is quickly approved and | |||
dispatched without the RO making a proper verification of the | dispatched without the RO making a proper verification of the | |||
request. An attacker can exploit this fatigue and get the RO to | request. An attacker can exploit this fatigue and get the RO to | |||
authorize the attacker's system for access. To mitigate this, AS | authorize the attacker's system for access. To mitigate this, AS | |||
systems deploying asynchronous authorization should only prompt the | systems deploying asynchronous authorization should only prompt the | |||
RO when the RO is expecting such a request, and significant user | RO when the RO is expecting such a request, and significant user | |||
experience engineering efforts need to be employed to ensure the RO | experience engineering efforts need to be employed to ensure that the | |||
can clearly make the appropriate security decision. Furthermore, | RO can clearly make the appropriate security decision. Furthermore, | |||
audit capability, and the ability to undo access decisions that may | audit capability and the ability to undo access decisions that may be | |||
be ongoing, is particularly important in the asynchronous case. | ongoing are particularly important in the asynchronous case. | |||
13.37. Compromised RS | 11.37. Compromised RS | |||
An attacker may aim to gain access to confidential or sensitive | An attacker may aim to gain access to confidential or sensitive | |||
resources. The measures for hardening and monitoring resource server | resources. The measures for hardening and monitoring RS systems | |||
systems (beyond protection with access tokens) is out of the scope of | (beyond protection with access tokens) are out of the scope of this | |||
this document, but the use of GNAP to protect a system does not | document, but the use of GNAP to protect a system does not absolve | |||
absolve the resource server of following best practices. GNAP | the RS of following best practices. GNAP generally considers that a | |||
generally considers a breach can occur, and therefore advises to | breach can occur and therefore advises to prefer key-bound tokens | |||
prefer key-bound tokens whenever possible, which at least limits the | whenever possible, which at least limits the impact of access token | |||
impact of access token leakage by a compromised or malicious RS. | leakage by a compromised or malicious RS. | |||
13.38. AS-Provided Token Keys | 11.38. AS-Provided Token Keys | |||
While the most common token issuance pattern is to bind the access | While the most common token-issuance pattern is to bind the access | |||
token to the client instance's presented key, it is possible for the | token to the client instance's presented key, it is possible for the | |||
AS to provide a binding key along with an access token, as shown by | AS to provide a binding key along with an access token, as shown by | |||
the key field of the token response in Section 3.2.1. This practice | the key field of the token response in Section 3.2.1. This practice | |||
allows for an AS to generate and manage the keys associated with | allows for an AS to generate and manage the keys associated with | |||
tokens independently of the keys known to client instances. | tokens independently of the keys known to client instances. | |||
If the key material is returned by value from the AS, then the client | If the key material is returned by value from the AS, then the client | |||
instance will simply use this key value when presenting the token. | instance will simply use this key value when presenting the token. | |||
This can be exploited by an attacker to issue a compromised token to | This can be exploited by an attacker to issue a compromised token to | |||
an unsuspecting client, assuming that the client instance trusts the | an unsuspecting client, assuming that the client instance trusts the | |||
attacker's AS to issue tokens for the target RS. In this attack, the | attacker's AS to issue tokens for the target RS. In this attack, the | |||
attacker first gets a token bound to a key under the attacker's | attacker first gets a token bound to a key under the attacker's | |||
control. This token is likely bound to an authorization or account | control. This token is likely bound to an authorization or account | |||
controlled by the attacker. The attacker then re-issues that same | controlled by the attacker. The attacker then reissues that same | |||
token to the client instance, this time acting as an AS. The | token to the client instance, this time acting as an AS. The | |||
attacker can return their own key to the client instance, tricking | attacker can return their own key to the client instance, tricking | |||
the client instance into using the attacker's token. Such an attack | the client instance into using the attacker's token. Such an attack | |||
is also possible when the key is returned by reference, if the | is also possible when the key is returned by reference, if the | |||
attacker is able to provide a reference meaningful to the client | attacker is able to provide a reference meaningful to the client | |||
instance that references a key under the attacker's control. This | instance that references a key under the attacker's control. This | |||
substitution attack is similar to some of the main issues found with | substitution attack is similar to some of the main issues found with | |||
bearer tokens as discussed in Section 13.9. | bearer tokens as discussed in Section 11.9. | |||
Returning a key with an access token should be limited to only | Returning a key with an access token should be limited to | |||
circumstances where both the client and AS can be verified to be | circumstances where both the client and AS can be verified to be | |||
honest, and further only when the tradeoff of not using a client | honest and when the trade-off of not using a client instance's own | |||
instance's own keys is worth the additional risk. | keys is worth the additional risk. | |||
14. Privacy Considerations | 12. Privacy Considerations | |||
The privacy considerations in this section are modeled after the list | The privacy considerations in this section are modeled after the list | |||
of privacy threats in [RFC6973], "Privacy Considerations for Internet | of privacy threats in "Privacy Considerations for Internet Protocols" | |||
Protocols", and either explain how these threats are mitigated or | [RFC6973] and either explain how these threats are mitigated or | |||
advise how the threats relate to GNAP. | advise how the threats relate to GNAP. | |||
14.1. Surveillance | 12.1. Surveillance | |||
Surveillance is the observation or monitoring of an individual's | Surveillance is the observation or monitoring of an individual's | |||
communications or activities. Surveillance can be conducted by | communications or activities. Surveillance can be conducted by | |||
observers or eavesdroppers at any point along the communications | observers or eavesdroppers at any point along the communications | |||
path. | path. | |||
GNAP assumes the TLS protection used throughout the spec is intact. | GNAP assumes the TLS protection used throughout the spec is intact. | |||
Without the protection of TLS, there are many points throughout the | Without the protection of TLS, there are many points throughout the | |||
use of GNAP that would lead to possible surveillance. Even with the | use of GNAP that could lead to possible surveillance. Even with the | |||
proper use of TLS, surveillance could occur by several parties | proper use of TLS, surveillance could occur by several parties | |||
outside of the TLS-protected channels, as discussed in the sections | outside of the TLS-protected channels, as discussed in the | |||
below. | subsections below. | |||
14.1.1. Surveillance by the Client | 12.1.1. Surveillance by the Client | |||
The purpose of GNAP is to authorize clients to be able to access | The purpose of GNAP is to authorize clients to be able to access | |||
information on behalf of a user. So while it is expected that the | information on behalf of a user. So while it is expected that the | |||
client may be aware of the user's identity as well as data being | client may be aware of the user's identity as well as data being | |||
fetched for that user, in some cases the extent of the client may be | fetched for that user, in some cases, the extent of the client may be | |||
beyond what the user is aware of. For example, a client may be | beyond what the user is aware of. For example, a client may be | |||
implemented as multiple distinct pieces of software, such as a | implemented as multiple distinct pieces of software, such as a | |||
logging service or a mobile app that reports usage data to an | logging service or a mobile application that reports usage data to an | |||
external backend service. Each of these pieces could gain | external backend service. Each of these pieces could gain | |||
information about the user without the user being aware of this | information about the user without the user being aware of this | |||
action. | action. | |||
When the client software uses a hosted asset for its components, such | When the client software uses a hosted asset for its components, such | |||
as its logo image, the fetch of these assets can reveal user actions | as its logo image, the fetch of these assets can reveal user actions | |||
to the host. If the AS presents the logo URI to the resource owner | to the host. If the AS presents the logo URI to the RO in a browser | |||
in a browser page, the browser will fetch the logo URL from the | page, the browser will fetch the logo URL from the authorization | |||
authorization screen. This fetch will tell the host of the logo | screen. This fetch will tell the host of the logo image that someone | |||
image that someone is accessing an instance of the client software | is accessing an instance of the client software and requesting access | |||
and requesting access for it. This is particularly problematic when | for it. This is particularly problematic when the host of the asset | |||
the host of the asset is not the client software itself, such as when | is not the client software itself, such as when a content delivery | |||
a content delivery network is used. | network is used. | |||
14.1.2. Surveillance by the Authorization Server | 12.1.2. Surveillance by the Authorization Server | |||
The role of the authorization server is to manage the authorization | The role of the AS is to manage the authorization of client instances | |||
of client instances to protect access to the user's data. In this | to protect access to the user's data. In this role, the AS is by | |||
role, the authorization server is by definition aware of each | definition aware of each authorization of a client instance by a | |||
authorization of a client instance by a user. When the authorization | user. When the AS shares user information with the client instance, | |||
server shares user information with the client instance, it needs to | it needs to make sure that it has the permission from that user to do | |||
make sure that it has the permission from that user to do so. | so. | |||
Additionally, as part of the authorization grant process, the | Additionally, as part of the authorization grant process, the AS may | |||
authorization server may be aware of which resource servers the | be aware of which RSs the client intends to use an access token at. | |||
client intends to use an access token at. However, it is possible to | However, it is possible to design a system using GNAP in which this | |||
design a system using GNAP in which this knowledge is not made | knowledge is not made available to the AS, such as by avoiding the | |||
available to the authorization server, such as by avoiding the use of | use of the locations object in the authorization request. | |||
the locations object in the authorization request. | ||||
If the authorization server's implementation of access tokens is such | If the AS's implementation of access tokens is such that it requires | |||
that it requires a resource server call back to the authorization | an RS callback to the AS to validate them, then the AS will be aware | |||
server to validate them, then the authorization server will be aware | of which RSs are actively in use and by which users and clients. To | |||
of which resource servers are actively in use and by which users and | avoid this possibility, the AS would need to structure access tokens | |||
which clients. To avoid this possibility, the authorization server | in such a way that they can be validated by the RS without notifying | |||
would need to structure access tokens in such a way that they can be | the AS that the token is being validated. | |||
validated by the resource server without notifying the authorization | ||||
server that the token is being validated. | ||||
14.2. Stored Data | 12.2. Stored Data | |||
Several parties in the GNAP process are expected to persist data at | Several parties in the GNAP process are expected to persist data at | |||
least temporarily, if not semi-permanently, for the normal | least temporarily, if not semi-permanently, for the normal | |||
functioning of the system. If compromised, this could lead to | functioning of the system. If compromised, this could lead to | |||
exposure of sensitive information. This section documents the | exposure of sensitive information. This section documents the | |||
potentially sensitive information each party in GNAP is expected to | potentially sensitive information each party in GNAP is expected to | |||
store for normal operation. Naturally it is possible that any party | store for normal operation. Naturally, it is possible for any party | |||
is storing information for longer than technically necessary of the | to store information related to protocol mechanics (such as audit | |||
protocol mechanics (such as audit logs, etc). | logs, etc.) for longer than is technically necessary. | |||
The authorization server is expected to store subject identifiers for | The AS is expected to store Subject Identifiers for users | |||
users indefinitely, in order to be able to include them in the | indefinitely, in order to be able to include them in the responses to | |||
responses to clients. The authorization server is also expected to | clients. The AS is also expected to store client key identifiers | |||
store client key identifiers associated with display information | associated with display information about the client, such as its | |||
about the client such as its name and logo. | name and logo. | |||
The client is expected to store its client instance key indefinitely, | The client is expected to store its client instance key indefinitely, | |||
in order to authenticate to the authorization server for the normal | in order to authenticate to the AS for the normal functioning of the | |||
functioning of the GNAP flows. Additionally, the client will be | GNAP flows. Additionally, the client will be temporarily storing | |||
temporarily storing artifacts issued by the authorization server | artifacts issued by the AS during a flow, and these artifacts ought | |||
during a flow, and these artifacts ought to be discarded by the | to be discarded by the client when the transaction is complete. | |||
client when the transaction is complete. | ||||
The resource server is not required to store any state for its normal | The RS is not required to store any state for its normal operation, | |||
operation, as far as its part in implementing GNAP. Depending on the | as far as its part in implementing GNAP. Depending on the | |||
implementation of access tokens, the resource server may need to | implementation of access tokens, the RS may need to cache public keys | |||
cache public keys from the authorization server in order to validate | from the AS in order to validate access tokens. | |||
access tokens. | ||||
14.3. Intrusion | 12.3. Intrusion | |||
Intrusion refers to the ability of various parties to send | Intrusion refers to the ability of various parties to send | |||
unsolicited messages or cause denial of service for unrelated | unsolicited messages or cause denial of service for unrelated | |||
parties. | parties. | |||
If the resource owner is different from the end user, there is an | If the RO is different from the end user, there is an opportunity for | |||
opportunity for the end user to cause unsolicited messages to be sent | the end user to cause unsolicited messages to be sent to the RO if | |||
to the resource owner if the system prompts the resource owner for | the system prompts the RO for consent when an end user attempts to | |||
consent when an end user attempts to access their data. | access their data. | |||
The format and contents of subject identifiers are intentionally not | The format and contents of Subject Identifiers are intentionally not | |||
defined by GNAP. If the authorization server uses values for subject | defined by GNAP. If the AS uses values for Subject Identifiers that | |||
identifiers that are also identifiers for communication channels, | are also identifiers for communication channels (e.g., an email | |||
(e.g. an email address or phone number), this opens up the | address or phone number), this opens up the possibility for a client | |||
possibility for a client to learn this information when it was not | to learn this information when it was not otherwise authorized to | |||
otherwise authorized to access this kind of data about the user. | access this kind of data about the user. | |||
14.4. Correlation | 12.4. Correlation | |||
The threat of correlation is the combination of various pieces of | The threat of correlation is the combination of various pieces of | |||
information related to an individual in a way that defies their | information related to an individual in a way that defies their | |||
expectations of what others know about them. | expectations of what others know about them. | |||
14.4.1. Correlation by Clients | 12.4.1. Correlation by Clients | |||
The biggest risk of correlation in GNAP is when an authorization | The biggest risk of correlation in GNAP is when an AS returns stable, | |||
server returns stable consistent user identifiers to multiple | consistent user identifiers to multiple different applications. In | |||
different applications. In this case, applications created by | this case, applications created by different parties would be able to | |||
different parties would be able to correlate these user identifiers | correlate these user identifiers out of band in order to know which | |||
out of band in order to know which users they have in common. | users they have in common. | |||
The most common example of this in practice is tracking for | The most common example of this in practice is tracking for | |||
advertising purposes, such that a client shares their list of user | advertising purposes, such that a client shares their list of user | |||
IDs with an ad platform that is then able to retarget ads to | IDs with an ad platform that is then able to retarget ads to | |||
applications created by other parties. In contrast, a positive | applications created by other parties. In contrast, a positive | |||
example of correlation is a corporate acquisition where two | example of correlation is a corporate acquisition where two | |||
previously unrelated clients now do need to be able to identify the | previously unrelated clients now do need to be able to identify the | |||
same user between the two clients, such as when software systems are | same user between the two clients, such as when software systems are | |||
intentionally connected by the end user. | intentionally connected by the end user. | |||
Another means of correlation comes from the use of RS-first discovery | Another means of correlation comes from the use of RS-first discovery | |||
(Section 9.1). A client instance knowing nothing other than an RS's | (Section 9.1). A client instance that knows nothing other than an | |||
URL could make an unauthenticated call to the RS and learn which AS | RS's URL could make an unauthenticated call to the RS and learn which | |||
protects the resources there. If the client instance knows something | AS protects the resources there. If the client instance knows | |||
about the AS, such as it being a single-user AS or belonging to a | something about the AS, such as it being a single-user AS or | |||
specific organization, the client instance could, through | belonging to a specific organization, the client instance could, | |||
association, learn things about the resource without ever gaining | through association, learn things about the resource without ever | |||
access to the resource itself. | gaining access to the resource itself. | |||
14.4.2. Correlation by Resource Servers | 12.4.2. Correlation by Resource Servers | |||
Unrelated resource servers also have an opportunity to correlate | Unrelated RSs also have an opportunity to correlate users if the AS | |||
users if the authorization server includes stable user identifiers in | includes stable user identifiers in access tokens or in access token | |||
access tokens or in access token introspection responses. | introspection responses. | |||
In some cases a resource server may not actually need to be able to | In some cases, an RS may not actually need to be able to identify | |||
identify users, (such as a resource server providing access to a | users (such as an RS providing access to a company cafeteria menu, | |||
company cafeteria menu which only needs to validate whether the user | which only needs to validate whether the user is a current employee), | |||
is a current employee), so authorization servers should be thoughtful | so ASes should be thoughtful of when user identifiers are actually | |||
of when user identifiers are actually necessary to communicate to | necessary to communicate to RSs for the functioning of the system. | |||
resource servers for the functioning of the system. | ||||
However, note that the lack of inclusion of a user identifier in an | However, note that the lack of inclusion of a user identifier in an | |||
access token may be a risk if there is a concern that two users may | access token may be a risk if there is a concern that two users may | |||
voluntarily share access tokens between them in order to access | voluntarily share access tokens between them in order to access | |||
protected resources. For example, if a website wants to limit access | protected resources. For example, if a website wants to limit access | |||
to only people over 18, and such does not need to know any user | to only people over 18, and such does not need to know any user | |||
identifiers, an access token may be issued by an AS contains only the | identifiers, an access token may be issued by an AS contains only the | |||
claim "over 18". If the user is aware that this access token doesn't | claim "over 18". If the user is aware that this access token doesn't | |||
reference them individually, they may be willing to share the access | reference them individually, they may be willing to share the access | |||
token with a user who is under 18 in order to let them get access to | token with a user who is under 18 in order to let them get access to | |||
the website. (Note that the binding of an access token to a non- | the website. (Note that the binding of an access token to a non- | |||
extractable client instance key also prevents the access token from | extractable client instance key also prevents the access token from | |||
being voluntarily shared.) | being voluntarily shared.) | |||
14.4.3. Correlation by Authorization Servers | 12.4.3. Correlation by Authorization Servers | |||
Clients are expected to be identified by their client instance key. | Clients are expected to be identified by their client instance key. | |||
If a particular client instance key is used at more than one | If a particular client instance key is used at more than one AS, this | |||
authorization server, this could open up the possibility for multiple | could open up the possibility for multiple unrelated ASes to | |||
unrelated authorization servers to correlate client instances. This | correlate client instances. This is especially a problem in the | |||
is especially a problem in the common case where a client instance is | common case where a client instance is used by a single individual, | |||
used by a single individual, as it would allow the authorization | as it would allow the ASes to correlate that individual between them. | |||
servers to correlate that individual between them. If this is a | If this is a concern of a client, the client should use distinct keys | |||
concern of a client, the client should use distinct keys with each | with each AS. | |||
authorization server. | ||||
14.5. Disclosure in Shared References | 12.5. Disclosure in Shared References | |||
Throughout many parts of GNAP, the parties pass shared references | Throughout many parts of GNAP, the parties pass shared references | |||
between each other, sometimes in place of the values themselves. For | between each other, sometimes in place of the values themselves (for | |||
example the interact_ref value used throughout the flow. These | example, the interact_ref value used throughout the flow). These | |||
references are intended to be random strings and should not contain | references are intended to be random strings and should not contain | |||
any private or sensitive data that would potentially leak information | any private or sensitive data that could potentially leak information | |||
between parties. | between parties. | |||
15. References | 13. References | |||
15.1. Normative References | 13.1. Normative References | |||
[BCP195] Best Current Practice 195, | [BCP195] Best Current Practice 195, | |||
<https://www.rfc-editor.org/info/bcp195>. | <https://www.rfc-editor.org/info/bcp195>. | |||
At the time of writing, this BCP comprises the following: | At the time of writing, this BCP comprises the following: | |||
Moriarty, K. and S. Farrell, "Deprecating TLS 1.0 and TLS | Moriarty, K. and S. Farrell, "Deprecating TLS 1.0 and TLS | |||
1.1", BCP 195, RFC 8996, DOI 10.17487/RFC8996, March 2021, | 1.1", BCP 195, RFC 8996, DOI 10.17487/RFC8996, March 2021, | |||
<https://www.rfc-editor.org/info/rfc8996>. | <https://www.rfc-editor.org/info/rfc8996>. | |||
Sheffer, Y., Saint-Andre, P., and T. Fossati, | Sheffer, Y., Saint-Andre, P., and T. Fossati, | |||
"Recommendations for Secure Use of Transport Layer | "Recommendations for Secure Use of Transport Layer | |||
Security (TLS) and Datagram Transport Layer Security | Security (TLS) and Datagram Transport Layer Security | |||
(DTLS)", BCP 195, RFC 9325, DOI 10.17487/RFC9325, November | (DTLS)", BCP 195, RFC 9325, DOI 10.17487/RFC9325, November | |||
2022, <https://www.rfc-editor.org/info/rfc9325>. | 2022, <https://www.rfc-editor.org/info/rfc9325>. | |||
[HASH-ALG] IANA, "Named Information Hash Algorithm Registry", n.d., | [HASH-ALG] IANA, "Named Information Hash Algorithm Registry", | |||
<https://www.iana.org/assignments/named-information/named- | <https://www.iana.org/assignments/named-information/>. | |||
information.xhtml#hash-alg>. | ||||
[HTTP] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, | [HTTP] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, | |||
Ed., "HTTP Semantics", STD 97, RFC 9110, | Ed., "HTTP Semantics", STD 97, RFC 9110, | |||
DOI 10.17487/RFC9110, June 2022, | DOI 10.17487/RFC9110, June 2022, | |||
<https://www.rfc-editor.org/rfc/rfc9110>. | <https://www.rfc-editor.org/info/rfc9110>. | |||
[OIDC] Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and | [OIDC] Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and | |||
C. Mortimore, "OpenID Connect Core 1.0 incorporating | C. Mortimore, "OpenID Connect Core 1.0 incorporating | |||
errata set 1", November 2014, | errata set 2", December 2023, | |||
<https://openid.net/specs/openid-connect-core-1_0.html>. | <https://openid.net/specs/openid-connect-core-1_0.html>. | |||
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
<https://www.rfc-editor.org/rfc/rfc2119>. | <https://www.rfc-editor.org/info/rfc2119>. | |||
[RFC2397] Masinter, L., "The "data" URL scheme", RFC 2397, | [RFC2397] Masinter, L., "The "data" URL scheme", RFC 2397, | |||
DOI 10.17487/RFC2397, August 1998, | DOI 10.17487/RFC2397, August 1998, | |||
<https://www.rfc-editor.org/rfc/rfc2397>. | <https://www.rfc-editor.org/info/rfc2397>. | |||
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: | [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: | |||
Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, | Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, | |||
<https://www.rfc-editor.org/rfc/rfc3339>. | <https://www.rfc-editor.org/info/rfc3339>. | |||
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform | [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform | |||
Resource Identifier (URI): Generic Syntax", STD 66, | Resource Identifier (URI): Generic Syntax", STD 66, | |||
RFC 3986, DOI 10.17487/RFC3986, January 2005, | RFC 3986, DOI 10.17487/RFC3986, January 2005, | |||
<https://www.rfc-editor.org/rfc/rfc3986>. | <https://www.rfc-editor.org/info/rfc3986>. | |||
[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data | [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data | |||
Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, | Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, | |||
<https://www.rfc-editor.org/rfc/rfc4648>. | <https://www.rfc-editor.org/info/rfc4648>. | |||
[RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying | [RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying | |||
Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646, | Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646, | |||
September 2009, <https://www.rfc-editor.org/rfc/rfc5646>. | September 2009, <https://www.rfc-editor.org/info/rfc5646>. | |||
[RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", | [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", | |||
RFC 6749, DOI 10.17487/RFC6749, October 2012, | RFC 6749, DOI 10.17487/RFC6749, October 2012, | |||
<https://www.rfc-editor.org/rfc/rfc6749>. | <https://www.rfc-editor.org/info/rfc6749>. | |||
[RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization | [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization | |||
Framework: Bearer Token Usage", RFC 6750, | Framework: Bearer Token Usage", RFC 6750, | |||
DOI 10.17487/RFC6750, October 2012, | DOI 10.17487/RFC6750, October 2012, | |||
<https://www.rfc-editor.org/rfc/rfc6750>. | <https://www.rfc-editor.org/info/rfc6750>. | |||
[RFC7468] Josefsson, S. and S. Leonard, "Textual Encodings of PKIX, | [RFC7468] Josefsson, S. and S. Leonard, "Textual Encodings of PKIX, | |||
PKCS, and CMS Structures", RFC 7468, DOI 10.17487/RFC7468, | PKCS, and CMS Structures", RFC 7468, DOI 10.17487/RFC7468, | |||
April 2015, <https://www.rfc-editor.org/rfc/rfc7468>. | April 2015, <https://www.rfc-editor.org/info/rfc7468>. | |||
[RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web | [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web | |||
Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May | Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May | |||
2015, <https://www.rfc-editor.org/rfc/rfc7515>. | 2015, <https://www.rfc-editor.org/info/rfc7515>. | |||
[RFC7517] Jones, M., "JSON Web Key (JWK)", RFC 7517, | [RFC7517] Jones, M., "JSON Web Key (JWK)", RFC 7517, | |||
DOI 10.17487/RFC7517, May 2015, | DOI 10.17487/RFC7517, May 2015, | |||
<https://www.rfc-editor.org/rfc/rfc7517>. | <https://www.rfc-editor.org/info/rfc7517>. | |||
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | |||
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | |||
May 2017, <https://www.rfc-editor.org/rfc/rfc8174>. | May 2017, <https://www.rfc-editor.org/info/rfc8174>. | |||
[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data | [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data | |||
Interchange Format", STD 90, RFC 8259, | Interchange Format", STD 90, RFC 8259, | |||
DOI 10.17487/RFC8259, December 2017, | DOI 10.17487/RFC8259, December 2017, | |||
<https://www.rfc-editor.org/rfc/rfc8259>. | <https://www.rfc-editor.org/info/rfc8259>. | |||
[RFC8705] Campbell, B., Bradley, J., Sakimura, N., and T. | [RFC8705] Campbell, B., Bradley, J., Sakimura, N., and T. | |||
Lodderstedt, "OAuth 2.0 Mutual-TLS Client Authentication | Lodderstedt, "OAuth 2.0 Mutual-TLS Client Authentication | |||
and Certificate-Bound Access Tokens", RFC 8705, | and Certificate-Bound Access Tokens", RFC 8705, | |||
DOI 10.17487/RFC8705, February 2020, | DOI 10.17487/RFC8705, February 2020, | |||
<https://www.rfc-editor.org/rfc/rfc8705>. | <https://www.rfc-editor.org/info/rfc8705>. | |||
[RFC9111] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, | [RFC9111] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, | |||
Ed., "HTTP Caching", STD 98, RFC 9111, | Ed., "HTTP Caching", STD 98, RFC 9111, | |||
DOI 10.17487/RFC9111, June 2022, | DOI 10.17487/RFC9111, June 2022, | |||
<https://www.rfc-editor.org/rfc/rfc9111>. | <https://www.rfc-editor.org/info/rfc9111>. | |||
[RFC9421] Backman, A., Ed., Richer, J., Ed., and M. Sporny, "HTTP | [RFC9421] Backman, A., Ed., Richer, J., Ed., and M. Sporny, "HTTP | |||
Message Signatures", RFC 9421, DOI 10.17487/RFC9421, | Message Signatures", RFC 9421, DOI 10.17487/RFC9421, | |||
February 2024, <https://www.rfc-editor.org/rfc/rfc9421>. | February 2024, <https://www.rfc-editor.org/info/rfc9421>. | |||
[RFC9493] Backman, A., Ed., Scurtescu, M., and P. Jain, "Subject | [RFC9493] Backman, A., Ed., Scurtescu, M., and P. Jain, "Subject | |||
Identifiers for Security Event Tokens", RFC 9493, | Identifiers for Security Event Tokens", RFC 9493, | |||
DOI 10.17487/RFC9493, December 2023, | DOI 10.17487/RFC9493, December 2023, | |||
<https://www.rfc-editor.org/rfc/rfc9493>. | <https://www.rfc-editor.org/info/rfc9493>. | |||
[RFC9530] Polli, R. and L. Pardue, "Digest Fields", RFC 9530, | [RFC9530] Polli, R. and L. Pardue, "Digest Fields", RFC 9530, | |||
DOI 10.17487/RFC9530, February 2024, | DOI 10.17487/RFC9530, February 2024, | |||
<https://www.rfc-editor.org/rfc/rfc9530>. | <https://www.rfc-editor.org/info/rfc9530>. | |||
[SAML2] Cantor, S., Kemp, J., Philpott, R., and E. Maler, | [SAML2] Cantor, S., Ed., Kemp, J., Ed., Philpott, R., Ed., and E. | |||
"Assertions and Protocol for the OASIS Security Assertion | Maler, Ed., "Assertions and Protocol for the OASIS | |||
Markup Language (SAML) V2.0", March 2005, | Security Assertion Markup Language (SAML) V2.0", OASIS | |||
<https://docs.oasis-open.org/security/saml/v2.0/saml-core- | Standard, March 2005, <https://docs.oasis- | |||
2.0-os.pdf>. | open.org/security/saml/v2.0/saml-core-2.0-os.pdf>. | |||
15.2. Informative References | 13.2. Informative References | |||
[Auth-Schemes] | ||||
IANA, "HTTP Authentication Schemes", | ||||
<https://www.iana.org/assignments/http-authschemes>. | ||||
[AXELAND2021] | [AXELAND2021] | |||
Axeland, Å. and O. Oueidat, "Security Analysis of Attack | Axeland, Å. and O. Oueidat, "Security Analysis of Attack | |||
Surfaces on the Grant Negotiation and Authorization | Surfaces on the Grant Negotiation and Authorization | |||
Protocol", 2021, | Protocol", Master's thesis, Department of Computer Science | |||
<https://odr.chalmers.se/handle/20.500.12380/304105>. | and Engineering, Chalmers University of Technology and | |||
University of Gothenburg, 2021, | ||||
<https://hdl.handle.net/20.500.12380/304105>. | ||||
[HELMSCHMIDT2022] | [GNAP-REG] IANA, "Grant Negotiation and Authorization Protocol | |||
Helmschmidt, F., "Security Analysis of the Grant | (GNAP)", <https://www.iana.org/assignments/gnap>. | |||
Negotiation and Authorization Protocol", 2022, | ||||
<http://dx.doi.org/10.18419/opus-12203>. | ||||
[I-D.ietf-gnap-resource-servers] | [GNAP-RS] Richer, J., Ed. and F. Imbault, "Grant Negotiation and | |||
Richer, J. and F. Imbault, "Grant Negotiation and | ||||
Authorization Protocol Resource Server Connections", Work | Authorization Protocol Resource Server Connections", Work | |||
in Progress, Internet-Draft, draft-ietf-gnap-resource- | in Progress, Internet-Draft, draft-ietf-gnap-resource- | |||
servers-05, 19 February 2024, | servers-09, 23 September 2024, | |||
<https://datatracker.ietf.org/doc/html/draft-ietf-gnap- | <https://datatracker.ietf.org/doc/html/draft-ietf-gnap- | |||
resource-servers-05>. | resource-servers-09>. | |||
[I-D.ietf-oauth-security-topics] | [HELMSCHMIDT2022] | |||
Helmschmidt, F., "Security Analysis of the Grant | ||||
Negotiation and Authorization Protocol", Master's thesis, | ||||
Institute of Information Security, University of Stuggart, | ||||
DOI 10.18419/opus-12203, 2022, | ||||
<http://dx.doi.org/10.18419/opus-12203>. | ||||
[MediaTypes] | ||||
IANA, "Media Types", | ||||
<https://www.iana.org/assignments/media-types>. | ||||
[OAUTH-SEC-TOPICS] | ||||
Lodderstedt, T., Bradley, J., Labunets, A., and D. Fett, | Lodderstedt, T., Bradley, J., Labunets, A., and D. Fett, | |||
"OAuth 2.0 Security Best Current Practice", Work in | "OAuth 2.0 Security Best Current Practice", Work in | |||
Progress, Internet-Draft, draft-ietf-oauth-security- | Progress, Internet-Draft, draft-ietf-oauth-security- | |||
topics-25, 8 February 2024, | topics-29, 3 June 2024, | |||
<https://datatracker.ietf.org/doc/html/draft-ietf-oauth- | <https://datatracker.ietf.org/doc/html/draft-ietf-oauth- | |||
security-topics-25>. | security-topics-29>. | |||
[IANA.MediaTypes] | ||||
IANA, "Media Types", n.d., | ||||
<https://www.iana.org/assignments/media-types/media- | ||||
types.xhtml>. | ||||
[promise-theory] | [promise-theory] | |||
Burgess, M. and J. Bergstra, "Promise theory", January | Bergstra, J. and M. Burgess, "Promise Theory: Principles | |||
2014, <http://markburgess.org/promises.html>. | and Applications", Second Edition, XtAxis Press, 2019, | |||
<http://markburgess.org/promises.html>. | ||||
[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail | [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail | |||
Extensions (MIME) Part Two: Media Types", RFC 2046, | Extensions (MIME) Part Two: Media Types", RFC 2046, | |||
DOI 10.17487/RFC2046, November 1996, | DOI 10.17487/RFC2046, November 1996, | |||
<https://www.rfc-editor.org/rfc/rfc2046>. | <https://www.rfc-editor.org/info/rfc2046>. | |||
[RFC4107] Bellovin, S. and R. Housley, "Guidelines for Cryptographic | [RFC4107] Bellovin, S. and R. Housley, "Guidelines for Cryptographic | |||
Key Management", BCP 107, RFC 4107, DOI 10.17487/RFC4107, | Key Management", BCP 107, RFC 4107, DOI 10.17487/RFC4107, | |||
June 2005, <https://www.rfc-editor.org/rfc/rfc4107>. | June 2005, <https://www.rfc-editor.org/info/rfc4107>. | |||
[RFC6202] Loreto, S., Saint-Andre, P., Salsano, S., and G. Wilkins, | [RFC6202] Loreto, S., Saint-Andre, P., Salsano, S., and G. Wilkins, | |||
"Known Issues and Best Practices for the Use of Long | "Known Issues and Best Practices for the Use of Long | |||
Polling and Streaming in Bidirectional HTTP", RFC 6202, | Polling and Streaming in Bidirectional HTTP", RFC 6202, | |||
DOI 10.17487/RFC6202, April 2011, | DOI 10.17487/RFC6202, April 2011, | |||
<https://www.rfc-editor.org/rfc/rfc6202>. | <https://www.rfc-editor.org/info/rfc6202>. | |||
[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type | [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type | |||
Specifications and Registration Procedures", BCP 13, | Specifications and Registration Procedures", BCP 13, | |||
RFC 6838, DOI 10.17487/RFC6838, January 2013, | RFC 6838, DOI 10.17487/RFC6838, January 2013, | |||
<https://www.rfc-editor.org/rfc/rfc6838>. | <https://www.rfc-editor.org/info/rfc6838>. | |||
[RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., | [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., | |||
Morris, J., Hansen, M., and R. Smith, "Privacy | Morris, J., Hansen, M., and R. Smith, "Privacy | |||
Considerations for Internet Protocols", RFC 6973, | Considerations for Internet Protocols", RFC 6973, | |||
DOI 10.17487/RFC6973, July 2013, | DOI 10.17487/RFC6973, July 2013, | |||
<https://www.rfc-editor.org/rfc/rfc6973>. | <https://www.rfc-editor.org/info/rfc6973>. | |||
[RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, | [RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, | |||
DOI 10.17487/RFC7518, May 2015, | DOI 10.17487/RFC7518, May 2015, | |||
<https://www.rfc-editor.org/rfc/rfc7518>. | <https://www.rfc-editor.org/info/rfc7518>. | |||
[RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for | [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for | |||
Writing an IANA Considerations Section in RFCs", BCP 26, | Writing an IANA Considerations Section in RFCs", BCP 26, | |||
RFC 8126, DOI 10.17487/RFC8126, June 2017, | RFC 8126, DOI 10.17487/RFC8126, June 2017, | |||
<https://www.rfc-editor.org/rfc/rfc8126>. | <https://www.rfc-editor.org/info/rfc8126>. | |||
[RFC8264] Saint-Andre, P. and M. Blanchet, "PRECIS Framework: | [RFC8264] Saint-Andre, P. and M. Blanchet, "PRECIS Framework: | |||
Preparation, Enforcement, and Comparison of | Preparation, Enforcement, and Comparison of | |||
Internationalized Strings in Application Protocols", | Internationalized Strings in Application Protocols", | |||
RFC 8264, DOI 10.17487/RFC8264, October 2017, | RFC 8264, DOI 10.17487/RFC8264, October 2017, | |||
<https://www.rfc-editor.org/rfc/rfc8264>. | <https://www.rfc-editor.org/info/rfc8264>. | |||
[RFC8707] Campbell, B., Bradley, J., and H. Tschofenig, "Resource | [RFC8707] Campbell, B., Bradley, J., and H. Tschofenig, "Resource | |||
Indicators for OAuth 2.0", RFC 8707, DOI 10.17487/RFC8707, | Indicators for OAuth 2.0", RFC 8707, DOI 10.17487/RFC8707, | |||
February 2020, <https://www.rfc-editor.org/rfc/rfc8707>. | February 2020, <https://www.rfc-editor.org/info/rfc8707>. | |||
[RFC8792] Watsen, K., Auerswald, E., Farrel, A., and Q. Wu, | [RFC8792] Watsen, K., Auerswald, E., Farrel, A., and Q. Wu, | |||
"Handling Long Lines in Content of Internet-Drafts and | "Handling Long Lines in Content of Internet-Drafts and | |||
RFCs", RFC 8792, DOI 10.17487/RFC8792, June 2020, | RFCs", RFC 8792, DOI 10.17487/RFC8792, June 2020, | |||
<https://www.rfc-editor.org/rfc/rfc8792>. | <https://www.rfc-editor.org/info/rfc8792>. | |||
[RFC9396] Lodderstedt, T., Richer, J., and B. Campbell, "OAuth 2.0 | [RFC9396] Lodderstedt, T., Richer, J., and B. Campbell, "OAuth 2.0 | |||
Rich Authorization Requests", RFC 9396, | Rich Authorization Requests", RFC 9396, | |||
DOI 10.17487/RFC9396, May 2023, | DOI 10.17487/RFC9396, May 2023, | |||
<https://www.rfc-editor.org/rfc/rfc9396>. | <https://www.rfc-editor.org/info/rfc9396>. | |||
[RFC9440] Campbell, B. and M. Bishop, "Client-Cert HTTP Header | [RFC9440] Campbell, B. and M. Bishop, "Client-Cert HTTP Header | |||
Field", RFC 9440, DOI 10.17487/RFC9440, July 2023, | Field", RFC 9440, DOI 10.17487/RFC9440, July 2023, | |||
<https://www.rfc-editor.org/rfc/rfc9440>. | <https://www.rfc-editor.org/info/rfc9440>. | |||
[RFC9525] Saint-Andre, P. and R. Salz, "Service Identity in TLS", | [RFC9525] Saint-Andre, P. and R. Salz, "Service Identity in TLS", | |||
RFC 9525, DOI 10.17487/RFC9525, November 2023, | RFC 9525, DOI 10.17487/RFC9525, November 2023, | |||
<https://www.rfc-editor.org/rfc/rfc9525>. | <https://www.rfc-editor.org/info/rfc9525>. | |||
[SP80063C] Grassi, P., Nadeau, E., Richer, J., Squire, S., Fenton, | [SP80063C] Grassi, P., Richer, J., Squire, S., Fenton, J., Nadeau, | |||
J., Lefkovitz, N., Danker, J., Choong, Y., Greene, K., and | E., Lefkovitz, N., Danker, J., Choong, Y., Greene, K., and | |||
M. Theofanos, "Digital Identity Guidelines: Federation and | M. Theofanos, "Digital Identity Guidelines: Federation and | |||
Assertions", June 2017, | Assertions", NIST SP 800-63C, DOI 10.6028/NIST.SP.800-63c, | |||
<https://doi.org/10.6028/NIST.SP.800-63c>. | June 2017, | |||
<https://nvlpubs.nist.gov/nistpubs/SpecialPublications/ | ||||
Appendix A. Document History | NIST.SP.800-63c.pdf>. | |||
Note: To be removed by RFC editor before publication. | ||||
* 19 | ||||
- Updates from IESG reviews. | ||||
- Updated JOSE types to no longer use subtypes. | ||||
- Added media type registrations. | ||||
* 18 | ||||
- Updates from IESG reviews. | ||||
* 17 | ||||
- Updates from IESG reviews. | ||||
* 16 | ||||
- Updates from AD review. | ||||
- Added security considerations on token substitution attack. | ||||
* 15 | ||||
- Editorial updates from shepherd review. | ||||
- Clarify character set constraints of user codes. | ||||
* 14 | ||||
- Update token rotation to use URI + management token. | ||||
- Fix key rotation with HTTP Signatures based on security | ||||
analysis. | ||||
* -13 | ||||
- Editoral changes from chair review. | ||||
- Clarify that user codes are ungessable. | ||||
- Fix user code examples. | ||||
- Clarify expectations for extensions to interaction start and | ||||
finish methods. | ||||
- Fix references. | ||||
- Add IANA designated expert instructions. | ||||
- Clarify new vs. updated access tokens, and call out no need for | ||||
refresh tokens in OAuth 2 comparison section. | ||||
- Add instructions on assertion processing. | ||||
- Explicitly list user reference lifetime management. | ||||
* -12 | ||||
- Make default hash algorithm SHA256 instead of SHA3-512. | ||||
- Remove previous_key from key rotation. | ||||
- Defined requirements for key rotation methods. | ||||
- Add specificity to context of subject identifier being the AS. | ||||
- Editorial updates and protocol clarification. | ||||
* -11 | ||||
- Error as object or string, more complete set of error codes | ||||
- Added key rotation in token management. | ||||
- Restrict keys to a single format per message. | ||||
- Discussed security issues of multiple key formats. | ||||
- Make token character set more strict. | ||||
- Add note on long-polling in continuation requests. | ||||
- Removed "Models" section. | ||||
- Rewrote guidance and requirements for extensions. | ||||
- Require all URIs to be absolute throughout protocol. | ||||
- Make response from RS a "SHOULD" instead of a "MAY". | ||||
- Added a way for the client instance to ask for a specific | ||||
user's information, separate from the end-user. | ||||
- Added security considerations for asynchronous authorization. | ||||
- Added security considerations for compromised RS. | ||||
- Added interoperability profiles. | ||||
- Added implementation status section. | ||||
* -10 | ||||
- Added note on relating access rights sent as strings to rights | ||||
sent as objects. | ||||
- Expand proofing methods to allow definition by object, with | ||||
single string as optimization for common cases. | ||||
- Removed "split_token" functionality. | ||||
- Collapse "user_code" into a string instead of an object. | ||||
- References hash algorithm identifiers from the existing IANA | ||||
registry | ||||
- Allow interaction responses to time out. | ||||
- Added explicit protocol state discussion. | ||||
- Added RO policy use case. | ||||
* -09 | ||||
- Added security considerations on redirection status codes. | ||||
- Added security considerations on cuckoo token attack. | ||||
- Made token management URL required on token rotation. | ||||
- Added considerations on token rotation and self-contained | ||||
tokens. | ||||
- Added security considerations for SSRF. | ||||
- Moved normative requirements about end user presence to | ||||
security considerations. | ||||
- Clarified default wait times for continuation requests | ||||
(including polling). | ||||
- Clarified URI vs. URL. | ||||
- Added "user_code_uri" mode, removed "uri" from "user_code" | ||||
mode. | ||||
- Consistently formatted all parameter lists. | ||||
- Updated examples for HTTP Signatures. | ||||
* -08 | ||||
- Update definition for "Client" to account for the case of no | ||||
end user. | ||||
- Change definition for "Subject". | ||||
- Expanded security and privacy considerations for more | ||||
situations. | ||||
- Added cross-links from security and privacy considerations. | ||||
- Editorial updates. | ||||
* -07 | ||||
- Replace user handle by opaque identifier | ||||
- Added trust relationships | ||||
- Added privacy considerations section | ||||
- Added security considerations. | ||||
* -06 | ||||
- Removed "capabilities" and "existing_grant" protocol fields. | ||||
- Removed separate "instance_id" field. | ||||
- Split "interaction_methods_supported" into | ||||
"interaction_start_modes_supported" and | ||||
"interaction_finish_methods_supported". | ||||
- Added AS endpoint to hash calculation to fix mix-up attack. | ||||
- Added "privileges" field to resource access request object. | ||||
- Moved client-facing RS response back from GNAP-RS document. | ||||
- Removed oauthpop key binding. | ||||
- Removed dpop key binding. | ||||
- Added example DID identifier. | ||||
- Changed token response booleans to flag structure to match | ||||
request. | ||||
- Updated signature examples to use HTTP Message Signatures. | ||||
* -05 | ||||
- Changed "interaction_methods" to | ||||
"interaction_methods_supported". | ||||
- Changed "key_proofs" to "key_proofs_supported". | ||||
- Changed "assertions" to "assertions_supported". | ||||
- Updated discovery and field names for subject formats. | ||||
- Add an appendix to provide protocol rationale, compared to | ||||
OAuth2. | ||||
- Updated subject information definition. | ||||
- Refactored the RS-centric components into a new document. | ||||
- Updated cryptographic proof of possession methods to match | ||||
current reference syntax. | ||||
- Updated proofing language to use "signer" and "verifier" | ||||
generically. | ||||
- Updated cryptographic proof of possession examples. | ||||
- Editorial cleanup and fixes. | ||||
- Diagram cleanup and fixes. | ||||
* -04 | ||||
- Updated terminology. | ||||
- Refactored key presentation and binding. | ||||
- Refactored "interact" request to group start and end modes. | ||||
- Changed access token request and response syntax. | ||||
- Changed DPoP digest field to 'htd' to match proposed FAPI | ||||
profile. | ||||
- Include the access token hash in the DPoP message. | ||||
- Removed closed issue links. | ||||
- Removed function to read state of grant request by client. | ||||
- Closed issues related to reading and updating access tokens. | ||||
* -03 | ||||
- Changed "resource client" terminology to separate "client | ||||
instance" and "client software". | ||||
- Removed OpenID Connect "claims" parameter. | ||||
- Dropped "short URI" redirect. | ||||
- Access token is mandatory for continuation. | ||||
- Removed closed issue links. | ||||
- Editorial fixes. | ||||
* -02 | ||||
- Moved all "editor's note" items to GitHub Issues. | ||||
- Added JSON types to fields. | ||||
- Changed "GNAP Protocol" to "GNAP". | ||||
- Editorial fixes. | ||||
* -01 | ||||
- "updated_at" subject info timestamp now in ISO 8601 string | ||||
format. | ||||
- Editorial fixes. | ||||
- Added Aaron and Fabien as document authors. | ||||
* -00 | ||||
- Initial working group draft. | [Subj-ID-Formats] | |||
IANA, "Subject Identifier Formats", | ||||
<https://www.iana.org/assignments/secevent>. | ||||
Appendix B. Compared to OAuth 2.0 | Appendix A. Comparison with OAuth 2.0 | |||
GNAP's protocol design differs from OAuth 2.0's in several | GNAP's protocol design differs from OAuth 2.0's in several | |||
fundamental ways: | fundamental ways: | |||
1. *Consent and authorization flexibility:* | 1. *Consent and authorization flexibility:* | |||
OAuth 2.0 generally assumes the user has access to a web browser. | OAuth 2.0 generally assumes the user has access to a web browser. | |||
The type of interaction available is fixed by the grant type, and | The type of interaction available is fixed by the grant type, and | |||
the most common interactive grant types start in the browser. | the most common interactive grant types start in the browser. | |||
OAuth 2.0 assumes that the user using the client software is the | OAuth 2.0 assumes that the user using the client software is the | |||
same user that will interact with the AS to approve access. | same user that will interact with the AS to approve access. | |||
GNAP allows various patterns to manage authorizations and | GNAP allows various patterns to manage authorizations and | |||
consents required to fulfill this requested delegation, including | consents required to fulfill this requested delegation, including | |||
information sent by the client instance, information supplied by | information sent by the client instance, information supplied by | |||
external parties, and information gathered through the | external parties, and information gathered through the | |||
interaction process. GNAP allows a client instance to list | interaction process. GNAP allows a client instance to list | |||
different ways that it can start and finish an interaction, and | different ways that it can start and finish an interaction, and | |||
these can be mixed together as needed for different use cases. | these can be mixed together as needed for different use cases. | |||
GNAP interactions can use a browser, but don't have to. Methods | GNAP interactions can use a browser, but they don't have to. | |||
can use inter-application messaging protocols, out-of-band data | Methods can use inter-application messaging protocols, out-of- | |||
transfer, or anything else. GNAP allows extensions to define new | band data transfer, or anything else. GNAP allows extensions to | |||
ways to start and finish an interaction, as new methods and | define new ways to start and finish an interaction, as new | |||
platforms are expected to become available over time. GNAP is | methods and platforms are expected to become available over time. | |||
designed to allow the end user and the resource owner to be two | GNAP is designed to allow the end user and the RO to be two | |||
different people, but still works in the optimized case of them | different people, but it still works in the optimized case of | |||
being the same party. | them being the same party. | |||
2. *Intent registration and inline negotiation:* | 2. *Intent registration and inline negotiation:* | |||
OAuth 2.0 uses different "grant types" that start at different | OAuth 2.0 uses different "grant types" that start at different | |||
endpoints for different purposes. Many of these require | endpoints for different purposes. Many of these require | |||
discovery of several interrelated parameters. | discovery of several interrelated parameters. | |||
GNAP requests all start with the same type of request to the same | GNAP requests all start with the same type of request to the same | |||
endpoint at the AS. Next steps are negotiated between the client | endpoint at the AS. Next steps are negotiated between the client | |||
instance and AS based on software capabilities, policies | instance and AS based on software capabilities, policies | |||
surrounding requested access, and the overall context of the | surrounding requested access, and the overall context of the | |||
ongoing request. GNAP defines a continuation API that allows the | ongoing request. GNAP defines a continuation API that allows the | |||
client instance and AS to request and send additional information | client instance and AS to request and send additional information | |||
from each other over multiple steps. This continuation API uses | from each other over multiple steps. This continuation API uses | |||
the same access token protection that other GNAP-protected APIs | the same access token protection that other GNAP-protected APIs | |||
use. GNAP allows discovery to optimize the requests but it isn't | use. GNAP allows discovery to optimize the requests, but it | |||
required thanks to the negotiation capabilities. | isn't required thanks to the negotiation capabilities. | |||
GNAP is able to handle the life-cycle of an authorization | GNAP is able to handle the life cycle of an authorization request | |||
request, and therefore simplifies the mental model surrounding | and therefore simplifies the mental model surrounding OAuth2. | |||
OAuth2. For instance, there's no need for refresh tokens when | For instance, there's no need for refresh tokens when the API | |||
the API enables proper rotation of access tokens. | enables proper rotation of access tokens. | |||
3. *Client instances:* | 3. *Client instances:* | |||
OAuth 2.0 requires all clients to be registered at the AS and to | OAuth 2.0 requires all clients to be registered at the AS and to | |||
use a client_id known to the AS as part of the protocol. This | use a client_id known to the AS as part of the protocol. This | |||
client_id is generally assumed to be assigned by a trusted | client_id is generally assumed to be assigned by a trusted | |||
authority during a registration process, and OAuth places a lot | authority during a registration process, and OAuth places a lot | |||
of trust on the client_id as a result. Dynamic registration | of trust on the client_id as a result. Dynamic registration | |||
allows different classes of clients to get a client_id at | allows different classes of clients to get a client_id at | |||
runtime, even if they only ever use it for one request. | runtime, even if they only ever use it for one request. | |||
skipping to change at page 216, line 49 ¶ | skipping to change at line 9365 ¶ | |||
client instance identifier mechanism allows for pre-registered | client instance identifier mechanism allows for pre-registered | |||
clients and dynamically registered clients to exist as an | clients and dynamically registered clients to exist as an | |||
optimized case without requiring the identifier as part of the | optimized case without requiring the identifier as part of the | |||
protocol at all times. | protocol at all times. | |||
4. *Expanded delegation:* | 4. *Expanded delegation:* | |||
OAuth 2.0 defines the "scope" parameter for controlling access to | OAuth 2.0 defines the "scope" parameter for controlling access to | |||
APIs. This parameter has been coopted to mean a number of | APIs. This parameter has been coopted to mean a number of | |||
different things in different protocols, including flags for | different things in different protocols, including flags for | |||
turning special behavior on and off, including the return of data | turning special behavior on and off and the return of data apart | |||
apart from the access token. The "resource" indicator (defined | from the access token. The "resource" indicator (defined in | |||
in [RFC8707]) and RAR extensions (as defined in [RFC9396]) expand | [RFC8707]) and Rich Authorization Request (RAR) extensions (as | |||
on the "scope" concept in similar but different ways. | defined in [RFC9396]) expand on the "scope" concept in similar | |||
but different ways. | ||||
GNAP defines a rich structure for requesting access (analogous to | GNAP defines a rich structure for requesting access (analogous to | |||
RAR), with string references as an optimization (analogous to | RAR), with string references as an optimization (analogous to | |||
scopes). GNAP defines methods for requesting directly-returned | scopes). GNAP defines methods for requesting directly returned | |||
user information, separate from API access. This information | user information, separate from API access. This information | |||
includes identifiers for the current user and structured | includes identifiers for the current user and structured | |||
assertions. The core GNAP protocol makes no assumptions or | assertions. GNAP makes no assumptions or demands on the format | |||
demands on the format or contents of the access token, but the RS | or contents of the access token, but the RS extension allows a | |||
extension allows a negotiation of token formats between the AS | negotiation of token formats between the AS and RS. | |||
and RS. | ||||
5. *Cryptography-based security:* | 5. *Cryptography-based security:* | |||
OAuth 2.0 uses shared bearer secrets, including the client_secret | OAuth 2.0 uses shared bearer secrets, including the client_secret | |||
and access token, and advanced authentication and sender | and access token, and advanced authentication and sender | |||
constraint have been built on after the fact in inconsistent | constraints have been built on after the fact in inconsistent | |||
ways. | ways. | |||
In GNAP, all communication between the client instance and AS is | In GNAP, all communication between the client instance and AS is | |||
bound to a key held by the client instance. GNAP uses the same | bound to a key held by the client instance. GNAP uses the same | |||
cryptographic mechanisms for both authenticating the client (to | cryptographic mechanisms for both authenticating the client (to | |||
the AS) and binding the access token (to the RS and the AS). | the AS) and binding the access token (to the RS and the AS). | |||
GNAP allows extensions to define new cryptographic protection | GNAP allows extensions to define new cryptographic protection | |||
mechanisms, as new methods are expected to become available over | mechanisms, as new methods are expected to become available over | |||
time. GNAP does not have a notion of "public clients" because | time. GNAP does not have the notion of "public clients" because | |||
key information can always be sent and used dynamically. | key information can always be sent and used dynamically. | |||
6. *Privacy and usable security:* | 6. *Privacy and usable security:* | |||
OAuth 2.0's deployment model assumes a strong binding between the | OAuth 2.0's deployment model assumes a strong binding between the | |||
AS and the RS. | AS and the RS. | |||
GNAP is designed to be interoperable with decentralized identity | GNAP is designed to be interoperable with decentralized identity | |||
standards and to provide a human-centric authorization layer. In | standards and to provide a human-centric authorization layer. In | |||
addition to the core protocol, GNAP supports various patterns of | addition to this specification, GNAP supports various patterns of | |||
communication between RSs and ASs through extensions. GNAP tries | communication between RSs and ASes through extensions. GNAP | |||
to limit the odds of a consolidation to just a handful of super- | tries to limit the odds of a consolidation to just a handful of | |||
popular AS services. | popular AS services. | |||
Appendix C. Example Protocol Flows | Appendix B. Example Protocol Flows | |||
The protocol defined in this specification provides a number of | The protocol defined in this specification provides a number of | |||
features that can be combined to solve many different kinds of | features that can be combined to solve many different kinds of | |||
authentication scenarios. This section seeks to show examples of how | authentication scenarios. This section seeks to show examples of how | |||
the protocol would be applied for different situations. | the protocol could be applied for different situations. | |||
Some longer fields, particularly cryptographic information, have been | Some longer fields, particularly cryptographic information, have been | |||
truncated for display purposes in these examples. | truncated for display purposes in these examples. | |||
C.1. Redirect-Based User Interaction | B.1. Redirect-Based User Interaction | |||
In this scenario, the user is the RO and has access to a web browser, | In this scenario, the user is the RO and has access to a web browser, | |||
and the client instance can take front-channel callbacks on the same | and the client instance can take front-channel callbacks on the same | |||
device as the user. This combination is analogous to the OAuth 2.0 | device as the user. This combination is analogous to the OAuth 2.0 | |||
Authorization Code grant type. | Authorization Code grant type. | |||
The client instance initiates the request to the AS. Here the client | The client instance initiates the request to the AS. Here, the | |||
instance identifies itself using its public key. | client instance identifies itself using its public key. | |||
POST /tx HTTP/1.1 | POST /tx HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
Content-Digest: sha-256=... | Content-Digest: sha-256=... | |||
{ | { | |||
"access_token": { | "access_token": { | |||
skipping to change at page 219, line 4 ¶ | skipping to change at line 9466 ¶ | |||
"key": { | "key": { | |||
"proof": "httpsig", | "proof": "httpsig", | |||
"jwk": { | "jwk": { | |||
"kty": "RSA", | "kty": "RSA", | |||
"e": "AQAB", | "e": "AQAB", | |||
"kid": "xyz-1", | "kid": "xyz-1", | |||
"alg": "RS256", | "alg": "RS256", | |||
"n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8..." | "n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8..." | |||
} | } | |||
} | } | |||
}, | }, | |||
"interact": { | "interact": { | |||
"start": ["redirect"], | "start": ["redirect"], | |||
"finish": { | "finish": { | |||
"method": "redirect", | "method": "redirect", | |||
"uri": "https://client.example.net/return/123455", | "uri": "https://client.example.net/return/123455", | |||
"nonce": "LKLTI25DK82FX4T4QFZC" | "nonce": "LKLTI25DK82FX4T4QFZC" | |||
} | } | |||
} | } | |||
} | } | |||
The AS processes the request and determines that the RO needs to | The AS processes the request and determines that the RO needs to | |||
interact. The AS returns the following response giving the client | interact. The AS returns the following response that gives the | |||
instance the information it needs to connect. The AS has also | client instance the information it needs to connect. The AS has also | |||
indicated to the client instance that it can use the given instance | indicated to the client instance that it can use the given instance | |||
identifier to identify itself in future requests (Section 2.3.1). | identifier to identify itself in future requests (Section 2.3.1). | |||
HTTP/1.1 200 OK | HTTP/1.1 200 OK | |||
Content-Type: application/json | Content-Type: application/json | |||
Cache-Control: no-store | Cache-Control: no-store | |||
{ | { | |||
"interact": { | "interact": { | |||
"redirect": | "redirect": | |||
skipping to change at page 221, line 40 ¶ | skipping to change at line 9585 ¶ | |||
}] | }] | |||
}, | }, | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "80UPRY5NM33OMUKMKSKU" | "value": "80UPRY5NM33OMUKMKSKU" | |||
}, | }, | |||
"uri": "https://server.example.com/continue" | "uri": "https://server.example.com/continue" | |||
} | } | |||
} | } | |||
C.2. Secondary Device Interaction | B.2. Secondary Device Interaction | |||
In this scenario, the user does not have access to a web browser on | In this scenario, the user does not have access to a web browser on | |||
the device and must use a secondary device to interact with the AS. | the device and must use a secondary device to interact with the AS. | |||
The client instance can display a user code or a printable QR code. | The client instance can display a user code or a printable QR code. | |||
The client instance is not able to accept callbacks from the AS and | The client instance is not able to accept callbacks from the AS and | |||
needs to poll for updates while waiting for the user to authorize the | needs to poll for updates while waiting for the user to authorize the | |||
request. | request. | |||
The client instance initiates the request to the AS. | The client instance initiates the request to the AS. | |||
skipping to change at page 222, line 27 ¶ | skipping to change at line 9618 ¶ | |||
}, | }, | |||
"client": "7C7C4AZ9KHRS6X63AJAO", | "client": "7C7C4AZ9KHRS6X63AJAO", | |||
"interact": { | "interact": { | |||
"start": ["redirect", "user_code"] | "start": ["redirect", "user_code"] | |||
} | } | |||
} | } | |||
The AS processes this and determines that the RO needs to interact. | The AS processes this and determines that the RO needs to interact. | |||
The AS supports both redirect URIs and user codes for interaction, so | The AS supports both redirect URIs and user codes for interaction, so | |||
it includes both. Since there is no interaction finish mode, the AS | it includes both. Since there is no interaction finish mode, the AS | |||
does not include a nonce, but does include a "wait" parameter on the | does not include a nonce but does include a "wait" parameter on the | |||
continuation section because it expects the client instance to poll | continuation section because it expects the client instance to poll | |||
for results. | for results. | |||
HTTP/1.1 200 OK | HTTP/1.1 200 OK | |||
Content-Type: application/json | Content-Type: application/json | |||
Cache-Control: no-store | Cache-Control: no-store | |||
{ | { | |||
"interact": { | "interact": { | |||
"redirect": "https://srv.ex/MXKHQ", | "redirect": "https://srv.ex/MXKHQ", | |||
skipping to change at page 223, line 4 ¶ | skipping to change at line 9641 ¶ | |||
} | } | |||
}, | }, | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "80UPRY5NM33OMUKMKSKU" | "value": "80UPRY5NM33OMUKMKSKU" | |||
}, | }, | |||
"uri": "https://server.example.com/continue/VGJKPTKC50", | "uri": "https://server.example.com/continue/VGJKPTKC50", | |||
"wait": 60 | "wait": 60 | |||
} | } | |||
} | } | |||
The client instance saves the response and displays the user code | The client instance saves the response and displays the user code | |||
visually on its screen along with the static device URI. The client | visually on its screen along with the static device URI. The client | |||
instance also displays the short interaction URI as a QR code to be | instance also displays the short interaction URI as a QR code to be | |||
scanned. | scanned. | |||
If the user scans the code, they are taken to the interaction | If the user scans the code, they are taken to the interaction | |||
endpoint and the AS looks up the current pending request based on the | endpoint, and the AS looks up the current pending request based on | |||
incoming URI. If the user instead goes to the static page and enters | the incoming URI. If the user instead goes to the static page and | |||
the code manually, the AS looks up the current pending request based | enters the code manually, the AS looks up the current pending request | |||
on the value of the user code. In both cases, the user logs in, is | based on the value of the user code. In both cases, the user logs | |||
identified as the RO for the resource being requested, and approves | in, is identified as the RO for the resource being requested, and | |||
the request. Once the request has been approved, the AS displays to | approves the request. Once the request has been approved, the AS | |||
the user a message to return to their device. | displays to the user a message to return to their device. | |||
Meanwhile, the client instance periodically polls the AS every 60 | Meanwhile, the client instance polls the AS every 60 seconds at the | |||
seconds at the continuation URI. The client instance signs the | continuation URI. The client instance signs the request using the | |||
request using the same key and method that it did in the first | same key and method that it did in the first request. | |||
request. | ||||
POST /continue/VGJKPTKC50 HTTP/1.1 | POST /continue/VGJKPTKC50 HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
Content-Digest: sha-256=... | Content-Digest: sha-256=... | |||
The AS retrieves the pending request based on the pending grant | The AS retrieves the pending request based on the pending grant | |||
request associated with the continuation access token and determines | request associated with the continuation access token and determines | |||
that it has not yet been authorized. The AS indicates to the client | that it has not yet been authorized. The AS indicates to the client | |||
instance that no access token has yet been issued but it can continue | instance that no access token has yet been issued but it can continue | |||
to call after another 60 second timeout. | to call after another 60-second timeout. | |||
HTTP/1.1 200 OK | HTTP/1.1 200 OK | |||
Content-Type: application/json | Content-Type: application/json | |||
Cache-Control: no-store | Cache-Control: no-store | |||
{ | { | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "G7YQT4KQQ5TZY9SLSS5E" | "value": "G7YQT4KQQ5TZY9SLSS5E" | |||
}, | }, | |||
skipping to change at page 224, line 4 ¶ | skipping to change at line 9686 ¶ | |||
{ | { | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "G7YQT4KQQ5TZY9SLSS5E" | "value": "G7YQT4KQQ5TZY9SLSS5E" | |||
}, | }, | |||
"uri": "https://server.example.com/continue/ATWHO4Q1WV", | "uri": "https://server.example.com/continue/ATWHO4Q1WV", | |||
"wait": 60 | "wait": 60 | |||
} | } | |||
} | } | |||
Note that the continuation URI and access token have been rotated | Note that the continuation URI and access token have been rotated | |||
since they were used by the client instance to make this call. The | since they were used by the client instance to make this call. The | |||
client instance polls the continuation URI after a 60 second timeout | client instance polls the continuation URI after a 60-second timeout | |||
using this new information. | using this new information. | |||
POST /continue/ATWHO4Q1WV HTTP/1.1 | POST /continue/ATWHO4Q1WV HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Authorization: GNAP G7YQT4KQQ5TZY9SLSS5E | Authorization: GNAP G7YQT4KQQ5TZY9SLSS5E | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
Content-Digest: sha-256=... | Content-Digest: sha-256=... | |||
The AS retrieves the pending request based on the URI and access | The AS retrieves the pending request based on the URI and access | |||
skipping to change at page 224, line 37 ¶ | skipping to change at line 9720 ¶ | |||
"access_token": { | "access_token": { | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | |||
"manage": "https://server.example.com/token/PRY5NM33O\ | "manage": "https://server.example.com/token/PRY5NM33O\ | |||
M4TB8N6BW7OZB8CDFONP219RP1L", | M4TB8N6BW7OZB8CDFONP219RP1L", | |||
"access": [ | "access": [ | |||
"dolphin-metadata", "some other thing" | "dolphin-metadata", "some other thing" | |||
] | ] | |||
} | } | |||
} | } | |||
C.3. No User Involvement | B.3. No User Involvement | |||
In this scenario, the client instance is requesting access on its own | In this scenario, the client instance is requesting access on its own | |||
behalf, with no user to interact with. | behalf, with no user to interact with. | |||
The client instance creates a request to the AS, identifying itself | The client instance creates a request to the AS, identifying itself | |||
with its public key and using MTLS to make the request. | with its public key and using MTLS to make the request. | |||
POST /tx HTTP/1.1 | POST /tx HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
skipping to change at page 225, line 23 ¶ | skipping to change at line 9746 ¶ | |||
], | ], | |||
}, | }, | |||
"client": { | "client": { | |||
"key": { | "key": { | |||
"proof": "mtls", | "proof": "mtls", | |||
"cert#S256": "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2" | "cert#S256": "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2" | |||
} | } | |||
} | } | |||
} | } | |||
The AS processes this and determines that the client instance can ask | The AS processes this, determines that the client instance can ask | |||
for the requested resources and issues an access token. | for the requested resources, and issues an access token. | |||
HTTP/1.1 200 OK | HTTP/1.1 200 OK | |||
Content-Type: application/json | Content-Type: application/json | |||
Cache-Control: no-store | Cache-Control: no-store | |||
{ | { | |||
"access_token": { | "access_token": { | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | |||
"manage": "https://server.example.com/token", | "manage": "https://server.example.com/token", | |||
"access": [ | "access": [ | |||
"backend service", "nightly-routine-3" | "backend service", "nightly-routine-3" | |||
] | ] | |||
} | } | |||
} | } | |||
C.4. Asynchronous Authorization | B.4. Asynchronous Authorization | |||
In this scenario, the client instance is requesting on behalf of a | In this scenario, the client instance is requesting on behalf of a | |||
specific RO, but has no way to interact with the user. The AS can | specific RO but has no way to interact with the user. The AS can | |||
asynchronously reach out to the RO for approval in this scenario. | asynchronously reach out to the RO for approval in this scenario. | |||
The client instance starts the request at the AS by requesting a set | The client instance starts the request at the AS by requesting a set | |||
of resources. The client instance also identifies a particular user. | of resources. The client instance also identifies a particular user. | |||
POST /tx HTTP/1.1 | POST /tx HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
skipping to change at page 227, line 26 ¶ | skipping to change at line 9841 ¶ | |||
"access_token": { | "access_token": { | |||
"value": "80UPRY5NM33OMUKMKSKU" | "value": "80UPRY5NM33OMUKMKSKU" | |||
}, | }, | |||
"uri": "https://server.example.com/continue", | "uri": "https://server.example.com/continue", | |||
"wait": 60 | "wait": 60 | |||
} | } | |||
} | } | |||
The AS reaches out to the RO and prompts them for consent. In this | The AS reaches out to the RO and prompts them for consent. In this | |||
example scenario, the AS has an application that it can push | example scenario, the AS has an application that it can push | |||
notifications in to for the specified account. | notifications to for the specified account. | |||
Meanwhile, the client instance periodically polls the AS every 60 | Meanwhile, the client instance periodically polls the AS every 60 | |||
seconds at the continuation URI. | seconds at the continuation URI. | |||
POST /continue HTTP/1.1 | POST /continue HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
The AS retrieves the pending request based on the continuation access | The AS retrieves the pending request based on the continuation access | |||
token and determines that it has not yet been authorized. The AS | token and determines that it has not yet been authorized. The AS | |||
indicates to the client instance that no access token has yet been | indicates to the client instance that no access token has yet been | |||
issued but it can continue to call after another 60 second timeout. | issued but it can continue to call after another 60-second timeout. | |||
HTTP/1.1 200 OK | HTTP/1.1 200 OK | |||
Content-Type: application/json | Content-Type: application/json | |||
Cache-Control: no-store | Cache-Control: no-store | |||
{ | { | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "BI9QNW6V9W3XFJK4R02D" | "value": "BI9QNW6V9W3XFJK4R02D" | |||
}, | }, | |||
"uri": "https://server.example.com/continue", | "uri": "https://server.example.com/continue", | |||
"wait": 60 | "wait": 60 | |||
} | } | |||
} | } | |||
Note that the continuation access token value has been rotated since | Note that the continuation access token value has been rotated since | |||
it was used by the client instance to make this call. The client | it was used by the client instance to make this call. The client | |||
instance polls the continuation URI after a 60 second timeout using | instance polls the continuation URI after a 60-second timeout using | |||
the new token. | the new token. | |||
POST /continue HTTP/1.1 | POST /continue HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Authorization: GNAP BI9QNW6V9W3XFJK4R02D | Authorization: GNAP BI9QNW6V9W3XFJK4R02D | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
The AS retrieves the pending request based on the handle and | The AS retrieves the pending request based on the handle, determines | |||
determines that it has been approved and it issues an access token. | that it has been approved, and issues an access token. | |||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
HTTP/1.1 200 OK | HTTP/1.1 200 OK | |||
Content-Type: application/json | Content-Type: application/json | |||
Cache-Control: no-store | Cache-Control: no-store | |||
{ | { | |||
"access_token": { | "access_token": { | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | |||
"manage": "https://server.example.com/token/PRY5NM33O\ | "manage": "https://server.example.com/token/PRY5NM33O\ | |||
M4TB8N6BW7OZB8CDFONP219RP1L", | M4TB8N6BW7OZB8CDFONP219RP1L", | |||
"access": [ | "access": [ | |||
"dolphin-metadata", "some other thing" | "dolphin-metadata", "some other thing" | |||
] | ] | |||
} | } | |||
} | } | |||
C.5. Applying OAuth 2.0 Scopes and Client IDs | B.5. Applying OAuth 2.0 Scopes and Client IDs | |||
While GNAP is not designed to be directly compatible with OAuth 2.0 | While GNAP is not designed to be directly compatible with OAuth 2.0 | |||
[RFC6749], considerations have been made to enable the use of OAuth | [RFC6749], considerations have been made to enable the use of OAuth | |||
2.0 concepts and constructs more smoothly within GNAP. | 2.0 concepts and constructs more smoothly within GNAP. | |||
In this scenario, the client developer has a client_id and set of | In this scenario, the client developer has a client_id and set of | |||
scope values from their OAuth 2.0 system and wants to apply them to | scope values from their OAuth 2.0 system and wants to apply them to | |||
the new protocol. Traditionally, the OAuth 2.0 client developer | the new protocol. In OAuth 2.0, the client developer would put their | |||
would put their client_id and scope values as parameters into a | client_id and scope values as parameters into a redirect request to | |||
redirect request to the authorization endpoint. | the authorization endpoint. | |||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
HTTP 302 Found | HTTP 302 Found | |||
Location: https://server.example.com/authorize\ | Location: https://server.example.com/authorize\ | |||
?client_id=7C7C4AZ9KHRS6X63AJAO\ | ?client_id=7C7C4AZ9KHRS6X63AJAO\ | |||
&scope=read%20write%20dolphin\ | &scope=read%20write%20dolphin\ | |||
&redirect_uri=https://client.example.net/return\ | &redirect_uri=https://client.example.net/return\ | |||
&response_type=code\ | &response_type=code\ | |||
&state=123455 | &state=123455 | |||
skipping to change at page 230, line 40 ¶ | skipping to change at line 9963 ¶ | |||
The client_id can be used to identify the client instance's keys that | The client_id can be used to identify the client instance's keys that | |||
it uses for authentication, the scopes represent resources that the | it uses for authentication, the scopes represent resources that the | |||
client instance is requesting, and the redirect_uri and state value | client instance is requesting, and the redirect_uri and state value | |||
are pre-combined into a finish URI that can be unique per request. | are pre-combined into a finish URI that can be unique per request. | |||
The client instance additionally creates a nonce to protect the | The client instance additionally creates a nonce to protect the | |||
callback, separate from the state parameter that it has added to its | callback, separate from the state parameter that it has added to its | |||
return URI. | return URI. | |||
From here, the protocol continues as above. | From here, the protocol continues as above. | |||
Appendix D. Interoperability Profiles | Appendix C. Interoperability Profiles | |||
The GNAP specification has many different modes, options, and | The GNAP specification has many different modes, options, and | |||
mechanisms, allowing it to solve a wide variety of problems in a wide | mechanisms, allowing it to solve a wide variety of problems in a wide | |||
variety of deployments. The wide applicability of GNAP makes it | variety of deployments. The wide applicability of GNAP makes it | |||
difficult, if not impossible, to define a set of mandatory-to- | difficult, if not impossible, to define a set of mandatory-to- | |||
implement features, since one environment's required feature would be | implement features, since one environment's required feature would be | |||
impossible to do in another environment. While this is a large | impossible to do in another environment. While this is a large | |||
problem in many systems, GNAP's back-and-forth negotiation process | problem in many systems, GNAP's back-and-forth negotiation process | |||
allows parties to declare at runtime everything that they support and | allows parties to declare at runtime everything that they support and | |||
then have the other party select from that the subset of items that | then have the other party select from that the subset of items that | |||
they also support, leading to functional compatibility in many parts | they also support, leading to functional compatibility in many parts | |||
of the protocol even in an open world scenario. | of the protocol even in an open world scenario. | |||
In addition, GNAP defines a set of interoperability profiles which | In addition, GNAP defines a set of interoperability profiles that | |||
gather together core requirements to fix options into common | gather together core requirements to fix options into common | |||
configurations that are likely to be useful to large populations of | configurations that are likely to be useful to large populations of | |||
similar applications. | similar applications. | |||
Conformant AS implementations of these profiles MUST implement at | Conformant AS implementations of these profiles MUST implement at | |||
least the features as specified in the profile and MAY implement | least the features as specified in the profile and MAY implement | |||
additional features or profiles. Conformant client implementations | additional features or profiles. Conformant client implementations | |||
of these profiles MUST implement at least the features as specified, | of these profiles MUST implement at least the features as specified, | |||
except where a subset of the features allows the protocol to function | except where a subset of the features allows the protocol to function | |||
(such as using polling instead of a push finish method for the | (such as using polling instead of a push finish method for the | |||
Secondary Device profile). | Secondary Device profile). | |||
D.1. Web-based Redirection | C.1. Web-Based Redirection | |||
Implementations conformant to the Web-based Redirection profile of | Implementations conformant to the web-based redirection profile of | |||
GNAP MUST implement all of the following features: | GNAP MUST implement all of the following features: | |||
* _Interaction Start Methods_: redirect | * Interaction Start Methods: redirect | |||
* _Interaction Finish Methods_: redirect | * Interaction Finish Methods: redirect | |||
* _Interaction Hash Algorithms_: sha-256 | * Interaction Hash Algorithms: sha-256 | |||
* _Key Proofing Methods_: httpsig with no additional parameters | * Key Proofing Methods: httpsig with no additional parameters | |||
* _Key Formats_: jwks with signature algorithm included in the key's | * Key Formats: jwks with signature algorithm included in the key's | |||
alg parameter | alg parameter | |||
* _JOSE Signature Algorithm_: PS256 | * JOSE Signature Algorithm: PS256 | |||
* _Subject Identifier Formats_: opaque | * Subject Identifier Formats: opaque | |||
* _Assertion Formats_: id_token | * Assertion Formats: id_token | |||
D.2. Secondary Device | C.2. Secondary Device | |||
Implementations conformant to the Secondary Device profile of GNAP | Implementations conformant to the Secondary Device profile of GNAP | |||
MUST implement all of the following features: | MUST implement all of the following features: | |||
* _Interaction Start Methods_: user_code and user_code_uri | * Interaction Start Methods: user_code and user_code_uri | |||
* _Interaction Finish Methods_: push | * Interaction Finish Methods: push | |||
* _Interaction Hash Algorithms_: sha-256 | * Interaction Hash Algorithms: sha-256 | |||
* _Key Proofing Methods_: httpsig with no additional parameters | * Key Proofing Methods: httpsig with no additional parameters | |||
* _Key Formats_: jwks with signature algorithm included in the key's | ||||
* Key Formats: jwks with signature algorithm included in the key's | ||||
alg parameter | alg parameter | |||
* _JOSE Signature Algorithm_: PS256 | * JOSE Signature Algorithm: PS256 | |||
* _Subject Identifier Formats_: opaque | * Subject Identifier Formats: opaque | |||
* _Assertion Formats_: id_token | * Assertion Formats: id_token | |||
Appendix E. Guidance for Extensions | Appendix D. Guidance for Extensions | |||
Extensions to this specification have a variety of places to alter | Extensions to this specification have a variety of places to alter | |||
the protocol, including many fields and objects that can have | the protocol, including many fields and objects that can have | |||
additional values in a registry registry (Section 11) established by | additional values in a registry (Section 10) established by this | |||
this specification. For interoperability and to preserve the | specification. For interoperability and to preserve the security of | |||
security of the protocol, extensions should register new values with | the protocol, extensions should register new values with IANA by | |||
IANA by following the specified mechanism. While it may technically | following the specified mechanism. While it may technically be | |||
be possible to extend the protocol by adding elements to JSON objects | possible to extend the protocol by adding elements to JSON objects | |||
that are not governed by an IANA registry, a recipient may ignore | that are not governed by an IANA registry, a recipient may ignore | |||
such values but is also allowed to reject them. | such values but is also allowed to reject them. | |||
Most object fields in GNAP are specified with types, and those types | Most object fields in GNAP are specified with types, and those types | |||
can allow different but related behavior. For example, the access | can allow different but related behavior. For example, the access | |||
array can include either strings or objects, as discussed in | array can include either strings or objects, as discussed in | |||
Section 8. The use of JSON polymorphism (Appendix F) within GNAP | Section 8. The use of JSON polymorphism (Appendix E) within GNAP | |||
allows extensions to define new fields by not only choosing a new | allows extensions to define new fields by not only choosing a new | |||
name but also by using an existing name with a new type. However, | name but also by using an existing name with a new type. However, | |||
the extension's definition of a new type for a field needs to fit the | the extension's definition of a new type for a field needs to fit the | |||
same kind of item being extended. For example, a hypothetical | same kind of item being extended. For example, a hypothetical | |||
extension could define a string value for the access_token request | extension could define a string value for the access_token request | |||
field, with a URL to download a hosted access token request. Such an | field, with a URL to download a hosted access token request. Such an | |||
extension would be appropriate as the access_token field still | extension would be appropriate as the access_token field still | |||
defines the access tokens being requested. However, if an extension | defines the access tokens being requested. However, if an extension | |||
were to define a string value for the access_token request field, | were to define a string value for the access_token request field, | |||
with the value instead being something unrelated to the access token | with the value instead being something unrelated to the access token | |||
request such as a value or key format, this would not be an | request such as a value or key format, this would not be an | |||
appropriate means of extension. (Note that this specific extension | appropriate means of extension. (Note that this specific extension | |||
example would create another form of SSRF attack surface as discussed | example would create another form of SSRF attack surface as discussed | |||
in Section 13.34.) | in Section 11.34.) | |||
For another example, both interaction interaction start modes | As another example, both interaction start modes (Section 2.5.1) and | |||
(Section 2.5.1) and key proofing methods (Section 7.3) can be defined | key proofing methods (Section 7.3) can be defined as either strings | |||
as either strings or objects. An extension could take a method | or objects. An extension could take a method defined as a string, | |||
defined as a string, such as app, and define an object-based version | such as app, and define an object-based version with additional | |||
with additional parameters. This extension should still define a | parameters. This extension should still define a method to launch an | |||
method to launch an application on the end user's device, just like | application on the end user's device, just like app does when | |||
app does when specified as a string. | specified as a string. | |||
Additionally, the ability to deal with different types for a field is | Additionally, the ability to deal with different types for a field is | |||
not expected to be equal between an AS and client software, with the | not expected to be equal between an AS and client software, with the | |||
client software being assumed to be both more varied and more | client software being assumed to be both more varied and more | |||
simplified than the AS. Furthermore, the nature of the negotiation | simplified than the AS. Furthermore, the nature of the negotiation | |||
process in GNAP allows the AS more chance of recovery from unknown | process in GNAP allows the AS more chance of recovery from unknown | |||
situations and parameters. As such, any extensions that change the | situations and parameters. As such, any extensions that change the | |||
type of any field returned to a client instance should only do so | type of any field returned to a client instance should only do so | |||
when the client instance has indicated specific support for that | when the client instance has indicated specific support for that | |||
extension through some kind of request parameter. | extension through some kind of request parameter. | |||
Appendix F. JSON Structures and Polymorphism | Appendix E. JSON Structures and Polymorphism | |||
GNAP makes use of polymorphism within the JSON [RFC8259] structures | GNAP makes use of polymorphism within the JSON [RFC8259] structures | |||
used for the protocol. Each portion of this protocol is defined in | used for the protocol. Each portion of this protocol is defined in | |||
terms of the JSON data type that its values can take, whether it's a | terms of the JSON data type that its values can take, whether it's a | |||
string, object, array, boolean, or number. For some fields, | string, object, array, boolean, or number. For some fields, | |||
different data types offer different descriptive capabilities and are | different data types offer different descriptive capabilities and are | |||
used in different situations for the same field. Each data type | used in different situations for the same field. Each data type | |||
provides a different syntax to express the same underlying semantic | provides a different syntax to express the same underlying semantic | |||
protocol element, which allows for optimization and simplification in | protocol element, which allows for optimization and simplification in | |||
many common cases. | many common cases. | |||
skipping to change at page 233, line 40 ¶ | skipping to change at line 10108 ¶ | |||
be used as the value for any member. In practice, each member has a | be used as the value for any member. In practice, each member has a | |||
semantic type that needs to make sense to the parties creating and | semantic type that needs to make sense to the parties creating and | |||
consuming the object. Within this protocol, each object member is | consuming the object. Within this protocol, each object member is | |||
defined in terms of its semantic content, and this semantic content | defined in terms of its semantic content, and this semantic content | |||
might have expressions in different concrete data types for different | might have expressions in different concrete data types for different | |||
specific purposes. Since each object member has exactly one value in | specific purposes. Since each object member has exactly one value in | |||
JSON, each data type for an object member field is naturally mutually | JSON, each data type for an object member field is naturally mutually | |||
exclusive with other data types within a single JSON object. | exclusive with other data types within a single JSON object. | |||
For example, a resource request for a single access token is composed | For example, a resource request for a single access token is composed | |||
of an object of resource request descriptions while a request for | of an object of resource request descriptions, while a request for | |||
multiple access tokens is composed of an array whose member values | multiple access tokens is composed of an array whose member values | |||
are all objects. Both of these represent requests for access, but | are all objects. Both of these represent requests for access, but | |||
the difference in syntax allows the client instance and AS to | the difference in syntax allows the client instance and AS to | |||
differentiate between the two request types in the same request. | differentiate between the two request types in the same request. | |||
Another form of polymorphism in JSON comes from the fact that the | Another form of polymorphism in JSON comes from the fact that the | |||
values within JSON arrays need not all be of the same JSON data type. | values within JSON arrays need not all be of the same JSON data type. | |||
However, within this protocol, each element within the array needs to | However, within this protocol, each element within the array needs to | |||
be of the same kind of semantic element for the collection to make | be of the same kind of semantic element for the collection to make | |||
sense, even when the data types are different from each other. | sense, even when the data types are different from each other. | |||
skipping to change at page 234, line 17 ¶ | skipping to change at line 10132 ¶ | |||
requested using a string. In both cases, the resource request is | requested using a string. In both cases, the resource request is | |||
being described in a way that the AS needs to interpret, but with | being described in a way that the AS needs to interpret, but with | |||
different levels of specificity and complexity for the client | different levels of specificity and complexity for the client | |||
instance to deal with. An API designer can provide a set of common | instance to deal with. An API designer can provide a set of common | |||
access scopes as simple strings but still allow client software | access scopes as simple strings but still allow client software | |||
developers to specify custom access when needed for more complex | developers to specify custom access when needed for more complex | |||
APIs. | APIs. | |||
Extensions to this specification can use different data types for | Extensions to this specification can use different data types for | |||
defined fields, but each extension needs to not only declare what the | defined fields, but each extension needs to not only declare what the | |||
data type means, but also provide justification for the data type | data type means but also provide justification for the data type | |||
representing the same basic kind of thing it extends. For example, | representing the same basic kind of thing it extends. For example, | |||
an extension declaring an "array" representation for a field would | an extension declaring an "array" representation for a field would | |||
need to explain how the array represents something akin to the non- | need to explain how the array represents something akin to the non- | |||
array element that it is replacing. See additional discussion in | array element that it is replacing. See additional discussion in | |||
Appendix E. | Appendix D. | |||
Acknowledgements | ||||
The authors would like to thank the following individuals for their | ||||
reviews, implementations, and contributions: Åke Axeland, Aaron | ||||
Parecki, Adam Omar Oueidat, Andrii Deinega, Annabelle Backman, Dick | ||||
Hardt, Dmitri Zagidulin, Dmitry Barinov, Florian Helmschmidt, Francis | ||||
Pouatcha, George Fletcher, Haardik Haardik, Hamid Massaoud, Jacky | ||||
Yuan, Joseph Heenan, Kathleen Moriarty, Leif Johansson, Mike Jones, | ||||
Mike Varley, Nat Sakimura, Takahiko Kawasaki, Takahiro Tsuchiya, and | ||||
Yaron Sheffer. | ||||
The authors would also like to thank the GNAP Working Group design | ||||
team (Kathleen Moriarty, Dick Hardt, Mike Jones, and the authors), | ||||
who incorporated elements from the XAuth and XYZ proposals to create | ||||
the first draft version of this document. | ||||
In addition, the authors would like to thank Aaron Parecki and Mike | ||||
Jones for insights into how to integrate identity and authentication | ||||
systems into the core protocol. Both Justin Richer and Dick Hardt | ||||
developed the use cases, diagrams, and insights provided in the XYZ | ||||
and XAuth proposals that have been incorporated here. The authors | ||||
would like to especially thank Mike Varley and the team at SecureKey | ||||
for feedback and development of early versions of the XYZ protocol | ||||
that fed into this standards work. | ||||
Finally, the authors want to acknowledge the immense contributions of | ||||
Aaron Parecki to the content of this document. We thank him for his | ||||
insight, input, and hard work, without which GNAP would not have | ||||
grown to what it is. | ||||
Authors' Addresses | Authors' Addresses | |||
Justin Richer (editor) | Justin Richer (editor) | |||
Bespoke Engineering | Bespoke Engineering | |||
Email: ietf@justin.richer.org | Email: ietf@justin.richer.org | |||
URI: https://bspk.io/ | URI: https://bspk.io/ | |||
Fabien Imbault | Fabien Imbault | |||
acert.io | acert.io | |||
End of changes. 1110 change blocks. | ||||
3116 lines changed or deleted | 2848 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. |