draft-ietf-gnap-core-protocol-07.txt | draft-ietf-gnap-core-protocol-08.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: 28 March 2022 Okta | Expires: 28 April 2022 Okta | |||
F. Imbault | F. Imbault | |||
acert.io | acert.io | |||
24 September 2021 | 25 October 2021 | |||
Grant Negotiation and Authorization Protocol | Grant Negotiation and Authorization Protocol | |||
draft-ietf-gnap-core-protocol-07 | draft-ietf-gnap-core-protocol-08 | |||
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 28 March 2022. | This Internet-Draft will expire on 28 April 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 | |||
skipping to change at page 2, line 21 ¶ | skipping to change at page 2, line 21 ¶ | |||
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 . . . . . . . . . . . . . . . . . . . . . . . . 5 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 6 | 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
1.2. Roles . . . . . . . . . . . . . . . . . . . . . . . . . . 6 | 1.2. Roles . . . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
1.3. Elements . . . . . . . . . . . . . . . . . . . . . . . . 9 | 1.3. Elements . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
1.4. Trust relationships . . . . . . . . . . . . . . . . . . . 10 | 1.4. Trust relationships . . . . . . . . . . . . . . . . . . . 10 | |||
1.5. Sequences . . . . . . . . . . . . . . . . . . . . . . . . 11 | 1.5. Sequences . . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
1.5.1. Redirect-based Interaction . . . . . . . . . . . . . 15 | 1.5.1. Redirect-based Interaction . . . . . . . . . . . . . 15 | |||
1.5.2. User-code Interaction . . . . . . . . . . . . . . . . 18 | 1.5.2. User-code Interaction . . . . . . . . . . . . . . . . 18 | |||
1.5.3. Asynchronous Authorization . . . . . . . . . . . . . 20 | 1.5.3. Asynchronous Authorization . . . . . . . . . . . . . 20 | |||
1.5.4. Software-only Authorization . . . . . . . . . . . . . 22 | 1.5.4. Software-only Authorization . . . . . . . . . . . . . 22 | |||
1.5.5. Refreshing an Expired Access Token . . . . . . . . . 23 | 1.5.5. Refreshing an Expired Access Token . . . . . . . . . 23 | |||
1.5.6. Requesting User Information . . . . . . . . . . . . . 25 | 1.5.6. Requesting User Information . . . . . . . . . . . . . 25 | |||
2. Requesting Access . . . . . . . . . . . . . . . . . . . . . . 26 | 2. Requesting Access . . . . . . . . . . . . . . . . . . . . . . 26 | |||
2.1. Requesting Access to Resources . . . . . . . . . . . . . 28 | 2.1. Requesting Access to Resources . . . . . . . . . . . . . 28 | |||
2.1.1. Requesting a Single Access Token . . . . . . . . . . 28 | 2.1.1. Requesting a Single Access Token . . . . . . . . . . 28 | |||
2.1.2. Requesting Multiple Access Tokens . . . . . . . . . . 31 | 2.1.2. Requesting Multiple Access Tokens . . . . . . . . . . 31 | |||
2.2. Requesting Subject Information . . . . . . . . . . . . . 33 | 2.2. Requesting Subject Information . . . . . . . . . . . . . 33 | |||
2.3. Identifying the Client Instance . . . . . . . . . . . . . 34 | 2.3. Identifying the Client Instance . . . . . . . . . . . . . 34 | |||
2.3.1. Identifying the Client Instance by Reference . . . . 35 | 2.3.1. Identifying the Client Instance by Reference . . . . 35 | |||
2.3.2. Providing Displayable Client Instance Information . . 36 | 2.3.2. Providing Displayable Client Instance Information . . 36 | |||
2.3.3. Authenticating the Client Instance . . . . . . . . . 36 | 2.3.3. Authenticating the Client Instance . . . . . . . . . 36 | |||
2.4. Identifying the User . . . . . . . . . . . . . . . . . . 37 | 2.4. Identifying the User . . . . . . . . . . . . . . . . . . 37 | |||
2.4.1. Identifying the User by Reference . . . . . . . . . . 38 | 2.4.1. Identifying the User by Reference . . . . . . . . . . 38 | |||
2.5. Interacting with the User . . . . . . . . . . . . . . . . 38 | 2.5. Interacting with the User . . . . . . . . . . . . . . . . 39 | |||
2.5.1. Start Mode Definitions . . . . . . . . . . . . . . . 40 | 2.5.1. Start Mode Definitions . . . . . . . . . . . . . . . 40 | |||
2.5.2. Finish Interaction Modes . . . . . . . . . . . . . . 41 | 2.5.2. Finish Interaction Modes . . . . . . . . . . . . . . 42 | |||
2.5.3. Hints . . . . . . . . . . . . . . . . . . . . . . . . 44 | 2.5.3. Hints . . . . . . . . . . . . . . . . . . . . . . . . 44 | |||
2.5.4. Extending Interaction Modes . . . . . . . . . . . . . 44 | 2.5.4. Extending Interaction Modes . . . . . . . . . . . . . 45 | |||
2.6. Extending The Grant Request . . . . . . . . . . . . . . . 44 | 2.6. Extending The Grant Request . . . . . . . . . . . . . . . 45 | |||
3. Grant Response . . . . . . . . . . . . . . . . . . . . . . . 45 | 3. Grant Response . . . . . . . . . . . . . . . . . . . . . . . 45 | |||
3.1. Request Continuation . . . . . . . . . . . . . . . . . . 46 | 3.1. Request Continuation . . . . . . . . . . . . . . . . . . 47 | |||
3.2. Access Tokens . . . . . . . . . . . . . . . . . . . . . . 47 | 3.2. Access Tokens . . . . . . . . . . . . . . . . . . . . . . 48 | |||
3.2.1. Single Access Token . . . . . . . . . . . . . . . . . 48 | 3.2.1. Single Access Token . . . . . . . . . . . . . . . . . 48 | |||
3.2.2. Multiple Access Tokens . . . . . . . . . . . . . . . 51 | 3.2.2. Multiple Access Tokens . . . . . . . . . . . . . . . 52 | |||
3.3. Interaction Modes . . . . . . . . . . . . . . . . . . . . 52 | 3.3. Interaction Modes . . . . . . . . . . . . . . . . . . . . 53 | |||
3.3.1. Redirection to an arbitrary URL . . . . . . . . . . . 53 | 3.3.1. Redirection to an arbitrary URL . . . . . . . . . . . 54 | |||
3.3.2. Launch of an application URL . . . . . . . . . . . . 54 | 3.3.2. Launch of an application URL . . . . . . . . . . . . 55 | |||
3.3.3. Display of a Short User Code . . . . . . . . . . . . 54 | 3.3.3. Display of a Short User Code . . . . . . . . . . . . 55 | |||
3.3.4. Interaction Finish . . . . . . . . . . . . . . . . . 55 | 3.3.4. Interaction Finish . . . . . . . . . . . . . . . . . 56 | |||
3.3.5. Extending Interaction Mode Responses . . . . . . . . 56 | 3.3.5. Extending Interaction Mode Responses . . . . . . . . 57 | |||
3.4. Returning Subject Information . . . . . . . . . . . . . . 56 | 3.4. Returning Subject Information . . . . . . . . . . . . . . 57 | |||
3.5. Returning Dynamically-bound Reference Handles . . . . . . 57 | 3.5. Returning a Dynamically-bound Client Instance | |||
3.6. Error Response . . . . . . . . . . . . . . . . . . . . . 58 | Identifier . . . . . . . . . . . . . . . . . . . . . . . 58 | |||
3.7. Extending the Response . . . . . . . . . . . . . . . . . 59 | 3.6. Error Response . . . . . . . . . . . . . . . . . . . . . 59 | |||
4. Determining Authorization and Consent . . . . . . . . . . . . 59 | 3.7. Extending the Response . . . . . . . . . . . . . . . . . 60 | |||
4.1. Interaction Start Methods . . . . . . . . . . . . . . . . 62 | 4. Determining Authorization and Consent . . . . . . . . . . . . 60 | |||
4.1.1. Interaction at a Redirected URI . . . . . . . . . . . 62 | 4.1. Interaction Start Methods . . . . . . . . . . . . . . . . 63 | |||
4.1.2. Interaction at the User Code URI . . . . . . . . . . 63 | 4.1.1. Interaction at a Redirected URI . . . . . . . . . . . 63 | |||
4.1.3. Interaction through an Application URI . . . . . . . 64 | 4.1.2. Interaction at the User Code URI . . . . . . . . . . 64 | |||
4.2. Post-Interaction Completion . . . . . . . . . . . . . . . 64 | 4.1.3. Interaction through an Application URI . . . . . . . 65 | |||
4.2. Post-Interaction Completion . . . . . . . . . . . . . . . 65 | ||||
4.2.1. Completing Interaction with a Browser Redirect to the | 4.2.1. Completing Interaction with a Browser Redirect to the | |||
Callback URI . . . . . . . . . . . . . . . . . . . . 65 | Callback URI . . . . . . . . . . . . . . . . . . . . 66 | |||
4.2.2. Completing Interaction with a Direct HTTP Request | 4.2.2. Completing Interaction with a Direct HTTP Request | |||
Callback . . . . . . . . . . . . . . . . . . . . . . 66 | Callback . . . . . . . . . . . . . . . . . . . . . . 67 | |||
4.2.3. Calculating the interaction hash . . . . . . . . . . 66 | 4.2.3. Calculating the interaction hash . . . . . . . . . . 68 | |||
5. Continuing a Grant Request . . . . . . . . . . . . . . . . . 68 | 5. Continuing a Grant Request . . . . . . . . . . . . . . . . . 69 | |||
5.1. Continuing After a Completed Interaction . . . . . . . . 70 | 5.1. Continuing After a Completed Interaction . . . . . . . . 71 | |||
5.2. Continuing During Pending Interaction . . . . . . . . . . 71 | 5.2. Continuing During Pending Interaction . . . . . . . . . . 72 | |||
5.3. Modifying an Existing Request . . . . . . . . . . . . . . 73 | 5.3. Modifying an Existing Request . . . . . . . . . . . . . . 74 | |||
5.4. Canceling a Grant Request . . . . . . . . . . . . . . . . 78 | 5.4. Canceling a Grant Request . . . . . . . . . . . . . . . . 80 | |||
6. Token Management . . . . . . . . . . . . . . . . . . . . . . 79 | 6. Token Management . . . . . . . . . . . . . . . . . . . . . . 80 | |||
6.1. Rotating the Access Token . . . . . . . . . . . . . . . . 79 | 6.1. Rotating the Access Token . . . . . . . . . . . . . . . . 80 | |||
6.2. Revoking the Access Token . . . . . . . . . . . . . . . . 81 | 6.2. Revoking the Access Token . . . . . . . . . . . . . . . . 82 | |||
7. Securing Requests from the Client Instance . . . . . . . . . 82 | 7. Securing Requests from the Client Instance . . . . . . . . . 83 | |||
7.1. Key Formats . . . . . . . . . . . . . . . . . . . . . . . 83 | 7.1. Key Formats . . . . . . . . . . . . . . . . . . . . . . . 84 | |||
7.1.1. Key References . . . . . . . . . . . . . . . . . . . 84 | 7.1.1. Key References . . . . . . . . . . . . . . . . . . . 85 | |||
7.2. Presenting Access Tokens . . . . . . . . . . . . . . . . 84 | 7.2. Presenting Access Tokens . . . . . . . . . . . . . . . . 85 | |||
7.3. Proving Possession of a Key with a Request . . . . . . . 85 | 7.3. Proving Possession of a Key with a Request . . . . . . . 86 | |||
7.3.1. HTTP Message Signing . . . . . . . . . . . . . . . . 87 | 7.3.1. HTTP Message Signing . . . . . . . . . . . . . . . . 88 | |||
7.3.2. Mutual TLS . . . . . . . . . . . . . . . . . . . . . 91 | 7.3.2. Mutual TLS . . . . . . . . . . . . . . . . . . . . . 92 | |||
7.3.3. Detached JWS . . . . . . . . . . . . . . . . . . . . 93 | 7.3.3. Detached JWS . . . . . . . . . . . . . . . . . . . . 94 | |||
7.3.4. Attached JWS . . . . . . . . . . . . . . . . . . . . 97 | 7.3.4. Attached JWS . . . . . . . . . . . . . . . . . . . . 98 | |||
8. Resource Access Rights . . . . . . . . . . . . . . . . . . . 101 | 8. Resource Access Rights . . . . . . . . . . . . . . . . . . . 102 | |||
8.1. Requesting Resources By Reference . . . . . . . . . . . . 104 | 8.1. Requesting Resources By Reference . . . . . . . . . . . . 105 | |||
9. Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . 106 | 9. Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . 107 | |||
9.1. RS-first Method of AS Discovery . . . . . . . . . . . . . 107 | 9.1. RS-first Method of AS Discovery . . . . . . . . . . . . . 108 | |||
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 109 | 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 110 | |||
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 109 | 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 110 | |||
12. Security Considerations . . . . . . . . . . . . . . . . . . . 109 | 12. Security Considerations . . . . . . . . . . . . . . . . . . . 110 | |||
12.1. TLS Protection in Transit . . . . . . . . . . . . . . . 109 | 12.1. TLS Protection in Transit . . . . . . . . . . . . . . . 110 | |||
12.2. Protection of Client Instance Key Material . . . . . . . 110 | 12.2. Signing Requests from the Client Software . . . . . . . 111 | |||
12.3. Protection of Authorization Server . . . . . . . . . . . 111 | 12.3. Protection of Client Instance Key Material . . . . . . . 112 | |||
12.4. Symmetric and Asymmetric Client Instance Keys . . . . . 112 | 12.4. Protection of Authorization Server . . . . . . . . . . . 114 | |||
12.5. Generation of Access Tokens . . . . . . . . . . . . . . 113 | 12.5. Symmetric and Asymmetric Client Instance Keys . . . . . 114 | |||
12.6. Bearer Access Tokens . . . . . . . . . . . . . . . . . . 114 | 12.6. Generation of Access Tokens . . . . . . . . . . . . . . 115 | |||
12.7. Key-Bound Token Access Tokens . . . . . . . . . . . . . 114 | 12.7. Bearer Access Tokens . . . . . . . . . . . . . . . . . . 116 | |||
12.8. Exposure of End-user Credentials to Client Instance . . 115 | 12.8. Key-Bound Token Access Tokens . . . . . . . . . . . . . 116 | |||
12.9. Mixing Up Authorization Servers . . . . . . . . . . . . 116 | 12.9. Exposure of End-user Credentials to Client Instance . . 117 | |||
12.10. Processing of Client-Presented User Information . . . . 117 | 12.10. Mixing Up Authorization Servers . . . . . . . . . . . . 118 | |||
12.11. Client Instance Pre-registration . . . . . . . . . . . . 118 | 12.11. Processing of Client-Presented User Information . . . . 119 | |||
12.12. Client Instance Impersonation . . . . . . . . . . . . . 119 | 12.12. Client Instance Pre-registration . . . . . . . . . . . . 120 | |||
12.13. Interception of Information in the Browser . . . . . . . 120 | 12.13. Client Instance Impersonation . . . . . . . . . . . . . 121 | |||
12.14. Callback URL Manipulation . . . . . . . . . . . . . . . 120 | 12.14. Interception of Information in the Browser . . . . . . . 122 | |||
12.15. MTLS Deployment Patterns . . . . . . . . . . . . . . . . 121 | 12.15. Callback URL Manipulation . . . . . . . . . . . . . . . 122 | |||
12.16. Interception of Responses from the AS . . . . . . . . . 121 | 12.16. MTLS Message Integrity . . . . . . . . . . . . . . . . . 123 | |||
12.17. Key Distribution . . . . . . . . . . . . . . . . . . . . 122 | 12.17. MTLS Deployment Patterns . . . . . . . . . . . . . . . . 124 | |||
12.18. Interaction Finish Modes and Polling . . . . . . . . . . 122 | 12.18. Interception of Responses from the AS . . . . . . . . . 124 | |||
12.19. Storage of Information During Interaction and | 12.19. Key Distribution . . . . . . . . . . . . . . . . . . . . 125 | |||
Continuation . . . . . . . . . . . . . . . . . . . . . 123 | 12.20. Interaction Finish Modes and Polling . . . . . . . . . . 125 | |||
12.20. Denial of Service (DoS) through Grant Continuation . . . 124 | 12.21. Storage of Information During Interaction and | |||
12.21. Exhaustion of Random Value Space . . . . . . . . . . . . 124 | Continuation . . . . . . . . . . . . . . . . . . . . . 126 | |||
13. Privacy Considerations . . . . . . . . . . . . . . . . . . . 125 | 12.22. Denial of Service (DoS) through Grant Continuation . . . 126 | |||
13.1. Surveillance . . . . . . . . . . . . . . . . . . . . . . 125 | 12.23. Exhaustion of Random Value Space . . . . . . . . . . . . 127 | |||
13.1.1. Surveillance by the Client . . . . . . . . . . . . . 125 | 12.24. Front-channel URLs . . . . . . . . . . . . . . . . . . . 128 | |||
13.1.2. Surveillance by the Authorization Server . . . . . . 125 | 12.25. Processing Assertions . . . . . . . . . . . . . . . . . 129 | |||
13.2. Stored Data . . . . . . . . . . . . . . . . . . . . . . 126 | 13. Privacy Considerations . . . . . . . . . . . . . . . . . . . 129 | |||
13.3. Intrusion . . . . . . . . . . . . . . . . . . . . . . . 127 | 13.1. Surveillance . . . . . . . . . . . . . . . . . . . . . . 129 | |||
13.4. Correlation . . . . . . . . . . . . . . . . . . . . . . 127 | 13.1.1. Surveillance by the Client . . . . . . . . . . . . . 130 | |||
13.4.1. Correlation by Clients . . . . . . . . . . . . . . . 127 | 13.1.2. Surveillance by the Authorization Server . . . . . . 130 | |||
13.4.2. Correlation by Resource Servers . . . . . . . . . . 127 | 13.2. Stored Data . . . . . . . . . . . . . . . . . . . . . . 130 | |||
13.4.3. Correlation by Authorization Servers . . . . . . . . 128 | 13.3. Intrusion . . . . . . . . . . . . . . . . . . . . . . . 131 | |||
13.5. Disclosure in Shared References . . . . . . . . . . . . 128 | 13.4. Correlation . . . . . . . . . . . . . . . . . . . . . . 131 | |||
14. References . . . . . . . . . . . . . . . . . . . . . . . . . 128 | 13.4.1. Correlation by Clients . . . . . . . . . . . . . . . 132 | |||
14.1. Normative References . . . . . . . . . . . . . . . . . . 128 | 13.4.2. Correlation by Resource Servers . . . . . . . . . . 132 | |||
14.2. Informative References . . . . . . . . . . . . . . . . . 131 | 13.4.3. Correlation by Authorization Servers . . . . . . . . 133 | |||
Appendix A. Document History . . . . . . . . . . . . . . . . . . 131 | 13.5. Disclosure in Shared References . . . . . . . . . . . . 133 | |||
Appendix B. Compared to OAuth 2.0 . . . . . . . . . . . . . . . 134 | 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 133 | |||
Appendix C. Component Data Models . . . . . . . . . . . . . . . 136 | 14.1. Normative References . . . . . . . . . . . . . . . . . . 133 | |||
Appendix D. Example Protocol Flows . . . . . . . . . . . . . . . 136 | 14.2. Informative References . . . . . . . . . . . . . . . . . 135 | |||
D.1. Redirect-Based User Interaction . . . . . . . . . . . . . 137 | Appendix A. Document History . . . . . . . . . . . . . . . . . . 136 | |||
D.2. Secondary Device Interaction . . . . . . . . . . . . . . 140 | Appendix B. Compared to OAuth 2.0 . . . . . . . . . . . . . . . 139 | |||
D.3. No User Involvement . . . . . . . . . . . . . . . . . . . 143 | Appendix C. Component Data Models . . . . . . . . . . . . . . . 141 | |||
D.4. Asynchronous Authorization . . . . . . . . . . . . . . . 144 | Appendix D. Example Protocol Flows . . . . . . . . . . . . . . . 142 | |||
D.5. Applying OAuth 2.0 Scopes and Client IDs . . . . . . . . 148 | D.1. Redirect-Based User Interaction . . . . . . . . . . . . . 142 | |||
Appendix E. JSON Structures and Polymorphism . . . . . . . . . . 149 | D.2. Secondary Device Interaction . . . . . . . . . . . . . . 146 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 150 | D.3. No User Involvement . . . . . . . . . . . . . . . . . . . 149 | |||
D.4. Asynchronous Authorization . . . . . . . . . . . . . . . 150 | ||||
D.5. Applying OAuth 2.0 Scopes and Client IDs . . . . . . . . 154 | ||||
Appendix E. JSON Structures and Polymorphism . . . . . . . . . . 155 | ||||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 156 | ||||
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 5, line 26 ¶ | skipping to change at page 5, line 26 ¶ | |||
multiple parties acting in distinct roles. | multiple parties acting in distinct roles. | |||
This specification focuses on the portions of the delegation process | This specification focuses on the portions of the delegation process | |||
facing the client instance. In particular, this specification | facing the client instance. In particular, this specification | |||
defines interoperable methods for a client instance to request, | defines interoperable methods for a client instance to request, | |||
negotiate, and receive access to information facilitated by the | negotiate, and receive access to information facilitated by the | |||
authorization server. This specification also discusses discovery | authorization server. This specification also discusses discovery | |||
mechanisms for the client instance to configure itself dynamically. | mechanisms for the client instance to configure itself dynamically. | |||
The means for an authorization server and resource server to | The means for an authorization server and resource server to | |||
interoperate are discussed in the companion document, | interoperate are discussed in the companion document, | |||
[I-D.draft-ietf-gnap-resource-servers]. | [I-D.ietf-gnap-resource-servers]. | |||
The focus of this protocol is to provide interoperability between the | The focus of this protocol is to provide interoperability between the | |||
different parties acting in each role, and is not to specify | different parties acting in each role, and is not to specify | |||
implementation details of each. Where appropriate, GNAP may make | implementation details of each. Where appropriate, GNAP may make | |||
recommendations about internal implementation details, but these | recommendations about internal implementation details, but these | |||
recommendations are to ensure the security of the overall deployment | recommendations are to ensure the security of the overall deployment | |||
rather than to be prescriptive in the implementation. | rather than to be prescriptive in the implementation. | |||
This protocol solves many of the same use cases as OAuth 2.0 | This protocol solves many of the same use cases as OAuth 2.0 | |||
[RFC6749], OpenID Connect [OIDC], and the family of protocols that | [RFC6749], OpenID Connect [OIDC], and the family of protocols that | |||
skipping to change at page 6, line 15 ¶ | skipping to change at page 6, line 15 ¶ | |||
1.1. Terminology | 1.1. Terminology | |||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | |||
"OPTIONAL" in this document are to be interpreted as described in | "OPTIONAL" in this document are to be interpreted as described in | |||
BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all | BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all | |||
capitals, as shown here. | capitals, as shown here. | |||
This document contains non-normative examples of partial and complete | This document contains non-normative examples of partial and complete | |||
HTTP messages, JSON structures, URLs, query components, keys, and | HTTP messages, JSON structures, URLs, query components, keys, and | |||
other elements. Some examples use a single trailing backslash '' to | other elements. Some examples use a single trailing backslash \ to | |||
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. | |||
+-------------+ +------------+ | +-------------+ +------------+ | |||
skipping to change at page 7, line 41 ¶ | skipping to change at page 7, line 41 ¶ | |||
+ + + indicates interaction between a human and computer | + + + indicates interaction between a human and computer | |||
----- indicates interaction between two pieces of software | ----- indicates interaction between two pieces of software | |||
~ ~ ~ indicates a potential equivalence or out-of-band | ~ ~ ~ indicates a potential equivalence or out-of-band | |||
communication between roles | communication between roles | |||
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 that consumes resources from one or several RSs, | |||
from one or several RSs, possibly requiring access privileges from | possibly requiring access privileges from one or several ASs. The | |||
one or several ASs. Example: a client can be a mobile | client is operated by the end-user or it runs autonomously on | |||
application, a web application, etc. Note: this specification | behalf of a resource owner. | |||
differentiates between a specific instance (the client instance, | ||||
identified by its unique key) and the software running the | Example: a client can be a mobile application, a web application, | |||
instance (the client software). For some kinds of client | etc. | |||
software, there could be many instances of that software, each | ||||
instance with a different key. | Note: this specification differentiates between a specific | |||
instance (the client instance, identified by its unique key) and | ||||
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. Note: the act of granting or | on resources it has authority upon. | |||
denying an operation may be manual (i.e. through an interaction | ||||
with a physical person) or automatic (i.e. through predefined | ||||
organizational rules). | ||||
End-user natural person that operates a client instance. Note: that | Note: the act of granting or denying an operation may be manual | |||
natural person may or may not be the same entity as the RO. | (i.e. through an interaction with a physical person) or automatic | |||
(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 | ||||
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 9, line 32 ¶ | skipping to change at page 9, line 38 ¶ | |||
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. Note: an access token can be first issued to an | attributes. | |||
client instance (requiring authorization by the RO) and | ||||
subsequently rotated. | Note: an access token can be first issued to an client instance | |||
(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. Note: the | Privilege right or attribute associated with a subject. | |||
RO defines and maintains the rights and attributes associated to | ||||
the protected resource, and might temporarily delegate some set of | Note: the RO defines and maintains the rights and attributes | |||
those privileges to an end-user. This process is refered to as | associated to the protected resource, and might temporarily | |||
privilege delegation. | delegate some set of those privileges to an end-user. This | |||
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. Note: to avoid complex | if a valid access token is provided. | |||
sentences, the specification document may simply refer to resource | ||||
instead of protected resource. | Note: to avoid complex sentences, the specification document may | |||
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. It decides whether and | |||
under which conditions its attributes can be disclosed to other | ||||
parties. | ||||
Subject Information statement asserted by an AS about a subject. | Subject Information statement asserted by an AS about a subject. | |||
1.4. Trust relationships | 1.4. Trust relationships | |||
GNAP defines its trust objective as: "the RO trusts the AS to ensure | GNAP defines its trust objective as: "the RO trusts the AS to ensure | |||
access validation and delegation of protected resources to end-users, | access validation and delegation of protected resources to end-users, | |||
through third party clients." | through third party clients." | |||
This trust objective can be decomposed into trust relationships | This trust objective can be decomposed into trust relationships | |||
skipping to change at page 11, line 9 ¶ | skipping to change at page 11, line 23 ¶ | |||
* end-user/client: the client acts as a user agent. Depending on | * end-user/client: the client acts as a user agent. Depending on | |||
the technology used (browser, SPA, mobile application, IoT device, | the technology used (browser, SPA, mobile application, IoT device, | |||
etc.), some interactions may or may not be possible (as described | etc.), some interactions may or may not be possible (as described | |||
in Section 2.5.1). Client developers promise to implement | in Section 2.5.1). Client developers promise to implement | |||
requirements and generally some recommendations or best practices, | requirements and generally some recommendations or best practices, | |||
so that the end-users may confidently use their software. | so that the end-users may confidently use their software. | |||
However, end-users might also be facing some attacker's client | However, end-users might also be facing some attacker's client | |||
software, without even realizing it. | software, without even realizing it. | |||
* end-user / AS: when the client supports it (see Section 3.3), the | ||||
end-user gets to interact with front-channel URLs provided by the | ||||
AS. See Section 12.24 for some considerations in trusting these | ||||
interactions. | ||||
* client/AS: An honest AS may be facing an attacker's client (as | * client/AS: An honest AS may be facing an attacker's client (as | |||
discussed just above), or the reverse, and GNAP aims at making | discussed just above), or the reverse, and GNAP aims at making | |||
common attacks impractical. The core specification makes access | common attacks impractical. The core specification makes access | |||
tokens opaque to the client and defines the request/response | tokens opaque to the client and defines the request/response | |||
scheme in detail, therefore avoiding extra trust hypotheses from | scheme in detail, therefore avoiding extra trust hypotheses from | |||
this critical piece of software. Yet the AS may further define | this critical piece of software. Yet the AS may further define | |||
cryptographic attestations or optional rules to simplify the | cryptographic attestations or optional rules to simplify the | |||
access of clients it already trusts, due to past behavior or | access of clients it already trusts, due to past behavior or | |||
organizational policies (see Section 2.3). | organizational policies (see Section 2.3). | |||
skipping to change at page 11, line 33 ¶ | skipping to change at page 11, line 52 ¶ | |||
* AS/RO: the AS is expected to follow the decisions made by the RO, | * AS/RO: the AS is expected to follow the decisions made by the RO, | |||
either through interactive consent requests, repeated interactions | either through interactive consent requests, repeated interactions | |||
or automated rules (as described in Section 1.5). Privacy | or automated rules (as described in Section 1.5). Privacy | |||
considerations aim to reduce the risk of an honest but too curious | considerations aim to reduce the risk of an honest but too curious | |||
AS, or the consequences of an unexpected user data exposure. | AS, or the consequences of an unexpected user data exposure. | |||
* AS/RS: the AS promises to issue valid access tokens to legitimate | * AS/RS: the AS promises to issue valid access tokens to legitimate | |||
client requests (i.e. after carrying out appropriate due | client requests (i.e. after carrying out appropriate due | |||
diligence, as defined in the GNAP protocol). Some optional | diligence, as defined in the GNAP protocol). Some optional | |||
configurations are covered by | configurations are covered by [I-D.ietf-gnap-resource-servers]. | |||
[I-D.draft-ietf-gnap-resource-servers]. | ||||
A global assumption made by GNAP is that authorization requests are | A global assumption made by GNAP is that authorization requests are | |||
security and privacy sensitive, and appropriate measures are | security and privacy sensitive, and appropriate measures are | |||
respectively detailed in Section 12 and Section 13. | respectively detailed in Section 12 and Section 13. | |||
A formal trust model is out of scope of this specification, but might | A formal trust model is out of scope of this specification, but might | |||
be carried out thanks to [promise-theory]. | be carried out thanks to [promise-theory]. | |||
1.5. Sequences | 1.5. Sequences | |||
skipping to change at page 13, line 44 ¶ | skipping to change at page 13, line 44 ¶ | |||
Legend | Legend | |||
+ + + indicates a possible interaction with a human | + + + indicates a possible interaction with a human | |||
----- indicates an interaction between protocol roles | ----- indicates an interaction between protocol roles | |||
~ ~ ~ indicates a potential equivalence or out-of-band | ~ ~ ~ indicates a potential equivalence or out-of-band | |||
communication between roles | communication between roles | |||
* (A) The end-user interacts with the client instance to indicate a | * (A) The end-user interacts with the client instance to indicate a | |||
need for resources on behalf of the RO. This could identify the | need for resources on behalf of the RO. This could identify the | |||
RS the client instance needs to call, the resources needed, or the | RS the client instance needs to call, the resources needed, or the | |||
RO that is needed to approve the request. Note that the RO and | RO that is needed to approve the request. Note that the RO and | |||
end-user are often the same entity in practice, but some more | end-user are often the same entity in practice, but GNAP makes no | |||
dynamic processes are discussed in | general assumption that they are. | |||
[I-D.draft-ietf-gnap-resource-servers]. | ||||
* (1) The client instance determines what access is needed and which | * (1) The client instance determines what access is needed and which | |||
AS to approach for access. Note that for most situations, the | AS to approach for access. Note that for most situations, the | |||
client instance is pre-configured with which AS to talk to and | client instance is pre-configured with which AS to talk to and | |||
which kinds of access it needs. | which kinds of access it needs, but some more dynamic processes | |||
are discussed in Section 9.1. | ||||
* (2) The client instance requests access at the AS (Section 2). | * (2) The client instance requests access at the AS (Section 2). | |||
* (3) The AS processes the request and determines what is needed to | * (3) The AS processes the request and determines what is needed to | |||
fulfill the request. The AS sends its response to the client | fulfill the request. (See Section 4.) The AS sends its response | |||
instance (Section 3). | to the client instance (Section 3). | |||
* (B) If interaction is required, the AS interacts with the RO | * (B) If interaction is required, the AS interacts with the RO | |||
(Section 4) to gather authorization. The interactive component of | (Section 4) to gather authorization. The interactive component of | |||
the AS can function using a variety of possible mechanisms | the AS can function using a variety of possible mechanisms | |||
including web page redirects, applications, challenge/response | including web page redirects, applications, challenge/response | |||
protocols, or other methods. The RO approves the request for the | protocols, or other methods. The RO approves the request for the | |||
client instance being operated by the end-user. Note that the RO | client instance being operated by the end-user. Note that the RO | |||
and end-user are often the same entity in practice. | and end-user are often the same entity in practice, and many of | |||
GNAP's interaction methods allow the client instance to facilitate | ||||
the end user interacting with the AS in order to fulfill the role | ||||
of the RO. | ||||
* (4) The client instance continues the grant at the AS (Section 5). | * (4) The client instance continues the grant at the AS (Section 5). | |||
* (5) If the AS determines that access can be granted, it returns a | * (5) If the AS determines that access can be granted, it returns a | |||
response to the client instance (Section 3) including an access | response to the client instance (Section 3) including an access | |||
token (Section 3.2) for calling the RS and any directly returned | token (Section 3.2) for calling the RS and any directly returned | |||
information (Section 3.4) about the RO. | information (Section 3.4) about the RO. | |||
* (6) The client instance uses the access token (Section 7.2) to | * (6) The client instance uses the access token (Section 7.2) to | |||
call the RS. | call the RS. | |||
* (7) The RS determines if the token is sufficient for the request | * (7) The RS determines if the token is sufficient for the request | |||
by examining the token. The means of the RS determining this | by examining the token. The means of the RS determining this | |||
access are out of scope of this specification, but some options | access are out of scope of this specification, but some options | |||
are discussed in [I-D.draft-ietf-gnap-resource-servers]. | are discussed in [I-D.ietf-gnap-resource-servers]. | |||
* (8) The client instance calls the RS (Section 7.2) using the | * (8) The client instance calls the RS (Section 7.2) using the | |||
access token until the RS or client instance determine that the | access token until the RS or client instance determine that the | |||
token is no longer valid. | token is no longer valid. | |||
* (9) When the token no longer works, the client instance fetches an | * (9) When the token no longer works, the client instance fetches an | |||
updated access token (Section 6.1) based on the rights granted in | updated access token (Section 6.1) based on the rights granted in | |||
(5). | (5). | |||
* (10) The AS issues a new access token (Section 3.2) to the client | * (10) The AS issues a new access token (Section 3.2) to the client | |||
instance. | instance. | |||
* (11) The client instance uses the new access token (Section 7.2) | * (11) The client instance uses the new access token (Section 7.2) | |||
to call the RS. | to call the RS. | |||
* (12) The RS determines if the new token is sufficient for the | * (12) The RS determines if the new token is sufficient for the | |||
request. The means of the RS determining this access are out of | request. The means of the RS determining this access are out of | |||
scope of this specification, but some options are discussed in | scope of this specification, but some options are discussed in | |||
[I-D.draft-ietf-gnap-resource-servers]. | [I-D.ietf-gnap-resource-servers]. | |||
* (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. | |||
skipping to change at page 25, line 25 ¶ | skipping to change at page 25, line 25 ¶ | |||
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| | | | | | |||
| |--(1)--- Request Access --------->| | | | | | |--(1)--- Request Access --------->| | | | | |||
| | | | | | | | | | | | | | |||
| |<-(2)--- Request Access ----------| | | | | | |<-(2)-- Interaction Needed -------| | | | | |||
| | | | | | | | | | | | | | |||
| |+ (3) + Facilitate Interaction + + + + + + + + + + > | | | | |+ (3) + Facilitate Interaction + + + + + + + + + + > | | | |||
| | | | | | | | | | | | | | |||
| | | |<+ (4) +>| | | | | | |<+ (4) +>| | | |||
| | | | AuthN | | | | | | | AuthN | | | |||
| | | | | | | | | | | | | | |||
| | | |<+ (5) +>| | | | | | |<+ (5) +>| | | |||
| | | | AuthZ | | | | | | | AuthZ | | | |||
| | | | | | | | | | | | | | |||
| |< (6) + Signal Continuation + + + + + + + + + + + + +| | | | |< (6) + Signal Continuation + + + + + + + + + + + + +| | | |||
skipping to change at page 28, line 18 ¶ | skipping to change at page 28, line 18 ¶ | |||
"nonce": "LKLTI25DK82FX4T4QFZC" | "nonce": "LKLTI25DK82FX4T4QFZC" | |||
} | } | |||
}, | }, | |||
"subject": { | "subject": { | |||
"formats": ["iss_sub", "opaque"], | "formats": ["iss_sub", "opaque"], | |||
"assertions": ["id_token"] | "assertions": ["id_token"] | |||
} | } | |||
} | } | |||
The request and response MUST be sent as a JSON object in the body of | The request and response MUST be sent as a JSON object in the body of | |||
the HTTP POST request with Content-Type "application/json", unless | the HTTP POST request with Content-Type application/json, unless | |||
otherwise specified by the signature mechanism. | otherwise specified by the signature mechanism. | |||
The authorization server MUST include the HTTP "Cache-Control" | The authorization server MUST include the HTTP "Cache-Control" | |||
response header field [RFC7234] with a value set to "no-store". | response header field [RFC7234] with a value set to "no-store". | |||
2.1. Requesting Access to Resources | 2.1. Requesting Access to Resources | |||
If the client instance is requesting one or more access tokens for | If the client instance is requesting one or more access tokens for | |||
the purpose of accessing an API, the client instance MUST include an | the purpose of accessing an API, the client instance MUST include an | |||
"access_token" field. This field MUST be an object (for a single | access_token field. This field MUST be an object (for a single | |||
access token (Section 2.1.1)) or an array of these objects (for | access token (Section 2.1.1)) or an array of these objects (for | |||
multiple access tokens (Section 2.1.2)), as described in the | multiple access tokens (Section 2.1.2)), as described in the | |||
following sections. | following sections. | |||
2.1.1. Requesting a Single Access Token | 2.1.1. Requesting a Single Access Token | |||
To request a single access token, the client instance sends an | To request a single access token, the client instance sends an | |||
"acccess_token" object composed of the following fields. | acccess_token object composed of the following fields. | |||
access (array of objects/strings) Describes the rights that the | access (array of objects/strings) Describes the rights that the | |||
client instance is requesting for one or more access tokens to be | client instance is requesting for one or more access tokens to be | |||
used at RS's. This field is REQUIRED. Section 8 | used at RS's. This field is REQUIRED. Section 8 | |||
label (string) A unique name chosen by the client instance to refer | label (string) A unique name chosen by the client instance to refer | |||
to the resulting access token. The value of this field is opaque | to the resulting access token. The value of this field is opaque | |||
to the AS. If this field is included in the request, the AS MUST | to the AS. If this field is included in the request, the AS MUST | |||
include the same label in the token response (Section 3.2). This | include the same label in the token response (Section 3.2). This | |||
field is REQUIRED if used as part of a multiple access token | field is REQUIRED if used as part of a multiple access token | |||
request (Section 2.1.2), and is OPTIONAL otherwise. | request (Section 2.1.2), and is OPTIONAL otherwise. | |||
flags (array of strings) A set of flags that indicate desired | flags (array of strings) A set of flags that indicate desired | |||
attributes or behavior to be attached to the access token by the | attributes or behavior to be attached to the access token by the | |||
AS. This field is OPTIONAL. | AS. This field is OPTIONAL. | |||
The values of the "flags" field defined by this specification are as | The values of the flags field defined by this specification are as | |||
follows: | follows: | |||
"bearer" If this flag is included, the access token being requested | "bearer" If this flag is included, the access token being requested | |||
is a bearer token. If this flag is omitted, the access token is | is a bearer token. If this flag is omitted, the access token is | |||
bound to the key used by the client instance in this request, or | bound to the key used by the client instance in this request (or | |||
the key's most recent rotation. Methods for presenting bound and | that key's most recent rotation) and the access token MUST be | |||
bearer access tokens are described in Section 7.2. [[ See issue | presented using the same key and proofing method. Methods for | |||
#38 (https://github.com/ietf-wg-gnap/gnap-core-protocol/issues/38) | presenting bound and bearer access tokens are described in | |||
]] | Section 7.2. See Section 12.7 for additional considerations on | |||
the use of bearer tokens. | ||||
"split" If this flag is included, the client instance is capable of | "split" If this flag is included, the client instance is capable of | |||
receiving a different number of tokens than specified in the token | receiving a different number of tokens than specified in the token | |||
request (Section 2.1), including receiving multiple access tokens | request (Section 2.1), including receiving multiple access tokens | |||
(Section 3.2.2) in response to any single token request | (Section 3.2.2) in response to any single token request | |||
(Section 2.1.1) or a different number of access tokens than | (Section 2.1.1) or a different number of access tokens than | |||
requested in a multiple access token request (Section 2.1.2). The | requested in a multiple access token request (Section 2.1.2). The | |||
"label" fields of the returned additional tokens are chosen by the | label fields of the returned additional tokens are chosen by the | |||
AS. The client instance MUST be able to tell from the token | AS. The client instance MUST be able to tell from the token | |||
response where and how it can use each of the access tokens. [[ | response where and how it can use each of the access tokens. [[ | |||
See issue #37 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | See issue #37 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/37) ]] | issues/37) ]] | |||
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). | |||
skipping to change at page 31, line 9 ¶ | skipping to change at page 31, line 9 ¶ | |||
If access is approved, the resulting access token is valid for the | If access is approved, the resulting access token is valid for the | |||
described resource and is bound to the client instance's key (or its | described resource and is bound to the client instance's key (or its | |||
most recent rotation). The token is labeled "token1-23" and could be | most recent rotation). The token is labeled "token1-23" and could be | |||
split into multiple access tokens by the AS, if the AS chooses. The | split into multiple access tokens by the AS, if the AS chooses. The | |||
token response structure is described in Section 3.2.1. | token response structure is described in Section 3.2.1. | |||
2.1.2. Requesting Multiple Access Tokens | 2.1.2. Requesting Multiple Access Tokens | |||
To request multiple access tokens to be returned in a single | To request multiple access tokens to be returned in a single | |||
response, the client instance sends an array of objects as the value | response, the client instance sends an array of objects as the value | |||
of the "access_token" parameter. Each object MUST conform to the | of the access_token parameter. Each object MUST conform to the | |||
request format for a single access token request, as specified in | request format for a single access token request, as specified in | |||
requesting a single access token (Section 2.1.1). Additionally, each | requesting a single access token (Section 2.1.1). Additionally, each | |||
object in the array MUST include the "label" field, and all values of | object in the array MUST include the label field, and all values of | |||
these fields MUST be unique within the request. If the client | these fields MUST be unique within the request. If the client | |||
instance does not include a "label" value for any entry in the array, | instance does not include a label value for any entry in the array, | |||
or the values of the "label" field are not unique within the array, | or the values of the label field are not unique within the array, the | |||
the AS MUST return an error. | AS MUST return an error. | |||
The following non-normative example shows a request for two separate | The following non-normative example shows a request for two separate | |||
access tokens, "token1" and "token2". | access tokens, token1 and token2. | |||
"access_token": [ | "access_token": [ | |||
{ | { | |||
"label": "token1", | "label": "token1", | |||
"access": [ | "access": [ | |||
{ | { | |||
"type": "photo-api", | "type": "photo-api", | |||
"actions": [ | "actions": [ | |||
"read", | "read", | |||
"write", | "write", | |||
skipping to change at page 33, line 6 ¶ | skipping to change at page 33, line 6 ¶ | |||
"pictures", | "pictures", | |||
"walrus whiskers" | "walrus whiskers" | |||
] | ] | |||
} | } | |||
], | ], | |||
"flags": [ "bearer" ] | "flags": [ "bearer" ] | |||
} | } | |||
] | ] | |||
All approved access requests are returned in the multiple access | All approved access requests are returned in the multiple access | |||
token response (Section 3.2.2) structure using the values of the | token response (Section 3.2.2) structure using the values of the | |||
"label" fields in the request. | label fields in the request. | |||
2.2. Requesting Subject Information | 2.2. Requesting Subject Information | |||
If the client instance is requesting information about the RO from | If the client instance is requesting information about the RO from | |||
the AS, it sends a "subject" field as a JSON object. This object MAY | the AS, it sends a subject field as a JSON object. This object MAY | |||
contain the following fields (or additional fields defined in a | contain the following fields (or additional fields defined in a | |||
registry TBD (Section 11)). | registry TBD (Section 11)). | |||
formats (array of strings) An array of subject identifier subject | formats (array of strings) An array of subject identifier subject | |||
types requested for the RO, as defined by | types requested for the RO, as defined by | |||
[I-D.ietf-secevent-subject-identifiers]. | [I-D.ietf-secevent-subject-identifiers]. | |||
assertions (array of strings) An array of requested assertion | assertions (array of strings) An array of requested assertion | |||
formats. Possible values include "id_token" for an [OIDC] ID | formats. Possible values include id_token for an [OIDC] ID Token | |||
Token and "saml2" for a SAML 2 assertion. Additional assertion | and saml2 for a SAML 2 assertion. Additional assertion values are | |||
values are defined by a registry TBD (Section 11). [[ See issue | defined by a registry TBD (Section 11). [[ See issue #41 | |||
#41 (https://github.com/ietf-wg-gnap/gnap-core-protocol/issues/41) | (https://github.com/ietf-wg-gnap/gnap-core-protocol/issues/41) ]] | |||
]] | ||||
"subject": { | "subject": { | |||
"formats": [ "iss_sub", "opaque" ], | "formats": [ "iss_sub", "opaque" ], | |||
"assertions": [ "id_token", "saml2" ] | "assertions": [ "id_token", "saml2" ] | |||
} | } | |||
The AS can determine the RO's identity and permission for releasing | The AS can determine the RO's identity and permission for releasing | |||
this information through interaction with the RO (Section 4), AS | this information through interaction with the RO (Section 4), AS | |||
policies, or assertions presented by the client instance | policies, or assertions presented by the client instance | |||
(Section 2.4). If this is determined positively, the AS MAY return | (Section 2.4). If this is determined positively, the AS MAY return | |||
skipping to change at page 33, line 46 ¶ | skipping to change at page 33, line 45 ¶ | |||
Subject identifier types requested by the client instance serve only | Subject identifier types requested by the client instance serve only | |||
to identify the RO in the context of the AS and can't be used as | to identify the RO in the context of the AS and can't be used as | |||
communication channels by the client instance, as discussed in | communication channels by the client instance, as discussed in | |||
Section 3.4. | Section 3.4. | |||
The AS SHOULD NOT re-use subject identifiers for multiple different | The AS SHOULD NOT re-use subject identifiers for multiple different | |||
ROs. | ROs. | |||
Note: the "formats" and "assertions" request fields are independent | Note: the "formats" and "assertions" request fields are independent | |||
of each other, and a returned assertion MAY omit a requested subject | of each other, and a returned assertion MAY use a different subject | |||
identifier. | identifier. | |||
[[ See issue #43 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #43 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/43) ]] | issues/43) ]] | |||
2.3. Identifying the Client Instance | 2.3. Identifying the Client Instance | |||
When sending a non-continuation request to the AS, the client | When sending a non-continuation request to the AS, the client | |||
instance MUST identify itself by including the "client" field of the | instance MUST identify itself by including the client field of the | |||
request and by signing the request as described in Section 7.3. Note | request and by signing the request as described in Section 7.3. Note | |||
that for a continuation request (Section 5), the client instance is | that for a continuation request (Section 5), the client instance is | |||
identified by its association with the request being continued and so | identified by its association with the request being continued and so | |||
this field is not sent under those circumstances. | this field is not sent under those circumstances. | |||
When client instance information is sent by value, the "client" field | When client instance information is sent by value, the client field | |||
of the request consists of a JSON object with the following fields. | of the request consists of a JSON object with the following fields. | |||
key (object / string) The public key of the client instance to be | key (object / string) The public key of the client instance to be | |||
used in this request as described in Section 7.1 or a reference to | used in this request as described in Section 7.1 or a reference to | |||
a key as described in Section 7.1.1. This field is REQUIRED. | a key as described in Section 7.1.1. This field is REQUIRED. | |||
class_id (string) An identifier string that the AS can use to | class_id (string) An identifier string that the AS can use to | |||
identify the client software comprising this client instance. The | identify the client software comprising this client instance. The | |||
contents and format of this field are up to the AS. This field is | contents and format of this field are up to the AS. This field is | |||
OPTIONAL. | OPTIONAL. | |||
skipping to change at page 35, line 6 ¶ | skipping to change at page 35, line 6 ¶ | |||
"class_id": "web-server-1234", | "class_id": "web-server-1234", | |||
"display": { | "display": { | |||
"name": "My Client Display Name", | "name": "My Client Display Name", | |||
"uri": "https://example.net/client" | "uri": "https://example.net/client" | |||
} | } | |||
} | } | |||
Additional fields are defined in a registry TBD (Section 11). | Additional fields are defined in a registry TBD (Section 11). | |||
The client instance MUST prove possession of any presented key by the | The client instance MUST prove possession of any presented key by the | |||
"proof" mechanism associated with the key in the request. Proof | proof mechanism associated with the key in the request. Proof types | |||
types are defined in a registry TBD (Section 11) and an initial set | are defined in a registry TBD (Section 11) and an initial set of | |||
of methods is described in Section 7.3. | methods is described in Section 7.3. | |||
Note that the AS MAY know the client instance's public key ahead of | If the same public key is sent by value on different access requests, | |||
time, and the AS MAY apply different policies to the request | the AS MUST treat these requests as coming from the same client | |||
depending on what has been registered against that key. If the same | instance for purposes of identification, authentication, and policy | |||
public key is sent by value on subsequent access requests, the AS | ||||
SHOULD treat these requests as coming from the same client instance | ||||
for purposes of identification, authentication, and policy | ||||
application. If the AS does not know the client instance's public | application. If the AS does not know the client instance's public | |||
key ahead of time, the AS MAY accept or reject the request based on | key ahead of time, the AS MAY accept or reject the request based on | |||
AS policy, attestations within the "client" request, and other | AS policy, attestations within the client request, and other | |||
mechanisms. | mechanisms. | |||
[[ See issue #44 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #44 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/44) ]] | issues/44) ]] | |||
The client instance MUST NOT send a symmetric key by value in the | ||||
request, as doing so would expose the key directly instead of simply | ||||
proving possession of it. See considerations on symmetric keys in | ||||
Section 12.5. | ||||
The client instance's key MAY be pre-registered with the AS ahead of | ||||
time and associated with a set of policies and allowable actions | ||||
pertaining to that client. If this pre-registration includes other | ||||
fields that can occur in the client request object described in this | ||||
section, such as class_id or display, the pre-registered values MUST | ||||
take precedence over any values given at runtime. Additional fields | ||||
sent during a request but not present in a pre-registered client | ||||
instance record at the AS SHOULD NOT be added to the client's pre- | ||||
registered record. See additional considerations regarding client | ||||
instance impersonation in Section 12.13. | ||||
2.3.1. Identifying the Client Instance by Reference | 2.3.1. Identifying the Client Instance by Reference | |||
If the client instance has an instance identifier that the AS can use | If the client instance has an instance identifier that the AS can use | |||
to determine appropriate key information, the client instance can | to determine appropriate key information, the client instance can | |||
send this instance identifier as a direct reference value in lieu of | send this instance identifier as a direct reference value in lieu of | |||
the "client" object. The instance identifier MAY be assigned to a | the client object. The instance identifier MAY be assigned to a | |||
client instance at runtime through the Section 3.5 or MAY be obtained | client instance at runtime through the Section 3.5 or MAY be obtained | |||
in another fashion, such as a static registration process at the AS. | in another fashion, such as a static registration process at the AS. | |||
"client": "client-541-ab" | "client": "client-541-ab" | |||
When the AS receives a request with an instance identifier, the AS | When the AS receives a request with an instance identifier, the AS | |||
MUST ensure that the key used to sign the request (Section 7.3) is | MUST ensure that the key used to sign the request (Section 7.3) is | |||
associated with the instance identifier. | associated with the instance identifier. | |||
If the AS does not recognize the instance identifier, the request | If the AS does not recognize the instance identifier, the request | |||
MUST be rejected with an error. | MUST be rejected with an error. | |||
If the client instance is identified in this manner, the registered | If the client instance is identified in this manner, the registered | |||
key for the client instance MAY be a symmetric key known to the AS. | key for the client instance MAY be a symmetric key known to the AS. | |||
The client instance MUST NOT send a symmetric key by value in the | See considerations on symmetric keys in Section 12.5. | |||
request, as doing so would expose the key directly instead of proving | ||||
possession of it. | ||||
2.3.2. Providing Displayable Client Instance Information | 2.3.2. Providing Displayable Client Instance Information | |||
If the client instance has additional information to display to the | If the client instance has additional information to display to the | |||
RO during any interactions at the AS, it MAY send that information in | RO during any interactions at the AS, it MAY send that information in | |||
the "display" field. This field is a JSON object that declares | the "display" field. This field is a JSON object that declares | |||
information to present to the RO during any interactive sequences. | information to present to the RO during any interactive sequences. | |||
name (string) Display name of the client software | name (string) Display name of the client software | |||
skipping to change at page 36, line 32 ¶ | skipping to change at page 36, line 39 ¶ | |||
[[ 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 | |||
identified by their keys in Section 2.3. | identified by their keys in Section 2.3. See additional | |||
considerations for displayed client information in Section 12.13. | ||||
2.3.3. Authenticating the Client Instance | 2.3.3. Authenticating the Client Instance | |||
If the presented key is known to the AS and is associated with a | If the presented key is known to the AS and is associated with a | |||
single instance of the client software, the process of presenting a | single instance of the client software, the process of presenting a | |||
key and proving possession of that key is sufficient to authenticate | key and proving possession of that key is sufficient to authenticate | |||
the client instance to the AS. The AS MAY associate policies with | the client instance to the AS. The AS MAY associate policies with | |||
the client instance identified by this key, such as limiting which | the client instance identified by this key, such as limiting which | |||
resources can be requested and which interaction methods can be used. | resources can be requested and which interaction methods can be used. | |||
For example, only specific client instances with certain known keys | For example, only specific client instances with certain known keys | |||
skipping to change at page 37, line 26 ¶ | skipping to change at page 37, line 34 ¶ | |||
If the client instance knows the identity of the end-user through one | If the client instance knows the identity of the end-user through one | |||
or more identifiers or assertions, the client instance MAY send that | or more identifiers or assertions, the client instance MAY send that | |||
information to the AS in the "user" field. The client instance MAY | information to the AS in the "user" field. The client instance MAY | |||
pass this information by value or by reference. | pass this information by value or by reference. | |||
sub_ids (array of objects) An array of subject identifiers for the | sub_ids (array of objects) An array of subject identifiers for the | |||
end-user, as defined by [I-D.ietf-secevent-subject-identifiers]. | end-user, 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). | |||
Possible keys include "id_token" for an [OIDC] ID Token and | Possible keys include id_token for an [OIDC] ID Token and saml2 | |||
"saml2" for a SAML 2 assertion. Additional assertion values are | for a SAML 2 assertion. The assertion values are the string | |||
defined by a registry TBD (Section 11). [[ See issue #41 | serialization of the assertion format, encoded as a plain JSON | |||
(https://github.com/ietf-wg-gnap/gnap-core-protocol/issues/41) ]] | string. Additional assertion types are defined by a registry TBD | |||
(Section 11). [[ See issue #41 (https://github.com/ietf-wg-gnap/ | ||||
gnap-core-protocol/issues/41) ]] | ||||
"user": { | "user": { | |||
"sub_ids": [ { | "sub_ids": [ { | |||
"format": "opaque", | "format": "opaque", | |||
"id": "J2G8G8O4AZ" | "id": "J2G8G8O4AZ" | |||
} ], | } ], | |||
"assertions": { | "assertions": { | |||
"id_token": "eyj..." | "id_token": "eyj..." | |||
} | } | |||
} | } | |||
skipping to change at page 38, line 13 ¶ | skipping to change at page 38, line 22 ¶ | |||
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. | |||
See Section 12.25 for considerations that the AS has to make when | ||||
accepting and processing assertions from the client instance. | ||||
2.4.1. Identifying the User by Reference | 2.4.1. Identifying the User by Reference | |||
The AS can identify the current end-user to the client instance with | The AS can identify the current end-user to the client instance with | |||
a reference which can be used by the client instance to refer to the | a reference which can be used by the client instance to refer to the | |||
end-user across multiple requests. If the client instance has a | end-user across multiple requests. If the client instance has a | |||
reference for the end-user at this AS, the client instance MAY pass | reference for the end-user at this AS, the client instance MAY pass | |||
that reference as a string. The format of this string is opaque to | that reference as a string. The format of this string is opaque to | |||
the client instance. | the client instance. | |||
"user": "XUT2MFM1XBIKJKSDU8QM" | "user": "XUT2MFM1XBIKJKSDU8QM" | |||
One means of dynamically obtaining such a user reference is from the | One means of dynamically obtaining such a user reference is from the | |||
AS returning an "opaque" subject identifier as described in | AS returning an opaque subject identifier as described in | |||
Section 3.4. Other means of configuring a client instance with a | Section 3.4. Other means of configuring a client instance with a | |||
user identifier are out of scope of this specification. | 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. | |||
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. | |||
skipping to change at page 38, line 52 ¶ | skipping to change at page 39, line 20 ¶ | |||
the end-user using the client instance is the same person as the RO, | the end-user using the client instance is the same person as the RO, | |||
and the client instance can directly drive interaction with the end | and the client instance can directly drive interaction with the end | |||
user by facilitating the process through means such as redirection to | user by facilitating the process through means such as redirection to | |||
a URL or launching an application. Other times, the client instance | a URL or launching an application. Other times, the client instance | |||
can provide information to start the RO's interaction on a secondary | can provide information to start the RO's interaction on a secondary | |||
device, or the client instance will wait for the RO to approve the | device, or the client instance will wait for the RO to approve the | |||
request asynchronously. The client instance could also be signaled | request asynchronously. The client instance could also be signaled | |||
that interaction has concluded through a callback mechanism. | that interaction has concluded through a callback mechanism. | |||
The client instance declares the parameters for interaction methods | The client instance declares the parameters for interaction methods | |||
that it can support using the "interact" field. | that it can support using the interact field. | |||
The "interact" field is a JSON object with three keys whose values | The interact field is a JSON object with three keys whose values | |||
declare how the client can initiate and complete the request, as well | declare how the client can initiate and complete the request, as well | |||
as provide hints to the AS about user preferences such as locale. A | as provide hints to the AS about user preferences such as locale. A | |||
client instance MUST NOT declare an interaction mode it does not | client instance MUST NOT declare an interaction mode it does not | |||
support. The client instance MAY send multiple modes in the same | support. The client instance MAY send multiple modes in the same | |||
request. There is no preference order specified in this request. An | request. There is no preference order specified in this request. An | |||
AS MAY respond to any, all, or none of the presented interaction | AS MAY respond to any, all, or none of the presented interaction | |||
modes (Section 3.3) in a request, depending on its capabilities and | modes (Section 3.3) in a request, depending on its capabilities and | |||
what is allowed to fulfill the request. | what is allowed to fulfill the request. | |||
start (list of strings/objects) Indicates how the client instance | start (list of strings/objects) Indicates how the client instance | |||
can start an interaction. | can start an interaction. | |||
finish (object) Indicates how the client instance can receive an | finish (object) Indicates how the client instance can receive an | |||
indication that interaction has finished at the AS. | indication that interaction has finished at the AS. | |||
hints (object) Provides additional information to inform the | hints (object) Provides additional information to inform the | |||
interaction process at the AS. | interaction process at the AS. | |||
The "interact" field MUST contain the "start" key, and MAY contain | The interact field MUST contain the start key, and MAY contain the | |||
the "finish" and "hints" keys. The value of each key is an array | finish and hints keys. The value of each key is an array which | |||
which contains strings or JSON objects as defined below. | contains strings or JSON objects as defined below. | |||
In this non-normative example, the client instance is indicating that | In this non-normative example, the client instance is indicating that | |||
it can redirect (Section 2.5.1.1) the end-user to an arbitrary URL | it can redirect (Section 2.5.1.1) the end-user to an arbitrary URL | |||
and can receive a redirect (Section 2.5.2.1) through a browser | and can receive a redirect (Section 2.5.2.1) through a browser | |||
request. | request. | |||
"interact": { | "interact": { | |||
"start": ["redirect"], | "start": ["redirect"], | |||
"finish": { | "finish": { | |||
"method": "redirect", | "method": "redirect", | |||
skipping to change at page 40, line 17 ¶ | skipping to change at page 40, line 36 ¶ | |||
error since the client instance will be unable to complete the | error since the client instance will be unable to complete the | |||
request without authorization. | request without authorization. | |||
The AS SHOULD apply suitable timeouts to any interaction mechanisms | The AS SHOULD apply suitable timeouts to any interaction mechanisms | |||
provided, including user codes and redirection URLs. The client | provided, including user codes and redirection URLs. The client | |||
instance SHOULD apply suitable timeouts to any callback URLs. | instance SHOULD apply suitable timeouts to any callback URLs. | |||
2.5.1. Start Mode Definitions | 2.5.1. Start Mode Definitions | |||
This specification defines the following interaction start modes as | This specification defines the following interaction start modes as | |||
an array of string values under the "start" key: | an array of string values under the start key: | |||
"redirect" Indicates that the client instance can direct the end- | "redirect" Indicates that the client instance can direct the end- | |||
user to an arbitrary URL for interaction. Section 2.5.1.1 | user to an arbitrary URL for interaction. Section 2.5.1.1 | |||
"app" Indicates that the client instance can launch an application | "app" Indicates that the client instance can launch an application | |||
on the end-user's device for interaction. Section 2.5.1.2 | on the end-user's device for interaction. Section 2.5.1.2 | |||
"user_code" Indicates that the client instance can communicate a | "user_code" Indicates that the client instance can communicate a | |||
human-readable short code to the end-user for use with a stable | human-readable short code to the end-user for use with a stable | |||
URL. Section 2.5.1.3 | URL. Section 2.5.1.3 | |||
2.5.1.1. Redirect to an Arbitrary URL | 2.5.1.1. Redirect to an Arbitrary URL | |||
If the client instance is capable of directing the end-user to a URL | If the client instance is capable of directing the end-user to a URL | |||
defined by the AS at runtime, the client instance indicates this by | defined by the AS at runtime, the client instance indicates this by | |||
sending the "redirect" field with the boolean value "true". The | including redirect in the array under the start key. The means by | |||
means by which the client instance will activate this URL is out of | which the client instance will activate this URL is out of scope of | |||
scope of this specification, but common methods include an HTTP | this specification, but common methods include an HTTP redirect, | |||
redirect, launching a browser on the end-user's device, providing a | launching a browser on the end-user's device, providing a scannable | |||
scannable image encoding, and printing out a URL to an interactive | image encoding, and printing out a URL to an interactive console. | |||
console. While this URL is generally hosted at the AS, the client | While this URL is generally hosted at the AS, the client instance can | |||
instance can make no assumptions about its contents, composition, or | make no assumptions about its contents, composition, or relationship | |||
relationship to the AS grant URL. | to the AS grant URL. | |||
"interact": { | "interact": { | |||
"start": ["redirect"] | "start": ["redirect"] | |||
} | } | |||
If this interaction mode is supported for this client instance and | If this interaction mode is supported for this client instance and | |||
request, the AS returns a redirect interaction response | request, the AS returns a redirect interaction response | |||
Section 3.3.1. The client instance manages this interaction method | Section 3.3.1. The client instance manages this interaction method | |||
as described in Section 4.1.1. | as described in Section 4.1.1. | |||
See Section 12.24 for more considerations regarding the use of front- | ||||
channel communication techniques such as this. | ||||
2.5.1.2. Open an Application-specific URL | 2.5.1.2. Open an Application-specific URL | |||
If the client instance can open a URL associated with an application | If the client instance can open a URL associated with an application | |||
on the end-user's device, the client instance indicates this by | on the end-user's device, the client instance indicates this by | |||
sending the "app" field with boolean value "true". The means by | including app in the array under the start key. The means by which | |||
which the client instance determines the application to open with | the client instance determines the application to open with this URL | |||
this URL are out of scope of this specification. | are out of scope of this specification. | |||
"interact": { | "interact": { | |||
"start": ["app"] | "start": ["app"] | |||
} | } | |||
If this interaction mode is supported for this client instance and | If this interaction mode is supported for this client instance and | |||
request, the AS returns an app interaction response with an app URL | request, the AS returns an app interaction response with an app URL | |||
payload Section 3.3.2. The client instance manages this interaction | payload Section 3.3.2. The client instance manages this interaction | |||
method as described in Section 4.1.3. | method as described in Section 4.1.3. | |||
[[ See issue #54 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #54 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/54) ]] | issues/54) ]] | |||
2.5.1.3. Display a Short User Code | 2.5.1.3. Display a Short User Code | |||
If the client instance is capable of displaying or otherwise | If the client instance is capable of displaying or otherwise | |||
communicating a short, human-entered code to the RO, the client | communicating a short, human-entered code to the RO, the client | |||
instance indicates this by sending the "user_code" field with the | instance indicates this by including user_code in the array under the | |||
boolean value "true". This code is to be entered at a static URL | start key. This code is to be entered at a static URL that does not | |||
that does not change at runtime. While this URL is generally hosted | change at runtime. While this URL is generally hosted at the AS, the | |||
at the AS, the client instance can make no assumptions about its | client instance can make no assumptions about its contents, | |||
contents, composition, or relationship to the AS grant URL. | composition, or relationship to the AS grant URL. | |||
"interact": { | "interact": { | |||
"start": ["user_code"] | "start": ["user_code"] | |||
} | } | |||
If this interaction mode is supported for this client instance and | If this interaction mode is supported for this client instance and | |||
request, the AS returns a user code and interaction URL as specified | request, the AS returns a user code and interaction URL as specified | |||
in Section 3.3.3. The client instances manages this interaction | in Section 3.3.3. The client instances manages this interaction | |||
method as described in Section 4.1.2 | method as described in Section 4.1.2 | |||
2.5.2. Finish Interaction Modes | 2.5.2. Finish Interaction Modes | |||
If the client instance is capable of receiving a message from the AS | If the client instance is capable of receiving a message from the AS | |||
indicating that the RO has completed their interaction, the client | indicating that the RO has completed their interaction, the client | |||
instance indicates this by sending the following members of an object | instance indicates this by sending the following members of an object | |||
under the "finish" key. | under the finish key. | |||
method (string) REQUIRED. The callback method that the AS will use | method (string) REQUIRED. The callback method that the AS will use | |||
to contact the client instance. This specification defines the | to contact the client instance. This specification defines the | |||
following interaction completion methods, with other values | following interaction completion methods, with other values | |||
defined by a registry TBD (Section 11): | defined by a registry TBD (Section 11): | |||
"redirect" Indicates that the client instance can receive a | "redirect" Indicates that the client instance can receive a | |||
redirect from the end-user's device after interaction with the | redirect from the end-user's device after interaction with the | |||
RO has concluded. Section 2.5.2.1 | RO has concluded. Section 2.5.2.1 | |||
skipping to change at page 42, line 37 ¶ | skipping to change at page 43, line 16 ¶ | |||
information. The callback URI SHOULD be presented to the RO | information. The callback URI SHOULD be presented to the RO | |||
during the interaction phase before redirect. | during the interaction phase before redirect. | |||
nonce (string) REQUIRED. Unique value to be used in the calculation | nonce (string) REQUIRED. Unique value to be used in the calculation | |||
of the "hash" query parameter sent to the callback URL, must be | of the "hash" query parameter sent to the callback URL, must be | |||
sufficiently random to be unguessable by an attacker. MUST be | sufficiently random to be unguessable by an attacker. MUST be | |||
generated by the client instance as a unique value for this | generated by the client instance as a unique value for this | |||
request. | request. | |||
hash_method (string) OPTIONAL. The hash calculation mechanism to be | hash_method (string) OPTIONAL. The hash calculation mechanism to be | |||
used for the callback hash in Section 4.2.3. Can be one of "sha3" | used for the callback hash in Section 4.2.3. Can be one of sha3 | |||
or "sha2". If absent, the default value is "sha3". [[ See issue | or sha2. If absent, the default value is sha3. [[ See issue #56 | |||
#56 (https://github.com/ietf-wg-gnap/gnap-core-protocol/issues/56) | (https://github.com/ietf-wg-gnap/gnap-core-protocol/issues/56) ]] | |||
]] | ||||
If this interaction mode is supported for this client instance and | If this interaction mode is supported for this client instance and | |||
request, the AS returns a nonce for use in validating the callback | request, the AS returns a nonce for use in validating the callback | |||
response (Section 3.3.4). Requests to the callback URI MUST be | response (Section 3.3.4). Requests to the callback URI MUST be | |||
processed as described in Section 4.2, and the AS MUST require | processed as described in Section 4.2, and the AS MUST require | |||
presentation of an interaction callback reference as described in | presentation of an interaction callback reference as described in | |||
Section 5.1. | Section 5.1. | |||
[[ See issue #58 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #58 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/58) ]] | issues/58) ]] | |||
[[ See issue #59 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | ||||
issues/59) ]] | ||||
2.5.2.1. Receive an HTTP Callback Through the Browser | 2.5.2.1. Receive an HTTP Callback Through the Browser | |||
A finish "method" value of "redirect" indicates that the client | A finish method value of redirect indicates that the client instance | |||
instance will expect a request from the RO's browser using the HTTP | will expect a request from the RO's browser using the HTTP method GET | |||
method GET as described in Section 4.2.1. | as described in Section 4.2.1. | |||
"interact": { | "interact": { | |||
"finish": { | "finish": { | |||
"method": "redirect", | "method": "redirect", | |||
"uri": "https://client.example.net/return/123455", | "uri": "https://client.example.net/return/123455", | |||
"nonce": "LKLTI25DK82FX4T4QFZC" | "nonce": "LKLTI25DK82FX4T4QFZC" | |||
} | } | |||
} | } | |||
Requests to the callback URI MUST be processed by the client instance | Requests to the callback URI MUST be processed by the client instance | |||
as described in Section 4.2.1. | as described in Section 4.2.1. | |||
Since the incoming request to the callback URL is from the RO's | Since the incoming request to the callback URL is from the RO's | |||
browser, this method is usually used when the RO and end-user are the | browser, this method is usually used when the RO and end-user are the | |||
same entity. As such, the client instance MUST ensure the end-user | same entity. As such, the client instance MUST ensure the end-user | |||
is present on the request to prevent substitution attacks. | is present on the request to prevent substitution attacks. | |||
See Section 12.24 for more considerations regarding the use of front- | ||||
channel communication techniques such as this. | ||||
2.5.2.2. Receive an HTTP Direct Callback | 2.5.2.2. Receive an HTTP Direct Callback | |||
A finish "method" value of "push" indicates that the client instance | A finish method value of push indicates that the client instance will | |||
will expect a request from the AS directly using the HTTP method POST | expect a request from the AS directly using the HTTP method POST as | |||
as described in Section 4.2.2. | described in Section 4.2.2. | |||
"interact": { | "interact": { | |||
"finish": { | "finish": { | |||
"method": "push", | "method": "push", | |||
"uri": "https://client.example.net/return/123455", | "uri": "https://client.example.net/return/123455", | |||
"nonce": "LKLTI25DK82FX4T4QFZC" | "nonce": "LKLTI25DK82FX4T4QFZC" | |||
} | } | |||
} | } | |||
Requests to the callback URI MUST be processed by the client instance | Requests to the callback URI MUST be processed by the client instance | |||
as described in Section 4.2.2. | as described in Section 4.2.2. | |||
Since the incoming request to the callback URL is from the AS and not | Since the incoming request to the callback URL is from the AS and not | |||
from the RO's browser, the client instance MUST NOT require the end- | from the RO's browser, the client instance MUST NOT require the end- | |||
user to be present on the incoming HTTP request. | user to be present on the incoming HTTP request. | |||
[[ See issue #60 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | ||||
issues/60) ]] | ||||
2.5.3. Hints | 2.5.3. Hints | |||
The "hints" key is an object describing one or more suggestions from | The hints key is an object describing one or more suggestions from | |||
the client instance that the AS can use to help drive user | the client instance that the AS can use to help drive user | |||
interaction. | interaction. | |||
This specification defines the following properties under the "hints" | This specification defines the following properties under the hints | |||
key: | key: | |||
ui_locales (array of strings) Indicates the end-user's preferred | ui_locales (array of strings) Indicates the end-user's preferred | |||
locales that the AS can use during interaction, particularly | locales that the AS can use during interaction, particularly | |||
before the RO has authenticated. Section 2.5.3.1 | before the RO has authenticated. Section 2.5.3.1 | |||
The following sections detail requests for interaction modes. | The following sections detail requests for interaction modes. | |||
Additional interaction modes are defined in a registry TBD | Additional interaction modes are defined in a registry TBD | |||
(Section 11). | (Section 11). | |||
2.5.3.1. Indicate Desired Interaction Locales | 2.5.3.1. Indicate Desired Interaction Locales | |||
If the client instance knows the end-user's locale and language | If the client instance knows the end-user's locale and language | |||
preferences, the client instance can send this information to the AS | preferences, the client instance can send this information to the AS | |||
using the "ui_locales" field with an array of locale strings as | using the ui_locales field with an array of locale strings as defined | |||
defined by [RFC5646]. | by [RFC5646]. | |||
"interact": { | "interact": { | |||
"hints": { | "hints": { | |||
"ui_locales": ["en-US", "fr-CA"] | "ui_locales": ["en-US", "fr-CA"] | |||
} | } | |||
} | } | |||
If possible, the AS SHOULD use one of the locales in the array, with | If possible, the AS SHOULD use one of the locales in the array, with | |||
preference to the first item in the array supported by the AS. If | preference to the first item in the array supported by the AS. If | |||
none of the given locales are supported, the AS MAY use a default | none of the given locales are supported, the AS MAY use a default | |||
skipping to change at page 46, line 32 ¶ | skipping to change at page 47, line 8 ¶ | |||
} | } | |||
} | } | |||
In this example, the AS is returning set of subject identifiers | In this example, the AS is returning set of subject identifiers | |||
(Section 3.4), simultaneously as an opaque identifier, an email | (Section 3.4), simultaneously as an opaque identifier, an email | |||
address, and a decentralized identifier (DID). | address, and a decentralized identifier (DID). | |||
{ | { | |||
"subject": { | "subject": { | |||
"sub_ids": [ { | "sub_ids": [ { | |||
"subject_type": "opaque", | "format": "opaque", | |||
"id": "J2G8G8O4AZ" | "id": "J2G8G8O4AZ" | |||
}, { | }, { | |||
"format": "email", | "format": "email", | |||
"email": "user@example.com" | "email": "user@example.com" | |||
}, { | }, { | |||
"format": "did", | "format": "did", | |||
"url": "did:example:123456" | "url": "did:example:123456" | |||
} ] | } ] | |||
} | } | |||
} | } | |||
3.1. Request Continuation | 3.1. Request Continuation | |||
If the AS determines that the request can be continued with | If the AS determines that the request can be continued with | |||
additional requests, it responds with the "continue" field. This | additional requests, it responds with the continue field. This field | |||
field contains a JSON object with the following properties. | contains a JSON object with the following properties. | |||
uri (string) REQUIRED. The URI at which the client instance can | uri (string) REQUIRED. The URI at which the client instance can | |||
make continuation requests. This URI MAY vary per request, or MAY | make continuation requests. This URI MAY vary per request, or MAY | |||
be stable at the AS if the AS includes an access token. The | be stable at the AS. The client instance MUST use this value | |||
client instance MUST use this value exactly as given when making a | exactly as given when making a continuation request (Section 5). | |||
continuation request (Section 5). | ||||
wait (integer) RECOMMENDED. The amount of time in integer seconds | wait (integer) RECOMMENDED. The amount of time in integer seconds | |||
the client instance SHOULD wait after receiving this continuation | the client instance SHOULD wait after receiving this continuation | |||
handle and calling the URI. | handle and calling the URI. | |||
access_token (object) REQUIRED. A unique access token for | access_token (object) REQUIRED. A unique access token for | |||
continuing the request, in the format specified in Section 3.2.1. | continuing the request, called the "continuation access token". | |||
This access token MUST be bound to the client instance's key used | The value of this property MUST be in the format specified in | |||
in the request and MUST NOT be a "bearer" token. As a | Section 3.2.1. This access token MUST be bound to the client | |||
consequence, the "flags" array of this access token MUST NOT | instance's key used in the request and MUST NOT be a bearer token. | |||
contain the string "bearer" and the "key" field MUST be omitted. | As a consequence, the flags array of this access token MUST NOT | |||
This access token MUST NOT be usable at resources outside of the | contain the string bearer and the key field MUST be omitted. The | |||
AS. The client instance MUST present the access token in all | client instance MUST present the continuation access token in all | |||
requests to the continuation URI as described in Section 7.2. [[ | requests to the continuation URI as described in Section 7.2. | |||
See issue #66 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | ||||
issues/66) ]] | ||||
{ | { | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "80UPRY5NM33OMUKMKSKU" | "value": "80UPRY5NM33OMUKMKSKU" | |||
}, | }, | |||
"uri": "https://server.example.com/continue", | "uri": "https://server.example.com/continue", | |||
"wait": 60 | "wait": 60 | |||
} | } | |||
} | } | |||
skipping to change at page 47, line 48 ¶ | skipping to change at page 48, line 28 ¶ | |||
Section 7.3 and MUST present the access token in its continuation | Section 7.3 and MUST present the access token in its continuation | |||
request. | request. | |||
This field SHOULD be returned when interaction is expected, to allow | This field SHOULD be returned when interaction is expected, to allow | |||
the client instance to follow up after interaction has been | the client instance to follow up after interaction has been | |||
concluded. | concluded. | |||
3.2. Access Tokens | 3.2. Access Tokens | |||
If the AS has successfully granted one or more access tokens to the | If the AS has successfully granted one or more access tokens to the | |||
client instance, the AS responds with the "access_token" field. This | client instance, the AS responds with the access_token field. This | |||
field contains either a single access token as described in | field contains either a single access token as described in | |||
Section 3.2.1 or an array of access tokens as described in | Section 3.2.1 or an array of access tokens as described in | |||
Section 3.2.2. | Section 3.2.2. | |||
The client instance uses any access tokens in this response to call | The client instance uses any access tokens in this response to call | |||
the RS as described in Section 7.2. | the RS as described in Section 7.2. | |||
3.2.1. Single Access Token | 3.2.1. Single Access Token | |||
If the client instance has requested a single access token and the AS | If the client instance has requested a single access token and the AS | |||
skipping to change at page 48, line 22 ¶ | skipping to change at page 49, line 4 ¶ | |||
"access_token" field. The value of this field is an object with the | "access_token" field. The value of this field is an object with the | |||
following properties. | following properties. | |||
value (string) REQUIRED. The value of the access token as a string. | value (string) REQUIRED. The value of the access token as a string. | |||
The value is opaque to the client instance. The value SHOULD be | The value is opaque to the client instance. The value SHOULD be | |||
limited to ASCII characters to facilitate transmission over HTTP | limited to ASCII characters to facilitate transmission over HTTP | |||
headers within other protocols without requiring additional | headers within other protocols without requiring additional | |||
encoding. | encoding. | |||
label (string) REQUIRED for multiple access tokens, OPTIONAL for | label (string) REQUIRED for multiple access tokens, OPTIONAL for | |||
single access token. The value of the "label" the client instance | single access token. The value of the label the client instance | |||
provided in the associated token request (Section 2.1), if | provided in the associated token request (Section 2.1), if | |||
present. If the token has been split by the AS, the value of the | present. If the token has been split by the AS, the value of the | |||
"label" field is chosen by the AS and the "split" field is | label field is chosen by the AS and the split flag is used. | |||
included and set to "true". | ||||
manage (string) OPTIONAL. The management URI for this access token. | manage (string) OPTIONAL. The management URI for this access token. | |||
If provided, the client instance MAY manage its access token as | If provided, the client instance MAY manage its access token as | |||
described in Section 6. This management URI is a function of the | described in Section 6. This management URI is a function of the | |||
AS and is separate from the RS the client instance is requesting | AS and is separate from the RS the client instance is requesting | |||
access to. This URI MUST NOT include the access token value and | access to. This URI MUST NOT include the access token value and | |||
SHOULD be different for each access token issued in a request. | SHOULD be different for each access token issued in a request. | |||
access (array of objects/strings) RECOMMENDED. A description of the | access (array of objects/strings) RECOMMENDED. A description of the | |||
rights associated with this access token, as defined in Section 8. | rights associated with this access token, as defined in Section 8. | |||
skipping to change at page 49, line 8 ¶ | skipping to change at page 49, line 37 ¶ | |||
key (object / string) OPTIONAL. The key that the token is bound to, | key (object / string) OPTIONAL. The key that the token is bound to, | |||
if different from the client instance's presented key. The key | if different from the client instance's presented key. The key | |||
MUST be an object or string in a format described in Section 7.1. | MUST be an object or string in a format described in Section 7.1. | |||
The client instance MUST be able to dereference or process the key | The client instance MUST be able to dereference or process the key | |||
information in order to be able to sign the request. | information in order to be able to sign the request. | |||
flags (array of strings) OPTIONAL. A set of flags that represent | flags (array of strings) OPTIONAL. A set of flags that represent | |||
attributes or behaviors of the access token issued by the AS. | attributes or behaviors of the access token issued by the AS. | |||
The values of the "flags" field defined by this specification are as | The values of the flags field defined by this specification are as | |||
follows: | follows: | |||
"bearer" This flag indicates whether the token is bound to the | "bearer" This flag indicates whether the token is a bearer token, | |||
client instance's key. If the "bearer" flag is present, the | not bound to a key and proofing mechanism. If the bearer flag is | |||
access token is a bearer token, and the "key" field in this | present, the access token is a bearer token, and the key field in | |||
response MUST be omitted. If the "bearer" flag is omitted and the | this response MUST be omitted. If the bearer flag is omitted and | |||
"key" field in this response is omitted, the token is bound the | the key field in this response is omitted, the token is bound the | |||
key used by the client instance (Section 2.3) in its request for | key used by the client instance (Section 2.3) in its request for | |||
access. If the "bearer" flag is omitted, and the "key" field is | access. If the bearer flag is omitted, and the key field is | |||
present, the token is bound to the key and proofing mechanism | present, the token is bound to the key and proofing mechanism | |||
indicated in the "key" field. | indicated in the key field. See Section 12.7 for additional | |||
considerations on the use of bearer tokens. | ||||
"durable" OPTIONAL. Flag indicating a hint of AS behavior on token | "durable" OPTIONAL. Flag indicating a hint of AS behavior on token | |||
rotation. If this flag is present, then the client instance can | rotation. If this flag is present, then the client instance can | |||
expect a previously-issued access token to continue to work after | expect a previously-issued access token to continue to work after | |||
it has been rotated (Section 6.1) or the underlying grant request | it has been rotated (Section 6.1) or the underlying grant request | |||
has been modified (Section 5.3), resulting in the issuance of new | has been modified (Section 5.3), resulting in the issuance of new | |||
access tokens. If this flag is omitted, the client instance can | access tokens. If this flag is omitted, the client instance can | |||
anticipate a given access token will stop working after token | anticipate a given access token will stop working after token | |||
rotation or grant request modification. Note that a token flagged | rotation or grant request modification. Note that a token flagged | |||
as "durable" can still expire or be revoked through any normal | as durable can still expire or be revoked through any normal | |||
means. | means. | |||
"split" OPTIONAL. Flag indicating that this token was generated by | "split" OPTIONAL. Flag indicating that this token was generated by | |||
issuing multiple access tokens in response to one of the client | issuing multiple access tokens in response to one of the client | |||
instance's token request (Section 2.1) objects. This behavior | instance's token request (Section 2.1) objects. This behavior | |||
MUST NOT be used unless the client instance has specifically | MUST NOT be used unless the client instance has specifically | |||
requested it by use of the "split" flag. | requested it by use of the split flag. | |||
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). | |||
skipping to change at page 50, line 45 ¶ | skipping to change at page 51, line 45 ¶ | |||
"access_token": { | "access_token": { | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | |||
"flags": ["bearer"], | "flags": ["bearer"], | |||
"access": [ | "access": [ | |||
"finance", "medical" | "finance", "medical" | |||
] | ] | |||
} | } | |||
If the client instance requested a single access token | If the client instance requested a single access token | |||
(Section 2.1.1), the AS MUST NOT respond with the multiple access | (Section 2.1.1), the AS MUST NOT respond with the multiple access | |||
token structure unless the client instance sends the "split" flag as | token structure unless the client instance sends the split flag as | |||
described in Section 2.1.1. | described in Section 2.1.1. | |||
If the AS has split the access token response, the response MUST | If the AS has split the access token response, the response MUST | |||
include the "split" flag. | include the split flag. | |||
[[ See issue #69 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #69 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/69) ]] | issues/69) ]] | |||
3.2.2. Multiple Access Tokens | 3.2.2. Multiple Access Tokens | |||
If the client instance has requested multiple access tokens and the | If the client instance has requested multiple access tokens and the | |||
AS has granted at least one of them, the AS responds with the | AS has granted at least one of them, the AS responds with the | |||
"access_token" field. The value of this field is a JSON array, the | "access_token" field. The value of this field is a JSON array, the | |||
members of which are distinct access tokens as described in | members of which are distinct access tokens as described in | |||
Section 3.2.1. Each object MUST have a unique "label" field, | Section 3.2.1. Each object MUST have a unique label field, | |||
corresponding to the token labels chosen by the client instance in | corresponding to the token labels chosen by the client instance in | |||
the multiple access token request (Section 2.1.2). | the 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 | 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", | |||
"value": "UFGLO2FDAFG7VGZZPJ3IZEMN21EVU71FHCARP4J1", | "value": "UFGLO2FDAFG7VGZZPJ3IZEMN21EVU71FHCARP4J1", | |||
"access": [ "medical" ] | "access": [ "medical" ] | |||
} | } | |||
} | } | |||
Each access token corresponds to one of the objects in the | Each access token corresponds to one of the objects in the | |||
"access_token" array of the client instance's request | access_token array of the client instance's request (Section 2.1.2). | |||
(Section 2.1.2). | ||||
The multiple access token response MUST be used when multiple access | The multiple access token response MUST be used when multiple access | |||
tokens are requested, even if only one access token is issued as a | tokens are requested, even if only one access token is issued as a | |||
result of the request. The AS MAY refuse to issue one or more of the | result of the request. The AS MAY refuse to issue one or more of the | |||
requested access tokens, for any reason. In such cases the refused | requested access tokens, for any reason. In such cases the refused | |||
token is omitted from the response and all of the other issued access | token is omitted from the response and all of the other issued access | |||
tokens are included in the response the requested names appropriate | tokens are included in the response the requested names appropriate | |||
names. | names. | |||
If the client instance requested multiple access tokens | If the client instance requested multiple access tokens | |||
(Section 2.1.2), the AS MUST NOT respond with a single access token | (Section 2.1.2), the AS MUST NOT respond with a single access token | |||
structure, even if only a single access token is granted. In such | structure, even if only a single access token is granted. In such | |||
cases, the AS responds with a multiple access token structure | cases, the AS responds with a multiple access token structure | |||
containing one access token. | containing one access token. | |||
If the AS has split the access token response, the response MUST | If the AS has split the access token response, the response MUST | |||
include the "split" flag in the "flags" array. | include the split flag in the flags array. | |||
"access_token": [ | "access_token": [ | |||
{ | { | |||
"label": "split-1", | "label": "split-1", | |||
"value": "8N6BW7OZB8CDFONP219-OS9M2PMHKUR64TBRP1LT0", | "value": "8N6BW7OZB8CDFONP219-OS9M2PMHKUR64TBRP1LT0", | |||
"flags": ["split"], | "flags": ["split"], | |||
"manage": "https://server.example.com/token/PRY5NM33O\ | "manage": "https://server.example.com/token/PRY5NM33O\ | |||
M4TB8N6BW7OZB8CDFONP219RP1L", | M4TB8N6BW7OZB8CDFONP219RP1L", | |||
"access": [ "fruits" ] | "access": [ "fruits" ] | |||
}, | }, | |||
skipping to change at page 52, line 29 ¶ | skipping to change at page 53, line 29 ¶ | |||
"value": "FG7VGZZPJ3IZEMN21EVU71FHCAR-UFGLO2FDAP4J1", | "value": "FG7VGZZPJ3IZEMN21EVU71FHCAR-UFGLO2FDAP4J1", | |||
"flags": ["split"], | "flags": ["split"], | |||
"access": [ "vegetables" ] | "access": [ "vegetables" ] | |||
} | } | |||
} | } | |||
Each access token MAY be bound to different keys with different | Each access token MAY be bound to different keys with different | |||
proofing mechanisms. | proofing mechanisms. | |||
If token management (Section 6) is allowed, each access token SHOULD | If token management (Section 6) is allowed, each access token SHOULD | |||
have different "manage" URIs. | have different manage URIs. | |||
[[ See issue #70 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #70 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/70) ]] | issues/70) ]] | |||
3.3. Interaction Modes | 3.3. Interaction Modes | |||
If the client instance has indicated a capability to interact with | If the client instance has indicated a capability to interact with | |||
the RO in its request (Section 2.5), and the AS has determined that | the RO in its request (Section 2.5), and the AS has determined that | |||
interaction is both supported and necessary, the AS responds to the | interaction is both supported and necessary, the AS responds to the | |||
client instance with any of the following values in the "interact" | client instance with any of the following values in the interact | |||
field of the response. There is no preference order for interaction | field of the response. There is no preference order for interaction | |||
modes in the response, and it is up to the client instance to | modes in the response, and it is up to the client instance to | |||
determine which ones to use. All supported interaction methods are | determine which ones to use. All supported interaction methods are | |||
included in the same "interact" object. | included in the same interact object. | |||
redirect (string) Redirect to an arbitrary URL. Section 3.3.1 | redirect (string) Redirect to an arbitrary URL. Section 3.3.1 | |||
app (string) Launch of an application URL. Section 3.3.2 | app (string) Launch of an application URL. Section 3.3.2 | |||
finish (string) A nonce used by the client instance to verify the | finish (string) A nonce used by the client instance to verify the | |||
callback after interaction is completed. Section 3.3.4 | callback after interaction is completed. Section 3.3.4 | |||
user_code (object) Display a short user code. Section 3.3.3 | user_code (object) Display a short user code. Section 3.3.3 | |||
Additional interaction mode responses can be defined in a registry | Additional interaction mode responses can be defined in a registry | |||
skipping to change at page 55, line 49 ¶ | skipping to change at page 56, line 49 ¶ | |||
See details of the interaction in Section 4.1.2. | See details of the interaction in Section 4.1.2. | |||
[[ See issue #72 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #72 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/72) ]] | issues/72) ]] | |||
3.3.4. Interaction Finish | 3.3.4. Interaction Finish | |||
If the client instance indicates that it can receive a | If the client instance indicates that it can receive a | |||
post-interaction redirect or push at a URL (Section 2.5.2) and the AS | post-interaction redirect or push at a URL (Section 2.5.2) and the AS | |||
supports this mode for the client instance's request, the AS responds | supports this mode for the client instance's request, the AS responds | |||
with a "finish" field containing a nonce that the client instance | with a finish field containing a nonce that the client instance will | |||
will use in validating the callback as defined in Section 4.2. | use in validating the callback as defined in Section 4.2. | |||
"interact": { | "interact": { | |||
"finish": "MBDOFXG4Y5CVJCX821LH" | "finish": "MBDOFXG4Y5CVJCX821LH" | |||
} | } | |||
When the interaction is completed, the interaction component MUST | When the interaction is completed, the interaction component MUST | |||
contact the client instance using either a redirect or launch of the | contact the client instance using either a redirect or launch of the | |||
RO's browser or through an HTTP POST to the client instance's | RO's browser or through an HTTP POST to the client instance's | |||
callback URL using the method indicated in the interaction request | callback URL using the method indicated in the interaction request | |||
(Section 2.5.2) as described in Section 4.2. | (Section 2.5.2) as described in Section 4.2. | |||
skipping to change at page 56, line 29 ¶ | skipping to change at page 57, line 29 ¶ | |||
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 Subject 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. The AS MUST return the "subject" | in the "subject" response field. The AS MUST return the subject | |||
field only in cases where the AS is sure that the RO and the end-user | field only in cases where the AS is sure that the RO and the end-user | |||
are the same party. This can be accomplished through some forms of | are the same party. This can be accomplished through some forms of | |||
interaction with the RO (Section 4). | interaction with the RO (Section 4). | |||
This field is an object with the following OPTIONAL properties. | 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 | An object containing assertions as values keyed on the assertion | |||
on the assertion type defined by a registry TBD (Section 11). [[ | type defined by a registry TBD (Section 11). Possible keys | |||
include id_token for an [OIDC] ID Token and saml2 for a SAML 2 | ||||
assertion. The assertion values are the string serialization of | ||||
the assertion format, encoded as a plain JSON string. Additional | ||||
assertion types are 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": { | |||
skipping to change at page 57, line 37 ¶ | skipping to change at page 58, line 37 ¶ | |||
represented email address or phone number in the identifier is | represented email address or phone number in the identifier is | |||
suitable for communication with the current user. To get such | suitable for communication with the current user. To get such | |||
information, the client instance MUST use an identity protocol to | information, the client instance MUST use an identity protocol to | |||
request and receive additional identity claims. The details of an | request and receive additional identity claims. The details of an | |||
identity protocol and associated schema are outside the scope of this | identity protocol and associated schema are outside the scope of this | |||
specification. | specification. | |||
Extensions to this specification MAY define additional response | Extensions to this specification MAY define additional response | |||
properties in a registry TBD (Section 11). | properties in a registry TBD (Section 11). | |||
3.5. Returning Dynamically-bound Reference Handles | See Section 12.25 for considerations that the client instance has to | |||
make when accepting and processing assertions from the AS. | ||||
3.5. Returning a Dynamically-bound Client Instance Identifier | ||||
Many parts of the client instance's request can be passed as either a | Many parts of the client instance's request can be passed as either a | |||
value or a reference. The use of a reference in place of a value | value or a reference. The use of a reference in place of a value | |||
allows for a client instance to optimize requests to the AS. | allows for a client instance to optimize requests to the AS. | |||
Some references, such as for the client instance's identity | Some references, such as for the client instance's identity | |||
(Section 2.3.1) or the requested resources (Section 8.1), can be | (Section 2.3.1) or the requested resources (Section 8.1), can be | |||
managed statically through an admin console or developer portal | managed statically through an admin console or developer portal | |||
provided by the AS or RS. The developer of the client software can | provided by the AS or RS. The developer of the client software can | |||
include these values in their code for a more efficient and compact | include these values in their code for a more efficient and compact | |||
request. | request. | |||
If desired, the AS MAY also generate and return some of these | If desired, the AS MAY also generate and return an instance | |||
references dynamically to the client instance in its response to | identifier dynamically to the client instance in the response to | |||
facilitate multiple interactions with the same software. The client | facilitate multiple interactions with the same client instance over | |||
instance SHOULD use these references in future requests in lieu of | time. The client instance SHOULD use this instance identifier in | |||
sending the associated data value. These handles are intended to be | future requests in lieu of sending the associated data values in the | |||
used on future requests. | client field. | |||
Dynamically generated handles are string values that MUST be | ||||
protected by the client instance as secrets. Handle values MUST be | ||||
unguessable and MUST NOT contain any sensitive information. Handle | ||||
values are opaque to the client instance. | ||||
All dynamically generated handles are returned as fields in the root | Dynamically generated client instance identifiers are string values | |||
JSON object of the response. This specification defines the | that MUST be protected by the client instance as secrets. Instance | |||
following dynamic handle return, additional handles can be defined in | identifier values MUST be unguessable and MUST NOT contain any | |||
a registry TBD (Section 11). | sensitive information. Instance identifier values are opaque to the | |||
client instance. | ||||
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 | |||
use in a future request, as described in Section 2.3.1. | in a future request, as described in Section 2.3.1. | |||
This non-normative example shows one handle along side an issued | This non-normative example shows an instance identifier along side an | |||
access token. | issued access token. | |||
{ | { | |||
"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) ]] | |||
skipping to change at page 59, line 25 ¶ | skipping to change at page 60, line 23 ¶ | |||
[[ See issue #79 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #79 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/79) ]] | issues/79) ]] | |||
3.7. Extending the Response | 3.7. Extending the Response | |||
Extensions to this specification MAY define additional fields for the | Extensions to this specification MAY define additional fields for the | |||
grant response in a registry TBD (Section 11). | grant response in a registry TBD (Section 11). | |||
4. Determining Authorization and Consent | 4. Determining Authorization and Consent | |||
When the client instance makes its Section 2 to the AS for delegated | When the client instance makes its initial request (Section 2) to the | |||
access, it is capable of asking for several different kinds of | AS for delegated access, it is capable of asking for several | |||
information in response: | different kinds of information in response: | |||
* the access being requested in the "access_token" request parameter | * the access being requested in the access_token request parameter | |||
* the subject information being requested in the "subject" request | * the subject information being requested in the subject request | |||
parameter | parameter | |||
* any additional requested information defined by extensions of this | * any additional requested information defined by extensions of this | |||
protocol | protocol | |||
The AS determines what authorizations and consents are required to | The AS determines what authorizations and consents are required to | |||
fulfill this requested delegation. The details of how the AS makes | fulfill this requested delegation. The details of how the AS makes | |||
this determination are out of scope for this document. However, | this determination are out of scope for this document. However, | |||
there are several common patterns defined and supported by GNAP for | there are several common patterns defined and supported by GNAP for | |||
fulfilling these requirements, including information sent by the | fulfilling these requirements, including information sent by the | |||
skipping to change at page 60, line 8 ¶ | skipping to change at page 61, line 5 ¶ | |||
how to gather the necessary authorizations and consent. | how to gather the necessary authorizations and consent. | |||
The client instance can supply information directly to the AS in its | The client instance can supply information directly to the AS in its | |||
request. From this information, the AS can determine if the | request. From this information, the AS can determine if the | |||
requested delegation can be granted immediately. The client instance | requested delegation can be granted immediately. The client instance | |||
can send several kinds of things, including: | can send several kinds of things, including: | |||
* the identity of the client instance, known from the presented keys | * the identity of the client instance, known from the presented keys | |||
or associated identifiers | or associated identifiers | |||
* the identity of the end user presented in the "user" request | * the identity of the end user presented in the user request | |||
parameter | parameter | |||
* any additional information presented by the client instance in the | * any additional information presented by the client instance in the | |||
request, including any extensions | request, including any extensions | |||
The AS will verify this presented information in the context of the | The AS will verify this presented information in the context of the | |||
client instance's request and can only trust the information as much | client instance's request and can only trust the information as much | |||
as it trusts the presentation and context of the information. If the | as it trusts the presentation and context of the information. If the | |||
AS determines that the information presented in the initial request | AS determines that the information presented in the initial request | |||
is sufficient for granting the requested access, the AS MAY return | is sufficient for granting the requested access, the AS MAY return | |||
the positive results immediately in its Section 3 with access tokens | the positive results immediately in its response (Section 3) with | |||
and subject information. | access tokens and subject information. | |||
If the AS determines that additional runtime authorization is | If the AS determines that additional runtime authorization is | |||
required, the AS can either deny the request outright or use a number | required, the AS can either deny the request outright or use a number | |||
of means at its disposal to gather that authorization from the | of means at its disposal to gather that authorization from the | |||
appropriate ROs, including for example: | appropriate ROs, including for example: | |||
* starting interaction with the end user facilitated by the client | * starting interaction with the end user facilitated by the client | |||
software, such as a redirection or user code | software, such as a redirection or user code | |||
* challenging the client instance through a challenge-response | * challenging the client instance through a challenge-response | |||
skipping to change at page 65, line 16 ¶ | skipping to change at page 66, line 23 ¶ | |||
method are dangerous or blocked. | method are dangerous or blocked. | |||
* The AS cannot determine which ongoing grant request is being | * The AS cannot determine which ongoing grant request is being | |||
referenced. | referenced. | |||
* The ongoing grant request has been cancelled or otherwise blocked. | * The ongoing grant request has been cancelled or otherwise blocked. | |||
4.2.1. Completing Interaction with a Browser Redirect to the Callback | 4.2.1. Completing Interaction with a Browser Redirect to the Callback | |||
URI | URI | |||
When using the "redirect" interaction finish method (Section 3.3.4), | When using the redirect interaction finish method (Section 3.3.4), | |||
the AS signals to the client instance that interaction is complete | the AS signals to the client instance that interaction is complete | |||
and the request can be continued by directing the RO (in their | and the request can be continued by directing the RO (in their | |||
browser) back to the client instance's redirect URL sent in the | browser) back to the client instance's redirect URL sent in the | |||
callback request (Section 2.5.2.1). | callback request (Section 2.5.2.1). | |||
The AS secures this redirect by adding the hash and interaction | The AS secures this redirect by adding the hash and interaction | |||
reference as query parameters to the client instance's redirect URL. | reference as query parameters to the client instance's redirect URL. | |||
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. | |||
skipping to change at page 66, line 7 ¶ | skipping to change at page 67, line 13 ¶ | |||
&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. | |||
4.2.2. Completing Interaction with a Direct HTTP Request Callback | 4.2.2. Completing Interaction with a Direct HTTP Request Callback | |||
When using the "callback" interaction mode (Section 3.3.4) with the | When using the push interaction finish method (Section 3.3.4), the AS | |||
"push" method, the AS signals to the client instance that interaction | signals to the client instance that interaction is complete and the | |||
is complete and the request can be continued by sending an HTTP POST | request can be continued by sending an HTTP POST request to the | |||
request to the client instance's callback URL sent in the callback | client instance's callback URL sent in the callback request | |||
request (Section 2.5.2.2). | (Section 2.5.2.2). | |||
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. | |||
skipping to change at page 67, line 7 ¶ | skipping to change at page 68, line 17 ¶ | |||
The "hash" parameter in the request to the client instance's callback | The "hash" parameter in the request to the client instance's callback | |||
URL ties the front channel response to an ongoing request by using | URL ties the front channel response to an ongoing request by using | |||
values known only to the parties involved. This security mechanism | values known only to the parties involved. This security mechanism | |||
allows the client instance to protect itself against several kinds of | allows the client instance to protect itself against several kinds of | |||
session fixation and injection attacks. The AS MUST always provide | session fixation and injection attacks. The AS MUST always provide | |||
this hash, and the client instance MUST validate the hash when | this hash, and the client instance MUST validate the hash when | |||
received. | received. | |||
To calculate the "hash" value, the party doing the calculation | To calculate the "hash" value, the party doing the calculation | |||
creates a hash string by concatenating the following values in the | creates a hash string by concatenating the following values in the | |||
following order using a single newline ("\\n") character to separate | following order using a single newline (\n) character to separate | |||
them: | them: | |||
* the "nonce" value sent by the client instance in the interaction | * the "nonce" value sent by the client instance in the interaction | |||
"finish" section of the initial request (Section 2.5.2) | "finish" section of the initial request (Section 2.5.2) | |||
* the AS's nonce value from the interaction finish response | * the AS's nonce value from the interaction finish response | |||
(Section 3.3.4) | (Section 3.3.4) | |||
* the "interact_ref" returned from the AS as part of the interaction | * the "interact_ref" returned from the AS as part of the interaction | |||
finish method (Section 4.2) | finish method (Section 4.2) | |||
skipping to change at page 67, line 31 ¶ | skipping to change at page 68, line 41 ¶ | |||
There is no padding or whitespace before or after any of the lines, | There is no padding or whitespace before or after any of the lines, | |||
and no trailing newline character. | and no trailing newline character. | |||
VJLO6A4CAYLBXHTR0KRO | VJLO6A4CAYLBXHTR0KRO | |||
MBDOFXG4Y5CVJCX821LH | MBDOFXG4Y5CVJCX821LH | |||
4IFWWIKYBC2PQ6U56NL1 | 4IFWWIKYBC2PQ6U56NL1 | |||
https://server.example.com/tx | https://server.example.com/tx | |||
The party then hashes this string with the appropriate algorithm | The party then hashes this string with the appropriate algorithm | |||
based on the "hash_method" parameter of the "callback". If the | based on the "hash_method" parameter under the "finish" key. If the | |||
"hash_method" value is not present in the client instance's request, | "hash_method" value is not present in the client instance's request, | |||
the algorithm defaults to "sha3". | the algorithm defaults to "sha3". | |||
[[ 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 | |||
skipping to change at page 68, line 18 ¶ | skipping to change at page 69, line 23 ¶ | |||
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 | 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 grant response | |||
client instance's requested information (including access tokens | (Section 3) with all the client instance's requested information | |||
(Section 3.2) and direct user information (Section 3.4)), it's more | (including access tokens (Section 3.2) and direct user information | |||
common that the AS and the client instance will need to communicate | (Section 3.4)), it's more common that the AS and the client instance | |||
several times over the lifetime of an access grant. This is often | will need to communicate several times over the lifetime of an access | |||
part of facilitating interaction (Section 4), but it could also be | grant. This is often part of facilitating interaction (Section 4), | |||
used to allow the AS and client instance to continue negotiating the | but it could also be used to allow the AS and client instance to | |||
parameters of the original grant request (Section 2). | continue negotiating the parameters of the original grant request | |||
(Section 2). | ||||
To enable this ongoing negotiation, the AS provides a continuation | To enable this ongoing negotiation, the AS provides a continuation | |||
API to the client software. The AS returns a "continue" field in the | API to the client software. The AS returns a continue field in the | |||
response (Section 3.1) that contains information the client instance | response (Section 3.1) that contains information the client instance | |||
needs to access this API, including a URI to access as well as an | needs to access this API, including a URI to access as well as a | |||
access token to use during the continued requests. | continuation access token to use during the requests. | |||
The access token is initially bound to the same key and method the | The continuation access token is initially bound to the same key and | |||
client instance used to make the initial request. As a consequence, | method the client instance used to make the initial request. As a | |||
when the client instance makes any calls to the continuation URL, the | consequence, when the client instance makes any calls to the | |||
client instance MUST present the access token as described in | continuation URL, the client instance MUST present the continuation | |||
Section 7.2 and present proof of the client instance's key (or its | access token as described in Section 7.2 and present proof of the | |||
most recent rotation) by signing the request as described in | client instance's key (or its most recent rotation) by signing the | |||
Section 7.3. The AS MUST validate all keys presented by the client | request as described in Section 7.3. The AS MUST validate all keys | |||
instance or referenced in an ongoing request for each call within | presented by the client instance or referenced in an ongoing request | |||
that request. | for each call within that request. | |||
Access tokens other than the continuation access tokens MUST NOT be | ||||
usable for continuation requests. | ||||
[[ See issue #85 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #85 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/85) ]] | issues/85) ]] | |||
For example, here the client instance makes a POST request to a | For example, here the client instance makes a POST request to a | |||
unique URI and signs the request with HTTP Message Signatures: | unique URI and signs the request with HTTP Message Signatures: | |||
POST /continue/KSKUOMUKM HTTP/1.1 | POST /continue/KSKUOMUKM HTTP/1.1 | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Host: server.example.com | Host: server.example.com | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
The AS MUST be able to tell from the client instance's request which | The AS MUST be able to tell from the client instance's request which | |||
specific ongoing request is being accessed, using a combination of | specific ongoing request is being accessed, using a combination of | |||
the continuation URL, the provided access token, and the client | the continuation URL, the provided continuation access token, and the | |||
instance identified by the key signature. If the AS cannot determine | client instance identified by the key signature. If the AS cannot | |||
a single active grant request to map the continuation request to, the | determine a single active grant request to map the continuation | |||
AS MUST return an error. | request to, the AS MUST return an error. | |||
The ability to continue an already-started request allows the client | The ability to continue an already-started request allows the client | |||
instance to perform several important functions, including presenting | instance to perform several important functions, including presenting | |||
additional information from interaction, modifying the initial | additional information from interaction, modifying the initial | |||
request, and getting the current state of the request. | request, and getting the current state of the request. | |||
All requests to the continuation API are protected by this bound | All requests to the continuation API are protected by this bound | |||
access token. For example, here the client instance makes a POST | continuation access token. For example, here the client instance | |||
request to a stable continuation endpoint URL with the interaction | makes a POST request to a stable continuation endpoint URL with the | |||
reference (Section 5.1), includes the access token, and signs with | interaction reference (Section 5.1), includes the access token, and | |||
HTTP Message Signatures: | signs with HTTP Message Signatures: | |||
POST /continue HTTP/1.1 | POST /continue HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
Digest: sha256=... | Digest: sha256=... | |||
{ | { | |||
"interact_ref": "4IFWWIKYBC2PQ6U56NL1" | "interact_ref": "4IFWWIKYBC2PQ6U56NL1" | |||
} | } | |||
If a "wait" parameter was included in the continuation response | If a wait parameter was included in the continuation response | |||
(Section 3.1), the client instance MUST NOT call the continuation URI | (Section 3.1), the client instance MUST NOT call the continuation URI | |||
prior to waiting the number of seconds indicated. If no "wait" | prior to waiting the number of seconds indicated. If no wait period | |||
period is indicated, the client instance SHOULD wait at least 5 | is indicated, the client instance SHOULD wait at least 5 seconds. If | |||
seconds. If the client instance does not respect the given wait | the client instance does not respect the given wait period, the AS | |||
period, the AS MUST return an error. [[ See issue #86 | MUST return an error. | |||
(https://github.com/ietf-wg-gnap/gnap-core-protocol/issues/86) ]] | ||||
The response from the AS is a JSON object and MAY contain any of the | The response from the AS is a JSON object and MAY contain any of the | |||
fields described in Section 3, as described in more detail in the | fields described in Section 3, as described in more detail in the | |||
sections below. | sections below. | |||
If the AS determines that the client instance can make a further | If the AS determines that the client instance can make a further | |||
continuation request, the AS MUST include a new "continue" response | continuation request, the AS MUST include a new "continue" response | |||
(Section 3.1). The new "continue" response MUST include a bound | (Section 3.1). The new continue response MUST include a continuation | |||
access token as well, and this token SHOULD be a new access token, | access token as well, and this token SHOULD be a new access token, | |||
invalidating the previous access token. If the AS does not return a | invalidating the previous access token. If the AS does not return a | |||
new "continue" response, the client instance MUST NOT make an | new continue response, the client instance MUST NOT make an | |||
additional continuation request. If a client instance does so, the | additional continuation request. If a client instance does so, the | |||
AS MUST return an error. [[ See issue #87 (https://github.com/ietf- | AS MUST return an error. [[ See issue #87 (https://github.com/ietf- | |||
wg-gnap/gnap-core-protocol/issues/87) ]] | wg-gnap/gnap-core-protocol/issues/87) ]] | |||
For continuation functions that require the client instance to send a | For continuation functions that require the client instance to send a | |||
message body, the body MUST be a JSON object. | message body, the body MUST be a JSON object. | |||
5.1. Continuing After a Completed Interaction | 5.1. Continuing After a Completed Interaction | |||
When the AS responds to the client instance's "finish" method as in | When the AS responds to the client instance's finish method as in | |||
Section 4.2.1, this response includes an interaction reference. The | Section 4.2.1, this response includes an interaction reference. The | |||
client instance MUST include that value as the field "interact_ref" | client instance MUST include that value as the field interact_ref in | |||
in a POST request to the continuation URI. | a POST request to the continuation URI. | |||
POST /continue HTTP/1.1 | POST /continue HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
Digest: sha256=... | Digest: sha256=... | |||
{ | { | |||
skipping to change at page 70, line 45 ¶ | skipping to change at page 72, line 5 ¶ | |||
} | } | |||
Since the interaction reference is a one-time-use value as described | Since the interaction reference is a one-time-use value as described | |||
in Section 4.2.1, if the client instance needs to make additional | in Section 4.2.1, if the client instance needs to make additional | |||
continuation calls after this request, the client instance MUST NOT | continuation calls after this request, the client instance MUST NOT | |||
include the interaction reference. If the AS detects a client | include the interaction reference. If the AS detects a client | |||
instance submitting the same interaction reference multiple times, | instance submitting the same interaction reference multiple times, | |||
the AS MUST return an error and SHOULD invalidate the ongoing | the AS MUST return an error and SHOULD invalidate the ongoing | |||
request. | request. | |||
The Section 3 MAY contain any newly-created access tokens | The grant response (Section 3) MAY contain any newly-created access | |||
(Section 3.2) or newly-released subject claims (Section 3.4). The | tokens (Section 3.2) or newly-released subject claims (Section 3.4). | |||
response MAY contain a new "continue" response (Section 3.1) as | The 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 | 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\ | |||
skipping to change at page 71, line 25 ¶ | skipping to change at page 72, line 33 ¶ | |||
}, | }, | |||
"subject": { | "subject": { | |||
"sub_ids": [ { | "sub_ids": [ { | |||
"format": "opaque", | "format": "opaque", | |||
"id": "J2G8G8O4AZ" | "id": "J2G8G8O4AZ" | |||
} ] | } ] | |||
} | } | |||
} | } | |||
With this example, the client instance can not make an additional | With this example, the client instance can not make an additional | |||
continuation request because a "continue" field is not included. | continuation request because a continue field is not included. | |||
[[ See issue #88 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | [[ See issue #88 (https://github.com/ietf-wg-gnap/gnap-core-protocol/ | |||
issues/88) ]] | issues/88) ]] | |||
5.2. Continuing During Pending Interaction | 5.2. Continuing During Pending Interaction | |||
When the client instance does not include a "finish" parameter, the | When the client instance does not include a finish parameter, the | |||
client instance will often need to poll the AS until the RO has | client instance will often need to poll the AS until the RO has | |||
authorized the request. To do so, the client instance makes a POST | authorized the request. To do so, the client instance makes a POST | |||
request to the continuation URI as in Section 5.1, but does not | request to the continuation URI as in Section 5.1, but does not | |||
include a message body. | include a message body. | |||
POST /continue HTTP/1.1 | POST /continue HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
The Section 3 MAY contain any newly-created access tokens | The grant response (Section 3) MAY contain any newly-created access | |||
(Section 3.2) or newly-released subject claims (Section 3.4). The | tokens (Section 3.2) or newly-released subject claims (Section 3.4). | |||
response MAY contain a new "continue" response (Section 3.1) as | The response MAY contain a new "continue" response (Section 3.1) as | |||
described above. If a "continue" field is included, it SHOULD | described above. If a continue field is included, it SHOULD include | |||
include a "wait" field to facilitate a reasonable polling rate by the | a wait field to facilitate a reasonable polling rate by the client | |||
client instance. The response SHOULD NOT contain interaction | instance. The response SHOULD NOT contain interaction responses | |||
responses (Section 3.3). | (Section 3.3). | |||
For example, if the request has not yet been authorized by the RO, | For example, if the request has not yet been authorized by the RO, | |||
the AS could respond by telling the client instance to make another | the AS could respond by telling the client instance to make another | |||
continuation request in the future. In this example, a new, unique | continuation request in the future. In this example, a new, unique | |||
access token has been issued for the call, which the client instance | access token has been issued for the call, which the client instance | |||
will use in its next continuation request. | will use in its next continuation request. | |||
{ | { | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
skipping to change at page 73, line 5 ¶ | skipping to change at page 74, line 21 ¶ | |||
M4TB8N6BW7OZB8CDFONP219RP1L", | M4TB8N6BW7OZB8CDFONP219RP1L", | |||
}, | }, | |||
"subject": { | "subject": { | |||
"sub_ids": [ { | "sub_ids": [ { | |||
"format": "opaque", | "format": "opaque", | |||
"id": "J2G8G8O4AZ" | "id": "J2G8G8O4AZ" | |||
} ] | } ] | |||
} | } | |||
} | } | |||
See Section 12.20 for considerations on polling for continuation | ||||
without an interaction finish method. | ||||
5.3. Modifying an Existing Request | 5.3. Modifying an Existing Request | |||
The client instance might need to modify an ongoing request, whether | The client instance might need to modify an ongoing request, whether | |||
or not tokens have already been issued or claims have already been | or not tokens have already been issued or claims have already been | |||
released. In such cases, the client instance makes an HTTP PATCH | released. In such cases, the client instance makes an HTTP PATCH | |||
request to the continuation URI and includes any fields it needs to | request to the continuation URI and includes any fields it needs to | |||
modify. Fields that aren't included in the request are considered | modify. Fields that aren't included in the request are considered | |||
unchanged from the original request. | unchanged from the original request. | |||
The client instance MAY include the "access_token" and "subject" | The client instance MAY include the access_token and subject fields | |||
fields as described in Section 2.1 and Section 2.2. Inclusion of | as described in Section 2.1 and Section 2.2. Inclusion of these | |||
these fields override any values in the initial request, which MAY | fields override any values in the initial request, which MAY trigger | |||
trigger additional requirements and policies by the AS. For example, | additional requirements and policies by the AS. For example, if the | |||
if the client instance is asking for more access, the AS could | client instance is asking for more access, the AS could require | |||
require additional interaction with the RO to gather additional | additional interaction with the RO to gather additional consent. If | |||
consent. If the client instance is asking for more limited access, | the client instance is asking for more limited access, the AS could | |||
the AS could determine that sufficient authorization has been granted | determine that sufficient authorization has been granted to the | |||
to the client instance and return the more limited access rights | 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 | |||
skipping to change at page 74, line 4 ¶ | skipping to change at page 75, line 23 ¶ | |||
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) | grant response (Section 3) MAY contain any newly-created access | |||
or newly-released subject claims (Section 3.4). The response MAY | tokens (Section 3.2) or newly-released subject claims (Section 3.4). | |||
contain a new "continue" response (Section 3.1) as described above. | The response MAY contain a new "continue" response (Section 3.1) as | |||
If interaction can occur, the response SHOULD contain interaction | described above. If interaction can occur, the response SHOULD | |||
responses (Section 3.3) as well. | contain interaction responses (Section 3.3) as well. | |||
For example, a client instance initially requests a set of resources | For example, a client instance initially requests a set of resources | |||
using references: | using references: | |||
POST /tx HTTP/1.1 | POST /tx HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
Digest: sha256=... | Digest: sha256=... | |||
skipping to change at page 74, line 39 ¶ | skipping to change at page 76, line 30 ¶ | |||
"finish": { | "finish": { | |||
"method": "redirect", | "method": "redirect", | |||
"uri": "https://client.example.net/return/123455", | "uri": "https://client.example.net/return/123455", | |||
"nonce": "LKLTI25DK82FX4T4QFZC" | "nonce": "LKLTI25DK82FX4T4QFZC" | |||
} | } | |||
}, | }, | |||
"client": "987YHGRT56789IOLK" | "client": "987YHGRT56789IOLK" | |||
} | } | |||
Access is granted by the RO, and a token is issued by the AS. In its | Access is granted by the RO, and a token is issued by the AS. In its | |||
final response, the AS includes a "continue" field, which includes a | final response, the AS includes a continue field, which includes a | |||
separate access token for accessing the continuation API: | separate access token for accessing the continuation API: | |||
{ | { | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "80UPRY5NM33OMUKMKSKU" | "value": "80UPRY5NM33OMUKMKSKU" | |||
}, | }, | |||
"uri": "https://server.example.com/continue", | "uri": "https://server.example.com/continue", | |||
"wait": 30 | "wait": 30 | |||
}, | }, | |||
"access_token": { | "access_token": { | |||
"value": "RP1LT0-OS9M2P_R64TB", | "value": "RP1LT0-OS9M2P_R64TB", | |||
"access": [ | "access": [ | |||
"read", "write" | "read", "write" | |||
] | ] | |||
} | } | |||
} | } | |||
This continue field allows the client instance to make an eventual | ||||
This "continue" field allows the client instance to make an eventual | ||||
continuation call. In the future, the client instance realizes that | continuation call. In the future, the client instance realizes that | |||
it no longer needs "write" access and therefore modifies its ongoing | it no longer needs "write" access and therefore modifies its ongoing | |||
request, here asking for just "read" access instead of both "read" | request, here asking for just "read" access instead of both "read" | |||
and "write" as before. | and "write" as before. | |||
PATCH /continue HTTP/1.1 | PATCH /continue HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
skipping to change at page 75, line 44 ¶ | skipping to change at page 77, line 27 ¶ | |||
{ | { | |||
"access_token": { | "access_token": { | |||
"access": [ | "access": [ | |||
"read" | "read" | |||
] | ] | |||
} | } | |||
... | ... | |||
} | } | |||
The AS replaces the previous "access" from the first request, | The AS replaces the previous access from the first request, allowing | |||
allowing the AS to determine if any previously-granted consent | the AS to determine if any previously-granted consent already | |||
already applies. In this case, the AS would likely determine that | applies. In this case, the AS would likely determine that reducing | |||
reducing the breadth of the requested access means that new access | the breadth of the requested access means that new access tokens can | |||
tokens can be issued to the client instance. The AS would likely | be issued to the client instance. The AS would likely revoke | |||
revoke previously-issued access tokens that had the greater access | previously-issued access tokens that had the greater access rights | |||
rights associated with them, unless they had been issued with the | associated with them, unless they had been issued with the durable | |||
"durable" flag. | flag. | |||
{ | { | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "M33OMUK80UPRY5NMKSKU" | "value": "M33OMUK80UPRY5NMKSKU" | |||
}, | }, | |||
"uri": "https://server.example.com/continue", | "uri": "https://server.example.com/continue", | |||
"wait": 30 | "wait": 30 | |||
}, | }, | |||
"access_token": { | "access_token": { | |||
skipping to change at page 76, line 50 ¶ | skipping to change at page 78, line 33 ¶ | |||
"finish": { | "finish": { | |||
"method": "redirect", | "method": "redirect", | |||
"uri": "https://client.example.net/return/123455", | "uri": "https://client.example.net/return/123455", | |||
"nonce": "LKLTI25DK82FX4T4QFZC" | "nonce": "LKLTI25DK82FX4T4QFZC" | |||
} | } | |||
}, | }, | |||
"client": "987YHGRT56789IOLK" | "client": "987YHGRT56789IOLK" | |||
} | } | |||
Access is granted by the RO, and a token is issued by the AS. In its | Access is granted by the RO, and a token is issued by the AS. In its | |||
final response, the AS includes a "continue" field: | final response, the AS includes a continue field: | |||
{ | { | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "80UPRY5NM33OMUKMKSKU" | "value": "80UPRY5NM33OMUKMKSKU" | |||
}, | }, | |||
"uri": "https://server.example.com/continue", | "uri": "https://server.example.com/continue", | |||
"wait": 30 | "wait": 30 | |||
}, | }, | |||
"access_token": { | "access_token": { | |||
skipping to change at page 80, line 17 ¶ | skipping to change at page 81, line 28 ¶ | |||
client instance is attempting to refresh the expired token. To | client instance is attempting to refresh the expired token. To | |||
support this, the AS MAY apply different lifetimes for the use of the | support this, the AS MAY apply different lifetimes for the use of the | |||
token in management vs. its use at an RS. An AS MUST NOT honor a | token in management vs. its use at an RS. An AS MUST NOT honor a | |||
rotation request for an access token that has been revoked, either by | rotation request for an access token that has been revoked, either by | |||
the AS or by the client instance through the token management URI | the AS or by the client instance through the token management URI | |||
(Section 6.2). | (Section 6.2). | |||
If the token is validated and the key is appropriate for the request, | If the token is validated and the key is appropriate for the request, | |||
the AS MUST invalidate the current access token associated with this | the AS MUST invalidate the current access token associated with this | |||
URL, if possible, and return a new access token response as described | URL, if possible, and return a new access token response as described | |||
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 | NOTE: '\' line wrapping per RFC 8792 | |||
skipping to change at page 82, line 28 ¶ | skipping to change at page 83, line 28 ¶ | |||
the token management function is specifically for the client | the token management function is specifically for the client | |||
instance's use. If the access token has already expired or has been | instance's use. If the access token has already expired or has been | |||
revoked through other means, the AS SHOULD honor the revocation | revoked through other means, the AS SHOULD honor the revocation | |||
request to the token management URL as valid, since the end result is | request to the token management URL as valid, since the end result is | |||
still the token not being usable. | still the token not being usable. | |||
7. Securing Requests from the Client Instance | 7. Securing Requests from the Client Instance | |||
In GNAP, the client instance secures its requests to the AS and RS by | In GNAP, the client instance secures its requests to the AS and RS by | |||
presenting an access token, presenting proof of a key that it | presenting an access token, presenting proof of a key that it | |||
possesses, or both an access token and key proof together. | possesses (aka, a "key proof"), or both an access token and key proof | |||
together. | ||||
* When an access token is used with a key proof, this is a bound | * When an access token is used with a key proof, this is a bound | |||
token request. This type of request is used for calls to the RS | token request. This type of request is used for calls to the RS | |||
as well as the AS during negotiation. | as well as the AS during negotiation. | |||
* When a key proof is used with no access token, this is a non- | * When a key proof is used with no access token, this is a non- | |||
authorized signed request. This type of request is used for calls | authorized signed request. This type of request is used for calls | |||
to the AS to initiate a negotiation. | to the AS to initiate a negotiation. | |||
* When an access token is used with no key proof, this is a bearer | * When an access token is used with no key proof, this is a bearer | |||
skipping to change at page 83, line 26 ¶ | skipping to change at page 84, line 26 ¶ | |||
A key presented by value MUST be a public key in at least one | A key presented by value MUST be a public key in at least one | |||
supported format. If a key is sent in multiple formats, all the key | supported format. If a key is sent in multiple formats, all the key | |||
format values MUST be equivalent. Note that while most formats | format values MUST be equivalent. Note that while most formats | |||
present the full value of the public key, some formats present a | present the full value of the public key, some formats present a | |||
value cryptographically derived from the public key. | value cryptographically derived from the public key. | |||
proof (string) The form of proof that the client instance will use | proof (string) The form of proof that the client instance will use | |||
when presenting the key. The valid values of this field and the | when presenting the key. The valid values of this field and the | |||
processing requirements for each are detailed in Section 7.3. The | processing requirements for each are detailed in Section 7.3. The | |||
"proof" field is REQUIRED. | proof field is REQUIRED. | |||
jwk (object) The public key and its properties represented as a JSON | jwk (object) The public key and its properties represented as a JSON | |||
Web Key [RFC7517]. A JWK MUST contain the "alg" (Algorithm) and | Web Key [RFC7517]. A JWK MUST contain the alg (Algorithm) and kid | |||
"kid" (Key ID) parameters. The "alg" parameter MUST NOT be | (Key ID) parameters. The alg parameter MUST NOT be "none". The | |||
"none". The "x5c" (X.509 Certificate Chain) parameter MAY be used | x5c (X.509 Certificate Chain) parameter MAY be used to provide the | |||
to provide the X.509 representation of the provided public key. | X.509 representation of the provided public key. | |||
cert (string) PEM serialized value of the certificate used to sign | cert (string) PEM serialized value of the certificate used to sign | |||
the request, with optional internal whitespace per [RFC7468]. The | the request, with optional internal whitespace per [RFC7468]. The | |||
PEM header and footer are optionally removed. | PEM header and footer are optionally removed. | |||
cert#S256 (string) The certificate thumbprint calculated as per | cert#S256 (string) The certificate thumbprint calculated as per | |||
OAuth-MTLS [RFC8705] in base64 URL encoding. Note that this | OAuth-MTLS [RFC8705] in base64 URL encoding. Note that this | |||
format does not include the full public key. | format does not include the full public key. | |||
Additional key formats are defined in a registry TBD (Section 11). | Additional key formats are defined in a registry TBD (Section 11). | |||
This non-normative example shows a single key presented in multiple | This non-normative example shows a single key presented in multiple | |||
formats. This example key is intended to be used with the HTTP | formats. This example key is intended to be used with the HTTP | |||
Message Signatures ({{httpsig-binding}}) proofing mechanism, as | Message Signatures ({{httpsig-binding}}) proofing mechanism, as | |||
indicated by the "httpsig" value of the "proof" field. | indicated by the httpsig value of the proof field. | |||
"key": { | "key": { | |||
"proof": "httpsig", | "proof": "httpsig", | |||
"jwk": { | "jwk": { | |||
"kty": "RSA", | "kty": "RSA", | |||
"e": "AQAB", | "e": "AQAB", | |||
"kid": "xyz-1", | "kid": "xyz-1", | |||
"alg": "RS256", | "alg": "RS256", | |||
"n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8xY..." | "n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8xY..." | |||
}, | }, | |||
skipping to change at page 84, line 39 ¶ | skipping to change at page 85, line 39 ¶ | |||
Keys referenced in this manner MUST be bound to a single proofing | Keys referenced in this manner MUST be bound to a single proofing | |||
mechanism. | mechanism. | |||
The means of dereferencing this value are out of scope for this | The means of dereferencing this value are out of scope for this | |||
specification. | specification. | |||
7.2. Presenting Access Tokens | 7.2. Presenting Access Tokens | |||
The method the client instance uses to send an access token depends | The method the client instance uses to send an access token depends | |||
on whether the token is bound to a key, and if so which proofing | on whether the token is bound to a key, and if so which proofing | |||
method is associated with the key. This information is conveyed in | method is associated with the key. This information is conveyed by | |||
the "bound" and "key" parameters in the single (Section 3.2.1) and | the key parameter and the bearer flag in the single (Section 3.2.1) | |||
multiple access tokens (Section 3.2.2) responses. | and multiple access tokens (Section 3.2.2) responses. | |||
If the "flags" field does not contain the "bearer" flag and the "key" | If the flags field does not contain the bearer flag and the key is | |||
is absent, the access token MUST be sent using the same key and | absent, the access token MUST be sent using the same key and proofing | |||
proofing mechanism that the client instance used in its initial | mechanism that the client instance used in its initial request (or | |||
request (or its most recent rotation). | its most recent rotation). | |||
If the "flags" field does not contain the "bearer" flag and the "key" | If the flags field does not contain the bearer flag and the key value | |||
value is an object as described in Section 7.1, the access token MUST | is an object as described in Section 7.1, the access token MUST be | |||
be sent using the key and proofing mechanism defined by the value of | sent using the key and proofing mechanism defined by the value of the | |||
the "proof" field within the key object. | proof field within the key object. | |||
The access token MUST be sent using the HTTP "Authorization" request | The access token MUST be sent using the HTTP "Authorization" request | |||
header field and the "GNAP" authorization scheme along with a key | header field and the "GNAP" authorization scheme along with a key | |||
proof as described in Section 7.3 for the key bound to the access | proof as described in Section 7.3 for the key bound to the access | |||
token. For example, an "httpsig"-bound access token is sent as | token. For example, an "httpsig"-bound access token is sent as | |||
follows: | follows: | |||
Authorization: GNAP OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0 | NOTE: '\' line wrapping per RFC 8792 | |||
Signature-Input: sig1=(authorization);... | ||||
Signature: sig1=... | ||||
If the "flags" field contains the "bearer" flag, the access token is | GET /stuff HTTP/1.1 | |||
a bearer token that MUST be sent using the "Authorization Request | Host: resource.example.com | |||
Header Field" method defined in [RFC6750]. | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Signature-Input: sig1=("@method" "@target-uri" "authorization")\ | ||||
;created=1618884475;keyid="gnap-rsa" | ||||
Signature: sig1=:KymTn1/++nwWsNHdc48sguMjnVSnvqQNrijQT0/kXDfljaIgHl\ | ||||
o12NkEt4e5qZeCFutzRxWpHKtjVEDldIUSsktxj4Li7PgUNJtIkJkdA1EoebGz1X/\ | ||||
AD3coqYpoaFsOcPyfXjYHYWFd8HxLOUz3imA8xbxS+J9GZAjyDjTfG6yfsMsfd10f\ | ||||
nrDRJqalPNDEgOOwwyEtjht4MnzpV1Wf43YWwgEJOC2rvxPIeuNxWbUc5v/o3s3Zr\ | ||||
ywo2sunUcwXwlmbgyiGY0vgGFWjdHfgKvjda7eNLTr7r3jPgo/GlOB3jyadD4xcKs\ | ||||
S/idS3RGk1+e9jbGHK5cRTp0ZzF94kWw==: | ||||
If the flags field contains the bearer flag, the access token is a | ||||
bearer token that MUST be sent using the Authorization Request Header | ||||
Field method defined in [RFC6750]. | ||||
Authorization: Bearer OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0 | Authorization: Bearer OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0 | |||
The "Form-Encoded Body Parameter" and "URI Query Parameter" methods | The Form-Encoded Body Parameter and URI Query Parameter methods of | |||
of [RFC6750] MUST NOT be used. | [RFC6750] MUST NOT be used. | |||
[[ See issue #104 (https://github.com/ietf-wg-gnap/gnap-core- | [[ See issue #104 (https://github.com/ietf-wg-gnap/gnap-core- | |||
protocol/issues/104) ]] | protocol/issues/104) ]] | |||
The client software MUST reject as an error a situation where the | The client software MUST reject as an error a situation where the | |||
"flags" field contains the "bearer" flag and the "key" field is | flags field contains the bearer flag and the key field is present | |||
present with any value. | with any value. | |||
7.3. Proving Possession of a Key with a Request | 7.3. Proving Possession of a Key with a Request | |||
Any keys presented by the client instance to the AS or RS MUST be | Any keys presented by the client instance to the AS or RS MUST be | |||
validated as part of the request in which they are presented. The | validated as part of the request in which they are presented. The | |||
type of binding used is indicated by the proof parameter of the key | type of binding used is indicated by the proof parameter of the key | |||
object in Section 7.1. Values defined by this specification are as | object in Section 7.1. Values defined by this specification are as | |||
follows: | follows: | |||
httpsig HTTP Signing signature header | httpsig HTTP Signing signature header | |||
skipping to change at page 86, line 19 ¶ | skipping to change at page 87, line 29 ¶ | |||
nature of the request. Key binding method definitions SHOULD | nature of the request. Key binding method definitions SHOULD | |||
enumerate how these requirements are fulfilled. | enumerate how these requirements are fulfilled. | |||
When a key proofing mechanism is bound to an access token, the key | When a key proofing mechanism is bound to an access token, the key | |||
being presented MUST be the key associated with the access token and | being presented MUST be the key associated with the access token and | |||
the access token MUST be covered by the signature method of the | the access token MUST be covered by the signature method of the | |||
proofing mechanism. | proofing mechanism. | |||
The key binding methods in this section MAY be used by other | The key binding methods in this section MAY be used by other | |||
components making calls as part of GNAP, such as the extensions | components making calls as part of GNAP, such as the extensions | |||
allowing the RS to make calls to the AS defined in {{I-D.ietf-gnap- | allowing the RS to make calls to the AS defined in | |||
resource-servers}}. To facilitate this extended use, the sections | [I-D.ietf-gnap-resource-servers]. To facilitate this extended use, | |||
below are defined in generic terms of the "sender" and "verifier" of | the sections below are defined in generic terms of the "signer" and | |||
the HTTP message. In the core functions of GNAP, the "sender" is the | "verifier" of the HTTP message. In the core functions of GNAP, the | |||
client instance and the "verifier" is the AS or RS, as appropriate. | "signer" is the client instance and the "verifier" is the AS or RS, | |||
as appropriate. | ||||
When used for delegation in GNAP, these key binding mechanisms allow | When used for delegation in GNAP, these key binding mechanisms allow | |||
the AS to ensure that the keys presented by the client instance in | the AS to ensure that the keys presented by the client instance in | |||
the initial request are in control of the party calling any follow-up | the initial request are in control of the party calling any follow-up | |||
or continuation requests. To facilitate this requirement, the | or continuation requests. To facilitate this requirement, the | |||
continuation response (Section 3.1) includes an access token bound to | continuation response (Section 3.1) includes an access token bound to | |||
the client instance's key (Section 2.3), and that key (or its most | the client instance's key (Section 2.3), and that key (or its most | |||
recent rotation) MUST be proved in all continuation requests | recent rotation) MUST be proved in all continuation requests | |||
Section 5. Token management requests Section 6 are similarly bound | Section 5. Token management requests Section 6 are similarly bound | |||
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 | 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", | |||
skipping to change at page 87, line 43 ¶ | skipping to change at page 88, line 46 ¶ | |||
"n": "hYOJ-XOKISdMMShn_G4W9m20mT0VWtQBsmBBkI2cmRt4Ai8BfYdHsFzAt\ | "n": "hYOJ-XOKISdMMShn_G4W9m20mT0VWtQBsmBBkI2cmRt4Ai8BfYdHsFzAt\ | |||
YKOjpBR1RpKpJmVKxIGNy0g6Z3ad2XYsh8KowlyVy8IkZ8NMwSrcUIBZGYX\ | YKOjpBR1RpKpJmVKxIGNy0g6Z3ad2XYsh8KowlyVy8IkZ8NMwSrcUIBZGYX\ | |||
jHpwjzvfGvXH_5KJlnR3_uRUp4Z4Ujk2bCaKegDn11V2vxE41hqaPUnhRZx\ | jHpwjzvfGvXH_5KJlnR3_uRUp4Z4Ujk2bCaKegDn11V2vxE41hqaPUnhRZx\ | |||
e0jRETddzsE3mu1SK8dTCROjwUl14mUNo8iTrTm4n0qDadz8BkPo-uv4BC0\ | e0jRETddzsE3mu1SK8dTCROjwUl14mUNo8iTrTm4n0qDadz8BkPo-uv4BC0\ | |||
bunS0K3bA_3UgVp7zBlQFoFnLTO2uWp_muLEWGl67gBq9MO3brKXfGhi3kO\ | bunS0K3bA_3UgVp7zBlQFoFnLTO2uWp_muLEWGl67gBq9MO3brKXfGhi3kO\ | |||
zywzwPTuq-cVQDyEN7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQ" | zywzwPTuq-cVQDyEN7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQ" | |||
} | } | |||
7.3.1. HTTP Message Signing | 7.3.1. HTTP Message Signing | |||
This method is indicated by "httpsig" in the "proof" field. The | This method is indicated by httpsig in the proof field. The signer | |||
sender creates an HTTP Message Signature as described in | creates an HTTP Message Signature as described in | |||
[I-D.ietf-httpbis-message-signatures]. | [I-D.ietf-httpbis-message-signatures]. | |||
The covered content of the signature MUST include the following: | The message components of the signature MUST include the following: | |||
@request-target: the target of the HTTP request | @method: the method used in the HTTP request | |||
digest: The Digest header as defined in [RFC3230]. When the request | @target-uri: the full request URL of the HTTP request | |||
content-digest or digest: The Content-Digest or Digest header as | ||||
defined in [I-D.ietf-httpbis-digest-headers]. When the request | ||||
message has a body, the signer MUST calculate this header value | message has a body, the signer MUST calculate this header value | |||
and the verifier MUST validate this header. | and the verifier MUST validate this field value. Use of Content- | |||
Digest is RECOMMENDED. Use of content-encoding agnostic digest | ||||
methods (such as id-sha-256) is RECOMMENDED. | ||||
When the request is bound to an access token, the covered content | When the request is bound to an access token, the covered content | |||
MUST also include: | MUST also include: | |||
authorization: The Authorization header used to present the access | authorization: The Authorization header used to present the access | |||
token as discussed in Section 7.2. | token as discussed in Section 7.2. | |||
Other covered content MAY also be included. | Other message components 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 | NOTE: '\' line wrapping per RFC 8792 | |||
{ | { | |||
"access_token": { | "access_token": { | |||
"access": [ | "access": [ | |||
"dolphin-metadata" | "dolphin-metadata" | |||
] | ] | |||
skipping to change at page 89, line 44 ¶ | skipping to change at page 90, line 44 ¶ | |||
N7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQ" | N7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQ" | |||
} | } | |||
} | } | |||
"display": { | "display": { | |||
"name": "My Client Display Name", | "name": "My Client Display Name", | |||
"uri": "https://client.foo/" | "uri": "https://client.foo/" | |||
}, | }, | |||
} | } | |||
} | } | |||
This body is hashed for the Digest header using SHA-256 into the | This body is hashed for the Content-Digest header using id-sha-256 | |||
following encoded value: | into the following encoded value: | |||
SHA-256=98QzyNVYpdgTrWBKpC4qFSCmmR+CrwwvUoiaDCSjKxw= | id-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 | NOTE: '\' line wrapping per RFC 8792 | |||
"@request-target": post /gnap | "@method": POST | |||
"host": server.example.com | "@target-uri": https://server.example.com/gnap | |||
"content-type": application/json | "content-type": application/json | |||
"digest": SHA-256=98QzyNVYpdgTrWBKpC4qFSCmmR+CrwwvUoiaDCSjKxw= | "content-digest": id-sha-256=98QzyNVYpdgTrWBKpC4qFSCmmR+Crwwv\ | |||
UoiaDCSjKxw= | ||||
"content-length": 986 | "content-length": 986 | |||
"@signature-params": ("@request-target" "host" "content-type" \ | "@signature-params": ("@method" "@target-uri" "content-type" \ | |||
"digest" "content-length");created=1618884475;keyid="gnap-rsa" | "content-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 | 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= | Content-Digest: id-sha-256=98QzyNVYpdgTrWBKpC4qFSCmmR+CrwwvUoiaDCSj\ | |||
Signature-Input: sig1=("@request-target" "host" "content-type" \ | Kxw= | |||
"digest" "content-length");created=1618884475;keyid="gnap-rsa" | Signature-Input: sig1=("@method" "@target-uri" "content-type" \ | |||
Signature: \ | "content-digest" "content-length");created=1618884475\ | |||
sig1=:axj8FLOvEWBcwh+Xk6VTTKXxqo4XNygleTDJ8h3ZJfi1sSmWrRtyo9RG/dc\ | ;keyid="gnap-rsa" | |||
miZmdszRjWbg+/ixVZpA4BL3AOwEOxxtmHAXNB8uJ0I3tfbs6Suyk4sEo8zPr+MJq\ | Signature: sig1=:SatKrAh2qNxbDBY6H3XUtpWn07aSrukpi3202L4DIPLLGgKdSu\ | |||
MjxdJEUgAQAy2AH+wg5a7CKq4IdLTulFK9njUIeG7MygHumeiumM3DbDQAHgF46dV\ | XyObjdCK/agmEx36xyn40iiCAqYskXugpNARianBiWKOkcWHhSs31FSTSoJ8vvGpJ\ | |||
q5UC6KJnqhGM1rFC128jd2D0sgWKCUgKGCHtfR159zfKWcEO9krsLoOnCdTzm1UyD\ | 4GxemDPvI6BXmLZtJvYBehoXtfcRFKGLzYOtbbtefzw2vP+k19W4PrhNmxFEUCepT\ | |||
DMjkIjqeN/1j8PdMJaRAwV4On079O0DVu6bl1jVtkzo/e/ZmwPr/X436V4xiw/hZt\ | KRk0sBoz4zIYK6FqEAHir0oRjwdCcXHFqI9U6+/DgpuxjFFX+OSZehmN6Q1quJgu0\ | |||
w4sfNsSbmsT0+UAQ20X/xaw==: | FITmsC9OANs5hwIAkXGJNdv3FuxAZAVrSnUScuGutSJXAn1daXToewVgBA+IrQ86m\ | |||
lsXtWgvmTTXENUvOELV6qTV2nenwr/UQ==: | ||||
{ | { | |||
"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 24 ¶ | skipping to change at page 92, line 27 ¶ | |||
} | } | |||
} | } | |||
"display": { | "display": { | |||
"name": "My Client Display Name", | "name": "My Client Display Name", | |||
"uri": "https://client.foo/" | "uri": "https://client.foo/" | |||
}, | }, | |||
} | } | |||
} | } | |||
If the HTTP Message includes a message body, the verifier MUST | If the HTTP Message includes a message body, the verifier MUST | |||
calculate and verify the value of the "Digest" header. The verifier | calculate and verify the value of the Digest or Content-Digest | |||
MUST ensure that the signature includes all required covered content. | header. The verifier MUST ensure that the signature covers all | |||
The verifier MUST validate the signature against the expected key of | required message components. The verifier MUST validate the | |||
the signer. | signature against the expected key of the signer. | |||
7.3.2. Mutual TLS | 7.3.2. Mutual TLS | |||
This method is indicated by "mtls" in the "proof" field. The signer | This method is indicated by mtls in the proof field. The signer | |||
presents its TLS client certificate during TLS negotiation with the | presents its TLS client certificate during TLS negotiation with the | |||
verifier. | verifier. | |||
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\ | |||
skipping to change at page 93, line 20 ¶ | skipping to change at page 94, line 22 ¶ | |||
The verifier compares the TLS client certificate presented during | The verifier compares the TLS client certificate presented during | |||
mutual TLS negotiation to the expected key of the signer. Since the | mutual TLS negotiation to the expected key of the signer. Since the | |||
TLS connection covers the entire message, there are no additional | TLS connection covers the entire message, there are no additional | |||
requirements to check. | requirements to check. | |||
Note that in many instances, the verifier will not do a full | Note that in many instances, the verifier will not do a full | |||
certificate chain validation of the presented TLS client certificate, | certificate chain validation of the presented TLS client certificate, | |||
as the means of trust for this certificate could be in something | as the means of trust for this certificate could be in something | |||
other than a PKI system, such as a static registration or trust-on- | other than a PKI system, such as a static registration or trust-on- | |||
first-use. | first-use. See Section 12.16 and Section 12.17 for some additional | |||
considerations for this key proofing method. | ||||
[[ See issue #110 (https://github.com/ietf-wg-gnap/gnap-core- | ||||
protocol/issues/110) ]] | ||||
7.3.3. Detached JWS | 7.3.3. Detached JWS | |||
This method is indicated by "jwsd" in the "proof" field. A JWS | This method is indicated by jwsd in the proof field. A JWS [RFC7515] | |||
[RFC7515] object is created as follows: | object is created as follows: | |||
To protect the request, the JOSE header of the signature contains the | To protect the request, the JOSE header of the signature contains the | |||
following parameters: | following parameters: | |||
kid (string) The key identifier. RECOMMENDED. If the key is | kid (string) The key identifier. RECOMMENDED. If the key is | |||
presented in JWK format, this MUST be the value of the "kid" field | presented in JWK format, this MUST be the value of the kid field | |||
of the key. | of the key. | |||
alg (string) The algorithm used to sign the request. REQUIRED. | alg (string) The algorithm used to sign the request. REQUIRED. | |||
MUST be appropriate to the key presented. If the key is presented | MUST be appropriate to the key presented. If the key is presented | |||
as a JWK, this MUST be equal to the "alg" parameter of the key. | as a JWK, this MUST be equal to the alg parameter of the key. | |||
MUST NOT be "none". | MUST NOT be none. | |||
typ (string) The type header, value "gnap-binding+jwsd". REQUIRED | typ (string) The type header, value "gnap-binding+jwsd". REQUIRED | |||
htm (string) The HTTP Method used to make this request, as an | htm (string) The HTTP Method used to make this request, as an | |||
uppercase ASCII string. REQUIRED | uppercase ASCII string. REQUIRED | |||
uri (string) The HTTP URI used for this request, including all path | uri (string) The HTTP URI used for this request, including all path | |||
and query components and no fragment component. REQUIRED | and query components and no fragment component. REQUIRED | |||
created (integer) A timestamp of when the signature was created, in | created (integer) A timestamp of when the signature was created, in | |||
skipping to change at page 94, line 18 ¶ | skipping to change at page 95, line 18 ¶ | |||
encoding of the associated access token's value. REQUIRED if the | encoding of the associated access token's value. REQUIRED if the | |||
request protects an access token. | request protects an access token. | |||
If the HTTP request has a message body, such as an HTTP POST or PUT | If the HTTP request has a message body, such as an HTTP POST or PUT | |||
method, the payload of the JWS object is the Base64url encoding | method, the payload of the JWS object is the Base64url encoding | |||
(without padding) of the SHA256 digest of the bytes of the body. If | (without padding) of the SHA256 digest of the bytes of the body. If | |||
the request being made does not have a message body, such as an HTTP | the request being made does not have a message body, such as an HTTP | |||
GET, OPTIONS, or DELETE method, the JWS signature is calculated over | GET, OPTIONS, or DELETE method, the JWS signature is calculated over | |||
an empty payload. | an empty payload. | |||
The client instance presents the signed object in compact form | The signer presents the signed object in compact form [RFC7515] in | |||
[RFC7515] in the Detached-JWS HTTP Header field. | the Detached-JWS HTTP Header field. | |||
In this example, the JOSE Header contains the following parameters: | In this example, the JOSE Header contains the following parameters: | |||
{ | { | |||
"alg": "RS256", | "alg": "RS256", | |||
"kid": "gnap-rsa", | "kid": "gnap-rsa", | |||
"uri": "https://server.example.com/gnap", | "uri": "https://server.example.com/gnap", | |||
"htm": "POST", | "htm": "POST", | |||
"typ": "gnap-binding+jwsd", | "typ": "gnap-binding+jwsd", | |||
"created": 1618884475 | "created": 1618884475 | |||
skipping to change at page 97, line 19 ¶ | skipping to change at page 98, line 19 ¶ | |||
When the verifier receives the Detached-JWS header, it MUST parse and | When the verifier receives the Detached-JWS header, it MUST parse and | |||
validate the JWS object. The signature MUST be validated against the | validate the JWS object. The signature MUST be validated against the | |||
expected key of the signer. All required fields MUST be present and | expected key of the signer. All required fields MUST be present and | |||
their values MUST be valid. If the HTTP message request contains a | their values MUST be valid. If the HTTP message request contains a | |||
body, the verifier MUST calculate the hash of body just as the signer | body, the verifier MUST calculate the hash of body just as the signer | |||
does, with no normalization or transformation of the request. | does, with no normalization or transformation of the request. | |||
7.3.4. Attached JWS | 7.3.4. Attached JWS | |||
This method is indicated by "jws" in the "proof" field. A JWS | This method is indicated by jws in the proof field. A JWS [RFC7515] | |||
[RFC7515] object is created as follows: | object is created as follows: | |||
The JOSE header MUST contain the "kid" parameter of the key bound to | The JOSE header MUST contain the kid parameter of the key bound to | |||
this client instance for this request. The "alg" parameter MUST be | this signer for this request. The alg parameter MUST be set to a | |||
set to a value appropriate for the key identified by kid and MUST NOT | value appropriate for the key identified by kid and MUST NOT be none. | |||
be "none". | ||||
To protect the request, the JWS header MUST contain the following | To protect the request, the JWS header MUST contain the following | |||
additional parameters. | additional parameters. | |||
typ (string) The type header, value "gnap-binding+jws". | typ (string) The type header, value "gnap-binding+jws". | |||
htm (string) The HTTP Method used to make this request, as an | htm (string) The HTTP Method used to make this request, as an | |||
uppercase ASCII string. | uppercase ASCII string. | |||
uri (string) The HTTP URI used for this request, including all path | uri (string) The HTTP URI used for this request, including all path | |||
skipping to change at page 98, line 8 ¶ | skipping to change at page 98, line 48 ¶ | |||
integer seconds since UNIX Epoch | integer seconds since UNIX Epoch | |||
ath (string) When a request is bound to an access token, the access | ath (string) When a request is bound to an access token, the access | |||
token hash value. The value MUST be the result of Base64url | token hash value. The value MUST be the result of Base64url | |||
encoding (with no padding) the SHA-256 digest of the ASCII | encoding (with no padding) the SHA-256 digest of the ASCII | |||
encoding of the associated access token's value. | encoding of the associated access token's value. | |||
If the HTTP request has a message body, such as an HTTP POST or PUT | If the HTTP request has a message body, such as an HTTP POST or PUT | |||
method, the payload of the JWS object is the JSON serialized body of | method, the payload of the JWS object is the JSON serialized body of | |||
the request, and the object is signed according to JWS and serialized | the request, and the object is signed according to JWS and serialized | |||
into compact form [RFC7515]. The client instance presents the JWS as | into compact form [RFC7515]. The signer presents the JWS as the body | |||
the body of the request along with a content type of "application/ | of the request along with a content type of application/jose. The | |||
jose". The AS MUST extract the payload of the JWS and treat it as | verifier MUST extract the payload of the JWS and treat it as the | |||
the request body for further processing. | request body for further processing. | |||
If the request being made does not have a message body, such as an | If the request being made does not have a message body, such as an | |||
HTTP GET, OPTIONS, or DELETE method, the JWS signature is calculated | HTTP GET, OPTIONS, or DELETE method, the JWS signature is calculated | |||
over an empty payload and passed in the "Detached-JWS" header as | over an empty payload and passed in the Detached-JWS header as | |||
described in Section 7.3.3. | described in Section 7.3.3. | |||
In this example, the JOSE header contains the following parameters: | In this example, the JOSE header contains the following parameters: | |||
{ | { | |||
"alg": "RS256", | "alg": "RS256", | |||
"kid": "gnap-rsa", | "kid": "gnap-rsa", | |||
"uri": "https://server.example.com/gnap", | "uri": "https://server.example.com/gnap", | |||
"htm": "POST", | "htm": "POST", | |||
"typ": "gnap-binding+jwsd", | "typ": "gnap-binding+jwsd", | |||
skipping to change at page 101, line 19 ¶ | skipping to change at page 102, line 19 ¶ | |||
used when the client instance requests an access token (Section 2.1) | used when the client instance requests an access token (Section 2.1) | |||
and when an access token is returned (Section 3.2). | and when an access token is returned (Section 3.2). | |||
The root of this structure is a JSON array. The elements of the JSON | The root of this structure is a JSON array. The elements of the JSON | |||
array represent rights of access that are associated with the the | array represent rights of access that are associated with the the | |||
access token. The resulting access is the union of all elements | access token. The resulting access is the union of all elements | |||
within the array. | within the array. | |||
The access associated with the access token is described using | The access associated with the access token is described using | |||
objects that each contain multiple dimensions of access. Each object | objects that each contain multiple dimensions of access. Each object | |||
contains a REQUIRED "type" property that determines the type of API | contains a REQUIRED type property that determines the type of API | |||
that the token is used for. | that the token is used for. | |||
type (string) The type of resource request as a string. This field | type (string) The type of resource request as a string. This field | |||
MAY define which other fields are allowed in the request object. | MAY define which other fields are allowed in the request object. | |||
This field is REQUIRED. | This field is REQUIRED. | |||
The value of the "type" field is under the control of the AS. This | The value of the type field is under the control of the AS. This | |||
field MUST be compared using an exact byte match of the string value | field MUST be compared using an exact byte match of the string value | |||
against known types by the AS. The AS MUST ensure that there is no | against known types by the AS. The AS MUST ensure that there is no | |||
collision between different authorization data types that it | collision between different authorization data types that it | |||
supports. The AS MUST NOT do any collation or normalization of data | supports. The AS MUST NOT do any collation or normalization of data | |||
types during comparison. It is RECOMMENDED that designers of | types during comparison. It is RECOMMENDED that designers of | |||
general-purpose APIs use a URI for this field to avoid collisions | general-purpose APIs use a URI for this field to avoid collisions | |||
between multiple API types protected by a single AS. | between multiple API types protected by a single AS. | |||
While it is expected that many APIs will have their own properties, a | While it is expected that many APIs will have their own properties, a | |||
set of common properties are defined here. Specific API | set of common properties are defined here. Specific API | |||
skipping to change at page 102, line 17 ¶ | skipping to change at page 103, line 17 ¶ | |||
medical API or a bank account number for a financial API. | medical API or a bank account number for a financial API. | |||
privileges (array of strings) The types or levels of privilege being | privileges (array of strings) The types or levels of privilege being | |||
requested at the resource. For example, a client instance asking | requested at the resource. For example, a client instance asking | |||
for administrative level access, or access when the resource owner | for administrative level access, or access when the resource owner | |||
is no longer online. | is no longer online. | |||
The following non-normative example is describing three kinds of | The following non-normative example is describing three kinds of | |||
access (read, write, delete) to each of two different locations and | access (read, write, delete) to each of two different locations and | |||
two different data types (metadata, images) for a single access token | two different data types (metadata, images) for a single access token | |||
using the fictitious "photo-api" type definition. | using the fictitious photo-api type definition. | |||
"access": [ | "access": [ | |||
{ | { | |||
"type": "photo-api", | "type": "photo-api", | |||
"actions": [ | "actions": [ | |||
"read", | "read", | |||
"write", | "write", | |||
"delete" | "delete" | |||
], | ], | |||
"locations": [ | "locations": [ | |||
skipping to change at page 102, line 40 ¶ | skipping to change at page 103, line 40 ¶ | |||
], | ], | |||
"datatypes": [ | "datatypes": [ | |||
"metadata", | "metadata", | |||
"images" | "images" | |||
] | ] | |||
} | } | |||
] | ] | |||
The access requested for a given object when using these fields is | The access requested for a given object when using these fields is | |||
the cross-product of all fields of the object. That is to say, the | the cross-product of all fields of the object. That is to say, the | |||
object represents a request for all "actions" listed to be used at | object represents a request for all actions listed to be used at all | |||
all "locations" listed for all possible "datatypes" listed within the | locations listed for all possible datatypes listed within the object. | |||
object. Assuming the request above was granted, the client instance | Assuming the request above was granted, the client instance could | |||
could assume that it would be able to do a "read" action against the | assume that it would be able to do a read action against the images | |||
"images" on the first server as well as a "delete" action on the | on the first server as well as a delete action on the metadata of the | |||
"metadata" of the second server, or any other combination of these | second server, or any other combination of these fields, using the | |||
fields, using the same access token. | same access token. | |||
To request a different combination of access, such as requesting one | To request a different combination of access, such as requesting one | |||
of the possible "actions" against one of the possible "locations" and | of the possible actions against one of the possible locations and a | |||
a different choice of possible "actions" against a different one of | different choice of possible actions against a different one of the | |||
the possible "locations", the client instance can include multiple | possible locations, the client instance can include multiple separate | |||
separate objects in the "resources" array. The following non- | objects in the resources array. The following non-normative example | |||
normative example uses the same fictitious "photo-api" type | uses the same fictitious photo-api type definition to request a | |||
definition to request a single access token with more specifically | single access token with more specifically targeted access rights by | |||
targeted access rights by using two discrete objects within the | using two discrete objects within the request. | |||
request. | ||||
"access": [ | "access": [ | |||
{ | { | |||
"type": "photo-api", | "type": "photo-api", | |||
"actions": [ | "actions": [ | |||
"read" | "read" | |||
], | ], | |||
"locations": [ | "locations": [ | |||
"https://server.example.net/" | "https://server.example.net/" | |||
], | ], | |||
skipping to change at page 103, line 37 ¶ | skipping to change at page 104, line 36 ¶ | |||
], | ], | |||
"locations": [ | "locations": [ | |||
"https://resource.local/other" | "https://resource.local/other" | |||
], | ], | |||
"datatypes": [ | "datatypes": [ | |||
"metadata" | "metadata" | |||
] | ] | |||
} | } | |||
] | ] | |||
The access requested here is for "read" access to "images" on one | The access requested here is for read access to images on one server | |||
server while simultaneously requesting "write" and "delete" access | while simultaneously requesting write and delete access for metadata | |||
for "metadata" on a different server, but importantly without | on a different server, but importantly without requesting write or | |||
requesting "write" or "delete" access to "images" on the first | delete access to images on the first server. | |||
server. | ||||
It is anticipated that API designers will use a combination of common | It is anticipated that API designers will use a combination of common | |||
fields defined in this specification as well as fields specific to | fields defined in this specification as well as fields specific to | |||
the API itself. The following non-normative example shows the use of | the API itself. The following non-normative example shows the use of | |||
both common and API-specific fields as part of two different | both common and API-specific fields as part of two different | |||
fictitious API "type" values. The first access request includes the | fictitious API type values. The first access request includes the | |||
"actions", "locations", and "datatypes" fields specified here as well | actions, locations, and datatypes fields specified here as well as | |||
as the API-specific "geolocation" field. The second access request | the API-specific geolocation field. The second access request | |||
includes the "actions" and "identifier" fields specified here as well | includes the actions and identifier fields specified here as well as | |||
as the API-specific "currency" field. | the API-specific currency field. | |||
"access": [ | "access": [ | |||
{ | { | |||
"type": "photo-api", | "type": "photo-api", | |||
"actions": [ | "actions": [ | |||
"read", | "read", | |||
"write" | "write" | |||
], | ], | |||
"locations": [ | "locations": [ | |||
"https://server.example.net/", | "https://server.example.net/", | |||
skipping to change at page 105, line 13 ¶ | skipping to change at page 106, line 13 ¶ | |||
] | ] | |||
This value is opaque to the client instance and MAY be any valid JSON | This value is opaque to the client instance and MAY be any valid JSON | |||
string, and therefore could include spaces, unicode characters, and | string, and therefore could include spaces, unicode characters, and | |||
properly escaped string sequences. However, in some situations the | properly escaped string sequences. However, in some situations the | |||
value is intended to be seen and understood by the client software's | value is intended to be seen and understood by the client software's | |||
developer. In such cases, the API designer choosing any such human- | developer. In such cases, the API designer choosing any such human- | |||
readable strings SHOULD take steps to ensure the string values are | readable strings SHOULD take steps to ensure the string values are | |||
not easily confused by a developer, such as by limiting the strings | not easily confused by a developer, such as by limiting the strings | |||
to easily disambiguated characters. | to easily disambiguated characters. | |||
This functionality is similar in practice to OAuth 2.0's "scope" | This functionality is similar in practice to OAuth 2.0's scope | |||
parameter [RFC6749], where a single string represents the set of | parameter [RFC6749], where a single string represents the set of | |||
access rights requested by the client instance. As such, the | access rights requested by the client instance. As such, the | |||
reference string could contain any valid OAuth 2.0 scope value as in | reference string could contain any valid OAuth 2.0 scope value as in | |||
Appendix D.5. Note that the reference string here is not bound to | Appendix D.5. Note that the reference string here is not bound to | |||
the same character restrictions as in OAuth 2.0's "scope" definition. | the same character restrictions as in OAuth 2.0's scope definition. | |||
A single "access" array MAY include both object-type and string-type | A single access array MAY include both object-type and string-type | |||
resource items. In this non-normative example, the client instance | resource items. In this non-normative example, the client instance | |||
is requesting access to a "photo-api" and "financial-transaction" API | is requesting access to a photo-api and financial-transaction API | |||
type as well as the reference values of "read", "dolphin-metadata", | type as well as the reference values of read, dolphin-metadata, and | |||
and "some other thing". | some other thing. | |||
"access": [ | "access": [ | |||
{ | { | |||
"type": "photo-api", | "type": "photo-api", | |||
"actions": [ | "actions": [ | |||
"read", | "read", | |||
"write", | "write", | |||
"delete" | "delete" | |||
], | ], | |||
"locations": [ | "locations": [ | |||
skipping to change at page 107, line 22 ¶ | skipping to change at page 108, line 22 ¶ | |||
list correspond to the possible values for the interaction start | list correspond to the possible values for the interaction start | |||
section (Section 2.5.1) of the request. | section (Section 2.5.1) of the request. | |||
interaction_finish_methods_supported (array of strings) OPTIONAL. A | interaction_finish_methods_supported (array of strings) OPTIONAL. A | |||
list of the AS's interaction finish methods. The values of this | list of the AS's interaction finish methods. The values of this | |||
list correspond to the possible values for the method element of | list correspond to the possible values for the method element of | |||
the interaction finish section (Section 2.5.2) of the request. | the interaction finish section (Section 2.5.2) of the request. | |||
key_proofs_supported (array of strings) OPTIONAL. A list of the | key_proofs_supported (array of strings) OPTIONAL. A list of the | |||
AS's supported key proofing mechanisms. The values of this list | AS's supported key proofing mechanisms. The values of this list | |||
correspond to possible values of the "proof" field of the key | correspond to possible values of the proof field of the key | |||
section (Section 7.1) of the request. | section (Section 7.1) of the request. | |||
subject_formats_supported (array of strings) OPTIONAL. A list of | subject_formats_supported (array of strings) OPTIONAL. A list of | |||
the AS's supported subject identifier types. The values of this | the AS's supported subject identifier types. The values of this | |||
list correspond to possible values of the subject identifier | list correspond to possible values of the subject identifier | |||
section (Section 2.2) of the request. | section (Section 2.2) of the request. | |||
assertions_supported (array of strings) OPTIONAL. A list of the | assertions_supported (array of strings) OPTIONAL. A list of the | |||
AS's supported assertion formats. The values of this list | AS's supported assertion formats. The values of this list | |||
correspond to possible values of the subject assertion section | correspond to possible values of the subject assertion section | |||
(Section 2.2) of the request. | (Section 2.2) of the request. | |||
The information returned from this method is for optimization | The information returned from this method is for optimization | |||
purposes only. The AS MAY deny any request, or any portion of a | purposes only. The AS MAY deny any request, or any portion of a | |||
request, even if it lists a capability as supported. For example, a | request, even if it lists a capability as supported. For example, a | |||
given client instance can be registered with the "mtls" key proofing | given client instance can be registered with the mtls key proofing | |||
mechanism, but the AS also returns other proofing methods, then the | mechanism, but the AS also returns other proofing methods, then the | |||
AS will deny a request from that client instance using a different | AS will deny a request from that client instance using a different | |||
proofing mechanism. | proofing mechanism. | |||
9.1. RS-first Method of AS Discovery | 9.1. RS-first Method of AS Discovery | |||
If the client instance calls an RS without an access token, or with | If the client instance calls an RS without an access token, or with | |||
an invalid access token, the RS MAY respond to the client instance | an invalid access token, the RS MAY respond to the client instance | |||
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.ietf-gnap-resource-servers]. | |||
[I-D.draft-ietf-gnap-resource-servers]. The content of the resource | The content of the resource reference is opaque to the client | |||
reference is opaque to the client instance. | instance. | |||
NOTE: '\' line wrapping per RFC 8792 | 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 | |||
client instance MAY request additional resources and other | instance MAY request additional resources and other information. The | |||
information. The client instance MAY request multiple access tokens. | client instance MAY request multiple access tokens. | |||
In this non-normative example, the client instance is requesting a | In this non-normative example, the client instance is requesting a | |||
single access token using the resource reference "FWWIKYBQ6U56NL1" | single access token using the resource reference FWWIKYBQ6U56NL1 | |||
received from the RS in addition to the "dolphin-metadata" resource | received from the RS in addition to the dolphin-metadata resource | |||
reference that the client instance has been configured with out of | reference that the client instance has been configured with out of | |||
band. | band. | |||
POST /tx HTTP/1.1 | POST /tx HTTP/1.1 | |||
Host: server.example.com | Host: server.example.com | |||
Content-Type: application/json | Content-Type: application/json | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
Signature: sig1=... | Signature: sig1=... | |||
Digest: sha256=... | Digest: sha256=... | |||
skipping to change at page 109, line 9 ¶ | skipping to change at page 110, line 9 ¶ | |||
"client": "KHRS6X63AJ7C7C4AZ9AO" | "client": "KHRS6X63AJ7C7C4AZ9AO" | |||
} | } | |||
If issued, the resulting access token would contain sufficient access | If issued, the resulting access token would contain sufficient access | |||
to be used at both referenced resources. | to be used at both referenced resources. | |||
10. Acknowledgements | 10. Acknowledgements | |||
The editors would like to thank the feedback of the following | The editors would like to thank the feedback of the following | |||
individuals for their reviews, implementations, and contributions: | individuals for their reviews, implementations, and contributions: | |||
Aeke Axeland, Aaron Parecki, Adam Omar Oueidat, Annabelle Backman, | Aeke Axeland, Aaron Parecki, Adam Omar Oueidat, Andrii Deinega, | |||
Dick Hardt, Dmitri Zagidulin, Dmitry Barinov, Fabien Imbault, Francis | Annabelle Backman, Dick Hardt, Dmitri Zagidulin, Dmitry Barinov, | |||
Pouatcha, George Fletcher, Haardik Haardik, Hamid Massaoud, Jacky | Fabien Imbault, Francis Pouatcha, George Fletcher, Haardik Haardik, | |||
Yuan, Joseph Heenan, Justin Richer, Kathleen Moriarty, Mike Jones, | Florian Helmschmidt, Hamid Massaoud, Jacky Yuan, Joseph Heenan, | |||
Mike Varley, Nat Sakimura, Takahiko Kawasaki, Takahiro Tsuchiya. | Justin Richer, Kathleen Moriarty, Mike Jones, Mike Varley, Nat | |||
Sakimura, Takahiko Kawasaki, Takahiro Tsuchiya. | ||||
The editors would also like to thank the GNAP working group design | The editors would also like to thank the GNAP working group design | |||
team of Kathleen Moriarty, Fabien Imbault, Dick Hardt, Mike Jones, | team of Kathleen Moriarty, Fabien Imbault, Dick Hardt, Mike Jones, | |||
and Justin Richer, who incorporated elements from the XAuth and XYZ | and Justin Richer, who incorporated elements from the XAuth and XYZ | |||
proposals to create the first version of this document. | proposals to create the first version of this document. | |||
In addition, the editors would like to thank Aaron Parecki and Mike | In addition, the editors would like to thank Aaron Parecki and Mike | |||
Jones for insights into how to integrate identity and authentication | Jones for insights into how to integrate identity and authentication | |||
systems into the core protocol, and Justin Richer and Dick Hardt for | systems into the core protocol, and Justin Richer and Dick Hardt for | |||
the use cases, diagrams, and insights provided in the XYZ and XAuth | the use cases, diagrams, and insights provided in the XYZ and XAuth | |||
skipping to change at page 109, line 45 ¶ | skipping to change at page 110, line 46 ¶ | |||
12.1. TLS Protection in Transit | 12.1. TLS Protection in Transit | |||
All requests in GNAP have to be made over TLS or equivalent as | All requests in GNAP have to be made over TLS or equivalent as | |||
outlined in [BCP195] to protect the contents of the request and | outlined in [BCP195] to protect the contents of the request and | |||
response from manipulation and interception by an attacker. This | response from manipulation and interception by an attacker. This | |||
includes all requests from a client instance to the AS, all requests | 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 | from the client instance to an RS, any requests back to a client | |||
instance such as the push-based interaction finish method, and any | 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 | back-end communications such as from an RS to an AS as described in | |||
[I-D.draft-ietf-gnap-resource-servers]. Additionally, all requests | [I-D.ietf-gnap-resource-servers]. Additionally, all requests between | |||
between a browser and other components, such as during redirect-based | a browser and other components, such as during redirect-based | |||
interaction, need to be made over TLS or use equivalent protection. | interaction, need to be made over TLS or use equivalent protection. | |||
Even though requests from the client instance to the AS are signed, | Even though requests from the client instance to the AS are signed, | |||
the signature method alone does not protect the request from | the signature method alone does not protect the request from | |||
interception by an attacker. TLS protects the response as well as | interception by an attacker. TLS protects the response as well as | |||
the request, preventing an attacker from intercepting requested | the request, preventing an attacker from intercepting requested | |||
information as it is returned. This is particularly important in the | information as it is returned. This is particularly important in the | |||
core protocol for security artifacts such as nonces and for personal | core protocol for security artifacts such as nonces and for personal | |||
information such as subject information. | information such as subject information. | |||
skipping to change at page 110, line 27 ¶ | skipping to change at page 111, line 28 ¶ | |||
software that would be otherwise unknown to the attacker. | software that would be otherwise unknown to the attacker. | |||
TLS or equivalent protection also needs to be used between the | TLS or equivalent protection also needs to be used between the | |||
browser and any other components. This applies during initial | browser and any other components. This applies during initial | |||
redirects to an AS's components during interaction, during any | redirects to an AS's components during interaction, during any | |||
interaction with the resource owner, and during any redirect back to | interaction with the resource owner, and during any redirect back to | |||
the client instance. Without TLS protection on these portions of the | the client instance. Without TLS protection on these portions of the | |||
process, an attacker could wait for a valid request to start and then | process, an attacker could wait for a valid request to start and then | |||
take over the resource owner's interaction session. | take over the resource owner's interaction session. | |||
12.2. Protection of Client Instance Key Material | 12.2. Signing Requests from the Client Software | |||
Even though all requests in GNAP need to be transmitted over TLS or | ||||
its equivalent, the use of TLS alone is not sufficient to protect all | ||||
parts of a multi-party and multi-stage protocol like GNAP, and TLS is | ||||
not targeted at tying multiple requests to each other over time. To | ||||
account for this, GNAP makes use of message-level protection and key | ||||
presentation mechanisms that strongly associate a request with a key | ||||
held by the client instance (see Section 7). | ||||
During the initial request from a client instance to the AS, the | ||||
client instance has to identify and prove possession of a | ||||
cryptographic key. If the key is known to the AS, such as if it is | ||||
previously registered or dereferenceable to a trusted source, the AS | ||||
can associate a set of policies to the client instance identified by | ||||
the key. Without the requirement that the client instance prove that | ||||
it holds that key, the AS could not trust that the connection came | ||||
from any particular client and could not apply any associated | ||||
policies. | ||||
Even more importantly, the client instance proving possession of a | ||||
key on the first request allows the AS to associate future requests | ||||
with each other. The access token used for grant continuation is | ||||
bound to the same key and proofing mechanism used by the client | ||||
instance in its initial request, which means that the client instance | ||||
needs to prove possession of that same key in future requests | ||||
allowing the AS to be sure that the same client instance is executing | ||||
the follow-ups for a given ongoing grant request. Therefore, the AS | ||||
has to ensure that all subsequent requests for a grant are associated | ||||
with the same key that started the grant, or the most recent rotation | ||||
of that key. This need holds true even if the initial key is | ||||
previously unknown to the AS, such as would be the case when a client | ||||
instance creates an ephemeral key for its request. Without this | ||||
ongoing association, an attacker would be able to impersonate a | ||||
client instance in the midst of a grant request, potentially stealing | ||||
access tokens and subject information with impunity. | ||||
Additionally, all access tokens in GNAP default to be associated with | ||||
the key that was presented during the grant request that created the | ||||
access token. This association allows an RS to know that the | ||||
presenter of the access token is the same party that the token was | ||||
issued to, as identified by their keys. While non-bound bearer | ||||
tokens are an option in GNAP, these types of tokens have their own | ||||
tradeoffs discussed elsewhere in this section. | ||||
TLS functions at the socket layer, ensuring that only the parties on | ||||
either end of that socket connection can read the information passed | ||||
along that connection. Each time a new socket connection is made, | ||||
such as for a new HTTP request, a new trust is re-established that is | ||||
unrelated to previous connections. As such, it is not possible with | ||||
TLS alone to know that the same party is making a set of calls, and | ||||
therefore TLS alone cannot provide the continuity of security needed | ||||
for GNAP. However, mutual TLS (MTLS) does provide such security | ||||
characteristics through the use of the TLS client certificate, and | ||||
thus MTLS is acceptable as a key-presentation mechanism when applied | ||||
as described in Section 7.3.2. | ||||
12.3. Protection of Client Instance Key Material | ||||
Client instances are identified by their unique keys, and anyone with | Client instances are identified by their unique keys, and anyone with | |||
access to a client instance's key material will be able to | access to a client instance's key material will be able to | |||
impersonate that client instance to all parties. This is true for | impersonate that client instance to all parties. This is true for | |||
both calls to the AS as well as calls to an RS using a key-bound | both calls to the AS as well as calls to an RS using a key-bound | |||
access token. | access token. | |||
Different types of client software have different methods available | Different types of client software have different methods available | |||
for creating, managing, and registering keys. GNAP explicitly allows | for creating, managing, and registering keys. GNAP explicitly allows | |||
for ephemeral clients, such as SPAs, and single-user clients, such as | for ephemeral clients, such as SPAs, and single-user clients, such as | |||
skipping to change at page 111, line 41 ¶ | skipping to change at page 114, line 5 ¶ | |||
between them. This situation could happen if multiple instances | between them. This situation could happen if multiple instances | |||
within a cluster can securely share secret information among | within a cluster can securely share secret information among | |||
themselves. Even though there are multiple copies of the software, | themselves. Even though there are multiple copies of the software, | |||
the shared key makes these copies all present as a single instance. | the shared key makes these copies all present as a single instance. | |||
It is considered bad practice to share keys between copies of | It is considered bad practice to share keys between copies of | |||
software unless they are very tightly integrated with each other and | software unless they are very tightly integrated with each other and | |||
can be closely managed. It is particularly bad practice to allow an | can be closely managed. It is particularly bad practice to allow an | |||
end-user to copy keys between client instances and to willingly use | end-user to copy keys between client instances and to willingly use | |||
the same key in multiple instances. | the same key in multiple instances. | |||
12.3. Protection of Authorization Server | 12.4. Protection of Authorization Server | |||
The AS performs critical functions in GNAP, including authenticating | The AS performs critical functions in GNAP, including authenticating | |||
client software, managing interactions with end-users to gather | client software, managing interactions with end-users to gather | |||
consent and provide notice, and issuing access tokens for client | consent and provide notice, and issuing access tokens for client | |||
instances to present to resource servers. As such, protecting the AS | instances to present to resource servers. As such, protecting the AS | |||
is central to any GNAP deployment. | is central to any GNAP deployment. | |||
If an attacker is able to gain control over an AS, they would be able | If an attacker is able to gain control over an AS, they would be able | |||
to create fraudulent tokens and manipulate registration information | to create fraudulent tokens and manipulate registration information | |||
to allow for malicious clients. These tokens and clients would be | to allow for malicious clients. These tokens and clients would be | |||
skipping to change at page 112, line 25 ¶ | skipping to change at page 114, line 33 ¶ | |||
If an attacker is able to impersonate an AS, they would be able to | If an attacker is able to impersonate an AS, they would be able to | |||
trick legitimate client instances into making signed requests for | trick legitimate client instances into making signed requests for | |||
information which could potentially be proxied to a real AS. To | information which could potentially be proxied to a real AS. To | |||
combat this, all communications to the AS need to be made over TLS or | combat this, all communications to the AS need to be made over TLS or | |||
its equivalent, and the software making the connection has to | its equivalent, and the software making the connection has to | |||
validate the certificate chain of the host it is connecting to. | validate the certificate chain of the host it is connecting to. | |||
Consequently, protecting, monitoring, and auditing the AS is | Consequently, protecting, monitoring, and auditing the AS is | |||
paramount to preserving the security of a GNAP-protected ecosystem. | paramount to preserving the security of a GNAP-protected ecosystem. | |||
12.4. Symmetric and Asymmetric Client Instance Keys | 12.5. Symmetric and Asymmetric Client Instance Keys | |||
The cryptographic methods used by GNAP for key-proofing can support | The cryptographic methods used by GNAP for key-proofing can support | |||
both asymmetric and symmetric cryptography, and can be extended to | both asymmetric and symmetric cryptography, and can be extended to | |||
use a wide variety of mechanisms. While symmetric cryptographic | use a wide variety of mechanisms. While symmetric cryptographic | |||
systems have some benefits in speed and simplicity, they have a | systems have some benefits in speed and simplicity, they have a | |||
distinct drawback that both parties need access to the same key in | distinct drawback that both parties need access to the same key in | |||
order to do both signing and verification of the message. This means | 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 | 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 | 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. | able to derive it) in order to validate the key proof signature. | |||
skipping to change at page 113, line 41 ¶ | skipping to change at page 115, line 36 ¶ | |||
be used by client instances, but only a reference to the key and not | 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 | 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 keys as well as key derivation schemes to take advantage of | |||
symmetric cryptography but without requiring key distribution at | symmetric cryptography but without requiring key distribution at | |||
runtime, which would expose the keys in transit. | runtime, which would expose the keys in transit. | |||
Both the AS and client software can use systems such as hardware | Both the AS and client software can use systems such as hardware | |||
security modules to strengthen their key security storage and | security modules to strengthen their key security storage and | |||
generation for both asymmetric and symmetric keys. | generation for both asymmetric and symmetric keys. | |||
12.5. Generation of Access Tokens | 12.6. Generation of Access Tokens | |||
The content of access tokens need to be such that only the generating | 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 | AS would be able to create them, and the contents cannot be | |||
manipulated by an attacker to gain different or additional access | manipulated by an attacker to gain different or additional access | |||
rights. | rights. | |||
One method for accomplishing this is to use a cryptographically | One method for accomplishing this is to use a cryptographically | |||
random value for the access token, generated by the AS using a secure | random value for the access token, generated by the AS using a secure | |||
randomization function with sufficiently high entropy. The odds of | randomization function with sufficiently high entropy. The odds of | |||
an attacker guessing the output of the randomization function to | an attacker guessing the output of the randomization function to | |||
skipping to change at page 114, line 23 ¶ | skipping to change at page 116, line 20 ¶ | |||
the AS can create such a signed token. The odds of an attacker being | the AS can create such a signed token. The odds of an attacker being | |||
able to guess a signature value with a useful payload are exceedingly | able to guess a signature value with a useful payload are exceedingly | |||
small. This technique only works if all targeted RS's check the | small. This technique only works if all targeted RS's check the | |||
signature of the access token. Any RS that does not validate the | signature of the access token. Any RS that does not validate the | |||
signature of all presented tokens would be susceptible to injection | signature of all presented tokens would be susceptible to injection | |||
of a modified or falsified token. Furthermore, an AS has to | of a modified or falsified token. Furthermore, an AS has to | |||
carefully protect the keys used to sign access tokens, since anyone | carefully protect the keys used to sign access tokens, since anyone | |||
with access to these signing keys would be able to create seemingly- | with access to these signing keys would be able to create seemingly- | |||
valid access tokens using them. | valid access tokens using them. | |||
12.6. Bearer Access Tokens | 12.7. Bearer Access Tokens | |||
Bearer access tokens can be used by any party that has access to the | Bearer access tokens can be used by any party that has access to the | |||
token itself, without any additional information. As a natural | token itself, without any additional information. As a natural | |||
consequence, any RS that a bearer token is presented to has the | consequence, any RS that a bearer token is presented to has the | |||
technical capability of presenting that bearer token to another RS, | technical capability of presenting that bearer token to another RS, | |||
as long as the token is valid. It also means that any party that is | as long as the token is valid. It also means that any party that is | |||
able capture of the token value in storage or in transit is able to | able capture of the token value in storage or in transit is able to | |||
use the access token. While bearer tokens are inherently simpler, | use the access token. While bearer tokens are inherently simpler, | |||
this simplicity has been misapplied and abused in making needlessly | this simplicity has been misapplied and abused in making needlessly | |||
insecure systems. | insecure systems. | |||
In GNAP, key-bound access tokens are the default due to their higher | In GNAP, key-bound access tokens are the default due to their higher | |||
security properties. While bearer tokens can be used in GNAP, their | security properties. While bearer tokens can be used in GNAP, their | |||
use should be limited onto to cases where the simplicity benefits | use should be limited onto to cases where the simplicity benefits | |||
outweigh the significant security downsides. | outweigh the significant security downsides. | |||
12.7. Key-Bound Token Access Tokens | 12.8. Key-Bound Token Access Tokens | |||
Key-bound access tokens, as the name suggests, are bound to a | Key-bound access tokens, as the name suggests, are bound to a | |||
specific key and must be presented along with proof of that key | specific key and must be presented along with proof of that key | |||
during use. The key itself is not presented at the same time as the | during use. The key itself is not presented at the same time as the | |||
token, so even if a token value is captured, it cannot be used to | token, so even if a token value is captured, it cannot be used to | |||
make a new request. This is particularly true for an RS, which will | make a new request. This is particularly true for an RS, which will | |||
see the token value but will not see the keys used to make the | see the token value but will not see the keys used to make the | |||
request. | request. | |||
Key-bound access tokens provide this additional layer of protection | Key-bound access tokens provide this additional layer of protection | |||
skipping to change at page 115, line 38 ¶ | skipping to change at page 117, line 31 ¶ | |||
Some key-bound tokens are susceptible to replay attacks, depending on | Some key-bound tokens are susceptible to replay attacks, depending on | |||
the details of the signing method used. If a signature method covers | the details of the signing method used. If a signature method covers | |||
only portions of a given request, that same signature proof can be | only portions of a given request, that same signature proof can be | |||
used by an attacker to make a similar call, potentially even varying | used by an attacker to make a similar call, potentially even varying | |||
elements that are outside of the protection of the signature. Key | elements that are outside of the protection of the signature. Key | |||
proofing mechanisms used with access tokens therefore need to use | proofing mechanisms used with access tokens therefore need to use | |||
replay protection mechanisms covered under the signature such as a | replay protection mechanisms covered under the signature such as a | |||
per-message nonce, a reasonably short time validity window, or other | per-message nonce, a reasonably short time validity window, or other | |||
uniqueness constraints. The details of using these will vary | uniqueness constraints. The details of using these will vary | |||
depending on the key proofing mechanism in use, but for example, HTTP | depending on the key proofing mechanism in use, but for example, HTTP | |||
Message Signatures has both a "created" and "nonce" signature | Message Signatures has both a created and nonce signature parameter | |||
parameter as well as the ability to cover significant portions of the | as well as the ability to cover significant portions of the HTTP | |||
HTTP message. | message. | |||
12.8. Exposure of End-user Credentials to Client Instance | 12.9. Exposure of End-user Credentials to Client Instance | |||
As a delegation protocol, one of the main goals of GNAP is to prevent | As a delegation protocol, one of the main goals of GNAP is to prevent | |||
the client software from being exposed to any credentials or | the client software from being exposed to any credentials or | |||
information about the end-user or resource owner as a requirement of | information about the end-user or resource owner as a requirement of | |||
the delegation process. By using the variety of interaction | the delegation process. By using the variety of interaction | |||
mechanisms, the resource owner can interact with the AS without ever | mechanisms, the resource owner can interact with the AS without ever | |||
authenticating to the client software, and without the client | authenticating to the client software, and without the client | |||
software having to impersonate the resource owner through replay of | software having to impersonate the resource owner through replay of | |||
their credentials. | their credentials. | |||
skipping to change at page 116, line 27 ¶ | skipping to change at page 118, line 20 ¶ | |||
possible for the client software to collect this password in a secure | possible for the client software to collect this password in a secure | |||
software enclave without exposing the password to the rest of the | software enclave without exposing the password to the rest of the | |||
client software or putting it across the wire to the AS. The AS can | client software or putting it across the wire to the AS. The AS can | |||
validate this challenge response against a known password for the | validate this challenge response against a known password for the | |||
identified end user. While an approach such as this does not remove | identified end user. While an approach such as this does not remove | |||
all of the concerns surrounding such a password-based scheme, it is | all of the concerns surrounding such a password-based scheme, it is | |||
at least possible to implement in a more secure fashion than simply | at least possible to implement in a more secure fashion than simply | |||
collecting and replaying the password. Even so, such schemes should | collecting and replaying the password. Even so, such schemes should | |||
only ever be used by trusted clients due to the ease of abusing them. | only ever be used by trusted clients due to the ease of abusing them. | |||
12.9. Mixing Up Authorization Servers | 12.10. Mixing Up Authorization Servers | |||
If a client instance is able to work with multiple AS's | If a client instance is able to work with multiple AS's | |||
simultaneously, it is more possible for an attacker to add a | simultaneously, it is more possible for an attacker to add a | |||
compromised AS to the client instance's configuration and cause the | compromised AS to the client instance's configuration and cause the | |||
client software to start a request at the compromised AS. This AS | 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 | 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 | attempt to get the resource owner to approve access for the | |||
legitimate client instance. | legitimate client instance. | |||
A client instance needs to always be aware of which AS it is talking | A client instance needs to always be aware of which AS it is talking | |||
skipping to change at page 117, line 5 ¶ | skipping to change at page 119, line 5 ¶ | |||
against this kind of substitution, but only if the client instance | against this kind of substitution, but only if the client instance | |||
validates the hash. If the client instance does not use an | validates the hash. If the client instance does not use an | |||
interaction finish method or does not check the interaction finish | interaction finish method or does not check the interaction finish | |||
hash value, the compromised AS can be granted a valid access token on | hash value, the compromised AS can be granted a valid access token on | |||
behalf of the resource owner. See [attack-surfaces] for details of | behalf of the resource owner. See [attack-surfaces] for details of | |||
one such attack, which has been since addressed in this document by | one such attack, which has been since addressed in this document by | |||
including the grant endpoint in the interaction hash calculation. | including the grant endpoint in the interaction hash calculation. | |||
The client instance still needs to validate the hash for the attack | The client instance still needs to validate the hash for the attack | |||
to be prevented. | to be prevented. | |||
12.10. Processing of Client-Presented User Information | 12.11. Processing of Client-Presented User Information | |||
GNAP allows the client instance to present assertions and identifiers | GNAP allows the client instance to present assertions and identifiers | |||
of the current user to the AS as part of the initial request. This | of the current user to the AS as part of the initial request. This | |||
information should only ever be taken by the AS as a hint, since the | information should only ever be taken by the AS as a hint, since the | |||
AS has no way to tell if the represented person is present at the | AS has no way to tell if the represented person is present at the | |||
client software, without using an interaction mechanism. This | client software, without using an interaction mechanism. This | |||
information does not guarantee the given user is there, but it does | information does not guarantee the given user is there, but it does | |||
constitute a statement by the client software that the AS can take | constitute a statement by the client software that the AS can take | |||
into account. | into account. | |||
skipping to change at page 118, line 27 ¶ | skipping to change at page 120, line 27 ¶ | |||
without validating the audience of the assertion, a captured | without validating the audience of the assertion, a captured | |||
assertion could be presented by the client instance to impersonate a | assertion could be presented by the client instance to impersonate a | |||
given end user. In such cases, the assertion offers little more | given end user. In such cases, the assertion offers little more | |||
protection than a simple identifier would. | protection than a simple identifier would. | |||
A special case exists where the AS is the generator of the assertion | A special case exists where the AS is the generator of the assertion | |||
being presented by the client instance. In these cases, the AS can | being presented by the client instance. In these cases, the AS can | |||
validate that it did issue the assertion and it is associated with | validate that it did issue the assertion and it is associated with | |||
the client instance presenting the assertion. | the client instance presenting the assertion. | |||
12.11. Client Instance Pre-registration | 12.12. Client Instance Pre-registration | |||
Each client instance is identified by its own unique key, and for | Each client instance is identified by its own unique key, and for | |||
some kinds of client software such as a web server or backend system, | some kinds of client software such as a web server or backend system, | |||
this identification can be facilitated by registering a single key | this identification can be facilitated by registering a single key | |||
for a piece of client software ahead of time. This registration can | for a piece of client software ahead of time. This registration can | |||
be associated with a set of display attributes to be used during the | be associated with a set of display attributes to be used during the | |||
authorization process, identifying the client software to the user. | authorization process, identifying the client software to the user. | |||
In these cases, it can be assumed that only one instance of client | In these cases, it can be assumed that only one instance of client | |||
software will exist, likely to serve many different users. | software will exist, likely to serve many different users. | |||
A client's registration record needs to include its identifying key. | A client's registration record needs to include its identifying key. | |||
Furthermore, it is the case that any clients using symmetric | Furthermore, it is the case that any clients using symmetric | |||
cryptography for key proofing mechanisms need to have their keys pre- | cryptography for key proofing mechanisms need to have their keys pre- | |||
registered. The registration should also include any information | registered. The registration should also include any information | |||
that would aid in the authorization process, such as a display name | that would aid in the authorization process, such as a display name | |||
and logo. The registration record can also limit a given client to | and logo. The registration record can also limit a given client to | |||
ask for certain kinds of information and access, or be limited to | ask for certain kinds of information and access, or be limited to | |||
specific interaction mechanisms at runtime. | specific interaction mechanisms at runtime. | |||
It also is sensible to pre-register client instances when the | It also is sensible to pre-register client instances when the | |||
software is acting on its own behalf, without the need for a runtime | software is acting autonomously, without the need for a runtime | |||
approval by a resource owner or any interaction with an end-user. In | approval by a resource owner or any interaction with an end-user. In | |||
these cases, an AS needs to rest on the trust decisions that have | these cases, an AS needs to rest on the trust decisions that have | |||
been determined prior to runtime in determining what rights and | been determined prior to runtime in determining what rights and | |||
tokens to grant to a given client instance. | tokens to grant to a given client instance. | |||
However, it does not make sense to pre-register many types of | However, it does not make sense to pre-register many types of | |||
clients. Single-page applications (SPAs) and mobile/desktop | clients. Single-page applications (SPAs) and mobile/desktop | |||
applications in particular present problems with pre-registration. | applications in particular present problems with pre-registration. | |||
For SPAs, the instances are ephemeral in nature and long-term | For SPAs, the instances are ephemeral in nature and long-term | |||
registration of a single instance leads to significant storage and | registration of a single instance leads to significant storage and | |||
skipping to change at page 119, line 30 ¶ | skipping to change at page 121, line 30 ¶ | |||
registered. | registered. | |||
An AS can also provide warnings and caveats to resource owners during | An AS can also provide warnings and caveats to resource owners during | |||
the authorization process, allowing the user to make an informed | the authorization process, allowing the user to make an informed | |||
decision regarding the software they are authorizing. For example, | decision regarding the software they are authorizing. For example, | |||
if the AS has done vetting of the client software and this specific | if the AS has done vetting of the client software and this specific | |||
instance, it can present a different authorization screen compared to | instance, it can present a different authorization screen compared to | |||
a client instance that is presenting all of its information at | a client instance that is presenting all of its information at | |||
runtime. | runtime. | |||
12.12. Client Instance Impersonation | 12.13. Client Instance Impersonation | |||
If client instances are allowed to set their own user-facing display | If client instances are allowed to set their own user-facing display | |||
information, such as a display name and website URL, a malicious | information, such as a display name and website URL, a malicious | |||
client instance could impersonate legitimate client software for the | client instance could impersonate legitimate client software for the | |||
purposes of tricking users into authorizing the malicious client. | purposes of tricking users into authorizing the malicious client. | |||
Requiring clients to pre-register does not fully mitigate this | Requiring clients to pre-register does not fully mitigate this | |||
problem since many pre-registration systems have self-service portals | problem since many pre-registration systems have self-service portals | |||
for management of client registration, allowing authenticated | for management of client registration, allowing authenticated | |||
developers to enter self-asserted information into the management | developers to enter self-asserted information into the management | |||
skipping to change at page 120, line 12 ¶ | skipping to change at page 122, line 12 ¶ | |||
and through a registration portal, to limit the kinds of | and through a registration portal, to limit the kinds of | |||
impersonation that would be done. | impersonation that would be done. | |||
An AS can also warn the resource owner about the provenance of the | An AS can also warn the resource owner about the provenance of the | |||
information it is displaying, allowing the resource owner to make a | information it is displaying, allowing the resource owner to make a | |||
more informed delegation decision. For example, an AS can visually | more informed delegation decision. For example, an AS can visually | |||
differentiate between a client instance that can be traced back to a | differentiate between a client instance that can be traced back to a | |||
specific developer's registration and an instance that has self- | specific developer's registration and an instance that has self- | |||
asserted its own key and display information. | asserted its own key and display information. | |||
12.13. Interception of Information in the Browser | 12.14. Interception of Information in the Browser | |||
Most information passed through the web-browser is susceptible to | Most information passed through the web-browser is susceptible to | |||
interception and possible manipulation by elements within the browser | interception and possible manipulation by elements within the browser | |||
such as scripts loaded within pages. Information in the URL is | such as scripts loaded within pages. Information in the URL is | |||
exposed through browser and server logs, and can also leak to other | exposed through browser and server logs, and can also leak to other | |||
parties through HTTP "Referrer" headers. | parties through HTTP Referrer headers. | |||
GNAP's design limits the information passed directly through the | GNAP's design limits the information passed directly through the | |||
browser, allowing for opaque URLs in most circumstances. For the | browser, allowing for opaque URLs in most circumstances. For the | |||
redirect-based interaction finish mechanism, named query parameters | redirect-based interaction finish mechanism, named query parameters | |||
are used to carry unguessable opaque values. For these, GNAP | are used to carry unguessable opaque values. For these, GNAP | |||
requires creation and validation of a cryptographic hash to protect | requires creation and validation of a cryptographic hash to protect | |||
the query parameters added to the URL and associate them with an | the query parameters added to the URL and associate them with an | |||
ongoing grant process. The client instance has to properly validate | ongoing grant process. The client instance has to properly validate | |||
this hash to prevent an attacker from injecting an interaction | this hash to prevent an attacker from injecting an interaction | |||
reference intended for a different AS or client instance. | reference intended for a different AS or client instance. | |||
Several interaction start mechanisms use URLs created by the AS and | Several interaction start mechanisms use URLs created by the AS and | |||
passed to the client instance. While these URLs are opaque to the | passed to the client instance. While these URLs are opaque to the | |||
client instance, it's possible for the AS to include parameters, | client instance, it's possible for the AS to include parameters, | |||
paths, and other pieces of information that could leak security data | paths, and other pieces of information that could leak security data | |||
or be manipulated by a party in the middle of the transaction. | or be manipulated by a party in the middle of the transaction. | |||
12.14. Callback URL Manipulation | 12.15. Callback URL Manipulation | |||
The callback URL used in interaction finish mechanisms is defined by | The callback URL used in interaction finish mechanisms is defined by | |||
the client instance. This URL is opaque to the AS, but can contain | the client instance. This URL is opaque to the AS, but can contain | |||
information relevant to the client instance's operations. In | information relevant to the client instance's operations. In | |||
particular, the client instance can include state information to | particular, the client instance can include state information to | |||
allow the callback request to be associated with an ongoing grant | allow the callback request to be associated with an ongoing grant | |||
request. | request. | |||
Since this URL is exposed to the end-user's browser, it is | Since this URL is exposed to the end-user's browser, it is | |||
susceptible to both logging and manipulation in transit before the | susceptible to both logging and manipulation in transit before the | |||
skipping to change at page 121, line 11 ¶ | skipping to change at page 123, line 11 ¶ | |||
software includes a post-redirect target URL in its callback URL to | software includes a post-redirect target URL in its callback URL to | |||
the AS, this target URL could be manipulated by an attacker, creating | 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 open redirector at the client. Instead, a client instance can use | |||
an unguessable identifier into the URL that can then be used by the | 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 | client software to look up the details of the pending request. Since | |||
this approach requires some form of statefulness by the client | this approach requires some form of statefulness by the client | |||
software during the redirection process, clients that are not capable | software during the redirection process, clients that are not capable | |||
of holding state through a redirect should not use redirect-based | of holding state through a redirect should not use redirect-based | |||
interaction mechanisms. | interaction mechanisms. | |||
12.15. MTLS Deployment Patterns | 12.16. MTLS Message Integrity | |||
The MTLS key proofing mechanism (Section 7.3.2) provides a means for | ||||
a client instance to present a key using a certificate the TLS layer. | ||||
Since TLS protects the entire HTTP message in transit, verification | ||||
of the TLS client certificate presented with the message provides a | ||||
sufficient binding between the two. However, since TLS is | ||||
functioning at a separate layer from HTTP, there is no direct | ||||
connection between the TLS key presentation and the message itself, | ||||
other than the fact that the message was presented over the TLS | ||||
channel. That is to say, any HTTP message can be presented over the | ||||
TLS channel in question with the same level of trust. The verifier | ||||
is responsible for ensuring the key in the TLS client certificate is | ||||
the one expected for a particular request. For example, if the | ||||
request is a grant request (request), the AS needs to compare the TLS | ||||
client certificate presented at the TLS layer to the key identified | ||||
in the request body itself (either by value or through a referenced | ||||
identifier). | ||||
Furthermore, the prevalence of the TLS-terminating reverse proxy | ||||
(TTRP) pattern in deployments adds a wrinkle to the situation. In | ||||
this common pattern, the TTRP validates the TLS connection and then | ||||
forwards the HTTP message contents onward to an internal system for | ||||
processing. The system processing the HTTP message no longer has | ||||
access to the original TLS connection's information and context. To | ||||
compensate for this, the TTRP could inject the TLS client certificate | ||||
into the forwarded request as a header parameter using | ||||
[I-D.ietf-httpbis-client-cert-field], giving the downstream system | ||||
access to the certificate information. The TTRP has to be trusted to | ||||
provide accurate certificate information, and the connection between | ||||
the TTRP and the downstream system also has to be protected. The | ||||
TTRP could provide some additional assurance, for example, by adding | ||||
its own signature to the Client-Cert header field using | ||||
[I-D.ietf-httpbis-message-signatures]. This signature would be | ||||
effectively ignored by GNAP but understood by the downstream service | ||||
as part of its deployment. | ||||
Additional considerations for different types of deployment patterns | ||||
and key distribution mechanisms for MTLS are found in Section 12.17. | ||||
12.17. MTLS Deployment Patterns | ||||
GNAP does not specify how a client instance's keys could be made | GNAP does not specify how a client instance's keys could be made | |||
known to the AS ahead of time. Public Key Infrastructure (PKI) can | known to the AS ahead of time. Public Key Infrastructure (PKI) can | |||
be used to manage the keys used by client instances when calling the | 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. | AS, allowing the AS to trust a root key from a trusted authority. | |||
This method is particularly relevant to the MTLS signature method, | This method is particularly relevant to the MTLS key proofing method, | |||
where the client instance presents its certificate to the AS as part | where the client instance presents its certificate to the AS as part | |||
of the TLS connection. An AS using PKI to validate the MTLS | of the TLS connection. An AS using PKI to validate the MTLS | |||
connection would need to ensure that the presented certificate was | connection would need to ensure that the presented certificate was | |||
issued by a trusted certificate authority before allowing the | issued by a trusted certificate authority before allowing the | |||
connection to continue. PKI-based certificates would allow a key to | connection to continue. PKI-based certificates would allow a key to | |||
be revoked and rotated through management at the certificate | be revoked and rotated through management at the certificate | |||
authority without requiring additional registration or management at | authority without requiring additional registration or management at | |||
the AS. PKI has historically been difficult to deploy, especially at | the AS. PKI has historically been difficult to deploy, especially at | |||
scale, but it remains an appropriate solution for systems where the | scale, but it remains an appropriate solution for systems where the | |||
required overhead is not an impediment. | required overhead is not an impediment. | |||
MTLS need not use a PKI backing, as self-signed certificates and | MTLS in GNAP need not use a PKI backing, as self-signed certificates | |||
certificates from untrusted authorities can still be presented as | and certificates from untrusted authorities can still be presented as | |||
part of a TLS connection. In this case, the AS or RS would validate | part of a TLS connection. In this case, the verifier would validate | |||
the connection but accept whatever certificate was presented by the | the connection but accept whatever certificate was presented by the | |||
client software. This specific certificate would then be bound to | client software. This specific certificate would then be bound to | |||
all future connections from that client software by being bound to | all future connections from that client software by being bound to | |||
the resulting access tokens. | the resulting access tokens. See Section 12.16 for more | |||
considerations on MTLS as a key proofing mechanism. | ||||
12.16. Interception of Responses from the AS | 12.18. Interception of Responses from the AS | |||
Responses from the AS contain information vital to both the security | Responses from the AS contain information vital to both the security | |||
and privacy operations of GNAP. This information includes nonces | and privacy operations of GNAP. This information includes nonces | |||
used in cryptographic calculations, subject identifiers, assertions, | used in cryptographic calculations, subject identifiers, assertions, | |||
public keys, and information about what client software is requesting | public keys, and information about what client software is requesting | |||
and was granted. | and was granted. | |||
In addition, if bearer tokens are used or keys are issued alongside a | In addition, if bearer tokens are used or keys are issued alongside a | |||
bound access token, the response from the AS contains all information | bound access token, the response from the AS contains all information | |||
necessary for use of the contained access token. Any party that is | necessary for use of the contained access token. Any party that is | |||
capable of viewing such a response, such as an intermediary proxy, | capable of viewing such a response, such as an intermediary proxy, | |||
would be able to exfiltrate and use this token. If the access token | would be able to exfiltrate and use this token. If the access token | |||
is instead bound to the client instance's presented key, | is instead bound to the client instance's presented key, | |||
intermediaries no longer have sufficient information to use the | intermediaries no longer have sufficient information to use the | |||
token. They can still, however, gain information about the end user | token. They can still, however, gain information about the end user | |||
as well as the actions of the client software. | as well as the actions of the client software. | |||
12.17. Key Distribution | 12.19. Key Distribution | |||
The keys for client instances could be distributed as part of the | The keys for client instances could be distributed as part of the | |||
deployment process of instances of the client software. For example, | deployment process of instances of the client software. For example, | |||
an application installation framework could generate a keypair for | an application installation framework could generate a keypair for | |||
each copy of client software, then both install it into the client | each copy of client software, then both install it into the client | |||
software upon installation and registering that instance with the AS. | software upon installation and registering that instance with the AS. | |||
Additionally, it's possible for the AS to generate keys to be used | 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 | with access tokens that are separate from the keys used by the client | |||
instance to request tokens. In this method, the AS would generate | instance to request tokens. In this method, the AS would generate | |||
the asymmetric keypair or symmetric key and return the entire key, | the asymmetric keypair or symmetric key and return the entire key, | |||
including all private signing information, to the client instance | including all private signing information, to the client instance | |||
alongside the access token itself. This approach would make | alongside the access token itself. This approach would make | |||
interception of the return from the token endpoint equivalent to that | interception of the return from the token endpoint equivalent to that | |||
of a bearer token, since all information required to use the access | of a bearer token, since all information required to use the access | |||
token would be present in the request. | token would be present in the request. | |||
12.18. Interaction Finish Modes and Polling | 12.20. Interaction Finish Modes and Polling | |||
During the interaction process, the client instance usually hands | During the interaction process, the client instance usually hands | |||
control of the user experience over to another component, beit the | control of the user experience over to another component, beit the | |||
system browser, another application, or some action the resource | system browser, another application, or some action the resource | |||
owner is instructed to take on another device. By using an | owner is instructed to take on another device. By using an | |||
interaction finish method, the client instance can be securely | interaction finish method, the client instance can be securely | |||
notified by the AS when the interaction is completed and the next | notified by the AS when the interaction is completed and the next | |||
phase of the protocol should occur. This process includes | phase of the protocol should occur. This process includes | |||
information that the client instance can use to validate the finish | information that the client instance can use to validate the finish | |||
call from the AS and prevent some injection, session hijacking, and | call from the AS and prevent some injection, session hijacking, and | |||
skipping to change at page 123, line 28 ¶ | skipping to change at page 126, line 10 ¶ | |||
separate device. The smart device has to poll because the expected | separate device. The smart device has to poll because the expected | |||
behavior is that the interaction will take place on the separate | behavior is that the interaction will take place on the separate | |||
device, without a way to return information to the original device's | device, without a way to return information to the original device's | |||
context. | context. | |||
As such, developers need to weigh the risks of forgoing an | As such, developers need to weigh the risks of forgoing an | |||
interaction finish method against the deployment capabilities of the | interaction finish method against the deployment capabilities of the | |||
client software and its environment. Due to the increased security, | client software and its environment. Due to the increased security, | |||
an interaction finish method should be employed whenever possible. | an interaction finish method should be employed whenever possible. | |||
12.19. Storage of Information During Interaction and Continuation | 12.21. Storage of Information During Interaction and Continuation | |||
When starting an interactive grant request, a client application has | When starting an interactive grant request, a client application has | |||
a number of protocol elements that it needs to manage, including | a number of protocol elements that it needs to manage, including | |||
nonces, references, keys, access tokens, and other elements. During | nonces, references, keys, access tokens, and other elements. During | |||
the interaction process, the client instance usually hands control of | the interaction process, the client instance usually hands control of | |||
the user experience over to another component, beit the system | the user experience over to another component, beit the system | |||
browser, another application, or some action the resource owner is | browser, another application, or some action the resource owner is | |||
instructed to take on another device. In order for the client | instructed to take on another device. In order for the client | |||
instance to make its continuation call, it will need to recall all of | instance to make its continuation call, it will need to recall all of | |||
these protocol elements. Usually this means the client instance will | these protocol elements. Usually this means the client instance will | |||
skipping to change at page 124, line 10 ¶ | skipping to change at page 126, line 41 ¶ | |||
Note that in GNAP, the client instance has to choose its interaction | Note that in GNAP, the client instance has to choose its interaction | |||
finish URL prior to making the first call to the AS. As such, the | 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 | interaction finish URL will often have a unique identifier for the | |||
ongoing request, allowing the client instance to access the correct | ongoing request, allowing the client instance to access the correct | |||
portion of its storage. Since this URL is passed to other parties | portion of its storage. Since this URL is passed to other parties | |||
and often used through a browser, this URL should not contain any | and often used through a browser, this URL should not contain any | |||
security-sensitive information that would be valuable to an attacker, | security-sensitive information that would be valuable to an attacker, | |||
such as any token identifier, nonce, or user information. Instead, a | such as any token identifier, nonce, or user information. Instead, a | |||
cryptographically random value is suggested. | cryptographically random value is suggested. | |||
12.20. Denial of Service (DoS) through Grant Continuation | 12.22. Denial of Service (DoS) through Grant Continuation | |||
When a client instance starts off an interactive process, it will | When a client instance starts off an interactive process, it will | |||
eventually need to continue the grant request in a subsequent message | eventually need to continue the grant request in a subsequent message | |||
to the AS. It's possible for a naive client implementation to | to the AS. It's possible for a naive client implementation to | |||
continuously send continuation requests to the AS while waiting for | continuously send continuation requests to the AS while waiting for | |||
approval, especially if no interaction finish method is used. Such | approval, especially if no interaction finish method is used. Such | |||
constant requests could overwhelm the AS's ability to respond to both | constant requests could overwhelm the AS's ability to respond to both | |||
these and other requests. | these and other requests. | |||
To mitigate this for well-behaved client software, the continuation | To mitigate this for well-behaved client software, the continuation | |||
response contains a "wait" parameter that is intended to tell the | response contains a wait parameter that is intended to tell the | |||
client instance how long it should wait until making its next | client instance how long it should wait until making its next | |||
request. This value can be used to back off client software that is | request. This value can be used to back off client software that is | |||
checking too quickly by returning increasing wait times for a single | checking too quickly by returning increasing wait times for a single | |||
client instance. | client instance. | |||
If client software ignores the "wait" value and makes its | If client software ignores the wait value and makes its continuation | |||
continuation calls too quickly, or if the client software assumes the | calls too quickly, or if the client software assumes the absence of | |||
absence of the "wait" values means it should poll immediately, the AS | the wait values means it should poll immediately, the AS can choose | |||
can choose to return errors to the offending client instance, | to return errors to the offending client instance, including possibly | |||
including possibly canceling the ongoing grant request. With well- | canceling the ongoing grant request. With well-meaning client | |||
meaning client software these errors can indicate a need to change | software these errors can indicate a need to change the client | |||
the client software's programmed behavior. | software's programmed behavior. | |||
12.21. Exhaustion of Random Value Space | 12.23. Exhaustion of Random Value Space | |||
Several parts of the GNAP process make use of unguessable randomized | Several parts of the GNAP process make use of unguessable randomized | |||
values, such as nonces, tokens, and randomized URLs. Since these | values, such as nonces, tokens, and randomized URLs. Since these | |||
values are intended to be unique, a sufficiently powerful attacker | values are intended to be unique, a sufficiently powerful attacker | |||
could make a large number of requests to trigger generation of | could make a large number of requests to trigger generation of | |||
randomized values in an attempt to exhaust the random number | randomized values in an attempt to exhaust the random number | |||
generation space. While this attack is particularly applicable to | generation space. While this attack is particularly applicable to | |||
the AS, client software could likewise be targeted by an attacker | the AS, client software could likewise be targeted by an attacker | |||
triggering new grant requests against an AS. | triggering new grant requests against an AS. | |||
skipping to change at page 125, line 15 ¶ | skipping to change at page 128, line 5 ¶ | |||
For example, the nonces used for interaction finish hash calculation | For example, the nonces used for interaction finish hash calculation | |||
need only to be valid while the client instance is waiting for the | need only to be valid while the client instance is waiting for the | |||
finish callback and can be functionally expired when the interaction | finish callback and can be functionally expired when the interaction | |||
has completed. Similarly, artifacts like access tokens and the | has completed. Similarly, artifacts like access tokens and the | |||
interaction reference can be limited to have lifetimes tied to their | interaction reference can be limited to have lifetimes tied to their | |||
functional utility. Finally, each different category of artifact | functional utility. Finally, each different category of artifact | |||
(nonce, token, reference, identifier, etc.) can be generated from a | (nonce, token, reference, identifier, etc.) can be generated from a | |||
separate random pool of values instead of a single global value | separate random pool of values instead of a single global value | |||
space. | space. | |||
12.24. Front-channel URLs | ||||
Some interaction methods in GNAP make use of URLs accessed through | ||||
the end-user's browser, known collectively as front-channel | ||||
communication. These URLs are most notably present in the redirect | ||||
interaction start method and the redirect interaction finish mode. | ||||
Since these URLs are intended to be given to the end-user, the end | ||||
user and their browser will be subjected to anything hosted at that | ||||
URL including viruses, malware, and phishing scams. This kind of | ||||
risk is inherent to all redirection-based protocols, including GNAP | ||||
when used in this way. | ||||
When talking to a new or unknown AS, a client instance might want to | ||||
check the URL from the interaction start against a blocklist and warn | ||||
the end-user before redirecting them. Many client instances will | ||||
provide an interstitial message prior to redirection in order to | ||||
prepare the user for control of the user experience being handed to | ||||
the domain of the AS, and such a method could be used to warn the | ||||
user of potential threats. For instance, a rogue AS impersonating a | ||||
well-known service provider. Client software can also prevent this | ||||
by managing an allowlist of known and trusted AS's. | ||||
Alternatively, an attacker could start a GNAP request with a known | ||||
and trusted AS but include their own attack site URL as the callback | ||||
for the finish method. The attacker would then send the interaction | ||||
start URL to the victim and get them to click on it. Since the URL | ||||
is at the known AS, the victim is inclined to do so. The victim will | ||||
then be prompted to approve the attacker's application, and in most | ||||
circumstances the victim will then be redirected to the attacker's | ||||
site whether or not the user approved the request. The AS could | ||||
mitigate this partially by using a blocklist and allowlist of | ||||
interaction finish URLs during the client instance's initial request, | ||||
but this approach can be especially difficult if the URL has any | ||||
dynamic portion chosen by the client software. The AS can couple | ||||
these checks with policies associated with the client instance that | ||||
has been authenticated in the request. If the AS has any doubt about | ||||
the interaction finish URL, the AS can provide an interstitial | ||||
warning to the end-user before processing the redirect. | ||||
Ultimately, all protocols that use redirect-based communication | ||||
through the user's browser are susceptible to having an attacker try | ||||
to co-opt one or more of those URLs in order to harm the user. It is | ||||
the responsibility of the AS and the client software to provide | ||||
appropriate warnings, education, and mitigation to protect end users. | ||||
12.25. Processing Assertions | ||||
Identity assertions can be used in GNAP to convey subject | ||||
information, both from the AS to the client instance in a response | ||||
(Section 3.4) and from the client instance to the AS in a request | ||||
(Section 2.2). In both of these circumstances, when an assertion is | ||||
passed in GNAP, the receiver of the assertion needs to parse and | ||||
process the assertion. As assertions are complex artifacts with | ||||
their own syntax and security, special care needs to be taken to | ||||
prevent the assertion values from being used as an attack vector. | ||||
All assertion processing needs to account for the security aspects of | ||||
the assertion format in use. In particular, the processor needs to | ||||
parse the assertion from a JSON string object, and apply the | ||||
appropriate cryptographic processes to ensure the integrity of the | ||||
assertion. | ||||
For example, when SAML 2 assertions are used, the receiver hast to | ||||
parse an XML document. There are many well-known security | ||||
vulnerabilities in XML parsers, and the XML standard itself can be | ||||
attacked through the use of processing instructions and entity | ||||
expansions to cause problems with the processor. Therefore, any | ||||
system capable of processing SAML 2 assertions also needs to have a | ||||
secure and correct XML parser. In addition to this, the SAML 2 | ||||
specification uses XML Signatures, which have their own | ||||
implementation problems that need to be accounted for. Similar | ||||
requirements exist for OpenID Connect's ID token, which is based on | ||||
the JSON Web Token (JWT) format and the related JSON Object Signing | ||||
And Encryption (JOSE) cryptography suite. | ||||
13. Privacy Considerations | 13. Privacy Considerations | |||
The privacy considerations in this section are modeled after the list | The privacy considerations in this section are modeled after the list | |||
of privacy threats in [[RFC6973]], "Privacy Considerations for | of privacy threats in [RFC6973], "Privacy Considerations for Internet | |||
Internet Protocols", and either explain how these threats are | Protocols", and either explain how these threats are mitigated or | |||
mitigated or advise how the threats relate to GNAP. | advise how the threats relate to GNAP. | |||
13.1. Surveillance | 13.1. Surveillance | |||
Surveillance is the observation or monitoring of an individual's | Surveillance is the observation or monitoring of an individual's | |||
communications or activities. Surveillance can be conducted by | communications or activities. Surveillance can be conducted by | |||
observers or eavesdroppers at any point along the communications | observers or eavesdroppers at any point along the communications | |||
path. | path. | |||
GNAP assumes the TLS protection used throughout the spec is intact. | GNAP assumes the TLS protection used throughout the spec is intact. | |||
Without the protection of TLS, there are many points throughout the | Without the protection of TLS, there are many points throughout the | |||
skipping to change at page 126, line 10 ¶ | skipping to change at page 130, line 30 ¶ | |||
role, the authorization server is by definition aware of each | role, the authorization server is by definition aware of each | |||
authorization of a client instance by a user. When the authorization | authorization of a client instance by a user. When the authorization | |||
server shares user information with the client instance, it needs to | server shares user information with the client instance, it needs to | |||
make sure that it has the permission from that user to do so. | make sure that it has the permission from that user to do so. | |||
Additionally, as part of the authorization grant process, the | Additionally, as part of the authorization grant process, the | |||
authorization server may be aware of which resource servers the | authorization server may be aware of which resource servers the | |||
client intends to use an access token at. However, it is possible to | 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 | design a system using GNAP in which this knowledge is not made | |||
available to the authorization server, such as by avoiding the use of | available to the authorization server, such as by avoiding the use of | |||
the "locations" object in the authorization request. | the locations object in the authorization request. | |||
If the authorization server's implementation of access tokens is such | If the authorization server's implementation of access tokens is such | |||
that it requires a resource server call back to the authorization | that it requires a resource server call back to the authorization | |||
server to validate them, then the authorization server will be aware | server to validate them, then the authorization server will be aware | |||
of which resource servers are actively in use and by which users and | of which resource servers are actively in use and by which users and | |||
which clients. To avoid this possibility, the authorization server | which clients. To avoid this possibility, the authorization server | |||
would need to structure access tokens in such a way that they can be | would need to structure access tokens in such a way that they can be | |||
validated by the resource server without notifying the authorization | validated by the resource server without notifying the authorization | |||
server that the token is being validated. | server that the token is being validated. | |||
skipping to change at page 128, line 10 ¶ | skipping to change at page 132, line 32 ¶ | |||
Unrelated resource servers also have an opportunity to correlate | Unrelated resource servers also have an opportunity to correlate | |||
users if the authorization server includes stable user identifiers in | users if the authorization server includes stable user identifiers in | |||
access tokens or in access token introspection responses. | access tokens or in access token introspection responses. | |||
In some cases a resource server may not actually need to be able to | 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 | identify users, (such as a resource server providing access to a | |||
company cafeteria menu which only needs to validate whether the user | company cafeteria menu which only needs to validate whether the user | |||
is a current employee), so authorization servers should be thoughtful | is a current employee), so authorization servers should be thoughtful | |||
of when user identifiers are actually necessary to communicate to | of when user identifiers are actually necessary to communicate to | |||
resource servers for the functionining of the system. | resource servers for the functioning of the system. | |||
However, note that the lack of inclusion of a user identifier in an | ||||
access token may be a risk if there is a concern that two users may | ||||
voluntarily share access tokens between them in order to access | ||||
protected resources. For example, if a website wants to limit access | ||||
to only people over 18, and such does not need to know any user | ||||
identifiers, an access token may be issued by an AS contains only the | ||||
claim "over 18". If the user is aware that this access token doesn't | ||||
reference them individually, they may be willing to share the access | ||||
token with a user who is under 18 in order to let them get access to | ||||
the website. (Note that the binding of an access token to a non- | ||||
extractable client instance key also prevents the access token from | ||||
being voluntarily shared.) | ||||
13.4.3. Correlation by Authorization Servers | 13.4.3. Correlation by Authorization Servers | |||
Clients are expected to be identified by their client instance key. | Clients are expected to be identified by their client instance key. | |||
If a particular client instance key is used at more than one | If a particular client instance key is used at more than one | |||
authorization server, this could open up the possibility for multiple | authorization server, this could open up the possibility for multiple | |||
unrelated authorization servers to correlate client instances. This | unrelated authorization servers to correlate client instances. This | |||
is especially a problem in the common case where a client instance is | is especially a problem in the common case where a client instance is | |||
used by a single individual, as it would allow the authorization | used by a single individual, as it would allow the authorization | |||
servers to correlate that individual between them. If this is a | servers to correlate that individual between them. If this is a | |||
concern of a client, the client should use distinct keys with each | concern of a client, the client should use distinct keys with each | |||
authorization server. | authorization server. | |||
13.5. Disclosure in Shared References | 13.5. Disclosure in Shared References | |||
Throughout many parts of GNAP, the parties pass shared references | Throughout many parts of GNAP, the parties pass shared references | |||
between each other, sometimes in place of the values themselves. For | between each other, sometimes in place of the values themselves. For | |||
example the "interact_ref" value used throughout the flow. These | example the interact_ref value used throughout the flow. These | |||
references are intended to be random strings and should not contain | references are intended to be random strings and should not contain | |||
any private or sensitive data that would potentially leak information | any private or sensitive data that would potentially leak information | |||
between parties. | between parties. | |||
14. References | 14. References | |||
14.1. Normative 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.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-01, 12 July 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-01.txt>. | |||
[I-D.ietf-httpbis-digest-headers] | ||||
Polli, R. and L. Pardue, "Digest Fields", Work in | ||||
Progress, Internet-Draft, draft-ietf-httpbis-digest- | ||||
headers-06, 27 September 2021, | ||||
<https://www.ietf.org/archive/id/draft-ietf-httpbis- | ||||
digest-headers-06.txt>. | ||||
[I-D.ietf-httpbis-message-signatures] | [I-D.ietf-httpbis-message-signatures] | |||
Backman, A., Richer, J., and M. Sporny, "HTTP Message | Backman, A., Richer, J., and M. Sporny, "HTTP Message | |||
Signatures", Work in Progress, Internet-Draft, draft-ietf- | Signatures", Work in Progress, Internet-Draft, draft-ietf- | |||
httpbis-message-signatures-06, 13 August 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-06.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-07, 12 September 2021, | Draft, draft-ietf-oauth-rar-08, 18 October 2021, | |||
<https://www.ietf.org/archive/id/draft-ietf-oauth-rar- | <https://www.ietf.org/archive/id/draft-ietf-oauth-rar- | |||
07.txt>. | 08.txt>. | |||
[I-D.ietf-oauth-signed-http-request] | ||||
Richer, J., Bradley, J., and H. Tschofenig, "A Method for | ||||
Signing HTTP Requests for OAuth", Work in Progress, | ||||
Internet-Draft, draft-ietf-oauth-signed-http-request-03, 8 | ||||
August 2016, <https://www.ietf.org/archive/id/draft-ietf- | ||||
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 | |||
Security Event Tokens", Work in Progress, Internet-Draft, | Security Event Tokens", Work in Progress, Internet-Draft, | |||
draft-ietf-secevent-subject-identifiers-08, 24 May 2021, | draft-ietf-secevent-subject-identifiers-08, 24 May 2021, | |||
<https://www.ietf.org/archive/id/draft-ietf-secevent- | <https://www.ietf.org/archive/id/draft-ietf-secevent- | |||
subject-identifiers-08.txt>. | subject-identifiers-08.txt>. | |||
[OIDC] Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and | [OIDC] Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and | |||
C. Mortimore, "OpenID Connect Core 1.0 incorporating | C. Mortimore, "OpenID Connect Core 1.0 incorporating | |||
errata set 1", November 2014, | errata set 1", November 2014, | |||
<https://openiD.net/specs/openiD-connect-core-1_0.html>. | <https://openid.net/specs/openid-connect-core-1_0.html>. | |||
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
<https://www.rfc-editor.org/info/rfc2119>. | <https://www.rfc-editor.org/info/rfc2119>. | |||
[RFC3230] Mogul, J. and A. Van Hoff, "Instance Digests in HTTP", | [RFC3230] Mogul, J. and A. Van Hoff, "Instance Digests in HTTP", | |||
RFC 3230, DOI 10.17487/RFC3230, January 2002, | RFC 3230, DOI 10.17487/RFC3230, January 2002, | |||
<https://www.rfc-editor.org/info/rfc3230>. | <https://www.rfc-editor.org/info/rfc3230>. | |||
skipping to change at page 131, line 18 ¶ | skipping to change at page 136, line 11 ¶ | |||
<https://www.rfc-editor.org/info/rfc8792>. | <https://www.rfc-editor.org/info/rfc8792>. | |||
14.2. Informative References | 14.2. Informative References | |||
[attack-surfaces] | [attack-surfaces] | |||
Axeland, Å. and O. Oueidat, "Security Analysis of Attack | Axeland, Å. and O. Oueidat, "Security Analysis of Attack | |||
Surfaces on the Grant Negotiation and Authorization | Surfaces on the Grant Negotiation and Authorization | |||
Protocol", 2021, | Protocol", 2021, | |||
<https://odr.chalmers.se/handle/20.500.12380/304105>. | <https://odr.chalmers.se/handle/20.500.12380/304105>. | |||
[I-D.ietf-httpbis-client-cert-field] | ||||
Campbell, B. and M. Bishop, "Client-Cert HTTP Header | ||||
Field: Conveying Client Certificate Information from TLS | ||||
Terminating Reverse Proxies to Origin Server | ||||
Applications", Work in Progress, Internet-Draft, draft- | ||||
ietf-httpbis-client-cert-field-00, 8 June 2021, | ||||
<https://www.ietf.org/archive/id/draft-ietf-httpbis- | ||||
client-cert-field-00.txt>. | ||||
[promise-theory] | [promise-theory] | |||
Burgess, M. and J. Bergstra, "Promise theory", January | Burgess, M. and J. Bergstra, "Promise theory", January | |||
2014, <http://markburgess.org/promises.html>. | 2014, <http://markburgess.org/promises.html>. | |||
[RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., | [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., | |||
Morris, J., Hansen, M., and R. Smith, "Privacy | Morris, J., Hansen, M., and R. Smith, "Privacy | |||
Considerations for Internet Protocols", RFC 6973, | Considerations for Internet Protocols", RFC 6973, | |||
DOI 10.17487/RFC6973, July 2013, | DOI 10.17487/RFC6973, July 2013, | |||
<https://www.rfc-editor.org/info/rfc6973>. | <https://www.rfc-editor.org/info/rfc6973>. | |||
Appendix A. Document History | Appendix A. Document History | |||
* -08 | ||||
- Update definition for "Client" to account for the case of no | ||||
end-user. | ||||
- Change definition for "Subject". | ||||
- Expanded security and privacy considerations for more | ||||
situations. | ||||
- Added cross-links from security and privacy considerations. | ||||
- Editorial updates. | ||||
* -07 | * -07 | |||
- Replace user handle by opaque identifier | - Replace user handle by opaque identifier | |||
- Added trust relationships | - Added trust relationships | |||
- Added privacy considerations section | - Added privacy considerations section | |||
- Added security considerations. | - 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 | |||
skipping to change at page 138, line 32 ¶ | skipping to change at page 144, line 13 ¶ | |||
identifier to identify itself in future requests (Section 2.3.1). | identifier to identify itself in future requests (Section 2.3.1). | |||
HTTP/1.1 200 OK | HTTP/1.1 200 OK | |||
Content-Type: application/json | Content-Type: application/json | |||
Cache-Control: no-store | Cache-Control: no-store | |||
{ | { | |||
"interact": { | "interact": { | |||
"redirect": | "redirect": | |||
"https://server.example.com/interact/4CF492MLVMSW9MKM", | "https://server.example.com/interact/4CF492MLVMSW9MKM", | |||
"push": "MBDOFXG4Y5CVJCX821LH" | "finish": "MBDOFXG4Y5CVJCX821LH" | |||
} | } | |||
"continue": { | "continue": { | |||
"access_token": { | "access_token": { | |||
"value": "80UPRY5NM33OMUKMKSKU" | "value": "80UPRY5NM33OMUKMKSKU" | |||
}, | }, | |||
"uri": "https://server.example.com/continue" | "uri": "https://server.example.com/continue" | |||
}, | }, | |||
"instance_id": "7C7C4AZ9KHRS6X63AJAO" | "instance_id": "7C7C4AZ9KHRS6X63AJAO" | |||
} | } | |||
skipping to change at page 139, line 39 ¶ | skipping to change at page 145, line 17 ¶ | |||
Content-Type: application/json | Content-Type: application/json | |||
Authorization: GNAP 80UPRY5NM33OMUKMKSKU | Authorization: GNAP 80UPRY5NM33OMUKMKSKU | |||
Signature-Input: sig1=... | Signature-Input: sig1=... | |||
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 | |||
bearer access token and returns this to the client instance. | an access token and returns this to the client instance. | |||
NOTE: '\' line wrapping per RFC 8792 | NOTE: '\' line wrapping per RFC 8792 | |||
HTTP/1.1 200 OK | HTTP/1.1 200 OK | |||
Content-Type: application/json | Content-Type: application/json | |||
Cache-Control: no-store | Cache-Control: no-store | |||
{ | { | |||
"access_token": { | "access_token": { | |||
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", | |||
skipping to change at page 141, line 26 ¶ | skipping to change at page 147, line 26 ¶ | |||
], | ], | |||
}, | }, | |||
"client": "7C7C4AZ9KHRS6X63AJAO", | "client": "7C7C4AZ9KHRS6X63AJAO", | |||
"interact": { | "interact": { | |||
"start": ["redirect", "user_code"] | "start": ["redirect", "user_code"] | |||
} | } | |||
} | } | |||
The AS processes this and determines that the RO needs to interact. | The AS processes this and determines that the RO needs to interact. | |||
The AS supports both redirect URIs and user codes for interaction, so | The AS supports both redirect URIs and user codes for interaction, so | |||
it includes both. Since there is no "callback" the AS does not | it includes both. Since there is no interaction finish mode, the AS | |||
include a nonce, but does include a "wait" parameter on the | does not include a nonce, but does include a "wait" parameter on the | |||
continuation section because it expects the client instance to poll | continuation section because it expects the client instance to poll | |||
for results. | for results. | |||
HTTP/1.1 200 OK | HTTP/1.1 200 OK | |||
Content-Type: application/json | Content-Type: application/json | |||
Cache-Control: no-store | Cache-Control: no-store | |||
{ | { | |||
"interact": { | "interact": { | |||
"redirect": "https://srv.ex/MXKHQ", | "redirect": "https://srv.ex/MXKHQ", | |||
skipping to change at page 148, line 11 ¶ | skipping to change at page 154, line 11 ¶ | |||
] | ] | |||
} | } | |||
} | } | |||
D.5. Applying OAuth 2.0 Scopes and Client IDs | D.5. Applying OAuth 2.0 Scopes and Client IDs | |||
While GNAP is not designed to be directly compatible with OAuth 2.0 | While GNAP is not designed to be directly compatible with OAuth 2.0 | |||
[RFC6749], considerations have been made to enable the use of OAuth | [RFC6749], considerations have been made to enable the use of OAuth | |||
2.0 concepts and constructs more smoothly within GNAP. | 2.0 concepts and constructs more smoothly within GNAP. | |||
In this scenario, the client developer has a "client_id" and set of | In this scenario, the client developer has a client_id and set of | |||
"scope" values from their OAuth 2.0 system and wants to apply them to | scope values from their OAuth 2.0 system and wants to apply them to | |||
the new protocol. Traditionally, the OAuth 2.0 client developer | the new protocol. 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 | 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\ | |||
skipping to change at page 149, line 30 ¶ | skipping to change at page 155, line 30 ¶ | |||
"interact": { | "interact": { | |||
"start": ["redirect"], | "start": ["redirect"], | |||
"finish": { | "finish": { | |||
"method": "redirect", | "method": "redirect", | |||
"uri": "https://client.example.net/return?state=123455", | "uri": "https://client.example.net/return?state=123455", | |||
"nonce": "LKLTI25DK82FX4T4QFZC" | "nonce": "LKLTI25DK82FX4T4QFZC" | |||
} | } | |||
} | } | |||
} | } | |||
The "client_id" can be used to identify the client instance's keys | The client_id can be used to identify the client instance's keys that | |||
that it uses for authentication, the scopes represent resources that | it uses for authentication, the scopes represent resources that the | |||
the client instance is requesting, and the "redirect_uri" and "state" | client instance is requesting, and the redirect_uri and state value | |||
value are pre-combined into a "finish" URI that can be unique per | are pre-combined into a finish URI that can be unique per request. | |||
request. The client instance additionally creates a nonce to protect | The client instance additionally creates a nonce to protect the | |||
the callback, separate from the state parameter that it has added to | callback, separate from the state parameter that it has added to its | |||
its return URL. | return URL. | |||
From here, the protocol continues as above. | From here, the protocol continues as above. | |||
Appendix E. JSON Structures and Polymorphism | Appendix E. JSON Structures and Polymorphism | |||
GNAP makes use of polymorphism within the JSON [RFC8259] structures | GNAP makes use of polymorphism within the JSON [RFC8259] structures | |||
used for the protocol. Each portion of this protocol is defined in | used for the protocol. Each portion of this protocol is defined in | |||
terms of the JSON data type that its values can take, whether it's a | terms of the JSON data type that its values can take, whether it's a | |||
string, object, array, boolean, or number. For some fields, | string, object, array, boolean, or number. For some fields, | |||
different data types offer different descriptive capabilities and are | different data types offer different descriptive capabilities and are | |||
End of changes. 246 change blocks. | ||||
612 lines changed or deleted | 880 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/ |