draft-ietf-gnap-core-protocol-06.txt | draft-ietf-gnap-core-protocol-07.txt | |||
---|---|---|---|---|
GNAP J. Richer, Ed. | GNAP J. Richer, Ed. | |||
Internet-Draft Bespoke Engineering | Internet-Draft Bespoke Engineering | |||
Intended status: Standards Track A. Parecki | Intended status: Standards Track A. Parecki | |||
Expires: 13 January 2022 Okta | Expires: 28 March 2022 Okta | |||
F. Imbault | F. Imbault | |||
acert.io | acert.io | |||
12 July 2021 | 24 September 2021 | |||
Grant Negotiation and Authorization Protocol | Grant Negotiation and Authorization Protocol | |||
draft-ietf-gnap-core-protocol-06 | draft-ietf-gnap-core-protocol-07 | |||
Abstract | Abstract | |||
GNAP defines a mechanism for delegating authorization to a piece of | GNAP defines a mechanism for delegating authorization to a piece of | |||
software, and conveying that delegation to the software. This | software, and conveying that delegation to the software. This | |||
delegation can include access to a set of APIs as well as information | delegation can include access to a set of APIs as well as information | |||
passed directly to the software. | passed directly to the software. | |||
Status of This Memo | Status of This Memo | |||
skipping to change at page 1, line 36 ¶ | skipping to change at page 1, line 36 ¶ | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
Drafts is at https://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
This Internet-Draft will expire on 13 January 2022. | This Internet-Draft will expire on 28 March 2022. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2021 IETF Trust and the persons identified as the | Copyright (c) 2021 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 (https://trustee.ietf.org/ | |||
license-info) in effect on the date of publication of this document. | license-info) in effect on the date of publication of this document. | |||
Please review these documents carefully, as they describe your rights | Please review these documents carefully, as they describe your rights | |||
and restrictions with respect to this document. Code Components | and restrictions with respect to this document. Code Components | |||
extracted from this document must include Simplified BSD License text | extracted from this document must include Simplified BSD License text | |||
as described in Section 4.e of the Trust Legal Provisions and are | as described in Section 4.e of the Trust Legal Provisions and are | |||
provided without warranty as described in the Simplified BSD License. | provided without warranty as described in the Simplified BSD License. | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 | 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
1.2. Roles . . . . . . . . . . . . . . . . . . . . . . . . . . 5 | 1.2. Roles . . . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
1.3. Elements . . . . . . . . . . . . . . . . . . . . . . . . 8 | 1.3. Elements . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
1.4. Sequences . . . . . . . . . . . . . . . . . . . . . . . . 9 | 1.4. Trust relationships . . . . . . . . . . . . . . . . . . . 10 | |||
1.4.1. Redirect-based Interaction . . . . . . . . . . . . . 12 | 1.5. Sequences . . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
1.4.2. User-code Interaction . . . . . . . . . . . . . . . . 15 | 1.5.1. Redirect-based Interaction . . . . . . . . . . . . . 15 | |||
1.4.3. Asynchronous Authorization . . . . . . . . . . . . . 17 | 1.5.2. User-code Interaction . . . . . . . . . . . . . . . . 18 | |||
1.4.4. Software-only Authorization . . . . . . . . . . . . . 19 | 1.5.3. Asynchronous Authorization . . . . . . . . . . . . . 20 | |||
1.4.5. Refreshing an Expired Access Token . . . . . . . . . 20 | 1.5.4. Software-only Authorization . . . . . . . . . . . . . 22 | |||
1.4.6. Requesting User Information . . . . . . . . . . . . . 22 | 1.5.5. Refreshing an Expired Access Token . . . . . . . . . 23 | |||
2. Requesting Access . . . . . . . . . . . . . . . . . . . . . . 23 | 1.5.6. Requesting User Information . . . . . . . . . . . . . 25 | |||
2.1. Requesting Access to Resources . . . . . . . . . . . . . 25 | 2. Requesting Access . . . . . . . . . . . . . . . . . . . . . . 26 | |||
2.1.1. Requesting a Single Access Token . . . . . . . . . . 25 | 2.1. Requesting Access to Resources . . . . . . . . . . . . . 28 | |||
2.1.2. Requesting Multiple Access Tokens . . . . . . . . . . 28 | 2.1.1. Requesting a Single Access Token . . . . . . . . . . 28 | |||
2.2. Requesting Subject Information . . . . . . . . . . . . . 30 | 2.1.2. Requesting Multiple Access Tokens . . . . . . . . . . 31 | |||
2.3. Identifying the Client Instance . . . . . . . . . . . . . 31 | 2.2. Requesting Subject Information . . . . . . . . . . . . . 33 | |||
2.3.1. Identifying the Client Instance by Reference . . . . 32 | 2.3. Identifying the Client Instance . . . . . . . . . . . . . 34 | |||
2.3.2. Providing Displayable Client Instance Information . . 33 | 2.3.1. Identifying the Client Instance by Reference . . . . 35 | |||
2.3.3. Authenticating the Client Instance . . . . . . . . . 33 | 2.3.2. Providing Displayable Client Instance Information . . 36 | |||
2.4. Identifying the User . . . . . . . . . . . . . . . . . . 34 | 2.3.3. Authenticating the Client Instance . . . . . . . . . 36 | |||
2.4.1. Identifying the User by Reference . . . . . . . . . . 35 | 2.4. Identifying the User . . . . . . . . . . . . . . . . . . 37 | |||
2.5. Interacting with the User . . . . . . . . . . . . . . . . 35 | 2.4.1. Identifying the User by Reference . . . . . . . . . . 38 | |||
2.5.1. Start Mode Definitions . . . . . . . . . . . . . . . 37 | 2.5. Interacting with the User . . . . . . . . . . . . . . . . 38 | |||
2.5.2. Finish Interaction Modes . . . . . . . . . . . . . . 38 | 2.5.1. Start Mode Definitions . . . . . . . . . . . . . . . 40 | |||
2.5.3. Hints . . . . . . . . . . . . . . . . . . . . . . . . 41 | 2.5.2. Finish Interaction Modes . . . . . . . . . . . . . . 41 | |||
2.5.4. Extending Interaction Modes . . . . . . . . . . . . . 41 | 2.5.3. Hints . . . . . . . . . . . . . . . . . . . . . . . . 44 | |||
2.6. Extending The Grant Request . . . . . . . . . . . . . . . 41 | 2.5.4. Extending Interaction Modes . . . . . . . . . . . . . 44 | |||
3. Grant Response . . . . . . . . . . . . . . . . . . . . . . . 42 | 2.6. Extending The Grant Request . . . . . . . . . . . . . . . 44 | |||
3.1. Request Continuation . . . . . . . . . . . . . . . . . . 43 | 3. Grant Response . . . . . . . . . . . . . . . . . . . . . . . 45 | |||
3.2. Access Tokens . . . . . . . . . . . . . . . . . . . . . . 44 | 3.1. Request Continuation . . . . . . . . . . . . . . . . . . 46 | |||
3.2.1. Single Access Token . . . . . . . . . . . . . . . . . 45 | 3.2. Access Tokens . . . . . . . . . . . . . . . . . . . . . . 47 | |||
3.2.2. Multiple Access Tokens . . . . . . . . . . . . . . . 48 | 3.2.1. Single Access Token . . . . . . . . . . . . . . . . . 48 | |||
3.3. Interaction Modes . . . . . . . . . . . . . . . . . . . . 49 | 3.2.2. Multiple Access Tokens . . . . . . . . . . . . . . . 51 | |||
3.3.1. Redirection to an arbitrary URL . . . . . . . . . . . 50 | 3.3. Interaction Modes . . . . . . . . . . . . . . . . . . . . 52 | |||
3.3.2. Launch of an application URL . . . . . . . . . . . . 51 | 3.3.1. Redirection to an arbitrary URL . . . . . . . . . . . 53 | |||
3.3.3. Display of a Short User Code . . . . . . . . . . . . 51 | 3.3.2. Launch of an application URL . . . . . . . . . . . . 54 | |||
3.3.4. Interaction Finish . . . . . . . . . . . . . . . . . 52 | 3.3.3. Display of a Short User Code . . . . . . . . . . . . 54 | |||
3.3.5. Extending Interaction Mode Responses . . . . . . . . 53 | 3.3.4. Interaction Finish . . . . . . . . . . . . . . . . . 55 | |||
3.4. Returning User Information . . . . . . . . . . . . . . . 53 | 3.3.5. Extending Interaction Mode Responses . . . . . . . . 56 | |||
3.5. Returning Dynamically-bound Reference Handles . . . . . . 54 | 3.4. Returning Subject Information . . . . . . . . . . . . . . 56 | |||
3.6. Error Response . . . . . . . . . . . . . . . . . . . . . 56 | 3.5. Returning Dynamically-bound Reference Handles . . . . . . 57 | |||
3.7. Extending the Response . . . . . . . . . . . . . . . . . 56 | 3.6. Error Response . . . . . . . . . . . . . . . . . . . . . 58 | |||
4. Determining Authorization and Consent . . . . . . . . . . . . 56 | 3.7. Extending the Response . . . . . . . . . . . . . . . . . 59 | |||
4.1. Interaction Start Methods . . . . . . . . . . . . . . . . 59 | 4. Determining Authorization and Consent . . . . . . . . . . . . 59 | |||
4.1.1. Interaction at a Redirected URI . . . . . . . . . . . 60 | 4.1. Interaction Start Methods . . . . . . . . . . . . . . . . 62 | |||
4.1.2. Interaction at the User Code URI . . . . . . . . . . 60 | 4.1.1. Interaction at a Redirected URI . . . . . . . . . . . 62 | |||
4.1.3. Interaction through an Application URI . . . . . . . 61 | 4.1.2. Interaction at the User Code URI . . . . . . . . . . 63 | |||
4.2. Post-Interaction Completion . . . . . . . . . . . . . . . 61 | 4.1.3. Interaction through an Application URI . . . . . . . 64 | |||
4.2. Post-Interaction Completion . . . . . . . . . . . . . . . 64 | ||||
4.2.1. Completing Interaction with a Browser Redirect to the | 4.2.1. Completing Interaction with a Browser Redirect to the | |||
Callback URI . . . . . . . . . . . . . . . . . . . . 62 | Callback URI . . . . . . . . . . . . . . . . . . . . 65 | |||
4.2.2. Completing Interaction with a Direct HTTP Request | 4.2.2. Completing Interaction with a Direct HTTP Request | |||
Callback . . . . . . . . . . . . . . . . . . . . . . 63 | Callback . . . . . . . . . . . . . . . . . . . . . . 66 | |||
4.2.3. Calculating the interaction hash . . . . . . . . . . 64 | 4.2.3. Calculating the interaction hash . . . . . . . . . . 66 | |||
5. Continuing a Grant Request . . . . . . . . . . . . . . . . . 65 | 5. Continuing a Grant Request . . . . . . . . . . . . . . . . . 68 | |||
5.1. Continuing After a Completed Interaction . . . . . . . . 67 | 5.1. Continuing After a Completed Interaction . . . . . . . . 70 | |||
5.2. Continuing During Pending Interaction . . . . . . . . . . 68 | 5.2. Continuing During Pending Interaction . . . . . . . . . . 71 | |||
5.3. Modifying an Existing Request . . . . . . . . . . . . . . 69 | 5.3. Modifying an Existing Request . . . . . . . . . . . . . . 73 | |||
5.4. Canceling a Grant Request . . . . . . . . . . . . . . . . 75 | 5.4. Canceling a Grant Request . . . . . . . . . . . . . . . . 78 | |||
6. Token Management . . . . . . . . . . . . . . . . . . . . . . 75 | 6. Token Management . . . . . . . . . . . . . . . . . . . . . . 79 | |||
6.1. Rotating the Access Token . . . . . . . . . . . . . . . . 75 | 6.1. Rotating the Access Token . . . . . . . . . . . . . . . . 79 | |||
6.2. Revoking the Access Token . . . . . . . . . . . . . . . . 77 | 6.2. Revoking the Access Token . . . . . . . . . . . . . . . . 81 | |||
7. Securing Requests from the Client Instance . . . . . . . . . 78 | 7. Securing Requests from the Client Instance . . . . . . . . . 82 | |||
7.1. Key Formats . . . . . . . . . . . . . . . . . . . . . . . 78 | 7.1. Key Formats . . . . . . . . . . . . . . . . . . . . . . . 83 | |||
7.1.1. Key References . . . . . . . . . . . . . . . . . . . 80 | 7.1.1. Key References . . . . . . . . . . . . . . . . . . . 84 | |||
7.2. Presenting Access Tokens . . . . . . . . . . . . . . . . 80 | 7.2. Presenting Access Tokens . . . . . . . . . . . . . . . . 84 | |||
7.3. Proving Possession of a Key with a Request . . . . . . . 81 | 7.3. Proving Possession of a Key with a Request . . . . . . . 85 | |||
7.3.1. HTTP Message Signing . . . . . . . . . . . . . . . . 83 | 7.3.1. HTTP Message Signing . . . . . . . . . . . . . . . . 87 | |||
7.3.2. Mutual TLS . . . . . . . . . . . . . . . . . . . . . 87 | 7.3.2. Mutual TLS . . . . . . . . . . . . . . . . . . . . . 91 | |||
7.3.3. Detached JWS . . . . . . . . . . . . . . . . . . . . 89 | 7.3.3. Detached JWS . . . . . . . . . . . . . . . . . . . . 93 | |||
7.3.4. Attached JWS . . . . . . . . . . . . . . . . . . . . 93 | 7.3.4. Attached JWS . . . . . . . . . . . . . . . . . . . . 97 | |||
8. Resource Access Rights . . . . . . . . . . . . . . . . . . . 97 | 8. Resource Access Rights . . . . . . . . . . . . . . . . . . . 101 | |||
8.1. Requesting Resources By Reference . . . . . . . . . . . . 100 | 8.1. Requesting Resources By Reference . . . . . . . . . . . . 104 | |||
9. Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . 102 | 9. Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . 106 | |||
9.1. RS-first Method of AS Discovery . . . . . . . . . . . . . 103 | 9.1. RS-first Method of AS Discovery . . . . . . . . . . . . . 107 | |||
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 105 | 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 109 | |||
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 105 | 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 109 | |||
12. Security Considerations . . . . . . . . . . . . . . . . . . . 105 | 12. Security Considerations . . . . . . . . . . . . . . . . . . . 109 | |||
13. Privacy Considerations . . . . . . . . . . . . . . . . . . . 105 | 12.1. TLS Protection in Transit . . . . . . . . . . . . . . . 109 | |||
14. Normative References . . . . . . . . . . . . . . . . . . . . 105 | 12.2. Protection of Client Instance Key Material . . . . . . . 110 | |||
Appendix A. Document History . . . . . . . . . . . . . . . . . . 108 | 12.3. Protection of Authorization Server . . . . . . . . . . . 111 | |||
Appendix B. Compared to OAuth 2.0 . . . . . . . . . . . . . . . 110 | 12.4. Symmetric and Asymmetric Client Instance Keys . . . . . 112 | |||
Appendix C. Component Data Models . . . . . . . . . . . . . . . 113 | 12.5. Generation of Access Tokens . . . . . . . . . . . . . . 113 | |||
Appendix D. Example Protocol Flows . . . . . . . . . . . . . . . 113 | 12.6. Bearer Access Tokens . . . . . . . . . . . . . . . . . . 114 | |||
D.1. Redirect-Based User Interaction . . . . . . . . . . . . . 113 | 12.7. Key-Bound Token Access Tokens . . . . . . . . . . . . . 114 | |||
D.2. Secondary Device Interaction . . . . . . . . . . . . . . 117 | 12.8. Exposure of End-user Credentials to Client Instance . . 115 | |||
D.3. No User Involvement . . . . . . . . . . . . . . . . . . . 120 | 12.9. Mixing Up Authorization Servers . . . . . . . . . . . . 116 | |||
D.4. Asynchronous Authorization . . . . . . . . . . . . . . . 121 | 12.10. Processing of Client-Presented User Information . . . . 117 | |||
D.5. Applying OAuth 2.0 Scopes and Client IDs . . . . . . . . 124 | 12.11. Client Instance Pre-registration . . . . . . . . . . . . 118 | |||
Appendix E. JSON Structures and Polymorphism . . . . . . . . . . 126 | 12.12. Client Instance Impersonation . . . . . . . . . . . . . 119 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 127 | 12.13. Interception of Information in the Browser . . . . . . . 120 | |||
12.14. Callback URL Manipulation . . . . . . . . . . . . . . . 120 | ||||
12.15. MTLS Deployment Patterns . . . . . . . . . . . . . . . . 121 | ||||
12.16. Interception of Responses from the AS . . . . . . . . . 121 | ||||
12.17. Key Distribution . . . . . . . . . . . . . . . . . . . . 122 | ||||
12.18. Interaction Finish Modes and Polling . . . . . . . . . . 122 | ||||
12.19. Storage of Information During Interaction and | ||||
Continuation . . . . . . . . . . . . . . . . . . . . . 123 | ||||
12.20. Denial of Service (DoS) through Grant Continuation . . . 124 | ||||
12.21. Exhaustion of Random Value Space . . . . . . . . . . . . 124 | ||||
13. Privacy Considerations . . . . . . . . . . . . . . . . . . . 125 | ||||
13.1. Surveillance . . . . . . . . . . . . . . . . . . . . . . 125 | ||||
13.1.1. Surveillance by the Client . . . . . . . . . . . . . 125 | ||||
13.1.2. Surveillance by the Authorization Server . . . . . . 125 | ||||
13.2. Stored Data . . . . . . . . . . . . . . . . . . . . . . 126 | ||||
13.3. Intrusion . . . . . . . . . . . . . . . . . . . . . . . 127 | ||||
13.4. Correlation . . . . . . . . . . . . . . . . . . . . . . 127 | ||||
13.4.1. Correlation by Clients . . . . . . . . . . . . . . . 127 | ||||
13.4.2. Correlation by Resource Servers . . . . . . . . . . 127 | ||||
13.4.3. Correlation by Authorization Servers . . . . . . . . 128 | ||||
13.5. Disclosure in Shared References . . . . . . . . . . . . 128 | ||||
14. References . . . . . . . . . . . . . . . . . . . . . . . . . 128 | ||||
14.1. Normative References . . . . . . . . . . . . . . . . . . 128 | ||||
14.2. Informative References . . . . . . . . . . . . . . . . . 131 | ||||
Appendix A. Document History . . . . . . . . . . . . . . . . . . 131 | ||||
Appendix B. Compared to OAuth 2.0 . . . . . . . . . . . . . . . 134 | ||||
Appendix C. Component Data Models . . . . . . . . . . . . . . . 136 | ||||
Appendix D. Example Protocol Flows . . . . . . . . . . . . . . . 136 | ||||
D.1. Redirect-Based User Interaction . . . . . . . . . . . . . 137 | ||||
D.2. Secondary Device Interaction . . . . . . . . . . . . . . 140 | ||||
D.3. No User Involvement . . . . . . . . . . . . . . . . . . . 143 | ||||
D.4. Asynchronous Authorization . . . . . . . . . . . . . . . 144 | ||||
D.5. Applying OAuth 2.0 Scopes and Client IDs . . . . . . . . 148 | ||||
Appendix E. JSON Structures and Polymorphism . . . . . . . . . . 149 | ||||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 150 | ||||
1. Introduction | 1. Introduction | |||
This protocol allows a piece of software, the client instance, to | This protocol allows a piece of software, the client instance, to | |||
request delegated authorization to resource servers and to request | request delegated authorization to resource servers and to request | |||
direct information. This delegation is facilitated by an | direct information. This delegation is facilitated by an | |||
authorization server usually on behalf of a resource owner. The end- | authorization server usually on behalf of a resource owner. The end- | |||
user operating the software may interact with the authorization | user operating the software may interact with the authorization | |||
server to authenticate, provide consent, and authorize the request. | server to authenticate, provide consent, and authorize the request. | |||
skipping to change at page 6, line 5 ¶ | skipping to change at page 7, line 5 ¶ | |||
indicate line wrapping for long values, as per [RFC8792]. The "\" | indicate line wrapping for long values, as per [RFC8792]. The "\" | |||
character and leading spaces on wrapped lines are not part of the | character and leading spaces on wrapped lines are not part of the | |||
value. | value. | |||
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 | | |||
| Server | | Server | | | Server | | Server | | |||
| |<-+ +---->| | | | |<-+ +---->| | | |||
+-------------+ | | +------------+ | +-------------+ | | +------------+ | |||
+ | | | + | | | |||
+ | | | + | | | |||
+ | | | + | | | |||
+ | | | + | | | |||
+ | | | + | | | |||
+ +----------+ | + +----------+ | |||
+ | Client | | + | Client | | |||
+ | 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 a potential equivalence or out-of-band communication between roles | ----- indicates interaction between two pieces of software | |||
~ ~ ~ indicates a potential equivalence or out-of-band | ||||
communication between roles | ||||
Authorization Server (AS) server that grants delegated privileges to | Authorization Server (AS) server that grants delegated privileges to | |||
a particular instance of client software in the form of access | a particular instance of client software in the form of access | |||
tokens or other information (such as subject information). | tokens or other information (such as subject information). | |||
Client application operated by an end-user that consumes resources | Client application operated by an end-user that consumes resources | |||
from one or several RSs, possibly requiring access privileges from | from one or several RSs, possibly requiring access privileges from | |||
one or several ASs. | one or several ASs. Example: a client can be a mobile | |||
application, a web application, etc. Note: this specification | ||||
Example: a client can be a mobile application, a web application, | differentiates between a specific instance (the client instance, | |||
etc. | identified by its unique key) and the software running the | |||
instance (the client software). For some kinds of client | ||||
Note: this specification differentiates between a specific | software, there could be many instances of that software, each | |||
instance (the client instance, identified by its unique key) and | instance with a different key. | |||
the software running the instance (the client software). For some | ||||
kinds of client software, there could be many instances of that | ||||
software, each instance with a different key. | ||||
Resource Server (RS) server that provides operations on protected | Resource Server (RS) server that provides operations on protected | |||
resources, where operations require a valid access token issued by | resources, where operations require a valid access token issued by | |||
an AS. | an AS. | |||
Resource Owner (RO) subject entity that may grant or deny operations | Resource Owner (RO) subject entity that may grant or deny operations | |||
on resources it has authority upon. | on resources it has authority upon. Note: the act of granting or | |||
denying an operation may be manual (i.e. through an interaction | ||||
Note: the act of granting or denying an operation may be manual | with a physical person) or automatic (i.e. through predefined | |||
(i.e. through an interaction with a physical person) or automatic | organizational rules). | |||
(i.e. through predefined organizational rules). | ||||
End-user natural person that operates a client instance. | ||||
Note: that natural person may or may not be the same entity as the | End-user natural person that operates a client instance. Note: that | |||
RO. | natural person may or may not be the same entity as the 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 | |||
skipping to change at page 8, line 32 ¶ | skipping to change at page 9, line 32 ¶ | |||
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. | |||
Attribute characteristics related to a subject. | Attribute characteristics related to a subject. | |||
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 an | |||
client instance (requiring authorization by the RO) and | ||||
Note: an access token can be first issued to an client instance | 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 valid for a specific | |||
duration and/or to exercise some set of delegated rights to access | duration and/or to exercise some set of delegated rights to access | |||
a protected resource (noun): the act of granting. | a protected resource (noun): the act of granting. | |||
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 associated to | ||||
Note: the RO defines and maintains the rights and attributes | the protected resource, and might temporarily delegate some set of | |||
associated to the protected resource, and might temporarily | those privileges to an end-user. This process is refered to as | |||
delegate some set of those privileges to an end-user. This | privilege delegation. | |||
process is refered to as privilege delegation. | ||||
Protected Resource protected API (Application Programming Interface) | Protected Resource protected API (Application Programming Interface) | |||
served by an RS and that can be accessed by a client, if and only | served by an RS and that can be accessed by a client, if and only | |||
if a valid access token is provided. | if a valid access token is provided. Note: to avoid complex | |||
sentences, the specification document may simply refer to resource | ||||
Note: to avoid complex sentences, the specification document may | 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, organization or device. | Subject person, organization or device. | |||
Subject Information statement asserted by an AS about a subject. | Subject Information statement asserted by an AS about a subject. | |||
1.4. Sequences | 1.4. Trust relationships | |||
GNAP defines its trust objective as: "the RO trusts the AS to ensure | ||||
access validation and delegation of protected resources to end-users, | ||||
through third party clients." | ||||
This trust objective can be decomposed into trust relationships | ||||
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 | ||||
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- | ||||
registration, uncompromised cryptographic components) or if the pair | ||||
is able to infer by indirect means that the agent has made such a | ||||
promise (e.g. a compliant client request). Each agent defines its | ||||
own valuation function of promises given or received. Examples of | ||||
such valuations can be the benefits from interacting with other | ||||
agents (e.g. safety in client access, interoperability with identity | ||||
standards), the cost of following the protocol (including its | ||||
security and privacy requirements and recommendations), a ranking 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 | ||||
against threats, etc. Those valuations may depend on the context of | ||||
the request. For instance, the AS may decide to either take into | ||||
account or discard hints provided by the client, the RS may refuse | ||||
bearer tokens, etc. depending on the specific case in which GNAP is | ||||
used. Some promises can be conditional of some previous interactions | ||||
(e.g. repeated requests). | ||||
Looking back on each trust relationship: | ||||
* end-user/RO: this relationship exists only when the end-user and | ||||
the RO are different, in which case the end-user needs some out of | ||||
band mechanism of getting the RO consent (see Section 4). GNAP | ||||
generally assumes that humans can be authenticated thanks to | ||||
identity protocols (for instance, through an id_token assertion in | ||||
Section 2.2). | ||||
* end-user/client: the client acts as a user agent. Depending on | ||||
the technology used (browser, SPA, mobile application, IoT device, | ||||
etc.), some interactions may or may not be possible (as described | ||||
in Section 2.5.1). Client developers promise to implement | ||||
requirements and generally some recommendations or best practices, | ||||
so that the end-users may confidently use their software. | ||||
However, end-users might also be facing some attacker's client | ||||
software, without even realizing it. | ||||
* client/AS: An honest AS may be facing an attacker's client (as | ||||
discussed just above), or the reverse, and GNAP aims at making | ||||
common attacks impractical. The core specification makes access | ||||
tokens opaque to the client and defines the request/response | ||||
scheme in detail, therefore avoiding extra trust hypotheses from | ||||
this critical piece of software. Yet the AS may further define | ||||
cryptographic attestations or optional rules to simplify the | ||||
access of clients it already trusts, due to past behavior or | ||||
organizational policies (see Section 2.3). | ||||
* RS/RO: the RS promises it protects its resources from unauthorized | ||||
access, and only accepts valid access tokens issued by a trusted | ||||
AS. In case tokens are key bound, proper validation is expected | ||||
from the RS. | ||||
* AS/RO: the AS is expected to follow the decisions made by the RO, | ||||
either through interactive consent requests, repeated interactions | ||||
or automated rules (as described in Section 1.5). Privacy | ||||
considerations aim to reduce the risk of an honest but too curious | ||||
AS, or the consequences of an unexpected user data exposure. | ||||
* AS/RS: the AS promises to issue valid access tokens to legitimate | ||||
client requests (i.e. after carrying out appropriate due | ||||
diligence, as defined in the GNAP protocol). Some optional | ||||
configurations are covered by | ||||
[I-D.draft-ietf-gnap-resource-servers]. | ||||
A global assumption made by GNAP is that authorization requests are | ||||
security and privacy sensitive, and appropriate measures are | ||||
respectively detailed in Section 12 and Section 13. | ||||
A formal trust model is out of scope of this specification, but might | ||||
be carried out thanks to [promise-theory]. | ||||
1.5. 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 | |||
skipping to change at page 12, line 15 ¶ | skipping to change at page 15, line 15 ¶ | |||
* (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 D contain specific guidance on | The following sections and Appendix D 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 for there | access token and never call an RS, just as it is possible for there | |||
not to be a user involved in the delegation process. | not to be a user involved in the delegation process. | |||
1.4.1. Redirect-based Interaction | 1.5.1. 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 resource owner (RO). Since the client | |||
instance is capable of directing the user to an arbitrary URL and | instance is capable of directing the user to an arbitrary URL and | |||
receiving responses from the user's browser, interaction here is | receiving responses from the user's browser, interaction here is | |||
handled through front-channel redirects using the user's browser. | handled through front-channel redirects using the user's browser. | |||
The redirection URL used for interaction is a service hosted by the | The redirection URL used for interaction is a service hosted by the | |||
AS in this example. The client instance uses a persistent session | AS in this example. The client instance uses a persistent session | |||
with the user to ensure the same user that is starting the | with the user to ensure the same user that is starting the | |||
skipping to change at page 15, line 5 ¶ | skipping to change at page 18, line 5 ¶ | |||
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 call | |||
the RS. | 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 D.1. | Appendix D.1. | |||
1.4.2. User-code Interaction | 1.5.2. 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 URL. The URL the user enters | the user to enter that code at a known URL. The URL the user enters | |||
the code at is an interactive service hosted by the AS in this | the code at 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 URL to the user, nor is it capable of accepting incoming | arbitrary URL 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 | |||
skipping to change at page 17, line 26 ¶ | skipping to change at page 20, line 26 ¶ | |||
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 call | |||
the RS. | 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 D.2. | Appendix D.2. | |||
1.4.3. Asynchronous Authorization | 1.5.3. 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. | |||
+--------+ +--------+ +------+ | +--------+ +--------+ +------+ | |||
| Client | | AS | | RO | | | Client | | AS | | RO | | |||
skipping to change at page 19, line 40 ¶ | skipping to change at page 22, line 40 ¶ | |||
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 call | |||
the RS. | 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 D.4. | Appendix D.4. | |||
1.4.4. Software-only Authorization | 1.5.4. 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 a RO to be | make a call on its own behalf, without the need for a 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 --->| | | |||
| | | | | | | | | | |||
skipping to change at page 20, line 36 ¶ | skipping to change at page 23, line 36 ¶ | |||
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 call | |||
the RS. | 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 D.3. | Appendix D.3. | |||
1.4.5. Refreshing an Expired Access Token | 1.5.5. 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 a resource server through some valid GNAP process. The client | |||
instance uses that token at the RS for some time, but eventually the | instance uses that token at the RS for some time, but eventually the | |||
access token expires. The client instance then gets a new access | access token expires. The client instance then gets a new access | |||
token by rotating the expired access token at the AS using the | token by rotating the expired access token at the AS using the | |||
token's management URL. | token's management URL. | |||
+--------+ +--------+ | +--------+ +--------+ | |||
| Client | | AS | | | Client | | AS | | |||
skipping to change at page 22, line 12 ¶ | skipping to change at page 25, line 12 ¶ | |||
as the appropriate key, see the token rotation section for | as the appropriate key, see the token rotation section for | |||
details. | details. | |||
8. The AS validates the rotation request including the signature and | 8. The AS validates the rotation request including the signature and | |||
keys presented in (5) and returns a new access token | keys presented in (5) and returns a new access token | |||
(Section 3.2.1). The response includes a new access token and | (Section 3.2.1). The response includes a new access token and | |||
can also include updated token management information, which the | can also include updated token management information, which the | |||
client instance will store in place of the values returned in | client instance will store in place of the values returned in | |||
(2). | (2). | |||
1.4.6. Requesting User Information | 1.5.6. Requesting User Information | |||
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. | |||
+--------+ +--------+ +------+ | +--------+ +--------+ +------+ | |||
| Client | | AS | | User | | | Client | | AS | | User | | |||
|Instance| | | | | | |Instance| | | | | | |||
skipping to change at page 33, line 18 ¶ | skipping to change at page 36, line 18 ¶ | |||
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 | name (string) Display name of the client software | |||
uri (string) User-facing web page of the client software | uri (string) User-facing web page of the client software | |||
logo_uri (string) Display image to represent the client software | logo_uri (string) Display image to represent the client software | |||
"display": { | "display": { | |||
"name": "My Client Display Name", | "name": "My Client Display Name", | |||
"uri": "https://example.net/client" | "uri": "https://example.net/client" | |||
} | } | |||
[[ See issue #48 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #48 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/48) ]] | issues/48) ]] | |||
Additional display fields are defined by a registry TBD (Section 11). | Additional display fields are defined by a registry TBD (Section 11). | |||
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 | |||
skipping to change at page 34, line 44 ¶ | skipping to change at page 37, line 44 ¶ | |||
"id": "J2G8G8O4AZ" | "id": "J2G8G8O4AZ" | |||
} ], | } ], | |||
"assertions": { | "assertions": { | |||
"id_token": "eyj..." | "id_token": "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 declarative statements that a particular RO is | MUST NOT be taken as declarative 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 SHOULD be validated by the AS. [[ See issue #49 | Assertions SHOULD be validated by the AS. [[ See issue #49 | |||
(https://github.com/ietf-wg-gnap/gnap-core-protocol/issues/49) ]] | (https://github.com/ietf-wg-gnap/gnap-core-protocol/issues/49) ]] | |||
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, the AS SHOULD reject the request with an | during an interaction step, the AS SHOULD reject the request with an | |||
error. | error. | |||
[[ See issue #50 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #50 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/50) ]] | issues/50) ]] | |||
If the AS trusts the client instance to present verifiable | If the AS trusts the client instance to present verifiable | |||
assertions, the AS MAY decide, based on its policy, to skip | assertions, the AS MAY decide, based on its policy, to skip | |||
interaction with the RO, even if the client instance provides one or | interaction with the RO, even if the client instance provides one or | |||
more interaction modes in its request. | more interaction modes in its request. | |||
2.4.1. Identifying the User by Reference | 2.4.1. Identifying the User by Reference | |||
User reference identifiers can be dynamically issued by the AS | The AS can identify the current end-user to the client instance with | |||
(Section 3.5) to allow the client instance to represent the same end- | a reference which can be used by the client instance to refer to the | |||
user to the AS over subsequent requests. | end-user across multiple requests. If the client instance has a | |||
reference for the end-user at this AS, the client instance MAY pass | ||||
If the client instance has a reference for the end-user at this AS, | that reference as a string. The format of this string is opaque to | |||
the client instance MAY pass that reference as a string. The format | the client instance. | |||
of this string is opaque to the client instance. | ||||
"user": "XUT2MFM1XBIKJKSDU8QM" | "user": "XUT2MFM1XBIKJKSDU8QM" | |||
One means of dynamically obtaining such a user reference is from the | ||||
AS returning an "opaque" subject identifier as described in | ||||
Section 3.4. Other means of configuring a client instance with a | ||||
user identifier are out of scope of this specification. | ||||
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, use the full user request object (Section 2.4) | send either of these, use the full user request object (Section 2.4) | |||
instead. | instead. | |||
[[ See issue #51 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | ||||
issues/51) ]] | ||||
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 | |||
error. | error. | |||
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 | |||
skipping to change at page 42, line 23 ¶ | skipping to change at page 45, line 23 ¶ | |||
Section 3.1 | 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. Section 3.2.1 | RS on behalf of the RO. Section 3.2.1 | |||
interact (object) Indicates that interaction through some set of | interact (object) Indicates that interaction through some set of | |||
defined mechanisms needs to take place. Section 3.3 | defined mechanisms needs to take place. Section 3.3 | |||
subject (object) Claims about the RO as known and declared by the | subject (object) Claims about the RO as known and declared by the | |||
AS. Section 3.4 | AS, as described in 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. Section 3.5 | identify itself when making future requests. Section 3.5 | |||
user_handle (string) An identifier this client instance can use to | ||||
identify its current end-user when making future requests. | ||||
Section 3.5 | ||||
error (object) An error code indicating that something has gone | error (object) An error code indicating that something has gone | |||
wrong. Section 3.6 | wrong. Section 3.6 | |||
In this example, the AS is returning an interaction URL | In this example, the AS is returning an interaction URL | |||
(Section 3.3.1), a callback nonce (Section 3.3.4), and a continuation | (Section 3.3.1), a callback nonce (Section 3.3.4), and a continuation | |||
response (Section 3.1). | response (Section 3.1). | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
{ | { | |||
"interact": { | "interact": { | |||
"redirect": "https://server.example.com/interact/4CF492ML\ | "redirect": "https://server.example.com/interact/4CF492ML\ | |||
VMSW9MKMXKHQ", | VMSW9MKMXKHQ", | |||
"finish": "MBDOFXG4Y5CVJCX821LH" | "finish": "MBDOFXG4Y5CVJCX821LH" | |||
}, | }, | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "80UPRY5NM33OMUKMKSKU", | "value": "80UPRY5NM33OMUKMKSKU", | |||
}, | }, | |||
"uri": "https://server.example.com/tx" | "uri": "https://server.example.com/tx" | |||
} | } | |||
} | } | |||
In this example, the AS is returning a bearer access token | In this example, the AS is returning a bearer access token | |||
(Section 3.2.1) with a management URL and a subject identifier | (Section 3.2.1) with a management URL and a subject identifier | |||
(Section 3.4) in the form of an opaque identifier. | (Section 3.4) in the form of an opaque identifier. | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
{ | { | |||
"access_token": { | "access_token": { | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | |||
"flags": ["bearer"], | "flags": ["bearer"], | |||
"manage": "https://server.example.com/token/PRY5NM33O\ | "manage": "https://server.example.com/token/PRY5NM33O\ | |||
M4TB8N6BW7OZB8CDFONP219RP1L", | M4TB8N6BW7OZB8CDFONP219RP1L", | |||
}, | }, | |||
"subject": { | "subject": { | |||
"sub_ids": [ { | "sub_ids": [ { | |||
"format": "opaque", | "format": "opaque", | |||
skipping to change at page 47, line 5 ¶ | skipping to change at page 50, line 5 ¶ | |||
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 a registry TBD | Additional flags can be defined by extensions using a registry TBD | |||
(Section 11). | (Section 11). | |||
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, with a | |||
management URL, and that has access to three described resources (one | management URL, and that has access to three described resources (one | |||
using an object and two described by reference strings). | using an object and two described by reference strings). | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
"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": [ | |||
{ | { | |||
"type": "photo-api", | "type": "photo-api", | |||
"actions": [ | "actions": [ | |||
"read", | "read", | |||
"write", | "write", | |||
skipping to change at page 48, line 19 ¶ | skipping to change at page 51, line 19 ¶ | |||
"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 multiple access token request (Section 2.1.2). | |||
In this non-normative example, two tokens are issued under the names | In this non-normative example, two tokens are issued under the names | |||
"token1" and "token2", and only the first token has a management URL | "token1" and "token2", and only the first token has a management URL | |||
associated with it. | associated with it. | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
"access_token": [ | "access_token": [ | |||
{ | { | |||
"label": "token1", | "label": "token1", | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | |||
"manage": "https://server.example.com/token/PRY5NM33O\ | "manage": "https://server.example.com/token/PRY5NM33O\ | |||
M4TB8N6BW7OZB8CDFONP219RP1L", | M4TB8N6BW7OZB8CDFONP219RP1L", | |||
"access": [ "finance" ] | "access": [ "finance" ] | |||
}, | }, | |||
{ | { | |||
"label": "token2", | "label": "token2", | |||
skipping to change at page 53, line 25 ¶ | skipping to change at page 56, line 25 ¶ | |||
If the AS returns a nonce, the client instance MUST NOT continue a | If the AS returns a nonce, the client instance MUST NOT continue a | |||
grant request before it receives the associated interaction reference | grant request before it receives the associated interaction reference | |||
on the callback URI. See details in Section 4.2. | on the callback URI. See details in Section 4.2. | |||
3.3.5. Extending Interaction Mode Responses | 3.3.5. Extending Interaction Mode Responses | |||
Extensions to this specification can define new interaction mode | Extensions to this specification can define new interaction mode | |||
responses in a registry TBD (Section 11). Extensions MUST document | responses in a registry TBD (Section 11). Extensions MUST document | |||
the corresponding interaction request. | the corresponding interaction request. | |||
3.4. Returning User Information | 3.4. Returning Subject Information | |||
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. This field is an object with the | in the "subject" response field. The AS MUST return the "subject" | |||
following OPTIONAL properties. | 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 | ||||
interaction with the RO (Section 4). | ||||
This field is an object with the following OPTIONAL 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 [I-D.ietf-secevent-subject-identifiers]. | RO, as defined by [I-D.ietf-secevent-subject-identifiers]. | |||
assertions (object) An object containing assertions as values keyed | assertions (object) An object containing assertions as values keyed | |||
on the assertion type defined by a registry TBD (Section 11). [[ | on the assertion type defined by a registry TBD (Section 11). [[ | |||
See issue #41 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | See issue #41 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/41) ]] | issues/41) ]] | |||
updated_at (string) Timestamp as an ISO8610 date string, indicating | updated_at (string) Timestamp as an ISO8610 date string, indicating | |||
when the identified account was last updated. The client instance | when the identified account was last updated. The client instance | |||
MAY use this value to determine if it needs to request updated | MAY use this value to determine if it needs to request updated | |||
profile information through an identity API. The definition of | profile information through an identity API. The definition of | |||
such an identity API is out of scope for this specification. | such an identity API is out of scope for this specification. | |||
"subject": { | "subject": { | |||
"sub_ids": [ { | "sub_ids": [ { | |||
"format": "opaque", | "format": "opaque", | |||
"id": "J2G8G8O4AZ" | "id": "XUT2MFM1XBIKJKSDU8QM" | |||
} ], | } ], | |||
"assertions": { | "assertions": { | |||
"id_token": "eyj..." | "id_token": "eyj..." | |||
} | } | |||
} | } | |||
The AS MUST return the "subject" 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 interaction with the RO | ||||
(Section 4). | ||||
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 identifier 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 others 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 AS MUST | with other account information at the client instance. The AS MUST | |||
ensure that the returned subject identifiers only apply to the | ensure that the returned subject identifiers only apply to the | |||
authenticated end user. The client instance MUST NOT request or use | authenticated end user. The client instance MUST NOT request or use | |||
any returned subject identifiers for communication purposes (see | any returned subject identifiers for communication purposes (see | |||
Section 2.2). That is, a subject identifier returned in the format | Section 2.2). That is, a subject identifier returned in the format | |||
skipping to change at page 55, line 26 ¶ | skipping to change at page 58, line 15 ¶ | |||
sending the associated data value. These handles are intended to be | sending the associated data value. These handles are intended to be | |||
used on future requests. | used on future requests. | |||
Dynamically generated handles are string values that MUST be | Dynamically generated handles are string values that MUST be | |||
protected by the client instance as secrets. Handle values MUST be | protected by the client instance as secrets. Handle values MUST be | |||
unguessable and MUST NOT contain any sensitive information. Handle | unguessable and MUST NOT contain any sensitive information. Handle | |||
values are opaque to the client instance. | values are opaque to the client instance. | |||
All dynamically generated handles are returned as fields in the root | All dynamically generated handles are returned as fields in the root | |||
JSON object of the response. This specification defines the | JSON object of the response. This specification defines the | |||
following dynamic handle returns, additional handles can be defined | following dynamic handle return, additional handles can be defined in | |||
in a registry TBD (Section 11). | a registry TBD (Section 11). | |||
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 | information in the "client" object that the client instance can | |||
use in a future request, as described in Section 2.3.1. | use in a future request, as described in Section 2.3.1. | |||
user_handle (string) A string value used to represent the current | This non-normative example shows one handle along side an issued | |||
user. The client instance can use in a future request, as | ||||
described in Section 2.4.1. | ||||
This non-normative example shows two handles along side an issued | ||||
access token. | access token. | |||
{ | { | |||
"user_handle": "XUT2MFM1XBIKJKSDU8QM", | ||||
"instance_id": "7C7C4AZ9KHRS6X63AJAO", | "instance_id": "7C7C4AZ9KHRS6X63AJAO", | |||
"access_token": { | "access_token": { | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0" | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0" | |||
} | } | |||
} | } | |||
[[ See issue #77 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #77 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/77) ]] | issues/77) ]] | |||
[[ See issue #78 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #78 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
skipping to change at page 63, line 5 ¶ | skipping to change at page 65, line 35 ¶ | |||
hash REQUIRED. The interaction hash value as described in | hash REQUIRED. The interaction hash value as described in | |||
Section 4.2.3. | Section 4.2.3. | |||
interact_ref REQUIRED. The interaction reference generated for this | interact_ref REQUIRED. The interaction reference generated for this | |||
interaction. | interaction. | |||
The means of directing the RO to this URL are outside the scope of | The means of directing the RO to this URL 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 URL. | from a web page and launching the system browser with the target URL. | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
https://client.example.net/return/123455\ | https://client.example.net/return/123455\ | |||
?hash=p28jsq0Y2KK3WS__a42tavNC64ldGTBroywsWxT4md_jZQ1R2\ | ?hash=p28jsq0Y2KK3WS__a42tavNC64ldGTBroywsWxT4md_jZQ1R2\ | |||
HZT8BOWYHcLmObM7XHPAdJzTZMtKBsaraJ64A\ | HZT8BOWYHcLmObM7XHPAdJzTZMtKBsaraJ64A\ | |||
&interact_ref=4IFWWIKYBC2PQ6U56NL1 | &interact_ref=4IFWWIKYBC2PQ6U56NL1 | |||
When receiving the request, the client instance MUST parse the query | When receiving the request, the client instance MUST parse the query | |||
parameters to calculate and validate the hash value as described in | parameters to calculate and validate the hash value as described in | |||
Section 4.2.3. If the hash validates, the client instance sends a | Section 4.2.3. If the hash validates, the client instance sends a | |||
continuation request to the AS as described in Section 5.1 using the | continuation request to the AS as described in Section 5.1 using the | |||
interaction reference value received here. | interaction reference value received here. | |||
skipping to change at page 63, line 33 ¶ | skipping to change at page 66, line 22 ¶ | |||
The entity message body is a JSON object consisting of the following | The entity message body is a JSON object consisting of the following | |||
two fields: | two fields: | |||
hash (string) REQUIRED. The interaction hash value as described in | hash (string) REQUIRED. The interaction hash value as described in | |||
Section 4.2.3. | Section 4.2.3. | |||
interact_ref (string) REQUIRED. The interaction reference generated | interact_ref (string) REQUIRED. The interaction reference generated | |||
for this interaction. | for this interaction. | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
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": "p28jsq0Y2KK3WS__a42tavNC64ldGTBroywsWxT4md_jZQ1R\ | "hash": "p28jsq0Y2KK3WS__a42tavNC64ldGTBroywsWxT4md_jZQ1R\ | |||
2HZT8BOWYHcLmObM7XHPAdJzTZMtKBsaraJ64A", | 2HZT8BOWYHcLmObM7XHPAdJzTZMtKBsaraJ64A", | |||
"interact_ref": "4IFWWIKYBC2PQ6U56NL1" | "interact_ref": "4IFWWIKYBC2PQ6U56NL1" | |||
} | } | |||
skipping to change at page 65, line 5 ¶ | skipping to change at page 67, line 44 ¶ | |||
[[ See issue #56 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #56 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/56) ]] | issues/56) ]] | |||
4.2.3.1. SHA3-512 | 4.2.3.1. SHA3-512 | |||
The "sha3" hash method consists of hashing the input string with the | The "sha3" hash method consists of hashing the input string with the | |||
512-bit SHA3 algorithm. The byte array is then encoded using URL | 512-bit SHA3 algorithm. The byte array is then encoded using URL | |||
Safe Base64 with no padding. The resulting string is the hash value. | Safe Base64 with no padding. The resulting string is the hash value. | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
p28jsq0Y2KK3WS__a42tavNC64ldGTBroywsWxT4md_jZQ1R2HZT8BOWYHcLmObM\ | p28jsq0Y2KK3WS__a42tavNC64ldGTBroywsWxT4md_jZQ1R2HZT8BOWYHcLmObM\ | |||
7XHPAdJzTZMtKBsaraJ64A | 7XHPAdJzTZMtKBsaraJ64A | |||
4.2.3.2. SHA2-512 | 4.2.3.2. SHA2-512 | |||
The "sha2" hash method consists of hashing the input string with the | The "sha2" hash method consists of hashing the input string with the | |||
512-bit SHA2 algorithm. The byte array is then encoded using URL | 512-bit SHA2 algorithm. The byte array is then encoded using URL | |||
Safe Base64 with no padding. The resulting string is the hash value. | Safe Base64 with no padding. The resulting string is the hash value. | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
62SbcD3Xs7L40rjgALA-ymQujoh2LB2hPJyX9vlcr1H6ecChZ8BNKkG_HrOKP_Bp\ | 62SbcD3Xs7L40rjgALA-ymQujoh2LB2hPJyX9vlcr1H6ecChZ8BNKkG_HrOKP_Bp\ | |||
j84rh4mC9aE9x7HPBFcIHw | j84rh4mC9aE9x7HPBFcIHw | |||
5. Continuing a Grant Request | 5. Continuing a Grant Request | |||
While it is possible for the AS to return a Section 3 with all the | While it is possible for the AS to return a Section 3 with all the | |||
client instance's requested information (including access tokens | client instance's requested information (including access tokens | |||
(Section 3.2) and direct user information (Section 3.4)), it's more | (Section 3.2) and direct user information (Section 3.4)), it's more | |||
common that the AS and the client instance will need to communicate | common that the AS and the client instance will need to communicate | |||
several times over the lifetime of an access grant. This is often | several times over the lifetime of an access grant. This is often | |||
skipping to change at page 68, line 8 ¶ | skipping to change at page 71, line 8 ¶ | |||
The Section 3 MAY contain any newly-created access tokens | The Section 3 MAY contain any newly-created access tokens | |||
(Section 3.2) or newly-released subject claims (Section 3.4). The | (Section 3.2) or newly-released subject claims (Section 3.4). The | |||
response MAY contain a new "continue" response (Section 3.1) as | response MAY contain a new "continue" response (Section 3.1) as | |||
described above. The response SHOULD NOT contain any interaction | described above. The response SHOULD NOT contain any interaction | |||
responses (Section 3.3). [[ See issue #89 (https://github.com/ietf- | responses (Section 3.3). [[ See issue #89 (https://github.com/ietf- | |||
wg-gnap/gnap-core-protocol/issues/89) ]] | wg-gnap/gnap-core-protocol/issues/89) ]] | |||
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 | ||||
{ | { | |||
"access_token": { | "access_token": { | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | |||
"manage": "https://server.example.com/token/PRY5NM33O\ | "manage": "https://server.example.com/token/PRY5NM33O\ | |||
M4TB8N6BW7OZB8CDFONP219RP1L", | M4TB8N6BW7OZB8CDFONP219RP1L", | |||
}, | }, | |||
"subject": { | "subject": { | |||
"sub_ids": [ { | "sub_ids": [ { | |||
"format": "opaque", | "format": "opaque", | |||
"id": "J2G8G8O4AZ" | "id": "J2G8G8O4AZ" | |||
skipping to change at page 69, line 31 ¶ | skipping to change at page 72, line 31 ¶ | |||
[[ See issue #90 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #90 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/90) ]] | issues/90) ]] | |||
[[ See issue #91 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #91 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/91) ]] | issues/91) ]] | |||
If the request is successful in causing the AS to issue access tokens | If the request is successful in causing the AS to issue access tokens | |||
and release subject claims, the response could look like this | and release subject claims, the response could look like this | |||
example: | example: | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
{ | { | |||
"access_token": { | "access_token": { | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | |||
"manage": "https://server.example.com/token/PRY5NM33O\ | "manage": "https://server.example.com/token/PRY5NM33O\ | |||
M4TB8N6BW7OZB8CDFONP219RP1L", | M4TB8N6BW7OZB8CDFONP219RP1L", | |||
}, | }, | |||
"subject": { | "subject": { | |||
"sub_ids": [ { | "sub_ids": [ { | |||
"format": "opaque", | "format": "opaque", | |||
"id": "J2G8G8O4AZ" | "id": "J2G8G8O4AZ" | |||
skipping to change at page 70, line 14 ¶ | skipping to change at page 73, line 23 ¶ | |||
The client instance MAY include the "access_token" and "subject" | The client instance MAY include the "access_token" and "subject" | |||
fields as described in Section 2.1 and Section 2.2. Inclusion of | fields as described in Section 2.1 and Section 2.2. Inclusion of | |||
these fields override any values in the initial request, which MAY | these fields override any values in the initial request, which MAY | |||
trigger additional requirements and policies by the AS. For example, | trigger additional requirements and policies by the AS. For example, | |||
if the client instance is asking for more access, the AS could | if the client instance is asking for more access, the AS could | |||
require additional interaction with the RO to gather additional | require additional interaction with the RO to gather additional | |||
consent. If the client instance is asking for more limited access, | consent. If the client instance is asking for more limited access, | |||
the AS could determine that sufficient authorization has been granted | the AS could determine that sufficient authorization has been granted | |||
to the client instance and return the more limited access rights | to the client instance and return the more limited access rights | |||
immediately. [[ See issue #92 (https://github.com/ietf-wg-gnap/gnap- | immediately. [[ See issue #92 (https://github.com/ietf-wg-gnap/gnap- | |||
core-protocol/issues/92) ]] | core-protocol/issues/92) ]] | |||
The client instance MAY include the "interact" field as described in | The client instance MAY include the "interact" field as described in | |||
Section 2.5. Inclusion of this field indicates that the client | Section 2.5. Inclusion of this field indicates that the client | |||
instance is capable of driving interaction with the RO, and this | instance is capable of driving interaction with the RO, and this | |||
field replaces any values from a previous request. The AS MAY | 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. [[ See issue #93 (https://github.com/ietf-wg-gnap/gnap-core- | user. [[ See issue #93 (https://github.com/ietf-wg-gnap/gnap-core- | |||
protocol/issues/93) ]] | protocol/issues/93) ]] | |||
The client instance MUST NOT include the "client" section of the | The client instance MUST NOT include the "client" section of the | |||
request. [[ See issue #94 (https://github.com/ietf-wg-gnap/gnap-core- | request. [[ See issue #94 (https://github.com/ietf-wg-gnap/gnap-core- | |||
protocol/issues/94) ]] | protocol/issues/94) ]] | |||
The client instance MAY include post-interaction responses such as | The client instance MAY include post-interaction responses such as | |||
described in Section 5.1. [[ See issue #95 (https://github.com/ietf- | described in Section 5.1. [[ See issue #95 (https://github.com/ietf- | |||
wg-gnap/gnap-core-protocol/issues/95) ]] | wg-gnap/gnap-core-protocol/issues/95) ]] | |||
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 existing access | new, separate access tokens. The AS MAY revoke existing access | |||
tokens after a modification has occurred. [[ See issue #96 | tokens after a modification has occurred. [[ See issue #96 | |||
(https://github.com/ietf-wg-gnap/gnap-core-protocol/issues/96) ]] | (https://github.com/ietf-wg-gnap/gnap-core-protocol/issues/96) ]] | |||
If the modified request can be granted immediately by the AS, the | If the modified request can be granted immediately by the AS, the | |||
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 "continue" 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: | |||
skipping to change at page 77, line 4 ¶ | skipping to change at page 81, line 4 ¶ | |||
in Section 3.2.1, unless the "multi_token" flag is specified in the | in Section 3.2.1, unless the "multi_token" flag is specified in the | |||
request. The value of the access token MUST NOT be the same as the | request. The value of the access token MUST NOT be the same as the | |||
current value of the access token used to access the management API. | current value of the access token used to access the management API. | |||
The response MAY include an updated access token management URL as | The response MAY include an updated access token management URL as | |||
well, and if so, the client instance MUST use this new URL to manage | well, and if so, the client instance MUST use this new URL to manage | |||
the new access token. [[ See issue #101 (https://github.com/ietf-wg- | the new access token. [[ See issue #101 (https://github.com/ietf-wg- | |||
gnap/gnap-core-protocol/issues/101) ]] | gnap/gnap-core-protocol/issues/101) ]] | |||
[[ See issue #102 (https://github.com/ietf-wg-gnap/gnap-core- | [[ See issue #102 (https://github.com/ietf-wg-gnap/gnap-core- | |||
protocol/issues/102) ]] | protocol/issues/102) ]] | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
{ | { | |||
"access_token": { | "access_token": { | |||
"value": "FP6A8H6HY37MH13CK76LBZ6Y1UADG6VEUPEER5H2", | "value": "FP6A8H6HY37MH13CK76LBZ6Y1UADG6VEUPEER5H2", | |||
"manage": "https://server.example.com/token/PRY5NM33O\ | "manage": "https://server.example.com/token/PRY5NM33O\ | |||
M4TB8N6BW7OZB8CDFONP219RP1L", | M4TB8N6BW7OZB8CDFONP219RP1L", | |||
"access": [ | "access": [ | |||
{ | { | |||
"type": "photo-api", | "type": "photo-api", | |||
"actions": [ | "actions": [ | |||
"read", | "read", | |||
skipping to change at page 83, line 5 ¶ | skipping to change at page 87, line 5 ¶ | |||
to either the access token's own key or, in the case of bearer | 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. | |||
[[ See issue #105 (https://github.com/ietf-wg-gnap/gnap-core- | [[ See issue #105 (https://github.com/ietf-wg-gnap/gnap-core- | |||
protocol/issues/105) ]] | protocol/issues/105) ]] | |||
In the following sections, unless otherwise noted, the "RS256" JOSE | In the following sections, unless otherwise noted, the "RS256" JOSE | |||
Signature Algorithm is applied using the following RSA key (presented | Signature Algorithm is applied using the following RSA key (presented | |||
here in JWK format): | here in JWK format): | |||
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\ | |||
LMovMinOYttpRndKoGTNdJfWlDFDScAs8C5n2y1STCQPRximBY-bw39-aZq\ | LMovMinOYttpRndKoGTNdJfWlDFDScAs8C5n2y1STCQPRximBY-bw39-aZq\ | |||
JXMxOLyPjzuVgiTOCBIvLD6-8-mvFjXZk_eefD0at6mQ5qV3U1jZt88", | JXMxOLyPjzuVgiTOCBIvLD6-8-mvFjXZk_eefD0at6mQ5qV3U1jZt88", | |||
"d": "FHlhdTF0ozTliDxMBffT6aJVKZKmbbFJOVNten9c3lXKB3ux3NAb_D2dB\ | "d": "FHlhdTF0ozTliDxMBffT6aJVKZKmbbFJOVNten9c3lXKB3ux3NAb_D2dB\ | |||
skipping to change at page 85, line 5 ¶ | skipping to change at page 89, line 5 ¶ | |||
Other covered content MAY also be included. | Other covered content MAY also be included. | |||
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, 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, and the explicit "alg" signature parameter MUST NOT be | field, and the explicit "alg" signature parameter MUST NOT be | |||
included. | included. | |||
In this example, the message body is the following JSON object: | In this example, the message body is the following JSON object: | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
{ | { | |||
"access_token": { | "access_token": { | |||
"access": [ | "access": [ | |||
"dolphin-metadata" | "dolphin-metadata" | |||
] | ] | |||
}, | }, | |||
"interact": { | "interact": { | |||
"start": ["redirect"], | "start": ["redirect"], | |||
"finish": { | "finish": { | |||
"method": "redirect", | "method": "redirect", | |||
skipping to change at page 86, line 5 ¶ | skipping to change at page 90, line 5 ¶ | |||
} | } | |||
This body is hashed for the Digest header using SHA-256 into the | This body is hashed for the Digest header using SHA-256 into the | |||
following encoded value: | following encoded value: | |||
SHA-256=98QzyNVYpdgTrWBKpC4qFSCmmR+CrwwvUoiaDCSjKxw= | SHA-256=98QzyNVYpdgTrWBKpC4qFSCmmR+CrwwvUoiaDCSjKxw= | |||
The HTTP message signature input string is calculated to be the | The HTTP message signature input string is calculated to be the | |||
following: | following: | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
"@request-target": post /gnap | "@request-target": post /gnap | |||
"host": server.example.com | "host": server.example.com | |||
"content-type": application/json | "content-type": application/json | |||
"digest": SHA-256=98QzyNVYpdgTrWBKpC4qFSCmmR+CrwwvUoiaDCSjKxw= | "digest": SHA-256=98QzyNVYpdgTrWBKpC4qFSCmmR+CrwwvUoiaDCSjKxw= | |||
"content-length": 986 | "content-length": 986 | |||
"@signature-params": ("@request-target" "host" "content-type" \ | "@signature-params": ("@request-target" "host" "content-type" \ | |||
"digest" "content-length");created=1618884475;keyid="gnap-rsa" | "digest" "content-length");created=1618884475;keyid="gnap-rsa" | |||
This leads to the following full HTTP message request: | This leads to the following full HTTP message request: | |||
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 | |||
Content-Length: 986 | Content-Length: 986 | |||
Digest: SHA-256=98QzyNVYpdgTrWBKpC4qFSCmmR+CrwwvUoiaDCSjKxw= | Digest: SHA-256=98QzyNVYpdgTrWBKpC4qFSCmmR+CrwwvUoiaDCSjKxw= | |||
Signature-Input: sig1=("@request-target" "host" "content-type" \ | Signature-Input: sig1=("@request-target" "host" "content-type" \ | |||
"digest" "content-length");created=1618884475;keyid="gnap-rsa" | "digest" "content-length");created=1618884475;keyid="gnap-rsa" | |||
Signature: \ | Signature: \ | |||
sig1=:axj8FLOvEWBcwh+Xk6VTTKXxqo4XNygleTDJ8h3ZJfi1sSmWrRtyo9RG/dc\ | sig1=:axj8FLOvEWBcwh+Xk6VTTKXxqo4XNygleTDJ8h3ZJfi1sSmWrRtyo9RG/dc\ | |||
miZmdszRjWbg+/ixVZpA4BL3AOwEOxxtmHAXNB8uJ0I3tfbs6Suyk4sEo8zPr+MJq\ | miZmdszRjWbg+/ixVZpA4BL3AOwEOxxtmHAXNB8uJ0I3tfbs6Suyk4sEo8zPr+MJq\ | |||
skipping to change at page 87, line 40 ¶ | skipping to change at page 91, line 44 ¶ | |||
In this example, the certificate is communicated to the application | In this example, the certificate is communicated to the application | |||
through the "Client-Cert" header from a TLS reverse proxy, leading to | through the "Client-Cert" header from a TLS reverse proxy, leading to | |||
the following full HTTP request message: | the following full HTTP request message: | |||
POST /gnap HTTP/1.1 | POST /gnap HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/jose | Content-Type: application/jose | |||
Content-Length: 1567 | Content-Length: 1567 | |||
Client-Cert: \ | Client-Cert: \ | |||
MIIC6jCCAdKgAwIBAgIGAXjw74xPMA0GCSqGSIb3DQEBCwUAMDYxNDAyBgNVBAMM \ | :MIIC6jCCAdKgAwIBAgIGAXjw74xPMA0GCSqGSIb3DQEBCwUAMDYxNDAyBgNVBAMM\ | |||
K05JWU15QmpzRGp5QkM5UDUzN0Q2SVR6a3BEOE50UmppOXlhcEV6QzY2bVEwHhcN \ | K05JWU15QmpzRGp5QkM5UDUzN0Q2SVR6a3BEOE50UmppOXlhcEV6QzY2bVEwHhcN\ | |||
MjEwNDIwMjAxODU0WhcNMjIwMjE0MjAxODU0WjA2MTQwMgYDVQQDDCtOSVlNeUJq \ | MjEwNDIwMjAxODU0WhcNMjIwMjE0MjAxODU0WjA2MTQwMgYDVQQDDCtOSVlNeUJq\ | |||
c0RqeUJDOVA1MzdENklUemtwRDhOdFJqaTl5YXBFekM2Nm1RMIIBIjANBgkqhkiG \ | c0RqeUJDOVA1MzdENklUemtwRDhOdFJqaTl5YXBFekM2Nm1RMIIBIjANBgkqhkiG\ | |||
9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhYOJ+XOKISdMMShn/G4W9m20mT0VWtQBsmBB \ | 9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhYOJ+XOKISdMMShn/G4W9m20mT0VWtQBsmBB\ | |||
kI2cmRt4Ai8BfYdHsFzAtYKOjpBR1RpKpJmVKxIGNy0g6Z3ad2XYsh8KowlyVy8I \ | kI2cmRt4Ai8BfYdHsFzAtYKOjpBR1RpKpJmVKxIGNy0g6Z3ad2XYsh8KowlyVy8I\ | |||
kZ8NMwSrcUIBZGYXjHpwjzvfGvXH/5KJlnR3/uRUp4Z4Ujk2bCaKegDn11V2vxE4 \ | kZ8NMwSrcUIBZGYXjHpwjzvfGvXH/5KJlnR3/uRUp4Z4Ujk2bCaKegDn11V2vxE4\ | |||
1hqaPUnhRZxe0jRETddzsE3mu1SK8dTCROjwUl14mUNo8iTrTm4n0qDadz8BkPo+ \ | 1hqaPUnhRZxe0jRETddzsE3mu1SK8dTCROjwUl14mUNo8iTrTm4n0qDadz8BkPo+\ | |||
uv4BC0bunS0K3bA/3UgVp7zBlQFoFnLTO2uWp/muLEWGl67gBq9MO3brKXfGhi3k \ | uv4BC0bunS0K3bA/3UgVp7zBlQFoFnLTO2uWp/muLEWGl67gBq9MO3brKXfGhi3k\ | |||
OzywzwPTuq+cVQDyEN7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQIDAQABMA0GCSqG \ | OzywzwPTuq+cVQDyEN7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQIDAQABMA0GCSqG\ | |||
SIb3DQEBCwUAA4IBAQBnYFK0eYHy+hVf2D58usj39lhL5znb/q9G35GBd/XsWfCE \ | SIb3DQEBCwUAA4IBAQBnYFK0eYHy+hVf2D58usj39lhL5znb/q9G35GBd/XsWfCE\ | |||
wHuLOSZSUmG71bZtrOcx0ptle9bp2kKl4HlSTTfbtpuG5onSa3swRNhtKtUy5NH9 \ | wHuLOSZSUmG71bZtrOcx0ptle9bp2kKl4HlSTTfbtpuG5onSa3swRNhtKtUy5NH9\ | |||
W/FLViKWfoPS3kwoEpC1XqKY6l7evoTCtS+kTQRSrCe4vbNprCAZRxz6z1nEeCgu \ | W/FLViKWfoPS3kwoEpC1XqKY6l7evoTCtS+kTQRSrCe4vbNprCAZRxz6z1nEeCgu\ | |||
NMk38yTRvx8ihZpVOuU+Ih+dOtVe/ex5IAPYxlQsvtfhsUZqc7IyCcy72WHnRHlU \ | NMk38yTRvx8ihZpVOuU+Ih+dOtVe/ex5IAPYxlQsvtfhsUZqc7IyCcy72WHnRHlU\ | |||
fn3pJm0S5270+Yls3Iv6h3oBAP19i906UjiUTNH3g0xMW+V4uLxgyckt4wD4Mlyv \ | fn3pJm0S5270+Yls3Iv6h3oBAP19i906UjiUTNH3g0xMW+V4uLxgyckt4wD4Mlyv\ | |||
jnaQ7Z3sR6EsXMocAbXHIAJhwKdtU/fLgdwL5vtx | jnaQ7Z3sR6EsXMocAbXHIAJhwKdtU/fLgdwL5vtx: | |||
{ | { | |||
"access_token": { | "access_token": { | |||
"access": [ | "access": [ | |||
"dolphin-metadata" | "dolphin-metadata" | |||
] | ] | |||
}, | }, | |||
"interact": { | "interact": { | |||
"start": ["redirect"], | "start": ["redirect"], | |||
"finish": { | "finish": { | |||
skipping to change at page 91, line 5 ¶ | skipping to change at page 95, line 5 ¶ | |||
"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 | |||
} | } | |||
The request body is the following JSON object: | The request body is the following JSON object: | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
{ | { | |||
"access_token": { | "access_token": { | |||
"access": [ | "access": [ | |||
"dolphin-metadata" | "dolphin-metadata" | |||
] | ] | |||
}, | }, | |||
"interact": { | "interact": { | |||
"start": ["redirect"], | "start": ["redirect"], | |||
"finish": { | "finish": { | |||
"method": "redirect", | "method": "redirect", | |||
skipping to change at page 92, line 5 ¶ | skipping to change at page 96, line 5 ¶ | |||
}, | }, | |||
} | } | |||
} | } | |||
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 | ||||
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 | |||
Content-Length: 983 | Content-Length: 983 | |||
Detached-JWS: eyJhbGciOiJSUzI1NiIsImNyZWF0ZWQiOjE2MTg4ODQ0NzUsImh0b\ | Detached-JWS: eyJhbGciOiJSUzI1NiIsImNyZWF0ZWQiOjE2MTg4ODQ0NzUsImh0b\ | |||
SI6IlBPU1QiLCJraWQiOiJnbmFwLXJzYSIsInR5cCI6ImduYXAtYmluZGluZytqd3\ | SI6IlBPU1QiLCJraWQiOiJnbmFwLXJzYSIsInR5cCI6ImduYXAtYmluZGluZytqd3\ | |||
NkIiwidXJpIjoiaHR0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20vZ25hcCJ9.PGiVuO\ | NkIiwidXJpIjoiaHR0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20vZ25hcCJ9.PGiVuO\ | |||
ZUcN1tRtUS6tx2b4cBgw9mPgXG3IPB3wY7ctc.fUq-SV-A1iFN2MwCRW_yolVtT2_\ | ZUcN1tRtUS6tx2b4cBgw9mPgXG3IPB3wY7ctc.fUq-SV-A1iFN2MwCRW_yolVtT2_\ | |||
TZA2h5YeXUoi5F2Q2iToC0Tc4drYFOSHIX68knd68RUA7yHqCVP-ZQEd6aL32H69e\ | TZA2h5YeXUoi5F2Q2iToC0Tc4drYFOSHIX68knd68RUA7yHqCVP-ZQEd6aL32H69e\ | |||
9zuMiw6O_s4TBKB3vDOvwrhYtDH6fX2hP70cQoO-47OwbqP-ifkrvI3hVgMX9TfjV\ | 9zuMiw6O_s4TBKB3vDOvwrhYtDH6fX2hP70cQoO-47OwbqP-ifkrvI3hVgMX9TfjV\ | |||
skipping to change at page 95, line 5 ¶ | skipping to change at page 99, line 5 ¶ | |||
"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 | |||
} | } | |||
The request body, used as the JWS Payload, is the following JSON | The request body, used as the JWS Payload, is the following JSON | |||
object: | object: | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
{ | { | |||
"access_token": { | "access_token": { | |||
"access": [ | "access": [ | |||
"dolphin-metadata" | "dolphin-metadata" | |||
] | ] | |||
}, | }, | |||
"interact": { | "interact": { | |||
"start": ["redirect"], | "start": ["redirect"], | |||
"finish": { | "finish": { | |||
"method": "redirect", | "method": "redirect", | |||
skipping to change at page 96, line 5 ¶ | skipping to change at page 100, line 5 ¶ | |||
"uri": "https://client.foo/" | "uri": "https://client.foo/" | |||
}, | }, | |||
}, | }, | |||
"subject": { | "subject": { | |||
"formats": ["iss_sub", "opaque"] | "formats": ["iss_sub", "opaque"] | |||
} | } | |||
} | } | |||
This leads to the following full HTTP request message: | This leads to the following full HTTP request message: | |||
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/jose | Content-Type: application/jose | |||
Content-Length: 1047 | Content-Length: 1047 | |||
eyJhbGciOiJSUzI1NiIsImNyZWF0ZWQiOjE2MTg4ODQ0NzUsImh0bSI6IlBPU1QiLCJ\ | eyJhbGciOiJSUzI1NiIsImNyZWF0ZWQiOjE2MTg4ODQ0NzUsImh0bSI6IlBPU1QiLCJ\ | |||
raWQiOiJnbmFwLXJzYSIsInR5cCI6ImduYXAtYmluZGluZytqd3NkIiwidXJpIjoiaH\ | raWQiOiJnbmFwLXJzYSIsInR5cCI6ImduYXAtYmluZGluZytqd3NkIiwidXJpIjoiaH\ | |||
R0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20vZ25hcCJ9.CnsKICAgICJhY2Nlc3NfdG9r\ | R0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20vZ25hcCJ9.CnsKICAgICJhY2Nlc3NfdG9r\ | |||
ZW4iOiB7CiAgICAgICAgImFjY2VzcyI6IFsKICAgICAgICAgICAgImRvbHBoaW4tbWV\ | ZW4iOiB7CiAgICAgICAgImFjY2VzcyI6IFsKICAgICAgICAgICAgImRvbHBoaW4tbWV\ | |||
0YWRhdGEiCiAgICAgICAgXQogICAgfSwKICAgICJpbnRlcmFjdCI6IHsKICAgICAgIC\ | 0YWRhdGEiCiAgICAgICAgXQogICAgfSwKICAgICJpbnRlcmFjdCI6IHsKICAgICAgIC\ | |||
skipping to change at page 104, line 9 ¶ | skipping to change at page 108, line 9 ¶ | |||
with an authentication header indicating that GNAP needs to be used | with an authentication header indicating that GNAP needs to be used | |||
to access the resource. The address of the GNAP endpoint MUST be | to access the resource. The address of the GNAP endpoint MUST be | |||
sent in the "as_uri" parameter. The RS MAY additionally return a | sent in the "as_uri" parameter. The RS MAY additionally return a | |||
resource reference that the client instance MAY use in its access | resource reference that the client instance MAY use in its access | |||
token request. This resource reference MUST be sufficient for at | token request. This resource reference MUST be sufficient for at | |||
least the action the client instance was attempting to take at the RS | least the action the client instance was attempting to take at the RS | |||
and MAY be more powerful. The means for the RS to determine the | and MAY be more powerful. The means for the RS to determine the | |||
resource reference are out of scope of this specification, but some | resource reference are out of scope of this specification, but some | |||
dynamic methods are discussed in | dynamic methods are discussed in | |||
[I-D.draft-ietf-gnap-resource-servers]. The content of the resource | [I-D.draft-ietf-gnap-resource-servers]. The content of the resource | |||
handle is opaque to the client instance. | reference is opaque to the client instance. | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
WWW-Authenticate: \ | WWW-Authenticate: \ | |||
GNAP as_uri=https://server.example/tx,access=FWWIKYBQ6U56NL1 | GNAP as_uri=https://server.example/tx,access=FWWIKYBQ6U56NL1 | |||
The client instance then makes a request to the "as_uri" as described | The client instance then makes a request to the "as_uri" as described | |||
in Section 2, with the value of "access" as one of the members of the | in Section 2, with the value of "access" as one of the members of the | |||
"access" array in the "access_token" portion of the request. The | "access" array in the "access_token" portion of the request. The | |||
client instance MAY request additional resources and other | client instance MAY request additional resources and other | |||
information. The client instance MAY request multiple access tokens. | information. The client instance MAY request multiple access tokens. | |||
skipping to change at page 105, line 36 ¶ | skipping to change at page 109, line 36 ¶ | |||
feedback and development of early versions of the XYZ protocol that | feedback and development of early versions of the XYZ protocol that | |||
fed into this standards work. | fed into this standards work. | |||
11. IANA Considerations | 11. IANA Considerations | |||
[[ TBD: There are a lot of items in the document that are expandable | [[ TBD: There are a lot of items in the document that are expandable | |||
through the use of value registries. ]] | through the use of value registries. ]] | |||
12. Security Considerations | 12. Security Considerations | |||
[[ TBD: There are a lot of security considerations to add. ]] | 12.1. TLS Protection in Transit | |||
All requests have to be over TLS or equivalent as per [BCP195]. Many | All requests in GNAP have to be made over TLS or equivalent as | |||
handles act as shared secrets, though they can be combined with a | outlined in [BCP195] to protect the contents of the request and | |||
requirement to provide proof of a key as well. | response from manipulation and interception by an attacker. This | |||
includes all requests from a client instance to the AS, all requests | ||||
from the client instance to an RS, any requests back to a client | ||||
instance such as the push-based interaction finish method, and any | ||||
back-end communications such as from an RS to an AS as described in | ||||
[I-D.draft-ietf-gnap-resource-servers]. Additionally, all requests | ||||
between a browser and other components, such as during redirect-based | ||||
interaction, need to be made over TLS or use equivalent protection. | ||||
Even though requests from the client instance to the AS are signed, | ||||
the signature method alone does not protect the request from | ||||
interception by an attacker. TLS protects the response as well as | ||||
the request, preventing an attacker from intercepting requested | ||||
information as it is returned. This is particularly important in the | ||||
core protocol for security artifacts such as nonces and for personal | ||||
information such as subject information. | ||||
The use of key-bound access tokens does not negate the requirement | ||||
for protecting calls to the RS with TLS. While the keys and | ||||
signatures associated a bound access token will prevent an attacker | ||||
from using a stolen token, without TLS an attacker would be able to | ||||
watch the data being sent to the RS and returned from the RS during | ||||
legitimate use of the client instance under attack. Additionally, | ||||
without TLS an attacker would be able to profile the calls made | ||||
between the client instance and RS, possibly gaining information | ||||
about the functioning of the API between the client software and RS | ||||
software that would be otherwise unknown to the attacker. | ||||
TLS or equivalent protection also needs to be used between the | ||||
browser and any other components. This applies during initial | ||||
redirects to an AS's components during interaction, during any | ||||
interaction with the resource owner, and during any redirect back to | ||||
the client instance. Without TLS protection on these portions of the | ||||
process, an attacker could wait for a valid request to start and then | ||||
take over the resource owner's interaction session. | ||||
12.2. Protection of Client Instance Key Material | ||||
Client instances are identified by their unique keys, and anyone with | ||||
access to a client instance's key material will be able to | ||||
impersonate that client instance to all parties. This is true for | ||||
both calls to the AS as well as calls to an RS using a key-bound | ||||
access token. | ||||
Different types of client software have different methods available | ||||
for creating, managing, and registering keys. GNAP explicitly allows | ||||
for ephemeral clients, such as SPAs, and single-user clients, such as | ||||
mobile applications, to create and present their own keys during the | ||||
initial grant request. The client software can securely generate a | ||||
keypair on-device and present the public key, along with proof of | ||||
holding that public key, to the AS as part of the initial request. | ||||
To facilitate trust in these ephemeral keys, GNAP further allows for | ||||
an extensible set of client information to be passed with the | ||||
request. This information can include device posture and third-party | ||||
attestations of the client software's provenance and authenticity, | ||||
depending on the needs and capabilities of the client software and | ||||
its deployment. | ||||
From GNAP's perspective, each distinct key is a different client | ||||
instance. However, multiple client instances can be grouped together | ||||
by an AS policy and treated similarly to each other. For instance, | ||||
if an AS knows of several different keys for different servers within | ||||
a cluster, the AS can decide that authorization of one of these | ||||
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 | ||||
client keys together in its policy, since the breach of one instance | ||||
would have direct effects on the others in the cluster. | ||||
Additionally, if an end user controls multiple instances of a single | ||||
type of client software, such as having an application installed on | ||||
multiple devices, each of these instances is expected to have a | ||||
separate key and be issued separate access tokens. However, if the | ||||
AS is able to group these separate instances together as described | ||||
above, it can streamline the authorization process for new instances | ||||
of the same client software. For example, if two client instances | ||||
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 | ||||
instance of this software to all related instances. The AS could | ||||
then choose to bypass an explicit prompt of the resource owner for | ||||
approval during authorization, since such approval has already been | ||||
given. An AS doing such a process would need to take assurance | ||||
measures that the different instances are in fact correlated and | ||||
authentic, as well as ensuring the expected resource owner is in | ||||
control of the client instance. | ||||
Finally, if multiple instances of client software each have the same | ||||
key, then from GNAP's perspective, these are functionally the same | ||||
client instance as GNAP has no reasonable way to differentiate | ||||
between them. This situation could happen if multiple instances | ||||
within a cluster can securely share secret information among | ||||
themselves. Even though there are multiple copies of the software, | ||||
the shared key makes these copies all present as a single instance. | ||||
It is considered bad practice to share keys between copies of | ||||
software unless they are very tightly integrated with each other and | ||||
can be closely managed. It is particularly bad practice to allow an | ||||
end-user to copy keys between client instances and to willingly use | ||||
the same key in multiple instances. | ||||
12.3. Protection of Authorization Server | ||||
The AS performs critical functions in GNAP, including authenticating | ||||
client software, managing interactions with end-users to gather | ||||
consent and provide notice, and issuing access tokens for client | ||||
instances to present to resource servers. As such, protecting the AS | ||||
is central to any GNAP deployment. | ||||
If an attacker is able to gain control over an AS, they would be able | ||||
to create fraudulent tokens and manipulate registration information | ||||
to allow for malicious clients. These tokens and clients would be | ||||
trusted by other components in the ecosystem under the protection of | ||||
the AS. | ||||
If the AS is using signed access tokens, an attacker in control of | ||||
the AS's signing keys would be able to manufacture fraudulent tokens | ||||
for use at RS's under the protection of the AS. | ||||
If an attacker is able to impersonate an AS, they would be able to | ||||
trick legitimate client instances into making signed requests for | ||||
information which could potentially be proxied to a real AS. To | ||||
combat this, all communications to the AS need to be made over TLS or | ||||
its equivalent, and the software making the connection has to | ||||
validate the certificate chain of the host it is connecting to. | ||||
Consequently, protecting, monitoring, and auditing the AS is | ||||
paramount to preserving the security of a GNAP-protected ecosystem. | ||||
12.4. Symmetric and Asymmetric Client Instance Keys | ||||
The cryptographic methods used by GNAP for key-proofing can support | ||||
both asymmetric and symmetric cryptography, and can be extended to | ||||
use a wide variety of mechanisms. While symmetric cryptographic | ||||
systems have some benefits in speed and simplicity, they have a | ||||
distinct drawback that both parties need access to the same key in | ||||
order to do both signing and verification of the message. This means | ||||
that when the client instance 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 validate the key proof signature. | ||||
With asymmetric keys, the client needs only to send its public key to | ||||
the AS to allow for verification that the client holds the associated | ||||
private key, regardless of whether that key was pre-registered or not | ||||
with the AS. | ||||
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. | ||||
Common methods for communicating these proofing keys include putting | ||||
information in a structured access token and allowing the RS to look | ||||
up the associated key material against the value of the access token. | ||||
With symmetric cryptography, both of these methods would expose the | ||||
signing key to the RS, and in the case of an structured access token, | ||||
potentially to any party that can see the access token itself unless | ||||
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 | ||||
signature. With asymmetric cryptography, the RS only needs to know | ||||
the public key associated with the token in order to validate, and | ||||
therefore cannot create any new calls. | ||||
Symmetric keys also have the expected advantage of providing better | ||||
protection against quantum threats in the future. Also, these types | ||||
of keys (and their secure derivations) are widely supported among | ||||
many cloud-based key management systems. | ||||
While both signing approaches are allowed, GNAP treats these two | ||||
classes of keys somewhat differently. Only the public portion of | ||||
asymmetric keys are allowed to be sent by value in requests to the AS | ||||
when establishing a connection. Since sending a symmetric key (or | ||||
the private portion of an asymmetric key) would expose the signing | ||||
material to any parties on the request path, including any attackers, | ||||
sending these kinds of keys is prohibited. Symmetric keys can still | ||||
be used by client instances, but only a reference to the key and not | ||||
its value can be sent. This allows the AS to use pre-registered | ||||
symmetric keys as well as key derivation schemes to take advantage of | ||||
symmetric cryptography but without requiring key distribution at | ||||
runtime, which would expose the keys in transit. | ||||
Both the AS and client software can use systems such as hardware | ||||
security modules to strengthen their key security storage and | ||||
generation for both asymmetric and symmetric keys. | ||||
12.5. Generation of Access Tokens | ||||
The content of access tokens need to be such that only the generating | ||||
AS would be able to create them, and the contents cannot be | ||||
manipulated by an attacker to gain different or additional access | ||||
rights. | ||||
One method for accomplishing this is to use a cryptographically | ||||
random value for the access token, generated by the AS using a secure | ||||
randomization function with sufficiently high entropy. The odds of | ||||
an attacker guessing the output of the randomization function to | ||||
collide with a valid access token are exceedingly small, and even | ||||
then the attacker would not have any control over what the access | ||||
token would represent since that information would be held close by | ||||
the AS. | ||||
Another method for accomplishing this is to use a structured token | ||||
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 | ||||
signature applied by the AS during token generation covers this | ||||
payload. Only the AS can create such a signature and therefore only | ||||
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 | ||||
small. This technique only works if all targeted RS's check the | ||||
signature of the access token. Any RS that does not validate the | ||||
signature of all presented tokens would be susceptible to injection | ||||
of a modified or falsified token. Furthermore, an AS has to | ||||
carefully protect the keys used to sign access tokens, since anyone | ||||
with access to these signing keys would be able to create seemingly- | ||||
valid access tokens using them. | ||||
12.6. Bearer Access Tokens | ||||
Bearer access tokens can be used by any party that has access to the | ||||
token itself, without any additional information. As a natural | ||||
consequence, any RS that a bearer token is presented to has the | ||||
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 | ||||
able capture of the token value in storage or in transit is able to | ||||
use the access token. While bearer tokens are inherently simpler, | ||||
this simplicity has been misapplied and abused in making needlessly | ||||
insecure systems. | ||||
In GNAP, key-bound access tokens are the default due to their higher | ||||
security properties. While bearer tokens can be used in GNAP, their | ||||
use should be limited onto to cases where the simplicity benefits | ||||
outweigh the significant security downsides. | ||||
12.7. Key-Bound Token Access Tokens | ||||
Key-bound access tokens, as the name suggests, are bound to a | ||||
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 | ||||
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 | ||||
see the token value but will not see the keys used to make the | ||||
request. | ||||
Key-bound access tokens provide this additional layer of protection | ||||
only when the RS checks the signature of the message presented with | ||||
the token. Acceptance of an invalid presentation signature, or | ||||
failure to check the signature entirely, would allow an attacker to | ||||
make calls with a captured access token without having access to the | ||||
related signing key material. | ||||
In addition to validating the signature of the presentation message | ||||
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 | ||||
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 | ||||
request with their own keys, thereby negating the benefits of using | ||||
key-bound access tokens. | ||||
The RS also needs to ensure that a sufficient portions of the message | ||||
are covered by the signature. Any items outside the signature could | ||||
still affect the API's processing decisions, but these items would | ||||
not be strongly bound to the token presentation. As such, an | ||||
attacker could capture a valid request, then manipulate portions of | ||||
the request outside of the signature envelope in order to cause | ||||
unwanted actions at the protected API. | ||||
Some key-bound tokens are susceptible to replay attacks, depending on | ||||
the details of the signing method used. If a signature method covers | ||||
only portions of a given request, that same signature proof can be | ||||
used by an attacker to make a similar call, potentially even varying | ||||
elements that are outside of the protection of the signature. Key | ||||
proofing mechanisms used with access tokens therefore need to use | ||||
replay protection mechanisms covered under the signature such as a | ||||
per-message nonce, a reasonably short time validity window, or other | ||||
uniqueness constraints. The details of using these will vary | ||||
depending on the key proofing mechanism in use, but for example, HTTP | ||||
Message Signatures has both a "created" and "nonce" signature | ||||
parameter as well as the ability to cover significant portions of the | ||||
HTTP message. | ||||
12.8. Exposure of End-user Credentials to Client Instance | ||||
As a delegation protocol, one of the main goals of GNAP is to prevent | ||||
the client software from being exposed to any credentials or | ||||
information about the end-user or resource owner as a requirement of | ||||
the delegation process. By using the variety of interaction | ||||
mechanisms, the resource owner can interact with the AS without ever | ||||
authenticating to the client software, and without the client | ||||
software having to impersonate the resource owner through replay of | ||||
their credentials. | ||||
Consequently, no interaction methods defined in the GNAP core require | ||||
the end-user to enter their credentials, but it is technologically | ||||
possible for an extension to be defined to carry such values. Such | ||||
an extension would be dangerous as it would allow rogue client | ||||
software to directly collect, store, and replay the end-user's | ||||
credentials outside of any legitimate use within a GNAP request. | ||||
The concerns of such an extension could be mitigated through use of a | ||||
challenge and response unlocked by the end user's credentials. For | ||||
example, the AS presents a challenge as part of an interaction start | ||||
method, and the client instance signs that challenge using a key | ||||
derived from a password presented by the end user. It would be | ||||
possible for the client software to collect this password in a secure | ||||
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 | ||||
validate this challenge response against a known password for the | ||||
identified end user. While an approach such as this does not remove | ||||
all of the concerns surrounding such a password-based scheme, it is | ||||
at least possible to implement in a more secure fashion than simply | ||||
collecting and replaying the password. Even so, such schemes should | ||||
only ever be used by trusted clients due to the ease of abusing them. | ||||
12.9. Mixing Up Authorization Servers | ||||
If a client instance is able to work with multiple AS's | ||||
simultaneously, it is more possible for an attacker to add a | ||||
compromised AS to the client instance's configuration and cause the | ||||
client 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 get the resource owner to approve access for the | ||||
legitimate client instance. | ||||
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 | ||||
AS does not get conflated with the callback to different AS. The | ||||
interaction finish hash calculate allows a client instance to protect | ||||
against this kind of substitution, but only if the client instance | ||||
validates the hash. If the client instance does not use an | ||||
interaction finish method or does not check the interaction finish | ||||
hash value, the compromised AS can be granted a valid access token on | ||||
behalf of the resource owner. See [attack-surfaces] for details of | ||||
one such attack, which has been since addressed in this document by | ||||
including the grant endpoint in the interaction hash calculation. | ||||
The client instance still needs to validate the hash for the attack | ||||
to be prevented. | ||||
12.10. Processing of Client-Presented User Information | ||||
GNAP allows the client instance to present assertions and identifiers | ||||
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 | ||||
AS has no way to tell if the represented person is present at the | ||||
client software, without using an interaction mechanism. This | ||||
information does not guarantee the given user is there, but it does | ||||
constitute a statement by the client software that the AS can take | ||||
into account. | ||||
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, the AS can either determine this to be an error or | ||||
signal to the client instance through returned subject information | ||||
that the current user has changed from what the client instance | ||||
thought. This user information can also be used by the AS to | ||||
streamline the interaction process when the user is present. For | ||||
example, instead of having the user type in their account identifier | ||||
during interaction at a redirected URL, the AS can immediately | ||||
challenge the user for their account credentials. Alternatively, if | ||||
an existing session is detected, the AS can determine that it matches | ||||
the identifier provided by the client and subsequently skip an | ||||
explicit authentication event by the resource owner. | ||||
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 | ||||
can take this user information as a statement that the user is | ||||
present and could issue access tokens and release subject information | ||||
without interaction. The AS should only take such action in very | ||||
limited circumstances, as a client instance could assert whatever it | ||||
likes for the user's identifiers in its request. | ||||
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 | ||||
intended audience of an assertion held by the client software, the AS | ||||
will need to evaluate the assertion in a different context. Even in | ||||
this case, the AS can still evaluate that the assertion was generated | ||||
by a trusted party, was appropriately signed, and is within any time | ||||
validity windows stated by the assertion. If the client instance's | ||||
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 | ||||
appropriate client instance is presenting the claimed assertion. All | ||||
of this will prevent an attacker from presenting a manufactured | ||||
assertion, or one captured from an untrusted system. However, | ||||
without validating the audience of the assertion, a captured | ||||
assertion could be presented by the client instance to impersonate a | ||||
given end user. In such cases, the assertion offers little more | ||||
protection than a simple identifier would. | ||||
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 | ||||
validate that it did issue the assertion and it is associated with | ||||
the client instance presenting the assertion. | ||||
12.11. Client Instance Pre-registration | ||||
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, | ||||
this identification can be facilitated by registering a single key | ||||
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 | ||||
authorization process, identifying the client software to the user. | ||||
In these cases, it can be assumed that only one instance of client | ||||
software will exist, likely to serve many different users. | ||||
A client's registration record needs to include its identifying key. | ||||
Furthermore, it is the case that any clients using symmetric | ||||
cryptography for key proofing mechanisms need to have their keys pre- | ||||
registered. The registration should also include any information | ||||
that would aid in the authorization process, such as a display name | ||||
and logo. The registration record can also limit a given client to | ||||
ask for certain kinds of information and access, or be limited to | ||||
specific interaction mechanisms at runtime. | ||||
It also is sensible to pre-register client instances when the | ||||
software is acting on its own behalf, without the need for a runtime | ||||
approval by a resource owner or any interaction with an end-user. In | ||||
these cases, an AS needs to rest on the trust decisions that have | ||||
been determined prior to runtime in determining what rights and | ||||
tokens to grant to a given client instance. | ||||
However, it does not make sense to pre-register many types of | ||||
clients. Single-page applications (SPAs) and mobile/desktop | ||||
applications in particular present problems with pre-registration. | ||||
For SPAs, the instances are ephemeral in nature and long-term | ||||
registration of a single instance leads to significant storage and | ||||
management overhead at the AS. For mobile applications, each | ||||
installation of the client software is a separate instance, and | ||||
sharing a key among all instances would be detrimental to security as | ||||
the compromise of any single installation would compromise all copies | ||||
for all users. | ||||
An AS can treat these classes of client software differently from | ||||
each other, perhaps by allowing access to certain high-value APIs | ||||
only to pre-registered known clients, or by requiring an active end- | ||||
user delegation of authority to any client software not pre- | ||||
registered. | ||||
An AS can also provide warnings and caveats to resource owners during | ||||
the authorization process, allowing the user to make an informed | ||||
decision regarding the software they are authorizing. For example, | ||||
if the AS has done vetting of the client software and this specific | ||||
instance, it can present a different authorization screen compared to | ||||
a client instance that is presenting all of its information at | ||||
runtime. | ||||
12.12. Client Instance Impersonation | ||||
If client instances are allowed to set their own user-facing display | ||||
information, such as a display name and website URL, a malicious | ||||
client instance could impersonate legitimate client software for the | ||||
purposes of tricking users into authorizing the malicious client. | ||||
Requiring clients to pre-register does not fully mitigate this | ||||
problem since many pre-registration systems have self-service portals | ||||
for management of client registration, allowing authenticated | ||||
developers to enter self-asserted information into the management | ||||
portal. | ||||
An AS can mitigate this by actively filtering all self-asserted | ||||
values presented by client software, both dynamically as part of GNAP | ||||
and through a registration portal, to limit the kinds of | ||||
impersonation that would be done. | ||||
An AS can also warn the resource owner about the provenance of the | ||||
information it is displaying, allowing the resource owner to make a | ||||
more informed delegation decision. For example, an AS can visually | ||||
differentiate between a client instance that can be traced back to a | ||||
specific developer's registration and an instance that has self- | ||||
asserted its own key and display information. | ||||
12.13. Interception of Information in the Browser | ||||
Most information passed through the web-browser is susceptible to | ||||
interception and possible manipulation by elements within the browser | ||||
such as scripts loaded within pages. Information in the URL is | ||||
exposed through browser and server logs, and can also leak to other | ||||
parties through HTTP "Referrer" headers. | ||||
GNAP's design limits the information passed directly through the | ||||
browser, allowing for opaque URLs in most circumstances. For the | ||||
redirect-based interaction finish mechanism, named query parameters | ||||
are used to carry unguessable opaque values. For these, GNAP | ||||
requires creation and validation of a cryptographic hash to protect | ||||
the query parameters added to the URL and associate them with an | ||||
ongoing grant process. The client instance has to properly validate | ||||
this hash to prevent an attacker from injecting an interaction | ||||
reference intended for a different AS or client instance. | ||||
Several interaction start mechanisms use URLs created by the AS and | ||||
passed to the client instance. While these URLs are opaque to the | ||||
client instance, it's possible for the AS to include parameters, | ||||
paths, and other pieces of information that could leak security data | ||||
or be manipulated by a party in the middle of the transaction. | ||||
12.14. Callback URL Manipulation | ||||
The callback URL used in interaction finish mechanisms is defined by | ||||
the client instance. This URL is opaque to the AS, but can contain | ||||
information relevant to the client instance's operations. In | ||||
particular, the client instance can include state information to | ||||
allow the callback request to be associated with an ongoing grant | ||||
request. | ||||
Since this URL is exposed to the end-user's browser, it is | ||||
susceptible to both logging and manipulation in transit before the | ||||
request is made to the client software. As such, a client instance | ||||
should never put security-critical or private information into the | ||||
callback URL in a cleartext form. For example, if the client | ||||
software includes a post-redirect target URL in its callback URL to | ||||
the AS, this target URL could be manipulated by an attacker, creating | ||||
an open redirector at the client. Instead, a client instance can use | ||||
an unguessable identifier into the URL that can then be used by the | ||||
client software to look up the details of the pending request. Since | ||||
this approach requires some form of statefulness by the client | ||||
software during the redirection process, clients that are not capable | ||||
of holding state through a redirect should not use redirect-based | ||||
interaction mechanisms. | ||||
12.15. MTLS Deployment Patterns | ||||
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 | ||||
be used to manage the keys used by client instances when calling the | ||||
AS, allowing the AS to trust a root key from a trusted authority. | ||||
This method is particularly relevant to the MTLS signature method, | ||||
where the client instance presents its certificate to the AS as part | ||||
of the TLS connection. An AS using PKI to validate the MTLS | ||||
connection would need to ensure that the presented certificate was | ||||
issued by a trusted certificate authority before allowing the | ||||
connection to continue. PKI-based certificates would allow a key to | ||||
be revoked and rotated through management at the certificate | ||||
authority without requiring additional registration or management at | ||||
the AS. PKI has historically been difficult to deploy, especially at | ||||
scale, but it remains an appropriate solution for systems where the | ||||
required overhead is not an impediment. | ||||
MTLS need not use a PKI backing, as self-signed certificates and | ||||
certificates from untrusted authorities can still be presented as | ||||
part of a TLS connection. In this case, the AS or RS would validate | ||||
the connection but accept whatever certificate was presented by the | ||||
client software. This specific certificate would then be bound to | ||||
all future connections from that client software by being bound to | ||||
the resulting access tokens. | ||||
12.16. Interception of Responses from the AS | ||||
Responses from the AS contain information vital to both the security | ||||
and privacy operations of GNAP. This information includes nonces | ||||
used in cryptographic calculations, subject identifiers, assertions, | ||||
public keys, and information about what client software is requesting | ||||
and was granted. | ||||
In addition, if bearer tokens are used or keys are issued alongside a | ||||
bound access token, the response from the AS contains all information | ||||
necessary for use of the contained access token. Any party that is | ||||
capable of viewing such a response, such as an intermediary proxy, | ||||
would be able to exfiltrate and use this token. If the access token | ||||
is instead bound to the client instance's presented key, | ||||
intermediaries no longer have sufficient information to use the | ||||
token. They can still, however, gain information about the end user | ||||
as well as the actions of the client software. | ||||
12.17. Key Distribution | ||||
The keys for client instances could be distributed as part of the | ||||
deployment process of instances of the client software. For example, | ||||
an application installation framework could generate a keypair for | ||||
each copy of client software, then both install it into the client | ||||
software upon installation and registering that instance with the AS. | ||||
Additionally, 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 | ||||
instance to request tokens. In this method, the AS would generate | ||||
the asymmetric keypair or symmetric key and return the entire key, | ||||
including all private signing information, to the client instance | ||||
alongside the access token itself. This approach would make | ||||
interception of the return from the token endpoint equivalent to that | ||||
of a bearer token, since all information required to use the access | ||||
token would be present in the request. | ||||
12.18. Interaction Finish Modes and Polling | ||||
During the interaction process, the client instance usually hands | ||||
control of the user experience over to another component, beit the | ||||
system browser, another application, or some action the resource | ||||
owner is instructed to take on another device. By using an | ||||
interaction finish method, the client instance can be securely | ||||
notified by the AS when the interaction is completed and the next | ||||
phase of the protocol should occur. This process includes | ||||
information that the client instance can use to validate the finish | ||||
call from the AS and prevent some injection, session hijacking, and | ||||
phishing attacks. | ||||
Some types of client deployment are unable to receive an interaction | ||||
finish message. Without an interaction finish method to notify it, | ||||
the client instance will need to poll the grant continuation API | ||||
while waiting for the resource owner to approve or deny the request. | ||||
An attacker could take advantage of this situation by capturing the | ||||
interaction start parameters and phishing a legitimate user into | ||||
authorizing the attacker's waiting client instance, which would in | ||||
turn have no way of associating the completed interaction with the | ||||
start of the request. | ||||
However, it is important to note that this pattern is practically | ||||
indistinguishable from some legitimate use cases. For example, a | ||||
smart device emits a code for the resource owner to enter on a | ||||
separate device. The smart device has to poll because the expected | ||||
behavior is that the interaction will take place on the separate | ||||
device, without a way to return information to the original device's | ||||
context. | ||||
As such, developers need to weigh the risks of forgoing an | ||||
interaction finish method against the deployment capabilities of the | ||||
client software and its environment. Due to the increased security, | ||||
an interaction finish method should be employed whenever possible. | ||||
12.19. Storage of Information During Interaction and Continuation | ||||
When starting an interactive grant request, a client application has | ||||
a number of protocol elements that it needs to manage, including | ||||
nonces, references, keys, access tokens, and other elements. During | ||||
the interaction process, the client instance usually hands control of | ||||
the user experience over to another component, beit the system | ||||
browser, another application, or some action the resource owner is | ||||
instructed to take on another device. In order for the client | ||||
instance to make its continuation call, it will need to recall all of | ||||
these protocol elements. Usually this means the client instance will | ||||
need to store these protocol elements in some retrievable fashion. | ||||
If the security protocol elements are stored on the end-user's | ||||
device, such as in browser storage or in local application data | ||||
stores, capture and exfiltration of this information could allow an | ||||
attacker to continue a pending transaction instead of the client | ||||
instance. Client software can make use of secure storage mechanisms, | ||||
including hardware-based key and data storage, to prevent such | ||||
exfiltration. | ||||
Note that in GNAP, the client instance has to choose its interaction | ||||
finish URL prior to making the first call to the AS. As such, the | ||||
interaction finish URL will often have a unique identifier for the | ||||
ongoing request, allowing the client instance to access the correct | ||||
portion of its storage. Since this URL is passed to other parties | ||||
and often used through a browser, this URL should not contain any | ||||
security-sensitive information that would be valuable to an attacker, | ||||
such as any token identifier, nonce, or user information. Instead, a | ||||
cryptographically random value is suggested. | ||||
12.20. Denial of Service (DoS) through Grant Continuation | ||||
When a client instance starts off an interactive process, it will | ||||
eventually need to continue the grant request in a subsequent message | ||||
to the AS. It's possible for a naive client implementation to | ||||
continuously send continuation requests to the AS while waiting for | ||||
approval, especially if no interaction finish method is used. Such | ||||
constant requests could overwhelm the AS's ability to respond to both | ||||
these and other requests. | ||||
To mitigate this for well-behaved client software, the continuation | ||||
response contains a "wait" parameter that is intended to tell the | ||||
client instance how long it should wait until making its next | ||||
request. This value can be used to back off client software that is | ||||
checking too quickly by returning increasing wait times for a single | ||||
client instance. | ||||
If client software ignores the "wait" value and makes its | ||||
continuation calls too quickly, or if the client software assumes the | ||||
absence of the "wait" values means it should poll immediately, the AS | ||||
can choose to return errors to the offending client instance, | ||||
including possibly canceling the ongoing grant request. With well- | ||||
meaning client software these errors can indicate a need to change | ||||
the client software's programmed behavior. | ||||
12.21. Exhaustion of Random Value Space | ||||
Several parts of the GNAP process make use of unguessable randomized | ||||
values, such as nonces, tokens, and randomized URLs. Since these | ||||
values are intended to be unique, a sufficiently powerful attacker | ||||
could make a large number of requests to trigger generation of | ||||
randomized values in an attempt to exhaust the random number | ||||
generation space. While this attack is particularly applicable to | ||||
the AS, client software could likewise be targeted by an attacker | ||||
triggering new grant requests against an AS. | ||||
To mitigate this, software can ensure that its random values are | ||||
chosen from a significantly large pool that exhaustion of that pool | ||||
is prohibitive for an attacker. Additionally, the random values can | ||||
be time-boxed in such a way as their validity windows are reasonably | ||||
short. Since many of the random values used within GNAP are used | ||||
within limited portions of the protocol, it is reasonable for a | ||||
particular random value to be valid for only a small amount of time. | ||||
For example, the nonces used for interaction finish hash calculation | ||||
need only to be valid while the client instance is waiting for the | ||||
finish callback and can be functionally expired when the interaction | ||||
has completed. Similarly, artifacts like access tokens and the | ||||
interaction reference can be limited to have lifetimes tied to their | ||||
functional utility. Finally, each different category of artifact | ||||
(nonce, token, reference, identifier, etc.) can be generated from a | ||||
separate random pool of values instead of a single global value | ||||
space. | ||||
13. Privacy Considerations | 13. Privacy Considerations | |||
[[ TBD: There are a lot of privacy considerations to add. ]] | The privacy considerations in this section are modeled after the list | |||
of privacy threats in [[RFC6973]], "Privacy Considerations for | ||||
Internet Protocols", and either explain how these threats are | ||||
mitigated or advise how the threats relate to GNAP. | ||||
Handles are passed between parties and therefore should not contain | 13.1. Surveillance | |||
any private data. | ||||
When user information is passed to the client instance, the AS needs | Surveillance is the observation or monitoring of an individual's | |||
to make sure that it has the permission to do so. | communications or activities. Surveillance can be conducted by | |||
observers or eavesdroppers at any point along the communications | ||||
path. | ||||
14. Normative References | GNAP assumes the TLS protection used throughout the spec is intact. | |||
Without the protection of TLS, there are many points throughout the | ||||
use of GNAP that would lead to possible surveillance. | ||||
13.1.1. Surveillance by the Client | ||||
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 | ||||
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 | ||||
beyond what the user is aware of. For example, a client may be | ||||
implemented as multiple distinct pieces of software, such as a | ||||
logging service or a mobile app that reports usage data to an | ||||
external backend service. | ||||
13.1.2. Surveillance by the Authorization Server | ||||
The role of the authorization server is to manage the authorization | ||||
of client instances to protect access to the user's data. In this | ||||
role, the authorization server is by definition aware of each | ||||
authorization of a client instance by a user. When the authorization | ||||
server shares user information with the client instance, it needs to | ||||
make sure that it has the permission from that user to do so. | ||||
Additionally, as part of the authorization grant process, the | ||||
authorization server may be aware of which resource servers the | ||||
client intends to use an access token at. However, it is possible to | ||||
design a system using GNAP in which this knowledge is not made | ||||
available to the authorization server, such as by avoiding the use of | ||||
the "locations" object in the authorization request. | ||||
If the authorization server's implementation of access tokens is such | ||||
that it requires a resource server call back to the authorization | ||||
server to validate them, then the authorization server will be aware | ||||
of which resource servers are actively in use and by which users and | ||||
which clients. To avoid this possibility, the authorization server | ||||
would need to structure access tokens in such a way that they can be | ||||
validated by the resource server without notifying the authorization | ||||
server that the token is being validated. | ||||
13.2. Stored Data | ||||
Several parties in the GNAP process are expected to persist data at | ||||
least temporarily, if not semi-permanently, for the normal | ||||
functioning of the system. If compromised, this could lead to | ||||
exposure of sensitive information. This section documents the | ||||
potentially sensitive information each party in GNAP is expected to | ||||
store for normal operation. Naturally it is possible that any party | ||||
is storing information for longer than technically necessary of the | ||||
protocol mechanics (such as audit logs, etc). | ||||
The authorization server is expected to store subject identifiers for | ||||
user indefinitely, in order to be able to include them in the | ||||
responses to clients. The authorization server is also expected to | ||||
store client key identifiers associated with display information | ||||
about the client such as its name and logo. | ||||
The client is expected to store its client instance key indefinitely, | ||||
in order to authenticate to the authorization server for the normal | ||||
functioning of the GNAP flows. Additionally, the client will be | ||||
temporarily storing artifacts issued by the authorization server | ||||
during a flow, and these artifacts SHOULD be discarded by the client | ||||
when the transaction is complete. | ||||
The resource server is not required to store any state for its normal | ||||
operation. Depending on the implementation of access tokens, the | ||||
resource server may need to cache public keys from the authorization | ||||
server in order to validate access tokens. | ||||
13.3. Intrusion | ||||
Intrusion refers to the ability of various parties to send | ||||
unsolicited messages or cause denial of service for unrelated | ||||
parties. | ||||
If the resource owner is different from the end user, there is an | ||||
opportunity for the end user to cause unsolicited messages to be sent | ||||
to the resource owner if the system prompts the resource owner for | ||||
consent when an end user attempts to access their data. | ||||
The format and contents of subject identifiers are intentionally not | ||||
defined by GNAP. If the authorization server uses values for subject | ||||
identifiers that are also identifiers for communication channels, | ||||
(e.g. an email address or phone number), this opens up the | ||||
possibility for a client to learn this information when it was not | ||||
otherwise authorized to access this kind of data about the user. | ||||
13.4. Correlation | ||||
The threat of correlation is the combination of various pieces of | ||||
information related to an individual in a way that defies their | ||||
expectations of what others know about them. | ||||
13.4.1. Correlation by Clients | ||||
The biggest risk of correlation in GNAP is when an authorization | ||||
server returns stable consistent user identifiers to multiple | ||||
different applications. In this case, applications created by | ||||
different parties would be able to correlate these user identifiers | ||||
out of band in order to know which users they have in common. | ||||
The most common example of this in practice is tracking for | ||||
advertising purposes, such that client A shares their list of user | ||||
IDs with an ad platform that is then able to retarget ads to | ||||
applications created by other parties. In contrast, a positive | ||||
example of correlation is a corporate acquisition where two | ||||
previously unrelated clients now do need to be able to identify the | ||||
same user between the two clients. | ||||
13.4.2. Correlation by Resource Servers | ||||
Unrelated resource servers also have an opportunity to correlate | ||||
users if the authorization server includes stable user identifiers in | ||||
access tokens or in access token introspection responses. | ||||
In some cases a resource server may not actually need to be able to | ||||
identify users, (such as a resource server providing access to a | ||||
company cafeteria menu which only needs to validate whether the user | ||||
is a current employee), so authorization servers should be thoughtful | ||||
of when user identifiers are actually necessary to communicate to | ||||
resource servers for the functionining of the system. | ||||
13.4.3. Correlation by Authorization Servers | ||||
Clients are expected to be identified by their client instance key. | ||||
If a particular client instance key is used at more than one | ||||
authorization server, this could open up the possibility for multiple | ||||
unrelated authorization servers to correlate client instances. This | ||||
is especially a problem in the common case where a client instance is | ||||
used by a single individual, as it would allow the authorization | ||||
servers to correlate that individual between them. If this is a | ||||
concern of a client, the client should use distinct keys with each | ||||
authorization server. | ||||
13.5. Disclosure in Shared References | ||||
Throughout many parts of GNAP, the parties pass shared references | ||||
between each other, sometimes in place of the values themselves. For | ||||
example the "interact_ref" value used throughout the flow. These | ||||
references are intended to be random strings and should not contain | ||||
any private or sensitive data that would potentially leak information | ||||
between parties. | ||||
14. References | ||||
14.1. Normative References | ||||
[BCP195] Sheffer, Y., Holz, R., and P. Saint-Andre, | [BCP195] Sheffer, Y., Holz, R., and P. Saint-Andre, | |||
"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)", May 2015, | (DTLS)", May 2015, | |||
<https://www.rfc-editor.org/info/bcp195>. | <https://www.rfc-editor.org/info/bcp195>. | |||
[I-D.draft-ietf-gnap-resource-servers] | [I-D.draft-ietf-gnap-resource-servers] | |||
Richer, J., Parecki, A., and F. Imbault, "Grant | Richer, J., Parecki, A., and F. Imbault, "Grant | |||
Negotiation and Authorization Protocol Resource Server | Negotiation and Authorization Protocol Resource Server | |||
Connections", Work in Progress, Internet-Draft, draft- | Connections", Work in Progress, Internet-Draft, draft- | |||
ietf-gnap-resource-servers-00, 28 April 2021, | ietf-gnap-resource-servers-00, 28 April 2021, | |||
<https://www.ietf.org/archive/id/draft-ietf-gnap-resource- | <https://www.ietf.org/archive/id/draft-ietf-gnap-resource- | |||
servers-00.txt>. | servers-00.txt>. | |||
[I-D.ietf-httpbis-message-signatures] | [I-D.ietf-httpbis-message-signatures] | |||
Backman, A., Richer, J., and M. Sporny, "Signing HTTP | Backman, A., Richer, J., and M. Sporny, "HTTP Message | |||
Messages", Work in Progress, Internet-Draft, draft-ietf- | Signatures", Work in Progress, Internet-Draft, draft-ietf- | |||
httpbis-message-signatures-05, 8 June 2021, | httpbis-message-signatures-06, 13 August 2021, | |||
<https://www.ietf.org/archive/id/draft-ietf-httpbis- | <https://www.ietf.org/archive/id/draft-ietf-httpbis- | |||
message-signatures-05.txt>. | message-signatures-06.txt>. | |||
[I-D.ietf-oauth-rar] | [I-D.ietf-oauth-rar] | |||
Lodderstedt, T., Richer, J., and B. Campbell, "OAuth 2.0 | Lodderstedt, T., Richer, J., and B. Campbell, "OAuth 2.0 | |||
Rich Authorization Requests", Work in Progress, Internet- | Rich Authorization Requests", Work in Progress, Internet- | |||
Draft, draft-ietf-oauth-rar-05, 15 May 2021, | Draft, draft-ietf-oauth-rar-07, 12 September 2021, | |||
<https://www.ietf.org/archive/id/draft-ietf-oauth-rar- | <https://www.ietf.org/archive/id/draft-ietf-oauth-rar- | |||
05.txt>. | 07.txt>. | |||
[I-D.ietf-oauth-signed-http-request] | [I-D.ietf-oauth-signed-http-request] | |||
Richer, J., Bradley, J., and H. Tschofenig, "A Method for | Richer, J., Bradley, J., and H. Tschofenig, "A Method for | |||
Signing HTTP Requests for OAuth", Work in Progress, | Signing HTTP Requests for OAuth", Work in Progress, | |||
Internet-Draft, draft-ietf-oauth-signed-http-request-03, 8 | Internet-Draft, draft-ietf-oauth-signed-http-request-03, 8 | |||
August 2016, <https://www.ietf.org/archive/id/draft-ietf- | August 2016, <https://www.ietf.org/archive/id/draft-ietf- | |||
oauth-signed-http-request-03.txt>. | oauth-signed-http-request-03.txt>. | |||
[I-D.ietf-secevent-subject-identifiers] | [I-D.ietf-secevent-subject-identifiers] | |||
Backman, A. and M. Scurtescu, "Subject Identifiers for | Backman, A. and M. Scurtescu, "Subject Identifiers for | |||
skipping to change at page 108, line 21 ¶ | skipping to change at page 131, line 10 ¶ | |||
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/info/rfc8705>. | <https://www.rfc-editor.org/info/rfc8705>. | |||
[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/info/rfc8792>. | <https://www.rfc-editor.org/info/rfc8792>. | |||
14.2. Informative References | ||||
[attack-surfaces] | ||||
Axeland, Å. and O. Oueidat, "Security Analysis of Attack | ||||
Surfaces on the Grant Negotiation and Authorization | ||||
Protocol", 2021, | ||||
<https://odr.chalmers.se/handle/20.500.12380/304105>. | ||||
[promise-theory] | ||||
Burgess, M. and J. Bergstra, "Promise theory", January | ||||
2014, <http://markburgess.org/promises.html>. | ||||
[RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., | ||||
Morris, J., Hansen, M., and R. Smith, "Privacy | ||||
Considerations for Internet Protocols", RFC 6973, | ||||
DOI 10.17487/RFC6973, July 2013, | ||||
<https://www.rfc-editor.org/info/rfc6973>. | ||||
Appendix A. Document History | Appendix A. Document History | |||
* -07 | ||||
- Replace user handle by opaque identifier | ||||
- Added trust relationships | ||||
- Added privacy considerations section | ||||
- Added security considerations. | ||||
* -06 | * -06 | |||
- Removed "capabilities" and "existing_grant" protocol fields. | - Removed "capabilities" and "existing_grant" protocol fields. | |||
- Removed separate "instance_id" field. | - Removed separate "instance_id" field. | |||
- Split "interaction_methods_supported" into | - Split "interaction_methods_supported" into | |||
"interaction_start_modes_supported" and | "interaction_start_modes_supported" and | |||
"interaction_finish_methods_supported". | "interaction_finish_methods_supported". | |||
skipping to change at page 115, line 35 ¶ | skipping to change at page 139, line 4 ¶ | |||
}, | }, | |||
"instance_id": "7C7C4AZ9KHRS6X63AJAO" | "instance_id": "7C7C4AZ9KHRS6X63AJAO" | |||
} | } | |||
The client instance saves the response and redirects the user to the | The client instance saves the response and redirects the user to the | |||
interaction_url by sending the following HTTP message to the user's | interaction_url by sending the following HTTP message to the user's | |||
browser. | browser. | |||
HTTP 302 Found | HTTP 302 Found | |||
Location: https://server.example.com/interact/4CF492MLVMSW9MKM | Location: https://server.example.com/interact/4CF492MLVMSW9MKM | |||
The user's browser fetches the AS's interaction URL. The user logs | The user's browser fetches the AS's interaction URL. The user logs | |||
in, is identified as the RO for the resource being requested, and | in, is identified as the RO for the resource being requested, and | |||
approves the request. Since the AS has a callback parameter, the AS | approves the request. Since the AS has a callback parameter, the AS | |||
generates the interaction reference, calculates the hash, and | generates the interaction reference, calculates the hash, and | |||
redirects the user back to the client instance with these additional | redirects the user back to the client instance with these additional | |||
values added as query parameters. | values added as query parameters. | |||
NOTE: '\' line wrapping per RFC 8792 | ||||
HTTP 302 Found | HTTP 302 Found | |||
Location: https://client.example.net/return/123455\ | Location: https://client.example.net/return/123455\ | |||
?hash=p28jsq0Y2KK3WS__a42tavNC64ldGTBroywsWxT4md_jZQ1R2\ | ?hash=p28jsq0Y2KK3WS__a42tavNC64ldGTBroywsWxT4md_jZQ1R2\ | |||
HZT8BOWYHcLmObM7XHPAdJzTZMtKBsaraJ64A\ | HZT8BOWYHcLmObM7XHPAdJzTZMtKBsaraJ64A\ | |||
&interact_ref=4IFWWIKYBC2PQ6U56NL1 | &interact_ref=4IFWWIKYBC2PQ6U56NL1 | |||
The client instance receives this request from the user's browser. | The client instance receives this request from the user's browser. | |||
The client instance ensures that this is the same user that was sent | The client instance ensures that this is the same user that was sent | |||
out by validating session information and retrieves the stored | out by validating session information and retrieves the stored | |||
pending request. The client instance uses the values in this to | pending request. The client instance uses the values in this to | |||
skipping to change at page 117, line 5 ¶ | skipping to change at page 140, line 5 ¶ | |||
Signature: sig1=... | Signature: sig1=... | |||
Digest: sha256=... | Digest: sha256=... | |||
{ | { | |||
"interact_ref": "4IFWWIKYBC2PQ6U56NL1" | "interact_ref": "4IFWWIKYBC2PQ6U56NL1" | |||
} | } | |||
The AS retrieves the pending request based on the handle and issues a | The AS retrieves the pending request based on the handle and issues a | |||
bearer access token and returns this to the client instance. | bearer access token and returns this to the client instance. | |||
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": [{ | |||
skipping to change at page 120, line 20 ¶ | skipping to change at page 143, line 20 ¶ | |||
Host: server.example.com | Host: server.example.com | |||
Authorization: GNAP G7YQT4KQQ5TZY9SLSS5E | Authorization: GNAP G7YQT4KQQ5TZY9SLSS5E | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
Digest: sha256=... | Digest: sha256=... | |||
The AS retrieves the pending request based on the URL and access | The AS retrieves the pending request based on the URL and access | |||
token, determines that it has been approved, and issues an access | token, determines that it has been approved, and issues an access | |||
token for the client to use at the RS. | token for the client to use at the RS. | |||
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": [ | |||
skipping to change at page 124, line 32 ¶ | skipping to change at page 147, line 32 ¶ | |||
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 and | |||
determines that it has been approved and it issues an access token. | determines that it has been approved and it issues an access token. | |||
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": [ | |||
skipping to change at page 125, line 11 ¶ | skipping to change at page 148, line 17 ¶ | |||
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. Traditionally, the OAuth 2.0 client developer | |||
would put their "client_id" and "scope" values as parameters into a | would put their "client_id" and "scope" values as parameters into a | |||
redirect request to the authorization endpoint. | redirect request to the authorization endpoint. | |||
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 | |||
Now the developer wants to make an analogous request to the AS using | Now the developer wants to make an analogous request to the AS using | |||
GNAP. To do so, the client instance makes an HTTP POST and places | GNAP. To do so, the client instance makes an HTTP POST and places | |||
the OAuth 2.0 values in the appropriate places. | the OAuth 2.0 values in the appropriate places. | |||
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=... | |||
End of changes. 81 change blocks. | ||||
240 lines changed or deleted | 1254 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |