draft-ietf-oauth-saml2-bearer-02.txt   draft-ietf-oauth-saml2-bearer-03.txt 
B. Campbell, Ed. B. Campbell, Ed.
Internet-Draft Ping Identity Corp. Internet-Draft Ping Identity Corp.
Intended status: Standards Track C. Mortimore Intended status: Standards Track C. Mortimore
Expires: August 7, 2011 Salesforce.com Expires: August 8, 2011 Salesforce.com
February 3, 2011 February 4, 2011
SAML 2.0 Bearer Assertion Grant Type Profile for OAuth 2.0 SAML 2.0 Bearer Assertion Grant Type Profile for OAuth 2.0
draft-ietf-oauth-saml2-bearer-02 draft-ietf-oauth-saml2-bearer-03
Abstract Abstract
This specification defines the use of a SAML 2.0 Bearer Assertion as This specification defines the use of a SAML 2.0 Bearer Assertion as
means for requesting an OAuth 2.0 access token. means for requesting an OAuth 2.0 access token.
Status of this Memo Status of this Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
skipping to change at page 1, line 32 skipping to change at page 1, line 32
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on August 7, 2011. This Internet-Draft will expire on August 8, 2011.
Copyright Notice Copyright Notice
Copyright (c) 2011 IETF Trust and the persons identified as the Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 3, line 8 skipping to change at page 3, line 8
Appendix A. Contributors . . . . . . . . . . . . . . . . . . . . 9 Appendix A. Contributors . . . . . . . . . . . . . . . . . . . . 9
Appendix B. Document History . . . . . . . . . . . . . . . . . . 10 Appendix B. Document History . . . . . . . . . . . . . . . . . . 10
5. References . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5. References . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.1. Normative References . . . . . . . . . . . . . . . . . . . 11 5.1. Normative References . . . . . . . . . . . . . . . . . . . 11
5.2. Informative References . . . . . . . . . . . . . . . . . . 12 5.2. Informative References . . . . . . . . . . . . . . . . . . 12
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 12 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 12
1. Introduction 1. Introduction
The Security Assertion Markup Language (SAML) 2.0 The Security Assertion Markup Language (SAML) 2.0
[OASIS.saml-core-2.0-os] is an XML-based framework that allows for [OASIS.saml-core-2.0-os] is an XML-based framework that allows
identity and security information to be shared across security identity and security information to be shared across security
domains. The SAML specification, while primarily targeted at domains. The SAML specification, while primarily targeted at
providing cross domain web browser single sign-on, was also designed providing cross domain Web browser single sign-on, was also designed
to be modular and extensible to facilitate use in other contexts. to be modular and extensible to facilitate use in other contexts.
The Assertion, an XML security token, is a fundamental construct of The Assertion, an XML security token, is a fundamental construct of
SAML that is often adopted for use in other protocols and SAML that is often adopted for use in other protocols and
specifications. An Assertion is generally issued by an identity specifications. An Assertion is generally issued by an identity
provider and consumed by a service provider who relies on its content provider and consumed by a service provider who relies on its content
to identify the Assertion's subject for security related purposes. to identify the Assertion's subject for security related purposes.
The OAuth 2.0 Authorization Protocol [I-D.ietf.oauth-v2] provides a The OAuth 2.0 Authorization Protocol [I-D.ietf.oauth-v2] provides a
method for making authenticated HTTP requests to a resource using an method for making authenticated HTTP requests to a resource using an
skipping to change at page 3, line 38 skipping to change at page 3, line 38
Several authorization grant types are defined to support a wide range Several authorization grant types are defined to support a wide range
of client types and user experiences. OAuth also allows for the of client types and user experiences. OAuth also allows for the
definition of new extension grant types to support additional clients definition of new extension grant types to support additional clients
or to provide a bridge between OAuth and other trust frameworks. or to provide a bridge between OAuth and other trust frameworks.
This specification defines an extension grant type that profiles the This specification defines an extension grant type that profiles the
use of a SAML 2.0 Bearer Assertion in requesting an OAuth 2.0 access use of a SAML 2.0 Bearer Assertion in requesting an OAuth 2.0 access
token. The format and processing rules for the SAML Assertion token. The format and processing rules for the SAML Assertion
defined in this specification are intentionally similar, though not defined in this specification are intentionally similar, though not
identical, to those in the Web Browser SSO Profile defined in identical, to those in the Web Browser SSO Profile defined in SAML
[OASIS.saml-profiles-2.0-os] reusing, to the extent reasonable, Profiles [OASIS.saml-profiles-2.0-os]. This specification is
concepts and patterns from that well-established profile. reusing, to the extent reasonable, concepts and patterns from that
well-established Profile.
1.1. Notational Conventions 1.1. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
Unless otherwise noted, all the protocol parameter names and values Unless otherwise noted, all the protocol parameter names and values
are case sensitive. are case sensitive.
2. SAML Assertion Access Token Request 2. SAML Assertion Access Token Request
A SAML Assertion can be used to request an access token when a client A SAML Assertion can be used to request an access token when a client
wishes to utilize an existing trust relationship, expressed though wishes to utilize an existing trust relationship, expressed through
the semantics of (and digital signature calculated over) the SAML the semantics of (and digital signature calculated over) the SAML
Assertion, without a direct user approval step at the authorization Assertion, without a direct user approval step at the authorization
server. server.
The process by which the client obtains the SAML Assertion, prior to The process by which the client obtains the SAML Assertion, prior to
exchanging it with the authorization server, is out of scope. exchanging it with the authorization server, is out of scope.
+--------+ +---------------+ +--------+ +---------------+
| | | | | | | |
| |>--(A)-- SAML 2.0 Assertion ----->| Authorization | | |>--(A)-- SAML 2.0 Assertion ----->| Authorization |
skipping to change at page 4, line 30 skipping to change at page 4, line 30
| |<--(B)---- Access Token ---------<| | | |<--(B)---- Access Token ---------<| |
| | | | | | | |
+--------+ +---------------+ +--------+ +---------------+
Figure 1: Assertion Access Token Request Figure 1: Assertion Access Token Request
The request/response flow illustrated in Figure 1 includes the The request/response flow illustrated in Figure 1 includes the
following steps: following steps:
(A) The client sends an access token request to the authorization (A) The client sends an access token request to the authorization
server with the server that includes a SAML 2.0 Assertion and a grant_type of
http://oauth.net/grant_type/assertion/saml/2.0/bearer grant_type "http://oauth.net/grant_type/assertion/saml/2.0/bearer".
and includes a SAML 2.0 Assertion.
(B) The authorization server validates the Assertion per the (B) The authorization server validates the Assertion per the
processing rules defined in this specification and issues an processing rules defined in this specification and issues an
access token. access token.
2.1. Client Requests Access Token 2.1. Client Requests Access Token
The client includes the Assertion in the access token request, the The client includes the Assertion in the access token request, the
core details of which are defined in OAuth [I-D.ietf.oauth-v2], by core details of which are defined in OAuth [I-D.ietf.oauth-v2], by
specifying "http://oauth.net/grant_type/assertion/saml/2.0/bearer" as specifying "http://oauth.net/grant_type/assertion/saml/2.0/bearer" as
the absolute URI value of the "grant_type" parameter and by adding the absolute URI value of the "grant_type" parameter and by adding
the following parameter: the following parameter:
assertion assertion
REQUIRED. The value of the assertion parameter MUST contain a REQUIRED. The value of the assertion parameter MUST contain a
single SAML 2.0 Assertion. When used with the single SAML 2.0 Assertion. When used with the
"http://oauth.net/grant_type/assertion/saml/2.0/bearer"; grant "http://oauth.net/grant_type/assertion/saml/2.0/bearer" grant
type, the assertion MUST be a SAML 2.0 Assertion. The SAML type, the assertion MUST be a SAML 2.0 Assertion. The SAML
Assertion XML data MUST be encoded using base64url, where the Assertion XML data MUST be encoded using base64url, where the
encoding adheres to the definition in Section 5 of RFC4648 encoding adheres to the definition in Section 5 of RFC4648
[RFC4648] and where the padding bits are set to zero. To to [RFC4648] and where the padding bits are set to zero. To to
avoid the need for subsequent encoding steps (by "application/ avoid the need for subsequent encoding steps (by "application/
x-www-form-urlencoded" [W3C.REC-html401-19991224], for x-www-form-urlencoded" [W3C.REC-html401-19991224], for
example), the base64url encoded data SHOULD NOT be line wrapped example), the base64url encoded data SHOULD NOT be line wrapped
and pad characters ("=") SHOULD NOT be included. and pad characters ("=") SHOULD NOT be included.
scope scope
OPTIONAL. The scope of the access request expressed as a list OPTIONAL. The scope of the access request is expressed as a
of space-delimited strings. The value is defined by the list of space-delimited strings. The value is defined by the
authorization server. If the value contains multiple space- authorization server. If the value contains multiple space-
delimited strings, their order does not matter, and each string delimited strings, their order does not matter, and each string
adds an additional access range to the requested scope. adds an additional access range to the requested scope.
Authorization servers SHOULD issue access tokens with a limited Authorization servers SHOULD issue access tokens with a limited
lifetime and require clients to refresh them by requesting a new lifetime and require clients to refresh them by requesting a new
access token using the same assertion, if it is still valid, or with access token using the same assertion, if it is still valid, or with
a new assertion. The authorization server SHOULD NOT issue a refresh a new assertion. The authorization server SHOULD NOT issue a refresh
token. token.
2.2. Assertion Format and Processing Requirements 2.2. Assertion Format and Processing Requirements
Prior to issuing an access token response as described in Prior to issuing an access token response as described in
[I-D.ietf.oauth-v2], the authorization server MUST validate the [I-D.ietf.oauth-v2], the authorization server MUST validate the
Assertion according to the criteria below. If present, the Assertion according to the criteria below. If present, the
authorization server MUST also validate the client credentials. authorization server MUST also validate the client credentials.
Application of additional restrictions and policy are at the Application of additional restrictions and policy are at the
discretion of the authorization server. discretion of the authorization server.
o The Assertion's <Issuer> element MUST contain a unique identifier o The Assertion's <Issuer> element MUST contain a unique identifier
for the entity that issued the Assertion; the Format attribute for the entity that issued the Assertion. The Format attribute
MUST be omitted or have a value of MUST be omitted or have a value of
"urn:oasis:names:tc:SAML:2.0:nameid-format:entity". "urn:oasis:names:tc:SAML:2.0:nameid-format:entity".
o The Assertion MUST contain a <Subject> element. The subject MAY o The Assertion MUST contain a <Subject> element. The subject MAY
identify the resource owner for whom the access token is being identify the resource owner for whom the access token is being
requested. requested.
o The <Subject> element MUST contain at least one o The <Subject> element MUST contain at least one
<SubjectConfirmation> element that allows the authorization server <SubjectConfirmation> element that allows the authorization server
to confirm it as a Bearer Assertion. Conditions for bearer to confirm it as a Bearer Assertion. Conditions for bearer
skipping to change at page 6, line 36 skipping to change at page 6, line 36
Assertion can be delivered. Verification of the Address is at Assertion can be delivered. Verification of the Address is at
the discretion of the authorization server. the discretion of the authorization server.
o If the Assertion issuer authenticated the subject, the Assertion o If the Assertion issuer authenticated the subject, the Assertion
SHOULD contain a single <AuthnStatement> representing that SHOULD contain a single <AuthnStatement> representing that
authentication event. authentication event.
o If the Assertion was issued with the intention that the client act o If the Assertion was issued with the intention that the client act
autonomously on behalf of the subject, an <AuthnStatement> SHOULD autonomously on behalf of the subject, an <AuthnStatement> SHOULD
NOT be included. The client SHOULD be identified in the <NameID> NOT be included. The client SHOULD be identified in the <NameID>
or similar element the <SubjectConfirmation> element or by other or similar element, the <SubjectConfirmation> element, or by other
available means like [OASIS.saml-deleg-cs]. available means like [OASIS.saml-deleg-cs].
o Other statements, in particular, <AttributeStatement> elements MAY o Other statements, in particular <AttributeStatement> elements, MAY
be included in the Assertion. be included in the Assertion.
o The Assertion MUST contain an <AudienceRestriction> element with o The Assertion MUST contain an <AudienceRestriction> element with
an <Audience> element containing a URI reference that identifies an <Audience> element containing a URI reference that identifies
the authorization server, or the service provider SAML entity of the authorization server, or the service provider SAML entity of
its controlling domain, as an intended audience. The its controlling domain, as an intended audience. The
authorization server MUST verify that it is an intended audience authorization server MUST verify that it is an intended audience
for the Assertion. for the Assertion.
o The Assertion MUST be digitally signed by the issuer and the o The Assertion MUST be digitally signed by the issuer and the
authorization server MUST verify the signature. authorization server MUST verify the signature.
o Encrypted elements MAY appear in place of their plain text o Encrypted elements MAY appear in place of their plain text
counterparts as defined in [OASIS.saml-core-2.0-os]. counterparts as defined in [OASIS.saml-core-2.0-os].
o The authorization server MUST verify that the Assertion is valid o The authorization server MUST verify that the Assertion is valid
in all other respects per [OASIS.saml-core-2.0-os] such as (but in all other respects per [OASIS.saml-core-2.0-os], such as (but
not limited to) evaluating all content within the Conditions not limited to) evaluating all content within the Conditions
element including the NotOnOrAfter and NotBefore attributes, element including the NotOnOrAfter and NotBefore attributes,
rejecting unknown condition types, etc. rejecting unknown condition types, etc.
2.3. Error Response 2.3. Error Response
If the Assertion is not valid, or its subject confirmation If the Assertion is not valid, or its subject confirmation
requirements cannot be met, the the authorization server MUST requirements cannot be met, the authorization server MUST construct
construct an error response as defined in [I-D.ietf.oauth-v2]. The an error response as defined in [I-D.ietf.oauth-v2]. The value of
value of the error parameter MUST be the "invalid_grant" error code. the error parameter MUST be the "invalid_grant" error code. The
The authorization server MAY include additional information regarding authorization server MAY include additional information regarding the
the reasons the Assertion was considered invalid using the reasons the Assertion was considered invalid using the
error_description or error_uri parameters. error_description or error_uri parameters.
For example: For example:
HTTP/1.1 400 Bad Request HTTP/1.1 400 Bad Request
Content-Type: application/json Content-Type: application/json
Cache-Control: no-store Cache-Control: no-store
{ {
"error":"invalid_grant", "error":"invalid_grant",
skipping to change at page 9, line 45 skipping to change at page 9, line 45
o Parameter usage location: token request o Parameter usage location: token request
o Change controller: IETF o Change controller: IETF
o Specification document(s): draft-ietf-oauth-saml2-bearer o Specification document(s): draft-ietf-oauth-saml2-bearer
Appendix A. Contributors Appendix A. Contributors
The following people contributed wording and concepts to this The following people contributed wording and concepts to this
document: Paul Madsen, Patrick Harding, Peter Motyka, Eran Hammer- document: Paul Madsen, Patrick Harding, Peter Motykowski, Eran
Lahav, Peter Saint-Andre, Ian Barnett, Eric Fazendin, Torsten Hammer-Lahav, Peter Saint-Andre, Ian Barnett, Eric Fazendin, Torsten
Lodderstedt, Scott Cantor and David Waite Lodderstedt, Susan Harper, Scott Cantor, and David Waite
Appendix B. Document History Appendix B. Document History
[[ to be removed by RFC editor before publication as an RFC ]] [[ to be removed by RFC editor before publication as an RFC ]]
draft-ietf-oauth-saml2-bearer-03
o Cleanup of some editorial issues.
draft-ietf-oauth-saml2-bearer-02 draft-ietf-oauth-saml2-bearer-02
o Added scope parameter with text copied from draft-ietf-oauth-v2-12 o Added scope parameter with text copied from draft-ietf-oauth-v2-12
(the reorg of draft-ietf-oauth-v2-12 made it so scope wasn't (the reorg of draft-ietf-oauth-v2-12 made it so scope wasn't
really inherited by this spec anymore) really inherited by this spec anymore)
o Change definition of the assertion parameter to be more generally o Change definition of the assertion parameter to be more generally
applicable per the suggestion near the end of applicable per the suggestion near the end of
http://www.ietf.org/mail-archive/web/oauth/current/msg05253.html http://www.ietf.org/mail-archive/web/oauth/current/msg05253.html
 End of changes. 17 change blocks. 
28 lines changed or deleted 32 lines changed or added

This html diff was produced by rfcdiff 1.40. The latest version is available from http://tools.ietf.org/tools/rfcdiff/