idnits 2.17.1 draft-richer-oauth-introspection-04.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 (May 01, 2013) is 4010 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) == Unused Reference: 'RFC6750' is defined on line 253, but no explicit reference was found in the text ** Obsolete normative reference: RFC 4627 (Obsoleted by RFC 7158, RFC 7159) -- Possible downref: Non-RFC (?) normative reference: ref. 'Revocation' Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 3 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 May 01, 2013 5 Expires: November 02, 2013 7 OAuth Token Introspection 8 draft-richer-oauth-introspection-04 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 November 02, 2013. 39 Copyright Notice 41 Copyright (c) 2013 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 91 The Introspection Endpoint is an OAuth 2 Endpoint that responds to 92 HTTP POST requests (and optionally HTTP GET requests) from token 93 holders, particularly including Resource Servers and Clients. The 94 endpoint takes a single parameter representing the token (and 95 optionally further authentication) and returns a JSON document 96 representing the meta information surrounding the token. 98 The endpoint MUST be protected by TLS or equivalent. 100 2.1. Introspection Request 102 token REQUIRED. The string value of the token. 104 resource_id OPTIONAL. A service-specific string identifying the 105 resource that the client doing the introspection is asking about. 107 token_type_hint OPTIONAL. A hint about the type of the token 108 submitted for revocation. Clients MAY pass this parameter in 109 order to help the authorization server to optimize the token 110 lookup. If the server is unable to locate the token using the 111 given hint, it MUST extend its search accross all of its supported 112 token types. An authorization server MAY ignore this parameter, 113 particularly if it is able to detect the token type automatically. 114 Values for this field are defined in OAuth Token Revocation 115 [Revocation]. 117 The endpoint MAY allow other parameters to provide context to the 118 query. For instance, an authorization service may need to know the 119 IP address of the Client in order to determine the appropriateness of 120 the token being presented. 122 The endpoint SHOULD also require some form of authentication to 123 access this endpoint, such as the Client Authentication as described 124 in OAuth 2 Core Specification [RFC6749] or a separate OAuth 2.0 125 Access Token. The methods of managing and validating these 126 authentication credentials are out of scope of this specification. 128 2.2. Introspection Response 130 The server responds with a JSON object [RFC4627] in "application/ 131 json" format with the following top-level members. Specific 132 implementations MAY extend this structure with their own service- 133 specific pieces of information. 135 active REQUIRED. Boolean indicator of whether or not the presented 136 token is currently active. 138 exp OPTIONAL. Integer timestamp, measured in the number of seconds 139 since January 1 1970 UTC, indicating when this token will expire. 141 iat OPTIONAL. Integer timestamp, measured in the number of seconds 142 since January 1 1970 UTC, indicating when this token was 143 originally issued. 145 scope OPTIONAL. A space-separated list of strings representing the 146 scopes associated with this token, in the format described in 147 Section 3.3 of OAuth 2.0 [RFC6749]. 149 client_id OPTIONAL. Client Identifier for the OAuth Client that 150 requested this token. 152 sub OPTIONAL. Local identifier of the Resource Owner who authorized 153 this token. 155 aud OPTIONAL. Service-specific string identifier or list of string 156 identifiers representing the intended audience for this token. 158 token_type OPTIONAL. Type of the token as defined in OAuth 2.0 159 section 5.1. 161 2.3. Non-normative Example 163 For example, a Protected Resource accepts a request from a Client 164 carrying an OAuth2 Bearer Token. In order to know how and whether to 165 serve the request, the Protected Resource then makes the following 166 request to the Introspection Endpoint of the Authorization Server. 167 The Protected Resource is here authenticating with its own Client ID 168 and Client Secret as per OAuth2 [RFC6749] Section 2.3.1. 170 Following is a non-normative example request (with line wraps for 171 display purposes only): 173 POST /register HTTP/1.1 174 Accept: application/x-www-form-urlencoded 175 Host: server.example.com 176 Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3 178 token=X3241Affw.4233-99JXJ 180 The Authorization Server validates the client credentials and looks 181 up the information in the token. If the token is currently active, 182 it returns the following JSON document. 184 Following is a non-normative example active token response (with line 185 wraps for display purposes only): 187 HTTP/1.1 200 OK 188 Content-Type: application/json 189 Cache-Control: no-store 191 { 192 "active": true, 193 "client_id":"s6BhdRkqt3", 194 "scope": "read write dolphin", 195 "sub": "2309fj32kl", 196 "aud": "http://example.org/protected-resource/*" 197 } 199 If the token presented is not currently active (but the 200 authentication presented is valid), it returns the following JSON 201 document. 203 Following is a non-normative example response to an inactive or 204 invalid token (with line wraps for display purposes only): 206 HTTP/1.1 200 OK 207 Content-Type: application/json 208 Cache-Control: no-store 210 { 211 "active": false 212 } 214 If the client credentials are invalid or there is another error, the 215 Authorization Server responds with an HTTP 400 (Bad Request) as 216 described in OAuth 2.0 section 5.2 [RFC6749]. 218 3. IANA Considerations 220 This document makes no request of IANA. 222 4. Security Considerations 224 If left unprotected and un-throttled, the Introspection Endpoint 225 could present a means for an attacker to poll a series of possible 226 token values, fishing for a valid token. Therefore, the 227 Authorization Server SHOULD issue special client credentials to any 228 protected resources or clients that need to access the introspection 229 endpoint. These credentials may be used directly at the endpoint, or 230 they may be exchanged for an OAuth2 Access token scoped specifically 231 for the Introspection Endpoint. 233 Since the introspection endpoint takes in OAuth 2 tokens as 234 parameters, it MUST be protected by TLS or equivalent. A server MAY 235 require an HTTP POST method only to the endpoint. 237 5. Acknowledgements 239 Thanks to the OAuth Working Group and the UMA Working Group for 240 feedback. 242 6. Normative References 244 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 245 Requirement Levels", BCP 14, RFC 2119, March 1997. 247 [RFC4627] Crockford, D., "The application/json Media Type for 248 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 250 [RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework", RFC 251 6749, October 2012. 253 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 254 Framework: Bearer Token Usage", RFC 6750, October 2012. 256 [Revocation] 257 Lodderstedt, T., "OAuth Token Revocation", April 2013. 259 Author's Address 261 Justin Richer (editor) 262 The MITRE Corporation 264 Email: jricher@mitre.org