idnits 2.17.1 draft-richer-oauth-introspection-05.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 (July 3, 2014) is 3583 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 July 3, 2014 5 Expires: January 4, 2015 7 OAuth Token Introspection 8 draft-richer-oauth-introspection-05 10 Abstract 12 This specification defines a method for a client or protected 13 resource to query an OAuth authorization server to determine meta- 14 information about an OAuth token. 16 Requirements Language 18 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 19 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 20 document are to be interpreted as described in RFC 2119 [RFC2119]. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on January 4, 2015. 39 Copyright Notice 41 Copyright (c) 2014 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 57 2. Introspection Endpoint . . . . . . . . . . . . . . . . . . . 2 58 2.1. Introspection Request . . . . . . . . . . . . . . . . . . 3 59 2.2. Introspection Response . . . . . . . . . . . . . . . . . 3 60 2.3. Non-normative Example . . . . . . . . . . . . . . . . . . 4 61 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 62 4. Security Considerations . . . . . . . . . . . . . . . . . . . 5 63 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 64 6. Normative References . . . . . . . . . . . . . . . . . . . . 6 65 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 6 67 1. Introduction 69 In OAuth, the contents of tokens are opaque to clients. This means 70 that the client does not need to know anything about the content or 71 structure of the token itself, if there is any. However, there is 72 still a large amount of metadata that may be attached to a token, 73 such as its current validity, approved scopes, and extra information 74 about the authentication context in which the token was issued. 75 These pieces of information are often vital to Protected Resources 76 making authorization decisions based on the tokens being presented. 77 Since OAuth2 defines no direct relationship between the Authorization 78 Server and the Protected Resource, only that they must have an 79 agreement on the tokens themselves, there have been many different 80 approaches to bridging this gap. 82 This specification defines an Introspection Endpoint that allows the 83 holder of a token to query the Authorization Server to discover the 84 set of metadata for a token. A Protected Resource may use the 85 mechanism described in this draft to query the Introspection Endpoint 86 in a particular authorization decision context and ascertain the 87 relevant metadata about the token in order to make this authorization 88 decision appropriately. 90 2. Introspection Endpoint 92 The Introspection Endpoint is an OAuth 2 Endpoint that responds to 93 HTTP POST requests (and optionally HTTP GET requests) from token 94 holders, particularly including Resource Servers and Clients. The 95 endpoint takes a single parameter representing the token (and 96 optionally further authentication) and returns a JSON document 97 representing the meta information surrounding the token. 99 The endpoint MUST be protected by TLS or equivalent. 101 2.1. Introspection Request 103 token REQUIRED. The string value of the token. 105 resource_id OPTIONAL. A service-specific string identifying the 106 resource that the client doing the introspection is asking about. 108 token_type_hint OPTIONAL. A hint about the type of the token 109 submitted for introspection. Clients MAY pass this parameter in 110 order to help the authorization server to optimize the token 111 lookup. If the server is unable to locate the token using the 112 given hint, it MUST extend its search accross all of its supported 113 token types. An authorization server MAY ignore this parameter, 114 particularly if it is able to detect the token type automatically. 115 Values for this field are defined in OAuth Token Revocation 116 [RFC7009]. 118 The endpoint MAY allow other parameters to provide context to the 119 query. For instance, an authorization service may need to know the 120 IP address of the Client in order to determine the appropriateness of 121 the token being presented. 123 The endpoint SHOULD also require some form of authentication to 124 access this endpoint, such as the Client Authentication as described 125 in OAuth 2.0 [RFC6749] or a separate OAuth 2.0 Access Token such as 126 the Bearer token described in OAuth 2.0 Bearer Token Usage [RFC6750]. 127 The methods of managing and validating these authentication 128 credentials are out of scope of this specification. 130 2.2. Introspection Response 132 The server responds with a JSON object [RFC4627] in "application/ 133 json" format with the following top-level members. Specific 134 implementations MAY extend this structure with their own service- 135 specific pieces of information. 137 active REQUIRED. Boolean indicator of whether or not the presented 138 token is currently active. 140 exp OPTIONAL. Integer timestamp, measured in the number of seconds 141 since January 1 1970 UTC, indicating when this token will expire. 143 iat OPTIONAL. Integer timestamp, measured in the number of seconds 144 since January 1 1970 UTC, indicating when this token was 145 originally issued. 147 scope OPTIONAL. A space-separated list of strings representing the 148 scopes associated with this token, in the format described in 149 Section 3.3 of OAuth 2.0 [RFC6749]. 151 client_id OPTIONAL. Client Identifier for the OAuth Client that 152 requested this token. 154 sub OPTIONAL. Machine-readable identifier local to the AS of the 155 Resource Owner who authorized this token. 157 user_id OPTIONAL. Human-readable identifier for the user who 158 authorized this token. 160 aud OPTIONAL. Service-specific string identifier or list of string 161 identifiers representing the intended audience for this token. 163 token_type OPTIONAL. Type of the token as defined in OAuth 2.0 164 section 5.1. 166 2.3. Non-normative Example 168 For example, a Protected Resource accepts a request from a Client 169 carrying an OAuth2 Bearer Token. In order to know how and whether to 170 serve the request, the Protected Resource then makes the following 171 request to the Introspection Endpoint of the Authorization Server. 172 The Protected Resource is here authenticating with its own Client ID 173 and Client Secret as per OAuth2 [RFC6749] Section 2.3.1. 175 Following is a non-normative example request (with line wraps for 176 display purposes only): 178 POST /register HTTP/1.1 179 Accept: application/x-www-form-urlencoded 180 Host: server.example.com 181 Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3 183 token=X3241Affw.4233-99JXJ 185 The Authorization Server validates the client credentials and looks 186 up the information in the token. If the token is currently active, 187 it returns the following JSON document. 189 Following is a non-normative example active token response (with line 190 wraps for display purposes only): 192 HTTP/1.1 200 OK 193 Content-Type: application/json 194 Cache-Control: no-store 196 { 197 "active": true, 198 "client_id":"s6BhdRkqt3", 199 "scope": "read write dolphin", 200 "sub": "2309fj32kl", 201 "aud": "http://example.org/protected-resource/*" 202 } 204 If the token presented is not currently active (but the 205 authentication presented during the request is valid), it returns the 206 following JSON document. 208 Following is a non-normative example response to an inactive or 209 invalid token (with line wraps for display purposes only): 211 HTTP/1.1 200 OK 212 Content-Type: application/json 213 Cache-Control: no-store 215 { 216 "active": false 217 } 219 If the client credentials are invalid or there is another error, the 220 Authorization Server responds with an HTTP 400 (Bad Request) as 221 described in OAuth 2.0 section 5.2 [RFC6749]. 223 3. IANA Considerations 225 This document makes no request of IANA. 227 4. Security Considerations 229 If left unprotected and un-throttled, the Introspection Endpoint 230 could present a means for an attacker to poll a series of possible 231 token values, fishing for a valid token. Therefore, the 232 Authorization Server SHOULD issue special client credentials to any 233 protected resources or clients that need to access the introspection 234 endpoint. These credentials may be used directly at the endpoint, or 235 they may be exchanged for an OAuth2 Access token scoped specifically 236 for the Introspection Endpoint. 238 Since the introspection endpoint takes in OAuth 2 tokens as 239 parameters, it MUST be protected by TLS or equivalent. A server MAY 240 require an HTTP POST method only to the endpoint. 242 5. Acknowledgements 244 Thanks to the OAuth Working Group and the UMA Working Group for 245 feedback. 247 6. Normative References 249 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 250 Requirement Levels", BCP 14, RFC 2119, March 1997. 252 [RFC4627] Crockford, D., "The application/json Media Type for 253 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 255 [RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework", RFC 256 6749, October 2012. 258 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 259 Framework: Bearer Token Usage", RFC 6750, October 2012. 261 [RFC7009] Lodderstedt, T., Dronia, S., and M. Scurtescu, "OAuth 2.0 262 Token Revocation", RFC 7009, August 2013. 264 Author's Address 266 Justin Richer (editor) 267 The MITRE Corporation 269 Email: jricher@mitre.org