draft-ietf-kitten-sasl-saml-09.txt   rfc6595.txt 
Network Working Group K. Wierenga Internet Engineering Task Force (IETF) K. Wierenga
Internet-Draft Cisco Systems, Inc. Request for Comments: 6595 Cisco Systems, Inc.
Intended status: Standards Track E. Lear Category: Standards Track E. Lear
Expires: August 23, 2012 Cisco Systems GmbH ISSN: 2070-1721 Cisco Systems GmbH
S. Josefsson S. Josefsson
SJD AB SJD AB
February 20, 2012 April 2012
A SASL and GSS-API Mechanism for SAML A Simple Authentication and Security Layer (SASL) and GSS-API Mechanism
draft-ietf-kitten-sasl-saml-09.txt for the Security Assertion Markup Language (SAML)
Abstract Abstract
Security Assertion Markup Language (SAML) has found its usage on the The Security Assertion Markup Language (SAML) has found its usage on
Internet for Web Single Sign-On. Simple Authentication and Security the Internet for Web Single Sign-On. The Simple Authentication and
Layer (SASL) and the Generic Security Service Application Program Security Layer (SASL) and the Generic Security Service Application
Interface (GSS-API) are application frameworks to generalize Program Interface (GSS-API) are application frameworks to generalize
authentication. This memo specifies a SASL mechanism and a GSS-API authentication. This memo specifies a SASL mechanism and a GSS-API
mechanism for SAML 2.0 that allows the integration of existing SAML mechanism for SAML 2.0 that allows the integration of existing SAML
Identity Providers with applications using SASL and GSS-API. Identity Providers with applications using SASL and GSS-API.
Status of this Memo Status of This Memo
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 This is an Internet Standards Track document.
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 This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
This Internet-Draft will expire on August 23, 2012. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc6595.
Copyright Notice Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the Copyright (c) 2012 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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction ....................................................3
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Terminology ................................................4
1.2. Applicability . . . . . . . . . . . . . . . . . . . . . . 4 1.2. Applicability ..............................................4
2. Authentication flow . . . . . . . . . . . . . . . . . . . . . 6 2. Authentication Flow .............................................5
3. SAML SASL Mechanism Specification . . . . . . . . . . . . . . 9 3. SAML SASL Mechanism Specification ...............................7
3.1. Initial Response . . . . . . . . . . . . . . . . . . . . . 9 3.1. Initial Response ...........................................8
3.2. Authentication Request . . . . . . . . . . . . . . . . . . 10 3.2. Authentication Request .....................................8
3.3. Outcome and parameters . . . . . . . . . . . . . . . . . . 11 3.3. Outcome and Parameters .....................................9
4. SAML GSS-API Mechanism Specification . . . . . . . . . . . . . 12 4. SAML GSS-API Mechanism Specification ...........................10
4.1. GSS-API Principal Name Types for SAML . . . . . . . . . . 13 4.1. GSS-API Principal Name Types for SAML .....................11
5. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5. Examples .......................................................11
5.1. XMPP . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5.1. XMPP ......................................................11
5.2. IMAP . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.2. IMAP ......................................................15
6. Security Considerations . . . . . . . . . . . . . . . . . . . 22 6. Security Considerations ........................................17
6.1. Man in the middle and Tunneling Attacks . . . . . . . . . 22 6.1. Man-in-the-Middle and Tunneling Attacks ...................17
6.2. Binding SAML subject identifiers to Authorization 6.2. Binding SAML Subject Identifiers to Authorization
Identities . . . . . . . . . . . . . . . . . . . . . . . . 22 Identities ................................................17
6.3. User Privacy . . . . . . . . . . . . . . . . . . . . . . . 22 6.3. User Privacy ..............................................18
6.4. Collusion between RPs . . . . . . . . . . . . . . . . . . 22 6.4. Collusion between RPs .....................................18
6.5. GSS-API specific security considerations . . . . . . . . . 22 6.5. Security Considerations Specific to GSS-API ...............18
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24 7. IANA Considerations ............................................18
7.1. IANA mech-profile . . . . . . . . . . . . . . . . . . . . 24 7.1. IANA Mech-Profile .........................................18
7.2. IANA OID . . . . . . . . . . . . . . . . . . . . . . . . . 24 7.2. IANA OID ..................................................19
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 25 8. References .....................................................19
8.1. Normative References . . . . . . . . . . . . . . . . . . . 25 8.1. Normative References ......................................19
8.2. Informative References . . . . . . . . . . . . . . . . . . 26 8.2. Informative References ....................................21
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 28 Appendix A. Acknowledgments .......................................22
Appendix B. Changes . . . . . . . . . . . . . . . . . . . . . . . 29
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 30
1. Introduction 1. Introduction
Security Assertion Markup Language (SAML) 2.0 Security Assertion Markup Language (SAML) 2.0 [OASIS-SAMLv2-CORE] is
[OASIS.saml-core-2.0-os] is a set of specifications that provide a set of specifications that provide various means for a user to be
various means for a user to be identified to a relying party (RP) identified to a Relying Party (RP) through the exchange of (typically
through the exchange of (typically signed) assertions issued by an signed) assertions issued by an Identity Provider (IdP). It includes
identity provider (IdP). It includes a number of protocols, protocol a number of protocols, protocol bindings [OASIS-SAMLv2-BIND], and
bindings [OASIS.saml-bindings-2.0-os], and interoperability profiles interoperability profiles [OASIS-SAMLv2-PROF] designed for different
[OASIS.saml-profiles-2.0-os] designed for different use cases. use cases.
Simple Authentication and Security Layer (SASL) [RFC4422] is a The Simple Authentication and Security Layer (SASL) [RFC4422] is a
generalized mechanism for identifying and authenticating a user and generalized mechanism for identifying and authenticating a user and
for optionally negotiating a security layer for subsequent protocol for optionally negotiating a security layer for subsequent protocol
interactions. SASL is used by application protocols like IMAP interactions. SASL is used by application protocols like IMAP
[RFC3501], POP [RFC1939] and XMPP [RFC6120]. The effect is to make [RFC3501], the Post Office Protocol (POP) [RFC1939], and the
modular authentication, so that newer authentication mechanisms can Extensible Message and Presence Protocol (XMPP) [RFC6120]. The
be added as needed. This memo specifies just such a mechanism. effect is to make modular authentication, so that newer
authentication mechanisms can be added as needed. This memo
specifies just such a mechanism.
The Generic Security Service Application Program Interface (GSS-API) The Generic Security Service Application Program Interface (GSS-API)
[RFC2743] provides a framework for applications to support multiple [RFC2743] provides a framework for applications to support multiple
authentication mechanisms through a unified programming interface. authentication mechanisms through a unified programming interface.
This document defines a pure SASL mechanism for SAML, but it conforms This document defines a pure SASL mechanism for SAML, but it conforms
to the new bridge between SASL and the GSS-API called GS2 [RFC5801]. to the new bridge between SASL and the GSS-API called GS2 [RFC5801].
This means that this document defines both a SASL mechanism and a This means that this document defines both a SASL mechanism and a
GSS-API mechanism. The GSS-API interface is OPTIONAL for SASL GSS-API mechanism. The GSS-API interface is OPTIONAL for SASL
implementers, and the GSS-API considerations can be avoided in implementers, and the GSS-API considerations can be avoided in
environments that use SASL directly without GSS-API. environments that use SASL directly without GSS-API.
As currently envisioned, this mechanism enables interworking between As currently envisioned, this mechanism enables interworking between
SASL and SAML in order to assert the identity of the user and other SASL and SAML in order to assert the identity of the user and other
attributes to relying parties. As such, while servers (as relying attributes to RPs. As such, while servers (as RPs) will advertise
parties) will advertise SASL mechanisms (including SAML), clients SASL mechanisms (including SAML), clients will select the SAML SASL
will select the SAML SASL mechanism as their SASL mechanism of mechanism as their SASL mechanism of choice.
choice.
The SAML mechanism described in this memo aims to re-use the Web The SAML mechanism described in this memo aims to reuse the Web
Browser SSO profile defined in section 4.1 of the SAML profiles 2.0 Browser Single Sign-On (SSO) profile defined in Section 4.1 of the
specification [OASIS.saml-profiles-2.0-os] to the maximum extent and SAML 2.0 profiles specification [OASIS-SAMLv2-PROF] to the maximum
therefore does not establish a separate authentication, integrity and extent and therefore does not establish a separate authentication,
confidentiality mechanism. The mechanism assumes a security layer, integrity, and confidentiality mechanism. The mechanism assumes that
such as Transport Layer Security (TLS [RFC5246]), will continue to be a security layer, such as Transport Layer Security (TLS) [RFC5246],
used. This specification is appropriate for use when a browser will continue to be used. This specification is appropriate for use
instance is available. In the absence of a browser instance, SAML when a browser instance is available. In the absence of a browser
profiles that don't require a browser such as the Enhanced Client or instance, SAML profiles that don't require a browser, such as the
Proxy profile (as defined in section 4.2 of the SAML profiles 2.0 Enhanced Client or Proxy profile (as defined in Section 4.2 of
specification [OASIS.saml-profiles-2.0-os] may be used, but that is [OASIS-SAMLv2-PROF], may be used, but that is outside the scope of
outside the scope of this specification. this specification.
Figure 1 describes the interworking between SAML and SASL: this Figure 1 describes the interworking between SAML and SASL: this
document requires enhancements to the Relying Party (the SASL server) document requires enhancements to the RP (the SASL server) and to the
and to the Client, as the two SASL communication end points, but no client, as the two SASL communication end points, but no changes to
changes to the SAML Identity Provider are necessary. To accomplish the SAML IdP are necessary. To accomplish this goal, some indirect
this goal some indirect messaging is tunneled within SASL, and some messaging is tunneled within SASL, and some use of external methods
use of external methods is made. is made.
+-----------+ +-----------+
| | | |
>| Relying | >| Relying |
/ | Party | / | Party |
// | | // | |
// +-----------+ // +-----------+
SAML/ // ^ SAML/ // ^
HTTPS // +--|--+ HTTPS // +--|--+
// | S| | // | S| |
skipping to change at page 4, line 42 skipping to change at page 4, line 42
+------------+ +----------+ +------------+ +----------+
Figure 1: Interworking Architecture Figure 1: Interworking Architecture
1.1. Terminology 1.1. Terminology
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].
The reader is assumed to be familiar with the terms used in the SAML The reader is assumed to be familiar with the terms used in the
2.0 specification [OASIS.saml-core-2.0-os]. SAML 2.0 core specification [OASIS-SAMLv2-CORE].
1.2. Applicability 1.2. Applicability
Because this mechanism transports information that should not be Because this mechanism transports information that should not be
controlled by an attacker, the SAML mechanism MUST only be used over controlled by an attacker, the SAML mechanism MUST only be used over
channels protected by TLS, or over similar integrity protected and channels protected by TLS, or over similar integrity-protected and
authenticated channels. In addition, when TLS is used the client authenticated channels. In addition, when TLS is used, the client
MUST successfully validate the server certificate ([RFC5280], MUST successfully validate the server's certificate ([RFC5280],
[RFC6125]) [RFC6125]).
Note: An Intranet does not constitute such an integrity protected and Note: An Intranet does not constitute such an integrity-protected and
authenticated channel! authenticated channel!
2. Authentication flow 2. Authentication Flow
While SAML itself is merely a markup language, its common use case While SAML itself is merely a markup language, its common use case
these days is with HTTP [RFC2616] or HTTPS [RFC2818] and HTML these days is with HTTP [RFC2616] or HTTPS [RFC2818] and HTML
[W3C.REC-html401-19991224]. What follows is a typical flow: [W3C-REC-HTML401]. What follows is a typical flow:
1. The browser requests a resource of a Relying Party (RP) (via an 1. The browser requests a resource of an RP (via an HTTP request).
HTTP request).
2. The Relying Party redirects the browser via an HTTP redirect (as 2. The RP redirects the browser via an HTTP redirect (as described
described in Section 10.3 of [RFC2616]) to the Identity Provider in Section 10.3 of [RFC2616]) to the IdP or an IdP discovery
(IdP) or an IdP discovery service. When it does so, it includes service. When it does so, it includes the following parameters:
the following parameters: (1) an authentication request that (1) an authentication request that contains the name of the
contains the name of resource being requested, (2) a browser resource being requested, (2) a browser cookie, and (3) a return
cookie, and (3) a return URL as specified in Section 3.1 of the URL as specified in Section 3.1 of [OASIS-SAMLv2-PROF].
SAML profiles 2.0 specification [OASIS.saml-profiles-2.0-os].
3. The user authenticates to the IdP and perhaps authorizes the 3. The user authenticates to the IdP and perhaps authorizes the
release of user attributes to the Relying Party. release of user attributes to the RP.
4. In its authentication response, the IdP redirects (via an HTTP 4. In its authentication response, the IdP redirects (via an HTTP
redirect) the browser back to the RP with an authentication redirect) the browser back to the RP with an authentication
assertion (stating that the IdP vouches that the subject has assertion (stating that the IdP vouches that the subject has
successfully authenticated), optionally along with some successfully authenticated), optionally along with some
additional attributes. additional attributes.
5. The Relying Party now has sufficient identity information to 5. The RP now has sufficient identity information to approve access
approve access to the resource or not, and acts accordingly. The to the resource or not, and acts accordingly. The authentication
authentication is concluded. is concluded.
When considering this flow in the context of SASL, we note that while When considering this flow in the context of SASL, we note that while
the Relying Party and the client both must change their code to the RP and the client both must change their code to implement this
implement this SASL mechanism, the IdP can remain untouched. The SASL mechanism, the IdP can remain untouched. The RP already has
Relying Party already has some sort of session (probably a TCP some sort of session (probably a TCP connection) established with the
connection) established with the client. However, it may be client. However, it may be necessary to redirect a SASL client to
necessary to redirect a SASL client to another application or another application or handler. The steps are as follows:
handler. The steps are as follows:
1. The SASL server (Relying Party) advertises support for the SASL 1. The SASL server (RP) advertises support for the SASL SAML20
SAML20 mechanism to the client mechanism to the client.
2. The client initiates a SASL authentication with SAML20 and sends 2. The client initiates a SASL authentication with SAML20 and sends
a domain name that allows the SASL server to determine the a domain name that allows the SASL server to determine the
appropriate IdP appropriate IdP.
3. The SASL server transmits an authentication request encoded using 3. The SASL server transmits an authentication request encoded using
a Uniform Resource Identifier (URI) as described in RFC 3986 a Uniform Resource Identifier (URI) as described in RFC 3986
[RFC3986] and an HTTP redirect to the IdP corresponding to the [RFC3986] and an HTTP redirect to the IdP corresponding to the
domain domain.
4. The SASL client now sends an empty response, as authentication 4. The SASL client now sends a response consisting of "=".
continues via the normal SAML flow and the SASL server will Authentication continues via the normal SAML flow, and the SASL
receive the answer to the challenge out-of-band from the SASL server will receive the answer to the challenge out of band from
conversation. the SASL conversation.
5. At this point the SASL client MUST construct a URL containing the 5. At this point, the SASL client MUST construct a URL containing
content received in the previous message from the SASL server. the content received in the previous message from the SASL
This URL is transmitted to the IdP either by the SASL client server. This URL is transmitted to the IdP either by the SASL
application or an appropriate handler, such as a browser. client application or an appropriate handler, such as a browser.
6. Next the user authenticates to the IdP. The manner in which the 6. Next, the user authenticates to the IdP. The manner in which the
end user is authenticated to the IdP and any policies surrounding end user is authenticated to the IdP, and any policies
such authentication is out of scope for SAML and hence for this surrounding such authentication, are out of scope for SAML and
draft. This step happens out of band from SASL. hence for this document. This step happens out of band from
SASL.
7. The IdP will convey information about the success or failure of 7. The IdP will convey information about the success or failure of
the authentication back to the the SASL server (Relying Party) in the authentication back to the SASL server (RP) in the form of an
the form of an Authentication Statement or failure, using a authentication statement or failure, using an indirect response
indirect response via the client browser or the handler (and with via the client browser or the handler (and with an external
an external browser client control should be passed back to the browser, client control should be passed back to the SASL
SASL client). This step happens out of band from SASL. client). This step happens out of band from SASL.
8. The SASL Server sends an appropriate SASL response to the client, 8. The SASL server sends an appropriate SASL response to the client.
along with an optional list of attributes
Please note: What is described here is the case in which the client Please note: What is described here is the case in which the client
has not previously authenticated. It is possible that the client has not previously authenticated. It is possible that the client
already holds a valid SAML authentication token so that the user does already holds a valid SAML authentication token so that the user does
not need to be involved in the process anymore, but that would still not need to be involved in the process anymore, but that would still
be external to SASL. This is classic Web Single Sign-On, in which be external to SASL. This is classic Web Single Sign-On, in which
the Web Browser client presents the authentication token (cookie) to the Web Browser client presents the authentication token (cookie) to
the RP without renewed user authentication at the IdP. the RP without renewed user authentication at the IdP.
With all of this in mind, the flow appears as follows in Figure 2: With all of this in mind, the flow appears as follows in Figure 2:
SASL Serv. Client IdP SASL Serv. Client IdP
|>-----(1)----->| | Advertisement |>-----(1)----->| | Advertisement
| | | | | |
|<-----(2)-----<| | Initiation |<-----(2)-----<| | Initiation
| | | | | |
|>-----(3)----->| | Authentication Request |>-----(3)----->| | Authentication Request
| | | | | |
|<-----(4)-----<| | Empty Response |<-----(4)-----<| | Response of "="
| | | | | |
| |< - -(5,6) - ->| Client<>IDP | |<- -(5,6) - ->| Client<>IdP
| | | Authentication | | | Authentication
| | | | | |
|<- - - - - - - - - - -(7)- - -| Authentication Statement |<- - - - - - - - - - -(7)- - -| Authentication Statement
| | | | | |
|>-----(8)----->| | SASL completion with |>-----(8)----->| | SASL Completion with
| | | status | | | Status
| | | | | |
----- = SASL ----- = SASL
- - - = HTTP or HTTPS (external to SASL) - - - = HTTP or HTTPS (external to SASL)
Figure 2: Authentication flow Figure 2: Authentication Flow
3. SAML SASL Mechanism Specification 3. SAML SASL Mechanism Specification
This section specifies the details of the SAML SASL mechanism. See This section specifies the details of the SAML SASL mechanism. See
section 5 of [RFC4422] for what is described here. Section 5 of [RFC4422] for additional details.
The name of this mechanism is "SAML20". The mechanism is capable of The name of this mechanism is "SAML20". The mechanism is capable of
transferring an authorization identity (via the "gs2-header"). The transferring an authorization identity (via the "gs2-header"). The
mechanism does not offer a security layer. mechanism does not offer a security layer.
The mechanism is client-first. The first mechanism message from the The mechanism is client-first. The first mechanism message from the
client to the server is the "initial-response". As described in client to the server is the "initial-response". As described in
[RFC4422], if the application protocol does not support sending a [RFC4422], if the application protocol does not support sending a
client-response together with the authentication request, the server client response together with the authentication request, the server
will send an empty server-challenge to let the client begin. The will send an empty server challenge to let the client begin. The
second mechanism message is from the server to the client, containing second mechanism message is from the server to the client, containing
the SAML "authentication-request". The third mechanism message is the SAML "authentication-request". The third mechanism message is
from client to the server, and is the fixed message consisting of "=" from the client to the server and is the fixed message consisting of
(i.e., an empty response). The fourth mechanism message is from the "=". The fourth mechanism message is from the server to the client,
server to the client, indicating the SASL mechanism outcome. indicating the SASL mechanism outcome.
3.1. Initial Response 3.1. Initial Response
A client initiates a "SAML20" authentication with SASL by sending the A client initiates a SAML20 authentication with SASL by sending the
GS2 header followed by the authentication identifier (message 2 in GS2 header followed by the Identity Provider identifier (message 2 in
Figure 2) and is defined as follows: Figure 2) and is defined using ABNF [RFC5234] as follows:
initial-response = gs2-header Idp-Identifier initial-response = gs2-header IdP-Identifier
IdP-Identifier = domain ; domain name with corresponding IdP IdP-Identifier = domain ; domain name with corresponding IdP
The "gs2-header" is used as follows: The gs2-header is used as follows:
- The "gs2-nonstd-flag" MUST NOT be present. - The "gs2-nonstd-flag" MUST NOT be present.
- The "gs2-cb-flag" MUST be set to "n" because channel binding - The "gs2-cb-flag" MUST be set to "n" because channel-binding
[RFC5056] data cannot be integrity protected by the SAML [RFC5056] data cannot be integrity protected by the SAML
negotiation. (Note: In theory channel binding data could be negotiation. (Note: In theory, channel-binding data could be
inserted in the SAML flow by the client and verified by the inserted in the SAML flow by the client and verified by the
server, but that is currently not supported in SAML.) server, but that is currently not supported in SAML.)
- The "gs2-authzid" carries the optional authorization identity as - The "gs2-authzid" carries the optional authorization identity as
specified in [RFC5801] (not to be confused with the IdP- specified in [RFC5801] (not to be confused with the
Identifier). IdP-Identifier).
Domain name is specified in [RFC1035]. A domain name is either a A domain name is either a "traditional domain name" as described in
"traditional domain name" as described in [RFC1035] or an [RFC1035] or an "internationalized domain name" as described in
"internationalized domain name" as described in [RFC5890]. Clients [RFC5890]. Clients and servers MUST treat the IdP-Identifier as a
and servers MUST treat the IdP-Identifier as a domain name slot domain name slot [RFC5890]. They also SHOULD support
[RFC5890]. They also SHOULD support internationalized domain names internationalized domain names (IDNs) in the IdP-Identifier field; if
(IDNs) in the Idp-Identifier field; if they do so, all of the domain they do so, all of the domain name's labels MUST be A-labels or
name's labels MUST be A-labels or NR-LDH labels [RFC5890], if NR-LDH labels [RFC5890]. If necessary, internationalized labels MUST
necessary internationalized labels MUST be converted from U-labels to be converted from U-labels to A-labels by using the Punycode encoding
A-labels by using the Punycode encoding [RFC3492] for A-labels prior [RFC3492] for A-labels prior to sending them to the SASL server, as
to sending them to the SASL-server as described in the protocol described in the protocol specification for Internationalized Domain
specification for Internationalized Domain Names in Applications Names in Applications [RFC5891].
[RFC5891].
3.2. Authentication Request 3.2. Authentication Request
The SASL Server transmits to the SASL client a URI that redirects the The SASL server transmits to the SASL client a URI that redirects the
SAML client to the IdP (corresponding to the domain that the user SAML client to the IdP (corresponding to the domain that the user
provided), with a SAML authentication request as one of the provided), with a SAML authentication request as one of the
parameters (message 3 in Figure 2) in the following way: parameters (message 3 in Figure 2) using the following ABNF:
authentication-request = URI authentication-request = URI
URI is specified in [RFC3986] and is encoded according to Section 3.4 The URI is specified in [RFC3986] and is encoded according to
(HTTP Redirect) of the SAML bindings 2.0 specification Section 3.4 ("HTTP Redirect Binding") of the SAML 2.0 bindings
[OASIS.saml-bindings-2.0-os]. The SAML authentication request is specification [OASIS-SAMLv2-BIND]. The SAML authentication request
encoded according to Section 3.4 (Authentication Request) of the SAML is encoded according to Section 3.4 ("Authentication Request
core 2.0 specification [OASIS.saml-core-2.0-os]. Should the client Protocol") of [OASIS-SAMLv2-CORE]. Should the client support
support Internationalized Resource Identifiers (IRIs) [RFC3987] it Internationalized Resource Identifiers (IRIs) [RFC3987], it MUST
MUST first convert the IRI to a URI before transmitting it to the first map the IRI to a URI before transmitting it to the server, as
server [RFC5890]. defined in Section 3.1 of [RFC3987].
Note: The SASL server may have a static mapping of domain to Note: The SASL server may have a static mapping of domain to
corresponding IdP or alternatively a DNS-lookup mechanism could be corresponding IdP or, alternatively, a DNS-lookup mechanism could be
envisioned, but that is out-of-scope for this document. envisioned, but that is out of scope for this document.
Note: While the SASL client MAY sanity check the URI it received, Note: While the SASL client MAY sanity-check the URI it received,
ultimately it is the SAML IdP that will be validated by the SAML ultimately it is the SAML IdP that will be validated by the SAML
client which is out-of-scope for this document. client; this topic is out of scope for this document.
The client then sends the authentication request via an HTTP GET The client then sends the authentication request via an HTTP GET
(sent over a server-authenticated TLS channel) to the IdP, as if (sent over a server-authenticated TLS channel) to the IdP, as if
redirected to do so from an HTTP server and in accordance with the redirected to do so from an HTTP server and in accordance with the
Web Browser SSO profile, as described in section 3.1 of SAML profiles Web Browser SSO profile, as described in Section 4.1 of
2.0 specification [OASIS.saml-profiles-2.0-os] (message 5 and 6 in [OASIS-SAMLv2-PROF] (messages 5 and 6 in Figure 2).
Figure 2).
The client handles both user authentication to the IdP and The client handles both user authentication to the IdP and
confirmation or rejection of the authentiation of the RP (out-of- confirmation or rejection of the authentication of the RP (out of
scope for this document). scope for this document).
After all authentication has been completed by the IdP, the IdP will After all authentication has been completed by the IdP, the IdP will
send a redirect message to the client in the form of a URI send a redirect message to the client in the form of a URI
corresponding to the Relying Party as specified in the authentication corresponding to the RP as specified in the authentication request
request ("AssertionConsumerServiceURL") and with the SAML response as ("AssertionConsumerServiceURL") and with the SAML response as one of
one of the parameters (message 7 in Figure 2). the parameters (message 7 in Figure 2).
Please note: this means that the SASL server needs to implement a Please note: This means that the SASL server needs to implement a
SAML Relying Party. Also, the SASL server needs to correlate the SAML RP. Also, the SASL server needs to correlate the session it has
session it has with the SASL client with the appropriate SAML with the SASL client with the appropriate SAML authentication result.
authentication result. It can do so by comparing the ID of the SAML It can do so by comparing the ID of the SAML authentication request
authentication request it has issued with the one it receives in the it has issued with the one it receives in the SAML authentication
SAML authentication statement. statement.
3.3. Outcome and parameters 3.3. Outcome and Parameters
The SASL server (in its capacity as a SAML Relying Party) now The SASL server (in its capacity as a SAML RP) now validates the SAML
validates the SAML authentication response it received from the SAML authentication response it received from the SAML client via HTTP or
client via HTTP or HTTPS. HTTPS.
The outcome of that validation by the SASL server constitutes a SASL The outcome of that validation by the SASL server constitutes a SASL
mechanism outcome, and therefore (as stated in [RFC4422]) SHALL be mechanism outcome and therefore (as stated in [RFC4422]) SHALL be
used to set state in the server accordingly, and it SHALL be used by used to set state in the server accordingly, and it SHALL be used by
the server to report that state to the SASL client as described in the server to report that state to the SASL client, as described in
[RFC4422] Section 3.6 (message 8 in Figure 2). [RFC4422], Section 3.6 (message 8 in Figure 2).
4. SAML GSS-API Mechanism Specification 4. SAML GSS-API Mechanism Specification
This section and its sub-sections are not required for SASL This section and its sub-sections are not required for SASL
implementors, but this section MUST be observed to implement the GSS- implementors, but this section MUST be observed to implement the
API mechanism discussed below. GSS-API mechanism discussed below.
This section specify a GSS-API mechanism that when used via the GS2 This section specifies a GSS-API mechanism that, when used via the
bridge to SASL behaves like the SASL mechanism defined in this GS2 bridge to SASL, behaves like the SASL mechanism defined in this
document. Thus, it can loosely be said that the SAML SASL mechanism document. Thus, it can loosely be said that the SAML SASL mechanism
is also a GSS-API mechanism. The SAML user takes the role of the is also a GSS-API mechanism. The SAML user takes the role of the
GSS-API Initiator and the SAML Relying Party takes the role of the GSS-API Initiator, and the SAML RP takes the role of the GSS-API
GSS-API Acceptor. The SAML Identity Provider does not have a role in Acceptor. The SAML IdP does not have a role in GSS-API and is
GSS-API, and is considered an internal matter for the SAML mechanism. considered an internal matter for the SAML mechanism. The messages
The messages are the same, but are the same, but
a) the GS2 header on the client's first message and channel binding a) the GS2 header on the client's first message and channel-binding
data is excluded when SAML is used as a GSS-API mechanism, and data are excluded when SAML is used as a GSS-API mechanism, and
b) the RFC2743 section 3.1 initial context token header is prefixed b) the initial context token header (Section 3.1 of [RFC2743]) is
to the client's first authentication message (context token). prefixed to the client's first authentication message (context
token).
The GSS-API mechanism OID for SAML is OID-TBD (IANA to assign: see The GSS-API mechanism OID for SAML is 1.3.6.1.5.5.17 (see Section 7.2
IANA considerations). for more information). The DER encoding of the OID is
0x2b 0x06 0x01 0x05 0x05 0x11.
SAML20 security contexts MUST have the mutual_state flag SAML20 security contexts MUST have the mutual_state flag
(GSS_C_MUTUAL_FLAG) set to TRUE. SAML does not support credential (GSS_C_MUTUAL_FLAG) set to TRUE. SAML does not support credential
delegation, therefore SAML security contexts MUST have the delegation; therefore, SAML security contexts MUST have the
deleg_state flag (GSS_C_DELEG_FLAG) set to FALSE. deleg_state flag (GSS_C_DELEG_FLAG) set to FALSE.
The mutual authentication property of this mechanism relies on The mutual authentication property of this mechanism relies on
successfully comparing the TLS server identity with the negotiated successfully comparing the TLS server's identity with the negotiated
target name. Since the TLS channel is managed by the application target name. Since the TLS channel is managed by the application
outside of the GSS-API mechanism, the mechanism itself is unable to outside of the GSS-API mechanism, the mechanism itself is unable to
confirm the name while the application is able to perform this confirm the name, while the application is able to perform this
comparison for the mechanism. For this reason, applications MUST comparison for the mechanism. For this reason, applications MUST
match the TLS server identity with the target name, as discussed in match the TLS server's identity with the target name, as discussed in
[RFC6125]. More precisely, to pass identity validation the client [RFC6125]. More precisely, to pass identity validation, the client
uses the securely negotiated targ_name as the reference identifier uses the securely negotiated targ_name as the reference identifier
and match it to the DNS-ID of the server certificate, and MUST reject and matches it to the DNS-ID of the server's certificate, and it MUST
the connection if there is a mismatch. For compatibility with reject the connection if there is a mismatch. For compatibility with
deployed certificate hierarchies, the client MAY also perform a deployed certificate hierarchies, the client MAY also perform a
comparison with the CN-ID when there is no DNS-ID present. Wildcard comparison with the Common Name ID (CN-ID) when there is no DNS-ID
matching is permitted. The targ_name reference identifier is a present. Wildcard matching is permitted. The targ_name reference
"traditional domain names" thus the comparison is made using case- identifier is a "traditional domain names"; thus, the comparison is
insensitive ASCII comparison. made using case-insensitive ASCII comparison.
The SAML mechanism does not support per-message tokens or The SAML mechanism does not support per-message tokens or the
GSS_Pseudo_random. GSS_Pseudo_random() function [RFC4401].
4.1. GSS-API Principal Name Types for SAML 4.1. GSS-API Principal Name Types for SAML
SAML supports standard generic name syntaxes for acceptors such as SAML supports standard generic name syntaxes for acceptors such as
GSS_C_NT_HOSTBASED_SERVICE (see [RFC2743], Section 4.1). SAML GSS_C_NT_HOSTBASED_SERVICE (see [RFC2743], Section 4.1). SAML
supports only a single name type for initiators: GSS_C_NT_USER_NAME. supports only a single name type for initiators: GSS_C_NT_USER_NAME.
GSS_C_NT_USER_NAME is the default name type for SAML. The query, GSS_C_NT_USER_NAME is the default name type for SAML. The query,
display, and exported name syntaxes for SAML principal names are all display, and exported name syntaxes for SAML principal names are all
the same. There are no SAML-specific name syntaxes -- applications the same. There are no SAML-specific name syntaxes -- applications
should use generic GSS-API name types such as GSS_C_NT_USER_NAME and should use generic GSS-API name types, such as GSS_C_NT_USER_NAME and
GSS_C_NT_HOSTBASED_SERVICE (see [RFC2743], Section 4). The exported GSS_C_NT_HOSTBASED_SERVICE (see [RFC2743] Section 4). The exported
name token does, of course, conforms to [RFC2743], Section 3.2. name token, of course, conforms to [RFC2743], Section 3.2.
5. Examples 5. Examples
5.1. XMPP 5.1. XMPP
Suppose the user has an identity at the SAML IdP saml.example.org and Suppose the user has an identity at the SAML IdP saml.example.org and
a Jabber Identifier (JID) "somenode@example.com", and wishes to a Jabber Identifier (JID) "somenode@example.com" and wishes to
authenticate his XMPP connection to xmpp.example.com. The authenticate his XMPP [RFC6120] connection to xmpp.example.com. The
authentication on the wire would then look something like the authentication on the wire would then look something like the
following: following:
Step 1: Client initiates stream to server: Step 1: Client initiates stream to server:
<stream:stream xmlns='jabber:client' <stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams' xmlns:stream='http://etherx.jabber.org/streams'
to='example.com' version='1.0'> to='example.com' version='1.0'>
Step 2: Server responds with a stream tag sent to client: Step 2: Server responds with a stream tag sent to client:
skipping to change at page 14, line 36 skipping to change at page 12, line 4
Step 3: Server informs client of available authentication mechanisms: Step 3: Server informs client of available authentication mechanisms:
<stream:features> <stream:features>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'> <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>DIGEST-MD5</mechanism> <mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism> <mechanism>PLAIN</mechanism>
<mechanism>SAML20</mechanism> <mechanism>SAML20</mechanism>
</mechanisms> </mechanisms>
</stream:features> </stream:features>
Step 4: Client selects an authentication mechanism and provides the Step 4: Client selects an authentication mechanism and provides the
initial client response containing the according to the definition in initial client response -- containing the gs2-header and domain --
Section 4 ofBASE64 [RFC4648] encoded gs2-header and domain: that has been encoded in base64 according to Section 4 of [RFC4648]:
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='SAML20'> <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='SAML20'>
biwsZXhhbXBsZS5vcmc</auth> biwsZXhhbXBsZS5vcmc=</auth>
The decoded string is: n,,example.org The decoded string is
Step 5: Server sends a BASE64 encoded challenge to client in the form
of an HTTP Redirect to the SAML IdP corresponding to example.org
(https://saml.example.org) with the SAML Authentication Request as
specified in the redirection url:
aHR0cHM6Ly9zYW1sLmV4YW1wbGUub3JnL1NBTUwvQnJvd3Nlcj9TQU1MUmVx n,,example.org
dWVzdD1QSE5oYld4d09rRjFkR2h1VW1WeGRXVnpkQ0I0Yld4dWN6cHpZVzFz
Y0QwaWRYSnVPbTloYzJsek9tNWhiV1Z6T25Sak9sTkJUVXc2TWk0d09uQnli
M1J2WTI5c0lnMEtJQ0FnSUVsRVBTSmZZbVZqTkRJMFptRTFNVEF6TkRJNE9U
QTVZVE13Wm1ZeFpUTXhNVFk0TXpJM1pqYzVORGMwT1RnMElpQldaWEp6YVc5
dVBTSXlMakFpRFFvZ0lDQWdTWE56ZFdWSmJuTjBZVzUwUFNJeU1EQTNMVEV5
TFRFd1ZERXhPak01T2pNMFdpSWdSbTl5WTJWQmRYUm9iajBpWm1Gc2MyVWlE
UW9nSUNBZ1NYTlFZWE56YVhabFBTSm1ZV3h6WlNJTkNpQWdJQ0JRY205MGIy
TnZiRUpwYm1ScGJtYzlJblZ5YmpwdllYTnBjenB1WVcxbGN6cDBZenBUUVUx
TU9qSXVNRHBpYVc1a2FXNW5jenBJVkZSUUxWQ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WmcwS0lDQWdJQ0FnZUcxc2JuTTZj
MkZ0YkQwaWRYSnVPbTloYzJsek9tNWhiV1Z6T25Sak9sTkJUVXc2TWk0d09t
RnpjMlZ5ZEdsdmJpSStEUW9nb0NBZ0lDQjFjbTQ2YjJGemFYTTZibUZ0WlhN
NmRHTTZVMEZOVERveUxqQTZZV002WTJ4aGMzTmxjenBRWVhOemQyOXlaRkJ5
YjNSbFkzUmxaRlJ5WVc1emNHOXlkQTBLSUNBOEwzTmhiV3c2UVhWMGFHNURi
MjUwWlhoMFEyeGhjM05TWldZK0RRb2dQQzl6WVcxc2NEcFNaWEYxWlhOMFpX
UkJkWFJvYmtOdmJuUmxlSFErSUEwS1BDOXpZVzFzY0RwQmRYUm9ibEpsY1hW
bGMzUSs=
The decoded challenge is: Step 5: Server sends a base64-encoded challenge to client in the form
of an HTTP redirect to the SAML IdP corresponding to example.org
(https://saml.example.org) with the SAML authentication request as
specified in the redirection URL:
https://saml.example.org/SAML/Browser?SAMLRequest=PHNhbWxwOk aHR0cHM6Ly9zYW1sLmV4YW1wbGUub3JnL1NBTUwvQnJvd3Nlcj9TQU1MUmVx
F1dGhuUmVxdWVzdCB4bWxuczpzYW1scD0idXJuOm9hc2lzOm5hbWVzOnRjOl dWVzdD1QSE5oYld4d09rRjFkR2h1VW1WeGRXVnpkQ0I0Yld4dWN6cHpZVzFz
NBTUw6Mi4wOnByb3RvY29sIg0KICAgIElEPSJfYmVjNDI0ZmE1MTAzNDI4OT Y0QwaWRYSnVPbTloYzJsek9tNWhiV1Z6T25Sak9sTkJUVXc2TWk0d09uQnli
A5YTMwZmYxZTMxMTY4MzI3Zjc5NDc0OTg0IiBWZXJzaW9uPSIyLjAiDQogIC M1J2WTI5c0lnMEtJQ0FnSUVsRVBTSmZZbVZqTkRJMFptRTFNVEF6TkRJNE9U
AgSXNzdWVJbnN0YW50PSIyMDA3LTEyLTEwVDExOjM5OjM0WiIgRm9yY2VBdX QTVZVE13Wm1ZeFpUTXhNVFk0T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6Mi4wOm
Fzc2VydGlvbiI+DQogICAgICAgICAgIHVybjpvYXNpczpuYW1lczp0YzpTQU
1MOjIuMDphYzpjbGFzc2VzOlBhc3N3b3JkUHJvdGVjdGVkVHJhbnNwb3J0DQ
ogIDwvc2FtbDpBdXRobkNvbnRleHRDbGFzc1JlZj4NCiA8L3NhbWxwOlJlcX
Vlc3RlZEF1dGhuQ29udGV4dD4gDQo8L3NhbWxwOkF1dGhuUmVxdWVzdD4=
Where the decoded SAMLRequest looks like the following:
<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" <samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
ID="_bec424fa5103428909a30ff1e31168327f79474984" Version="2.0" ID="_bec424fa5103428909a30ff1e31168327f79474984" Version="2.0"
IssueInstant="2007-12-10T11:39:34Z" ForceAuthn="false" IssueInstant="2007-12-10T11:39:34Z" ForceAuthn="false"
IsPassive="false" IsPassive="false"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
AssertionConsumerServiceURL= AssertionConsumerServiceURL=
"https://xmpp.example.com/SAML/AssertionConsumerService"> "https://xmpp.example.com/SAML/AssertionConsumerService">
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"> <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
https://xmpp.example.com https://xmpp.example.com
skipping to change at page 17, line 28 skipping to change at page 14, line 13
<samlp:RequestedAuthnContext <samlp:RequestedAuthnContext
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
Comparison="exact"> Comparison="exact">
<saml:AuthnContextClassRef <saml:AuthnContextClassRef
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"> xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport
</saml:AuthnContextClassRef> </saml:AuthnContextClassRef>
</samlp:RequestedAuthnContext> </samlp:RequestedAuthnContext>
</samlp:AuthnRequest> </samlp:AuthnRequest>
Note: the server can use the request ID Note: The server can use the request ID
(_bec424fa5103428909a30ff1e31168327f79474984) to correlate the SASL ("_bec424fa5103428909a30ff1e31168327f79474984") to correlate the SASL
session with the SAML authentication. session with the SAML authentication.
Step 5 (alternative): Server returns error to client if no SAML Step 5 (alternative): Server returns error to client if no SAML
Authentication Request can be constructed: authentication request can be constructed:
<failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'> <failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<temporary-auth-failure/> <temporary-auth-failure/>
</failure> </failure>
</stream:stream> </stream:stream>
Step 6: Client sends the empty response to the challenge encoded as a Step 6: Client sends the "=" response (base64-encoded) to the
single =: challenge:
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'> <response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
= PQ==
</response> </response>
The following steps between brackets are out of scope for this The following steps between brackets are out of scope for this
document but included to better illustrate the entire flow. document but are included to better illustrate the entire flow:
[The client now sends the URL to a browser instance for processing. [The client now sends the URL to a browser instance for processing.
The browser engages in a normal SAML authentication flow (external to The browser engages in a normal SAML authentication flow (external to
SASL), like redirection to the Identity Provider SASL), like redirection to the IdP (https://saml.example.org); the
(https://saml.example.org), the user logs into user logs into https://saml.example.org and agrees to authenticate to
https://saml.example.org, and agrees to authenticate to xmpp.example.com. A redirect is passed back to the client browser.
xmpp.example.com. A redirect is passed back to the client browser The client browser in turn sends the AuthN response, which contains
who sends the AuthN response to the server, containing the subject- the subject-identifier as an attribute, to the server. If the AuthN
identifier as an attribute. If the AuthN response doesn't contain response doesn't contain the JID, the server maps the subject-
the JID, the server maps the subject-identifier received from the IdP identifier received from the IdP to a JID.]
to a JID]
Step 7: Server informs client of successful authentication: Step 7: Server informs client of successful authentication:
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/> <success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
Step 7 (alternative): Server informs client of failed authentication:
Step 7 (alt): Server informs client of failed authentication:
<failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'> <failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<not-authorized/> <not-authorized/>
</failure> </failure>
</stream:stream> </stream:stream>
Please note: line breaks were added to the base64 for clarity. Please note: Line breaks were added to the base64 data for clarity.
5.2. IMAP 5.2. IMAP
The following describes an IMAP exchange. Lines beginning with 'S:' The following sequence describes an IMAP exchange. Lines beginning
indicate data sent by the server, and lines starting with 'C:' with 'S:' indicate data sent by the server, and lines starting with
indicate data sent by the client. Long lines are wrapped for 'C:' indicate data sent by the client. Long lines are wrapped for
readability. readability.
S: * OK IMAP4rev1 S: * OK IMAP4rev1
C: . CAPABILITY C: . CAPABILITY
S: * CAPABILITY IMAP4rev1 STARTTLS S: * CAPABILITY IMAP4rev1 STARTTLS
S: . OK CAPABILITY Completed S: . OK CAPABILITY Completed
C: . STARTTLS C: . STARTTLS
S: . OK Begin TLS negotiation now S: . OK Begin TLS negotiation now
C: . CAPABILITY C: . CAPABILITY
S: * CAPABILITY IMAP4rev1 AUTH=SAML20 S: * CAPABILITY IMAP4rev1 AUTH=SAML20
S: . OK CAPABILITY Completed S: . OK CAPABILITY Completed
C: . AUTHENTICATE SAML20 C: . AUTHENTICATE SAML20
S: + S: +
C: biwsZXhhbXBsZS5vcmc C: biwsZXhhbXBsZS5vcmc=
S: + aHR0cHM6Ly9zYW1sLmV4YW1wbGUub3JnL1NBTUwvQnJvd3Nlcj9TQU1M S: + aHR0cHM6Ly9zYW1sLmV4YW1wbGUub3JnL1NBTUwvQnJvd3Nlcj9TQU1M
UmVxdWVzdD1QSE5oYld4d09rRg0KMWRHaHVVbVZ4ZFdWemRDQjRiV3h1Y3pwe UmVxdWVzdD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BaV1JCZFhSb2JrTnZiblJsZUhRK0lB EUW9nUEM5ellXMXNjRHBTWlhGMVpYTjBaV1JCZFhSb2JrTnZiblJsZUhRK0lB
MEtQQw0KOXpZVzFzY0RwQmRYUm9ibEpsY1hWbGMzUSs= MEtQQw0KOXpZVzFzY0RwQmRYUm9ibEpsY1hWbGMzUSs=
C: C: PQ==
S: . OK Success (tls protection) S: . OK Success (TLS protection)
The decoded challenge is:
The decoded challenge is as follows:
https://saml.example.org/SAML/Browser?SAMLRequest=PHNhbWxwOkF https://saml.example.org/SAML/Browser?SAMLRequest=PHNhbWxwOkF
1dGhuUmVxdWVzdCB4bWxuczpzYW1scD0idXJuOm9hc2lzOm5hbWVzOnRjOlNB 1dGhuUmVxdWVzdCB4bWxuczpzYW1scD0idXJuOm9hc2lzOm5hbWVzOnRjOlNB
TUw6Mi4wOnByb3RvY29sIg0KICAgIElEPSJfYmVjNDI0ZmE1MTAzNDI4OTA5Y TUw6Mi4wOnByb3RvY29sIg0KICAgIElEPSJfYmVjNDI0ZmE1MTAzNDI4OTA5Y
TMwZmYxZTMxMTY4MzI3Zjc5NDc0OTg0IiBWZXJzaW9uPSIyLjAiDQogICAgSX TMwZmYxZTMxMTY4MzI3Zjc5NDc0OTg0IiBWZXJzaW9uPSIyLjAiDQogICAgSX
NzdWVJbnN0YW50PSIyMDA3LTEyLTEwVDExOjM5OjM0WiIgRm9yY2VBdXRobj0 NzdWVJbnN0YW50PSIyMDA3LTEyLTEwVDExOjM5OjM0WiIgRm9yY2VBdXRobj0
iZmFsc2UiDQogICAgSXNQYXNzaXZlPSJmYWxzZSINCiAgICBQcm90b2NvbEJp iZmFsc2UiDQogICAgSXNQYXNzaXZlPSJmYWxzZSINCiAgICBQcm90b2NvbEJp
bmRpbmc9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpiaW5kaW5nczpIV bmRpbmc9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpiaW5kaW5nczpIV
FRQLVBPU1QiDQogICAgQXNzZXJ0aW9uQ29uc3VtZXJTZXJ2aWNlVVJMPQ0KIC FRQLVBPU1QiDQogICAgQXNzZXJ0aW9uQ29uc3VtZXJTZXJ2aWNlVVJMPQ0KIC
AgICAgICAiaHR0cHM6Ly9tYWlsLmV4YW1wbGUuY29tL1NBTUwvQXNzZXJ0aW9 AgICAgICAiaHR0cHM6Ly9tYWlsLmV4YW1wbGUuY29tL1NBTUwvQXNzZXJ0aW9
skipping to change at page 20, line 31 skipping to change at page 17, line 4
QogICAgIFNQTmFtZVF1YWxpZmllcj0ieG1wcC5leGFtcGxlLmNvbSIgQWxsb3 QogICAgIFNQTmFtZVF1YWxpZmllcj0ieG1wcC5leGFtcGxlLmNvbSIgQWxsb3
dDcmVhdGU9InRydWUiIC8+DQogPHNhbWxwOlJlcXVlc3RlZEF1dGhuQ29udGV dDcmVhdGU9InRydWUiIC8+DQogPHNhbWxwOlJlcXVlc3RlZEF1dGhuQ29udGV
4dA0KICAgICB4bWxuczpzYW1scD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6 4dA0KICAgICB4bWxuczpzYW1scD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6
Mi4wOnByb3RvY29sIiANCiAgICAgICAgQ29tcGFyaXNvbj0iZXhhY3QiPg0KI Mi4wOnByb3RvY29sIiANCiAgICAgICAgQ29tcGFyaXNvbj0iZXhhY3QiPg0KI
CA8c2FtbDpBdXRobkNvbnRleHRDbGFzc1JlZg0KICAgICAgeG1sbnM6c2FtbD CA8c2FtbDpBdXRobkNvbnRleHRDbGFzc1JlZg0KICAgICAgeG1sbnM6c2FtbD
0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOmFzc2VydGlvbiI+DQogICA 0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOmFzc2VydGlvbiI+DQogICA
gICB1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6YWM6Y2xhc3NlczpQYXNz gICB1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6YWM6Y2xhc3NlczpQYXNz
d29yZFByb3RlY3RlZFRyYW5zcG9ydA0KICA8L3NhbWw6QXV0aG5Db250ZXh0Q d29yZFByb3RlY3RlZFRyYW5zcG9ydA0KICA8L3NhbWw6QXV0aG5Db250ZXh0Q
2xhc3NSZWY+DQogPC9zYW1scDpSZXF1ZXN0ZWRBdXRobkNvbnRleHQ+IA0KPC 2xhc3NSZWY+DQogPC9zYW1scDpSZXF1ZXN0ZWRBdXRobkNvbnRleHQ+IA0KPC
9zYW1scDpBdXRoblJlcXVlc3Q+ 9zYW1scDpBdXRoblJlcXVlc3Q+
Where the decoded SAMLRequest looks like the following:
Where the decoded SAMLRequest looks like:
<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" <samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
ID="_bec424fa5103428909a30ff1e31168327f79474984" Version="2.0" ID="_bec424fa5103428909a30ff1e31168327f79474984" Version="2.0"
IssueInstant="2007-12-10T11:39:34Z" ForceAuthn="false" IssueInstant="2007-12-10T11:39:34Z" ForceAuthn="false"
IsPassive="false" IsPassive="false"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
AssertionConsumerServiceURL= AssertionConsumerServiceURL=
"https://mail.example.com/SAML/AssertionConsumerService"> "https://mail.example.com/SAML/AssertionConsumerService">
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"> <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
https://xmpp.example.com https://xmpp.example.com
skipping to change at page 22, line 9 skipping to change at page 17, line 33
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"> xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport
</saml:AuthnContextClassRef> </saml:AuthnContextClassRef>
</samlp:RequestedAuthnContext> </samlp:RequestedAuthnContext>
</samlp:AuthnRequest> </samlp:AuthnRequest>
6. Security Considerations 6. Security Considerations
This section addresses only security considerations associated with This section addresses only security considerations associated with
the use of SAML with SASL applications. For considerations relating the use of SAML with SASL applications. For considerations relating
to SAML in general, the reader is referred to the SAML specification to SAML in general, and for general SASL security considerations, the
and to other literature. Similarly, for general SASL Security reader is referred to the SAML specifications and to other
Considerations, the reader is referred to that specification. literature.
6.1. Man in the middle and Tunneling Attacks 6.1. Man-in-the-Middle and Tunneling Attacks
This mechanism is vulnerable to man-in-the-middle and tunneling This mechanism is vulnerable to man-in-the-middle and tunneling
attacks unless a client always verifies the server identity before attacks unless a client always verifies the server's identity before
proceeding with authentication (see [RFC6125]). Typically TLS is proceeding with authentication (see [RFC6125]). Typically, TLS is
used to provide a secure channel with server authentication. used to provide a secure channel with server authentication.
6.2. Binding SAML subject identifiers to Authorization Identities 6.2. Binding SAML Subject Identifiers to Authorization Identities
As specified in [RFC4422], the server is responsible for binding As specified in [RFC4422], the server is responsible for binding
credentials to a specific authorization identity. It is therefore credentials to a specific authorization identity. It is therefore
necessary that only specific trusted IdPs be allowed. This is necessary that only specific trusted IdPs be allowed. This is a
typical part of SAML trust establishment between Relying Parties and typical part of SAML trust establishment between RPs and the IdP.
IdP.
6.3. User Privacy 6.3. User Privacy
The IdP is aware of each Relying Party that a user logs into. There The IdP is aware of each RP that a user logs into. There is nothing
is nothing in the protocol to hide this information from the IdP. It in the protocol to hide this information from the IdP. It is not a
is not a requirement to track the visits, but there is nothing that requirement to track the visits, but there is nothing that prohibits
prohibits the collection of information. SASL server implementers the collection of information. SASL server implementers should be
should be aware that SAML IdPs will be able to track - to some extent aware that SAML IdPs will be able to track -- to some extent -- user
- user access to their services. access to their services.
6.4. Collusion between RPs 6.4. Collusion between RPs
It is possible for Relying Parties to link data that they have It is possible for RPs to link data that they have collected on the
collected on the users. By using the same identifier to log into users. By using the same identifier to log into every RP, collusion
every Relying Party, collusion between Relying Parties is possible. between RPs is possible. In SAML, targeted identity was introduced.
In SAML, targeted identity was introduced. Targeted identity allows Targeted identity allows the IdP to transform the identifier the user
the IdP to transform the identifier the user typed in to a Relying typed in to an RP-specific opaque identifier. This way, the RP would
Party specific opaque identifier. This way the Relying Party would never see the actual user identifier but instead would see a randomly
never see the actual user identifier, but a randomly generated generated identifier.
identifier.
6.5. GSS-API specific security considerations 6.5. Security Considerations Specific to GSS-API
Security issues inherent in GSS-API (RFC 2743) and GS2 (RFC 5801) Security issues inherent in GSS-API [RFC2743] and GS2 [RFC5801] apply
apply to the SAML GSS-API mechanism defined in this document. to the SAML GSS-API mechanism defined in this document. Further, and
Further, and as discussed in section 4, proper TLS server identity as discussed in Section 4, proper TLS server identity verification is
verification is critical to the security of the mechanism. critical to the security of the mechanism.
7. IANA Considerations 7. IANA Considerations
7.1. IANA mech-profile 7.1. IANA Mech-Profile
The IANA is requested to register the following SASL profile: The IANA has registered the following SASL profile:
SASL mechanism profile: SAML20 SASL mechanism profile: SAML20
Security Considerations: See this document Security Considerations: See this document
Published Specification: See this document Published Specification: See this document
For further information: Contact the authors of this document. For further information: Contact the authors of this document.
Owner/Change controller: the IETF Owner/Change controller: the IETF
Intended usage: COMMON Intended usage: COMMON
Note: None Note: None
7.2. IANA OID 7.2. IANA OID
The IANA is further requested to assign a new entry for this GSS The IANA has also assigned a new entry for this GSS mechanism in the
mechanism in the sub-registry for SMI Security for Mechanism Codes, SMI Security for Mechanism Codes sub-registry, whose prefix is
whose prefix is iso.org.dod.internet.security.mechanisms iso.org.dod.internet.security.mechanisms (1.3.6.1.5.5), and
(1.3.6.1.5.5) and to reference this specification in the registry. referenced this specification in the registry.
8. References 8. References
8.1. Normative References 8.1. Normative References
[OASIS.saml-bindings-2.0-os] [OASIS-SAMLv2-BIND]
Cantor, S., Hirsch, F., Kemp, J., Philpott, R., and E. Cantor, S., Ed., Hirsch, F., Ed., Kemp, J., Ed., Philpott,
Maler, "Bindings for the OASIS Security Assertion Markup R., Ed., and E. Maler, Ed., "Bindings for the OASIS
Language (SAML) V2.0", OASIS Security Assertion Markup Language (SAML) V2.0", OASIS
Standard saml-bindings-2.0-os, March 2005. Standard saml-bindings-2.0-os, March 2005, <http://
docs.oasis-open.org/security/saml/v2.0/
[OASIS.saml-core-2.0-os] saml-bindings-2.0-os.pdf>.
Cantor, S., Kemp, J., Philpott, R., and E. Maler,
"Assertions and Protocol for the OASIS Security Assertion
Markup Language (SAML) V2.0", OASIS Standard saml-core-
2.0-os, March 2005.
[OASIS.saml-profiles-2.0-os] [OASIS-SAMLv2-CORE]
Hughes, J., Cantor, S., Hodges, J., Hirsch, F., Mishra, Cantor, S., Ed., Kemp, J., Ed., Philpott, R., Ed., and E.
P., Philpott, R., and E. Maler, "Profiles for the OASIS Maler, Ed., "Assertions and Protocols for the OASIS
Security Assertion Markup Language (SAML) V2.0", OASIS Security Assertion Markup Language (SAML) V2.0", OASIS
Standard OASIS.saml-profiles-2.0-os, March 2005. Standard saml-core-2.0-os, March 2005, <http://
docs.oasis-open.org/security/saml/v2.0/
saml-core-2.0-os.pdf>.
[OASIS-SAMLv2-PROF]
Hughes, J., Ed., Cantor, S., Ed., Hodges, J., Ed., Hirsch,
F., Ed., Mishra, P., Ed., Philpott, R., Ed., and E. Maler,
Ed., "Profiles for the OASIS Security Assertion Markup
Language (SAML) V2.0", OASIS Standard OASIS.saml-profiles-
2.0-os, March 2005, <http://docs.oasis-open.org/security/
saml/v2.0/saml-profiles-2.0-os.pdf>.
[RFC1035] Mockapetris, P., "Domain names - implementation and [RFC1035] Mockapetris, P., "Domain names - implementation and
specification", STD 13, RFC 1035, November 1987. specification", STD 13, RFC 1035, November 1987.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
skipping to change at page 26, line 5 skipping to change at page 20, line 18
for Internationalized Domain Names in Applications for Internationalized Domain Names in Applications
(IDNA)", RFC 3492, March 2003. (IDNA)", RFC 3492, March 2003.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66, Resource Identifier (URI): Generic Syntax", STD 66,
RFC 3986, January 2005. RFC 3986, January 2005.
[RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource
Identifiers (IRIs)", RFC 3987, January 2005. Identifiers (IRIs)", RFC 3987, January 2005.
[RFC4422] Melnikov, A. and K. Zeilenga, "Simple Authentication and [RFC4422] Melnikov, A., Ed., and K. Zeilenga, Ed., "Simple
Security Layer (SASL)", RFC 4422, June 2006. Authentication and Security Layer (SASL)", RFC 4422,
June 2006.
[RFC5056] Williams, N., "On the Use of Channel Bindings to Secure [RFC5056] Williams, N., "On the Use of Channel Bindings to Secure
Channels", RFC 5056, November 2007. Channels", RFC 5056, November 2007.
[RFC5234] Crocker, D., Ed., and P. Overell, "Augmented BNF for
Syntax Specifications: ABNF", STD 68, RFC 5234,
January 2008.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, August 2008. (TLS) Protocol Version 1.2", RFC 5246, August 2008.
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
Housley, R., and W. Polk, "Internet X.509 Public Key Housley, R., and W. Polk, "Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", RFC 5280, May 2008. (CRL) Profile", RFC 5280, May 2008.
[RFC5801] Josefsson, S. and N. Williams, "Using Generic Security [RFC5801] Josefsson, S. and N. Williams, "Using Generic Security
Service Application Program Interface (GSS-API) Mechanisms Service Application Program Interface (GSS-API) Mechanisms
skipping to change at page 26, line 37 skipping to change at page 21, line 11
[RFC5891] Klensin, J., "Internationalized Domain Names in [RFC5891] Klensin, J., "Internationalized Domain Names in
Applications (IDNA): Protocol", RFC 5891, August 2010. Applications (IDNA): Protocol", RFC 5891, August 2010.
[RFC6125] Saint-Andre, P. and J. Hodges, "Representation and [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and
Verification of Domain-Based Application Service Identity Verification of Domain-Based Application Service Identity
within Internet Public Key Infrastructure Using X.509 within Internet Public Key Infrastructure Using X.509
(PKIX) Certificates in the Context of Transport Layer (PKIX) Certificates in the Context of Transport Layer
Security (TLS)", RFC 6125, March 2011. Security (TLS)", RFC 6125, March 2011.
[W3C.REC-html401-19991224] [W3C-REC-HTML401]
Hors, A., Raggett, D., and I. Jacobs, "HTML 4.01 Le Hors, A., Ed., Raggett, D., Ed., and I. Jacobs, Ed.,
Specification", World Wide Web Consortium "HTML 4.01 Specification", World Wide Web Consortium
Recommendation REC-html401-19991224, December 1999, Recommendation REC-html401-19991224, December 1999,
<http://www.w3.org/TR/1999/REC-html401-19991224>. <http://www.w3.org/TR/1999/REC-html401-19991224>.
8.2. Informative References 8.2. Informative References
[RFC1939] Myers, J. and M. Rose, "Post Office Protocol - Version 3", [RFC1939] Myers, J. and M. Rose, "Post Office Protocol - Version 3",
STD 53, RFC 1939, May 1996. STD 53, RFC 1939, May 1996.
[RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL -
4rev1", RFC 3501, March 2003. VERSION 4rev1", RFC 3501, March 2003.
[RFC4401] Williams, N., "A Pseudo-Random Function (PRF) API
Extension for the Generic Security Service Application
Program Interface (GSS-API)", RFC 4401, February 2006.
[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data
Encodings", RFC 4648, October 2006. Encodings", RFC 4648, October 2006.
[RFC6120] Saint-Andre, P., "Extensible Messaging and Presence [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence
Protocol (XMPP): Core", RFC 6120, March 2011. Protocol (XMPP): Core", RFC 6120, March 2011.
Appendix A. Acknowledgments Appendix A. Acknowledgments
The authors would like to thank Scott Cantor, Joe Hildebrand, Josh The authors would like to thank Scott Cantor, Joe Hildebrand, Josh
Howlett, Leif Johansson, Thomas Lenggenhager, Diego Lopez, Hank Howlett, Leif Johansson, Thomas Lenggenhager, Diego Lopez, Hank
Mauldin, RL 'Bob' Morgan, Stefan Plug and Hannes Tschofenig for their Mauldin, RL "Bob" Morgan, Stefan Plug, and Hannes Tschofenig for
review and contributions. their review and contributions.
Appendix B. Changes
This section to be removed prior to publication.
o 09 Fixed text per IESG review
o 08 Fixed text per Gen-Art review
o 07 Fixed text per comments Alexey Melnikov
o 06 Fixed text per AD comments
o 05 Fixed references per ID-nits
o 04 Added request for IANA assignment, few text clarifications
o 03 Number of cosmetic changes, fixes per comments Alexey Melnikov
o 02 Changed IdP URI to domain per Joe Hildebrand, fixed some typos
o 00 WG -00 draft. Updates GSS-API section, some fixes per Scott
Cantor
o 01 Added authorization identity, added GSS-API specifics, added
client supplied IdP
o 00 Initial Revision.
Authors' Addresses Authors' Addresses
Klaas Wierenga Klaas Wierenga
Cisco Systems, Inc. Cisco Systems, Inc.
Haarlerbergweg 13-19 Haarlerbergweg 13-19
Amsterdam, Noord-Holland 1101 CH 1101 CH Amsterdam
Netherlands The Netherlands
Phone: +31 20 357 1752 Phone: +31 20 357 1752
Email: klaas@cisco.com EMail: klaas@cisco.com
Eliot Lear Eliot Lear
Cisco Systems GmbH Cisco Systems GmbH
Richtistrasse 7 Richtistrasse 7
Wallisellen, ZH CH-8304 CH-8304 Wallisellen
Switzerland Switzerland
Phone: +41 44 878 9200 Phone: +41 44 878 9200
Email: lear@cisco.com EMail: lear@cisco.com
Simon Josefsson Simon Josefsson
SJD AB SJD AB
Hagagatan 24 Johan Olof Wallins vag 13
Stockholm 113 47 Solna 171 64
SE Sweden
Email: simon@josefsson.org EMail: simon@josefsson.org
URI: http://josefsson.org/ URI: http://josefsson.org/
 End of changes. 124 change blocks. 
436 lines changed or deleted 414 lines changed or added

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