OAuth | P. Hunt, Ed. |
Internet-Draft | Oracle |
Intended status: Informational | T. Nadalin |
Expires: February 28, 2014 | Microsoft |
August 27, 2013 |
OAuth 2.0 User Authentication and Consent For Clients
draft-hunt-oauth-v2-user-a4c-01
This specification defines a new OAuth2 endpoint that enables user authentication session and consent information to be shared with client applications.
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 February 28, 2014.
Copyright (c) 2013 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 flow defines the "Authentication Code Grant" extension which enables clients to request re-authentication and makes authentication session information available to the client in a standardized format.
This document focuses on extending OAuth2 to provide authentication session information only. The specification does not define a standardized resource owner profile information API. It is assumed that other APIs such as the SCIM API [I-D.ietf-scim-api] or Open Identity Connect [OIDC] could be used for this purpose. As part of the session information, a subject profile URL may optionally be provided.
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].
The Authentication Code Grant type is used in exactly the same manor as the Authorization Code Grant Section 4.1 [RFC6749] and has the same features and conditions. The Authorization Code Grant extends the features available by making it possible for clients to test and request re-authenticaiton and authorization as well as obtain login session information at the end of the grant flow.
In addition to the parameters defined in Section 4.1.1 [RFC6749], the following additional parameters 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 xample, 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:
The response is identical to the one described in Section 4.1.2 [RFC6749].
In addition to those defined in Section 4.1.2.1 [RFC6749], an additional "error" type is defined. "unauthenticated_user", MUST be returned after an authentication request parameter prompt is provided containing value "none" and the user is found to be currently unauthenticated.
The access token request is identical to the one described in Section 4.1.3 [RFC6749]. In cases where there is no associated resource API and an access token is not to be issued, the normal OAuth2 token request is still made.
If the access token request is valid and authorized, the authorization server issues an access token and optional refresh token as described in Section 5.1 [RFC6749]with the exception that the issuance of access_token is OPTIONAL. If the request client authentication failed or is invalid, the authorization server returns an error response as described in Section 5.2.
In addition to the parameters described in Section 5, a JSON Web Token (JWT) [I-D.ietf-oauth-json-web-token] known as an id_token is returned containing the following possible 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. eyAic3ViIjoiNWRlZGNjOGItNzM1Yy00MDVmLWUwMjlmIiwicHJvZmlsZSI6Imh0 dHBzOi8vZXhhbXBsZS5jb20vVXNlcnMvNWRlZGNjOGItNzM1Yy00MDVmLWUwMjlm IiwiYXV0aF90aW1lIjoiMTM2Nzk1NjA5NiIsImV4cCI6IjEzNjgwNDI0OTYiLCJh bHYiOiIyIiwiaWF0IjoiMTM2Nzk1NjA5OCIsImlzcyI6Imh0dHBzOi8vc2VydmVy LmV4YW1wbGUuY29tIiwiYXVkIjoiczZCaGRSa3F0MyIsImV4YW1wbGVfc2Vzc2lv bl9wYXJhbWV0ZXIiOiJleGFtcGxlX3ZhbHVlIn0=." }
An non-normative example successful response using session (with carriage returns for readability):
As per the JWT specification, the encoded id_token is separated into parts by the ".", the first part (eyJhbGciOiJub25lIn0) indicates the signature algorithm and in this case decodes as:
{"alg":"none"}
The claimset is then decoded as:
{ "sub":"5dedcc8b-735c-405f-e029f", "profile":"https://example.com/Users/5dedcc8b-735c-405f-e029f", "auth_time":"1367956096", "exp":"1368042496", "alv":"2", "iat":"1367956098", "iss":"https://server.example.com", "aud":"s6BhdRkqt3", "example_session_parameter":"example_value" }
If the id_token contains the claim alv and its value is higher than "2", the id_token MUST be signed (has a signature alg value other than "none) AND validated.
All claims defined above MUST be understood before proceeding. Additional claims/parameters that are not understood MAY be ignored.
The client MUST confirm the "auth_time" 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 Authrization Server.
Thanks to members of the OAuth WG for their contributions and comments.
No IANA request registration is anticipated at this time.
This draft carries the same risk profiles as those outlined in the Security Considerations for [RFC6749] and OAuth2 Threat Model [RFC6819].
[RFC6749] | Hardt, D., "The OAuth 2.0 Authorization Framework", RFC 6749, October 2012. |
[RFC3339] | Klyne, G. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, July 2002. |
[RFC6755] | Campbell, B. and H. Tschofenig, "An IETF URN Sub-Namespace for OAuth", RFC 6755, October 2012. |
[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-11, July 2013. |
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. |
[ISO29115] | Brackney, D. and E. NIST, "ISO/IEC 29115:2013 Information technology -- Security techniques -- Entity authentication assurance framework", . |
[RFC6819] | Lodderstedt, T., McGloin, M. and P. Hunt, "OAuth 2.0 Threat Model and Security Considerations", RFC 6819, January 2013. |
[I-D.ietf-scim-api] | Drake, T., Mortimore, C., Ansari, M., Grizzle, K. and E. Wahlstroem, "System for Cross-Domain Identity Management:Protocol", Internet-Draft draft-ietf-scim-api-01, April 2013. |
[OIDC] | Sakimura, N., Ping IdentityJones, M., de Medeiros, B. and C. Mortimore, "OpenID Connect Basic Client Profile 1.0 - draft 28", OpenID Connect Specs http://openid.net/connect/, . |
[NIST_SP-800-63-2] | Burr, W.E., Dodson, D.F., Newton, E.M., Perlner, R.A., Polk, W.T., Newton, S. and E.A. Nabbus, "DRAFT NIST Special Publication 800-63-2: Electronic Authentication Guideline", February 2013. |
[I-D.narten-iana-considerations-rfc2434bis] | Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", Internet-Draft draft-narten-iana-considerations-rfc2434bis-09, March 2008. |