OAuth Working Group | P. Hunt, Ed. |
Internet-Draft | Oracle |
Intended status: Informational | T. Nadalin |
Expires: January 4, 2015 | M. Jones |
Microsoft | |
July 3, 2014 |
Providing User Authentication Information to OAuth 2.0 Clients
draft-hunt-oauth-v2-user-a4c-04
This specification defines a way for OAuth 2.0 clients to verify the identity of the End-User and obtain consent based upon the authentication performed by an Authorization Server. The interactions defined by this specification are intentionally compatible with the OpenID Connect protocol.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 4, 2015.
Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
Section 4.1 of the OAuth 2.0 Authorization Framework [RFC6749] defines the Authorization Code Grant flow which defines a redirect flow, typically via a web browser, that enables confidential clients to obtain access and refresh tokens. As part of this flow, resource owners are authenticated via the user agent so that their consent may be obtained.
This document extends the OAuth 2.0 authorization request and response messages for the Authorization Code flow to also request authentication of the End-User and to return information about the authentication performed. The interactions defined by this specification are intentionally compatible with the OpenID Connect [OpenID.Core] protocol. See Appendix A for a description of the features that are present in this specification that are not present in or different from OpenID Connect.
This specification does not define a resource owner profile information API. It is assumed that other APIs such as the SCIM API [I-D.ietf-scim-api] or the OpenID Connect [OpenID.Core] UserInfo Endpoint could be used for this purpose.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].
This specification uses the terms "Access Token", "Authorization Code", "Authorization Endpoint", "Authorization Grant", "Authorization Server", "Client", "Client Authentication", "Client Identifier", "Client Secret", "Grant Type", "Protected Resource", "Redirection URI", "Refresh Token", "Resource Owner", "Resource Server", "Response Type", and "Token Endpoint" defined by OAuth 2.0 [RFC6749], the terms "Claim", "Claim Name", "Claim Value", and "JSON Web Token (JWT)" defined by JSON Web Token (JWT) [I-D.ietf-oauth-json-web-token], the term "User Agent" defined by RFC 2616 [RFC2616].
This specification also defines the following terms:
This specification extends the use of the authorization code flow defined in Section 4.1 of RFC 6749 [RFC6749] in ways that enable clients to request authentication as well as to obtain information about the authentication performed.
In addition to the parameters defined in Section 4.1.1 of RFC 6749 [RFC6749], the following additional parameters and parameter values are defined:
GET /authenticate? response_type=code &client_id=s6BhdRkqt3 &redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb &state=af0ifjsldkj &prompt=login Host: server.example.com
For example, the client directs the User Agent to make the following HTTP request using TLS (with extra line breaks for display purposes only):
The authorization server MUST:
Both when using response_type=code and when using response_type=code_for_id_token, the response is identical to the one described in Section 4.1.2 of RFC 6749 [RFC6749].
In addition to those defined in Section 4.1.2.1 of RFC 6749 [RFC6749], an additional error type is defined. The error value login_required MUST be returned after an authentication request parameter prompt is provided containing value none and the End-User is found to be currently unauthenticated.
When using response_type=code, the token request is identical to the one described in Section 4.1.3 of RFC 6749 [RFC6749]. When using response_type=code_for_id_token, the token request is also identical to the one described in Section 4.1.3 of RFC 6749, except that the grant_type value used MUST be set to code_for_id_token instead of authorization_code.
When the authorization_code grant_type is used, the authorization server issues an access token and optional refresh token as described in Sections 4.1.4 and 5.1 of RFC 6749 [RFC6749]. When the code_for_id_token grant_type is used, the response is the same except that the access token and refresh token are omitted from the response. If the client authentication failed or the request is invalid, the authorization server returns an error response as described in Section 5.2 of RFC 6749.
In addition to the response parameters described in Section 5 of RFC 6749, a JSON Web Token (JWT) [I-D.ietf-oauth-json-web-token] known as an ID Token is returned for both of these grant types using the id_token parameter. The ID Token contains the following claims:
HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 Cache-Control: no-store Pragma: no-cache { "access_token":"2YotnFZFEjr1zCsicMWpAA", "token_type":"example", "expires_in":3600, "refresh_token":"tGzv3JOkF0XG5Qx2TlKWIA", "id_token":"eyJhbGciOiJub25lIn0. eyJpc3MiOiJodHRwczovL3NlcnZlci5leGFtcGxlLmNvbSIsInN1YiI6IjVkZWRjYz hiLTczNWMtNDA1Zi1lMDI5ZiIsImF1ZCI6InM2QmhkUmtxdDMiLCJhdXRoX3RpbWUi OjEzNjc5NTYwOTYsImlhdCI6MTM2Nzk1NjA5OCwiZXhwIjoxMzY4MDQyNDk2LCJhY3 IiOiIyIiwiZXhhbXBsZV9leHRlbnNpb25fcGFyYW1ldGVyIjoiZXhhbXBsZV92YWx1 ZSJ9." }
A non-normative example successful response with an ID Token follows (with line breaks within lines for readability):
As per the JWT specification, the encoded ID Token is separated into parts by the "." character. The first part (eyJhbGciOiJub25lIn0) contains the signature algorithm and in this case decodes as:
{"alg":"none"}
The claim set is then decoded as:
{ "iss":"https://server.example.com", "sub":"5dedcc8b-735c-405f-e029f", "aud":"s6BhdRkqt3", "auth_time":1367956096, "iat":1367956098, "exp":1368042496, "acr":"2", "example_extension_parameter":"example_value" }
If the ID Token contains the claim acr and its value represents an authentication level greater than "2", the ID Token MUST be signed (have a signature alg value other than none) and its signature MUST be validated.
All claims defined above MUST be understood before proceeding. Additional claims/parameters that are not understood MAY be ignored.
The client MUST verify that the auth_time value is not future dated and exp is not a date currently in the past.
Profile URL values issued in the ID Token and MAY be directed identifiers. In other words, the identifier/URL returned is valid only for the aud indicated. This prevents multiple clients and non-OAuth clients from being able to gather and correlate information about individuals authenticated by the OAuth Authorization Server.
This section registers the response_type values defined by this specification in the IANA OAuth Authorization Endpoint Response Types registry defined in RFC 6749 [RFC6749].
This section registers the following parameters in the IANA OAuth Parameters registry defined in RFC 6749 [RFC6749].
This draft carries the same risk profiles as those outlined in the Security Considerations for RFC 6749 [RFC6749] and OAuth 2.0 Threat Model [RFC6819].
[I-D.ietf-oauth-json-web-token] | Jones, M., Bradley, J. and N. Sakimura, "JSON Web Token (JWT)", Internet-Draft draft-ietf-oauth-json-web-token-24, July 2014. |
[ISO29115] | Brackney, D. and E. NIST, "ISO/IEC 29115:2013 Information technology -- Security techniques -- Entity authentication assurance framework", March 2013. |
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. |
[RFC2616] | Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. |
[RFC3339] | Klyne, G. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, July 2002. |
[RFC6711] | Johansson, L., "An IANA Registry for Level of Assurance (LoA) Profiles", RFC 6711, August 2012. |
[RFC6749] | Hardt, D., "The OAuth 2.0 Authorization Framework", RFC 6749, October 2012. |
[I-D.ietf-scim-api] | Hunt, P., Grizzle, K., Ansari, M., Wahlstroem, E. and C. Mortimore, "System for Cross-Domain Identity Management:Protocol", Internet-Draft draft-ietf-scim-api-06, June 2014. |
[NIST_SP-800-63-2] | Burr, W., Dodson, D., Newton, E., Perlner, R., Polk, W., Newton, S. and E. Nabbus, "DRAFT NIST Special Publication 800-63-2: Electronic Authentication Guideline", August 2013. |
[OpenID.Core] | Sakimura, N., Bradley, J., Jones, M., de Medeiros, B. and C. Mortimore, "OpenID Connect Core 1.0", February 2014. |
[RFC6819] | Lodderstedt, T., McGloin, M. and P. Hunt, "OAuth 2.0 Threat Model and Security Considerations", RFC 6819, January 2013. |
This appendix describes the features that are present in this specification that are not present in or different from OpenID Connect [OpenID.Core]. All other features present in both specifications have the same meanings.
New features added by this specification are:
The authors wish to thank the members of the OAuth working group for their contributions and comments.
[[ to be removed by the RFC editor before publication as an RFC ]]
-04
-03
-02
-01 - PJH 2013-08-15
-00 - PJH 2013-04-09