idnits 2.17.1 draft-ietf-oauth-introspection-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (August 22, 2014) is 3534 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 4627 (Obsoleted by RFC 7158, RFC 7159) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 OAuth Working Group J. Richer, Ed. 3 Internet-Draft The MITRE Corporation 4 Intended status: Standards Track August 22, 2014 5 Expires: February 23, 2015 7 OAuth Token Introspection 8 draft-ietf-oauth-introspection-00 10 Abstract 12 This specification defines a method for a client or protected 13 resource to query an OAuth authorization server to validate the 14 active state of an OAuth token and to determine meta-information 15 about an OAuth token. 17 Requirements Language 19 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 20 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 21 document are to be interpreted as described in RFC 2119 [RFC2119]. 23 Status of This Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at http://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on February 23, 2015. 40 Copyright Notice 42 Copyright (c) 2014 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents 47 (http://trustee.ietf.org/license-info) in effect on the date of 48 publication of this document. Please review these documents 49 carefully, as they describe your rights and restrictions with respect 50 to this document. Code Components extracted from this document must 51 include Simplified BSD License text as described in Section 4.e of 52 the Trust Legal Provisions and are provided without warranty as 53 described in the Simplified BSD License. 55 Table of Contents 57 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 58 2. Introspection Endpoint . . . . . . . . . . . . . . . . . . . 2 59 2.1. Introspection Request . . . . . . . . . . . . . . . . . . 3 60 2.2. Introspection Response . . . . . . . . . . . . . . . . . 3 61 2.3. Non-normative Example . . . . . . . . . . . . . . . . . . 4 62 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 63 4. Security Considerations . . . . . . . . . . . . . . . . . . . 6 64 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 65 6. Normative References . . . . . . . . . . . . . . . . . . . . 6 66 Appendix A. Document History . . . . . . . . . . . . . . . . . . 6 67 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7 69 1. Introduction 71 In OAuth, the contents of tokens are opaque to clients. This means 72 that the client does not need to know anything about the content or 73 structure of the token itself, if there is any. However, there is 74 still a large amount of metadata that may be attached to a token, 75 such as its current validity, approved scopes, and extra information 76 about the authentication context in which the token was issued. 77 These pieces of information are often vital to Protected Resources 78 making authorization decisions based on the tokens being presented. 79 Since OAuth2 defines no direct relationship between the Authorization 80 Server and the Protected Resource, only that they must have an 81 agreement on the tokens themselves, there have been many different 82 approaches to bridging this gap. 84 This specification defines an Introspection Endpoint that allows the 85 holder of a token to query the Authorization Server to discover the 86 set of metadata for a token. A Protected Resource may use the 87 mechanism described in this draft to query the Introspection Endpoint 88 in a particular authorization decision context and ascertain the 89 relevant metadata about the token in order to make this authorization 90 decision appropriately. 92 2. Introspection Endpoint 94 The Introspection Endpoint is an OAuth 2 Endpoint that responds to 95 HTTP POST requests (and optionally HTTP GET requests) from token 96 holders, particularly including Resource Servers and Clients. The 97 endpoint takes a single parameter representing the token (and 98 optionally further authentication) and returns a JSON document 99 representing the meta information surrounding the token. 101 The endpoint MUST be protected by TLS or equivalent. 103 2.1. Introspection Request 105 token REQUIRED. The string value of the token. 107 resource_id OPTIONAL. A service-specific string identifying the 108 resource that the client doing the introspection is asking about. 110 token_type_hint OPTIONAL. A hint about the type of the token 111 submitted for introspection. Clients MAY pass this parameter in 112 order to help the authorization server to optimize the token 113 lookup. If the server is unable to locate the token using the 114 given hint, it MUST extend its search accross all of its supported 115 token types. An authorization server MAY ignore this parameter, 116 particularly if it is able to detect the token type automatically. 117 Values for this field are defined in OAuth Token Revocation 118 [RFC7009]. 120 The endpoint MAY allow other parameters to provide context to the 121 query. For instance, an authorization service may need to know the 122 IP address of the Client in order to determine the appropriateness of 123 the token being presented. 125 The endpoint SHOULD also require some form of authentication to 126 access this endpoint, such as the Client Authentication as described 127 in OAuth 2.0 [RFC6749] or a separate OAuth 2.0 Access Token such as 128 the Bearer token described in OAuth 2.0 Bearer Token Usage [RFC6750]. 129 The methods of managing and validating these authentication 130 credentials are out of scope of this specification. 132 2.2. Introspection Response 134 The server responds with a JSON object [RFC4627] in "application/ 135 json" format with the following top-level members. Specific 136 implementations MAY extend this structure with their own service- 137 specific pieces of information. 139 active REQUIRED. Boolean indicator of whether or not the presented 140 token is currently active. 142 exp OPTIONAL. Integer timestamp, measured in the number of seconds 143 since January 1 1970 UTC, indicating when this token will expire. 145 iat OPTIONAL. Integer timestamp, measured in the number of seconds 146 since January 1 1970 UTC, indicating when this token was 147 originally issued. 149 scope OPTIONAL. A space-separated list of strings representing the 150 scopes associated with this token, in the format described in 151 Section 3.3 of OAuth 2.0 [RFC6749]. 153 client_id OPTIONAL. Client Identifier for the OAuth Client that 154 requested this token. 156 sub OPTIONAL. Machine-readable identifier local to the AS of the 157 Resource Owner who authorized this token. 159 user_id OPTIONAL. Human-readable identifier for the user who 160 authorized this token. 162 aud OPTIONAL. Service-specific string identifier or list of string 163 identifiers representing the intended audience for this token. 165 iss OPTIONAL. String representing the issuer of this token. 167 token_type OPTIONAL. Type of the token as defined in OAuth 2.0 168 section 5.1. 170 The response MAY be cached according to HTTP caching headers. 172 2.3. Non-normative Example 174 For example, a Protected Resource recieves a request from a Client 175 carrying an OAuth2 Bearer Token. In order to know how and whether to 176 serve the request, the Protected Resource then makes the following 177 request to the Introspection Endpoint of the Authorization Server. 178 The Protected Resource is here authenticating with its own Client ID 179 and Client Secret as per OAuth2 [RFC6749] Section 2.3.1. 181 Following is a non-normative example request: 183 POST /introspect HTTP/1.1 184 Host: authserver.example.com 185 Content-type: application/x-www-form-urlencoded 186 Accept: application/json 187 Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3 189 token=X3241Affw.4233-99JXJ 190 The Authorization Server validates the client credentials and looks 191 up the information in the token. If the token is currently active, 192 it returns the following JSON document. 194 Following is a non-normative example active token response (with line 195 wraps for display purposes only): 197 HTTP/1.1 200 OK 198 Content-Type: application/json 199 Cache-Control: no-store 201 { 202 "active": true, 203 "client_id":"s6BhdRkqt3", 204 "scope": "read write dolphin", 205 "sub": "2309fj32kl", 206 "user_id": "jdoe", 207 "aud": "https://example.org/protected-resource/*", 208 "iss": "https://authserver.example.com/" 209 } 211 If the token presented is not currently active (but the 212 authentication presented during the request is valid), it returns the 213 following JSON document. 215 Following is a non-normative example response to an inactive or 216 invalid token (with line wraps for display purposes only): 218 HTTP/1.1 200 OK 219 Content-Type: application/json 220 Cache-Control: no-store 222 { 223 "active": false 224 } 226 If the client credentials are invalid or there is another error, the 227 Authorization Server responds with an HTTP 400 (Bad Request) as 228 described in OAuth 2.0 section 5.2 [RFC6749]. 230 3. IANA Considerations 232 This document makes no request of IANA. 234 4. Security Considerations 236 If left unprotected and un-throttled, the Introspection Endpoint 237 could present a means for an attacker to poll a series of possible 238 token values, fishing for a valid token. Therefore, the 239 Authorization Server SHOULD issue special client credentials to any 240 protected resources or clients that need to access the introspection 241 endpoint. These credentials may be used directly at the endpoint, or 242 they may be exchanged for an OAuth2 Access token scoped specifically 243 for the Introspection Endpoint. 245 Since the introspection endpoint takes in OAuth 2 tokens as 246 parameters, it MUST be protected by TLS or equivalent. 248 In order to prevent the access tokens being introspected from leaking 249 into server-side logs via query parameters, a server MAY require an 250 HTTP POST method only to the endpoint. 252 5. Acknowledgements 254 Thanks to the OAuth Working Group and the UMA Working Group for 255 feedback. 257 6. Normative References 259 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 260 Requirement Levels", BCP 14, RFC 2119, March 1997. 262 [RFC4627] Crockford, D., "The application/json Media Type for 263 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 265 [RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework", RFC 266 6749, October 2012. 268 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 269 Framework: Bearer Token Usage", RFC 6750, October 2012. 271 [RFC7009] Lodderstedt, T., Dronia, S., and M. Scurtescu, "OAuth 2.0 272 Token Revocation", RFC 7009, August 2013. 274 Appendix A. Document History 276 - 00 278 o Created initial IETF drafted based on draft-richer-oauth- 279 introspection-06 with no normative changes. 281 Author's Address 283 Justin Richer (editor) 284 The MITRE Corporation 286 Email: jricher@mitre.org