draft-ietf-kitten-sasl-oauth-10.txt   draft-ietf-kitten-sasl-oauth-11.txt 
KITTEN W. Mills KITTEN W. Mills
Internet-Draft Yahoo! Inc. Internet-Draft Yahoo! Inc.
Intended status: Standards Track T. Showalter Intended status: Standards Track T. Showalter
Expires: August 28, 2013 Expires: April 20, 2014
H. Tschofenig H. Tschofenig
Nokia Siemens Networks Nokia Solutions and Networks
February 24, 2013 October 17, 2013
A set of SASL and GSS-API Mechanisms for OAuth A set of SASL Mechanisms for OAuth
draft-ietf-kitten-sasl-oauth-10.txt draft-ietf-kitten-sasl-oauth-11.txt
Abstract Abstract
OAuth enables a third-party application to obtain limited access to a OAuth enables a third-party application to obtain limited access to a
protected resource, either on behalf of a resource owner by protected resource, either on behalf of a resource owner by
orchestrating an approval interaction, or by allowing the third-party orchestrating an approval interaction, or by allowing the third-party
application to obtain access on its own behalf. application to obtain access on its own behalf.
This document defines how an application client uses credentials This document defines how an application client uses credentials
obtained via OAuth over the Simple Authentication and Security Layer obtained via OAuth over the Simple Authentication and Security Layer
(SASL) or the Generic Security Service Application Program Interface (SASL) to access a protected resource at a resource serve. Thereby,
(GSS-API) to access a protected resource at a resource serve. it enables schemes defined within the OAuth framework for non-HTTP-
Thereby, it enables schemes defined within the OAuth framework for based application protocols.
non-HTTP-based application protocols.
Clients typically store the user's long-term credential. This does, Clients typically store the user's long-term credential. This does,
however, lead to significant security vulnerabilities, for example, however, lead to significant security vulnerabilities, for example,
when such a credential leaks. A significant benefit of OAuth for when such a credential leaks. A significant benefit of OAuth for
usage in those clients is that the password is replaced by a token. usage in those clients is that the password is replaced by a shared
Tokens typically provided limited access rights and can be managed secret with higher entropy, i.e., the token. Tokens typically
and revoked separately from the user's long-term credential provide limited access rights and can be managed and revoked
(password). separately from the user's long-term password.
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.
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 28, 2013. This Internet-Draft will expire on April 20, 2014.
Copyright Notice Copyright Notice
Copyright (c) 2013 IETF Trust and the persons identified as the Copyright (c) 2013 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 . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 7 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5
3. OAuth SASL Mechanism Specifications . . . . . . . . . . . . . 8 3. OAuth SASL Mechanism Specifications . . . . . . . . . . . . . 5
3.1. Initial Client Response . . . . . . . . . . . . . . . . . 9 3.1. Initial Client Response . . . . . . . . . . . . . . . . . 7
3.1.1. Reserved Key/Values . . . . . . . . . . . . . . . . . 10 3.1.1. Reserved Key/Values . . . . . . . . . . . . . . . . . 7
3.1.2. Use of the gs2-header . . . . . . . . . . . . . . . . 10 3.2. Server's Response . . . . . . . . . . . . . . . . . . . . 8
3.2. Server's Response . . . . . . . . . . . . . . . . . . . . 10 3.2.1. OAuth Identifiers in the SASL Context . . . . . . . . 8
3.2.1. OAuth Identifiers in the SASL Context . . . . . . . . 11 3.2.2. Server Response to Failed Authentication . . . . . . 9
3.2.2. Server Response to Failed Authentication . . . . . . . 11 3.2.3. Completing an Error Message Sequence . . . . . . . . 9
3.2.3. Completing an Error Message Sequence . . . . . . . . . 12 3.3. OAuth Access Token Types using Keyed Message Digests . . 9
3.3. OAuth Access Token Types using Keyed Message Digests . . . 12 3.4. Channel Binding . . . . . . . . . . . . . . . . . . . . . 10
3.4. Channel Binding . . . . . . . . . . . . . . . . . . . . . 13 4. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4. GSS-API OAuth Mechanism Specification . . . . . . . . . . . . 14 4.1. Successful Bearer Token Exchange . . . . . . . . . . . . 11
5. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.2. OAuth 1.0a Authorization with Channel Binding . . . . . . 12
5.1. Successful Bearer Token Exchange . . . . . . . . . . . . . 16 4.3. Failed Exchange . . . . . . . . . . . . . . . . . . . . . 13
5.2. OAuth 1.0a Authorization with Channel Binding . . . . . . 17 4.4. Failed Channel Binding . . . . . . . . . . . . . . . . . 14
5.3. Failed Exchange . . . . . . . . . . . . . . . . . . . . . 18 4.5. SMTP Example of a Failed Negotiation . . . . . . . . . . 14
5.4. Failed Channel Binding . . . . . . . . . . . . . . . . . . 19 5. Security Considerations . . . . . . . . . . . . . . . . . . . 15
5.5. SMTP Example of a Failed Negotiation . . . . . . . . . . . 19 6. Internationalization Considerations . . . . . . . . . . . . . 16
6. Security Considerations . . . . . . . . . . . . . . . . . . . 21 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17
7. Internationalization Considerations . . . . . . . . . . . . . 22 7.1. SASL Registration . . . . . . . . . . . . . . . . . . . . 17
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 18
8.1. SASL Registration . . . . . . . . . . . . . . . . . . . . 23 8.1. Normative References . . . . . . . . . . . . . . . . . . 18
8.2. GSS-API Registration . . . . . . . . . . . . . . . . . . . 24 8.2. Informative References . . . . . . . . . . . . . . . . . 19
9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Appendix A. Acknowlegements . . . . . . . . . . . . . . . . . . 19
9.1. Normative References . . . . . . . . . . . . . . . . . . . 25 Appendix B. Document History . . . . . . . . . . . . . . . . . . 19
9.2. Informative References . . . . . . . . . . . . . . . . . . 26 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 22
Appendix A. Acknowlegements . . . . . . . . . . . . . . . . . . . 28
Appendix B. Document History . . . . . . . . . . . . . . . . . . 29
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 32
1. Introduction 1. Introduction
OAuth 1.0a [RFC5849] and OAuth 2.0 [RFC6749] are protocol frameworks OAuth 1.0a [RFC5849] and OAuth 2.0 [RFC6749] are protocol frameworks
that enable a third-party application to obtain limited access to a that enable a third-party application to obtain limited access to a
protected resource, either on behalf of a resource owner by protected resource, either on behalf of a resource owner by
orchestrating an approval interaction, or by allowing the third-party orchestrating an approval interaction, or by allowing the third-party
application to obtain access on its own behalf. application to obtain access on its own behalf.
The core OAuth 2.0 specification [RFC6749] does not define the The core OAuth 2.0 specification [RFC6749] specifies the interaction
interaction between the OAuth client and the resource server for the between the OAuth client and the authorization server; it does not
access to a protected resource using an Access Token. Instead, this define the interaction between the OAuth client and the resource
functionality is described in separate specifications, such as the server for the access to a protected resource using an Access Token.
bearer token specification [RFC6750]. OAuth 1.0a included the Instead, the OAuth client to resource server interaction is described
communication between the OAuth client and the resource server in in separate specifications, such as the bearer token specification
[RFC5849]. [RFC6750] and the MAC Token specification
[I-D.ietf-oauth-v2-http-mac]. OAuth 1.0a included the protocol
specification for the communication between the OAuth client and the
resource server in [RFC5849].
The main use cases for OAuth 2.0 and OAuth 1.0a have so far focused The main use cases for OAuth 2.0 and OAuth 1.0a have so far focused
on an HTTP-based environment only. This document integrates OAuth on an HTTP-based environment only. This document integrates OAuth
1.0a and OAuth 2.0 into non-HTTP-based applications using the 1.0a and OAuth 2.0 into non-HTTP-based applications using the
integration into SASL and the GSS-API. Hence, this document takes integration into SASL. Hence, this document takes advantage of the
advantage of the OAuth protocol and its deployment base to provide a OAuth protocol and its deployment base to provide a way to use the
way to use SASL [RFC4422] and the GSS-API [RFC2743] to gain access to Simple Authentication and Security Layer (SASL) [RFC4422] to gain
resources when using non-HTTP-based protocols, such as the Internet access to resources when using non-HTTP-based protocols, such as the
Message Access Protocol (IMAP) [RFC3501] and SMTP [RFC5321], which is Internet Message Access Protocol (IMAP) [RFC3501] and SMTP [RFC5321],
what this memo uses in the examples. which is what this memo uses in the examples.
To illustrate the impact of integrating this specification into an To illustrate the impact of integrating this specification into an
OAuth-enabled application environment Figure 1 shows the abstract OAuth-enabled application environment Figure 1 shows the abstract
message flow of OAuth 2.0 [RFC6749]. As indicated in the figure, message flow of OAuth 2.0 [RFC6749]. As indicated in the figure,
this document impacts the exchange of messages (E) and (F) since SASL this document impacts the exchange of messages (E) and (F) since SASL
or the GSS-API is used for interaction between the client and the is used for interaction between the client and the resource server
resource server instead of HTTP. instead of HTTP.
----+ ----+
+--------+ +---------------+ | +--------+ +---------------+ |
| |--(A)-- Authorization Request --->| Resource | | | |--(A)-- Authorization Request --->| Resource | |
| | | Owner | |Plain | | | Owner | |Plain
| |<-(B)------ Access Grant ---------| | |OAuth | |<-(B)------ Access Grant ---------| | |OAuth
| | +---------------+ |2.0 | | +---------------+ |2.0
| | | | | |
| | Client Credentials & +---------------+ | | | Client Credentials & +---------------+ |
| |--(C)------ Access Grant -------->| Authorization | | | |--(C)------ Access Grant -------->| Authorization | |
| Client | | Server | | | Client | | Server | |
| |<-(D)------ Access Token ---------| | | | |<-(D)------ Access Token ---------| | |
| | (w/ Optional Refresh Token) +---------------+ | | | (w/ Optional Refresh Token) +---------------+ |
| | ----+ | | ----+
| | ----+ | | ----+
| | +---------------+ | | | +---------------+ |
| | | | |OAuth | | | | |OAuth
| |--(E)------ Access Token -------->| Resource | |over | |--(E)------ Access Token -------->| Resource | |over
| | | Server | |SASL/ | | | Server | |SASL
| |<-(F)---- Protected Resource -----| | |GSS- | |<-(F)---- Protected Resource -----| | |
| | | | |API | | | | |
+--------+ +---------------+ | +--------+ +---------------+ |
----+ ----+
Figure 1: OAuth 2.0 Protocol Flow Figure 1: OAuth 2.0 Protocol Flow
The Simple Authentication and Security Layer (SASL) is a framework The Simple Authentication and Security Layer (SASL) is a framework
for providing authentication and data security services in for providing authentication and data security services in
connection-oriented protocols via replaceable mechanisms. It connection-oriented protocols via replaceable authentication
provides a structured interface between protocols and mechanisms. mechanisms. It provides a structured interface between protocols and
The resulting framework allows new protocols to reuse existing mechanisms. The resulting framework allows new protocols to reuse
mechanisms and allows old protocols to make use of new mechanisms. existing authentication protocols and allows old protocols to make
The framework also provides a protocol for securing subsequent use of new authentication mechanisms. The framework also provides a
protocol exchanges within a data security layer. protocol for securing subsequent protocol exchanges within a data
security layer.
The Generic Security Service Application Program Interface (GSS-API)
[RFC2743] provides a framework for applications to support multiple
authentication mechanisms through a unified interface.
This document defines SASL mechanisms for OAuth, and it conforms to
the new bridge between SASL and the GSS-API called GS2 [RFC5801].
This means that this document defines both SASL and GSS-API
mechanisms. Implementers may be interested in either the SASL, the
GSS-API, or even both mechanisms. To facilitate these two variants,
the description has been split into two parts, one part that provides
normative references for those interested in the SASL OAuth mechanism
(see Section 3), and a second part for those implementers that wish
to implement the GSS-API portion (see Section 4).
When OAuth is integrated into SASL and the GSS-API the high-level When OAuth is integrated into SASL the high-level steps are as
steps are as follows: follows:
(A) The client requests authorization from the resource owner. (A) The client requests authorization from the resource owner.
The authorization request can be made directly to the resource The authorization request can be made directly to the resource
owner (as shown), or preferably indirectly via the authorization owner (as shown), or preferably indirectly via the authorization
server as an intermediary. server as an intermediary.
(B) The client receives an authorization grant which is a (B) The client receives an authorization grant which is a
credential representing the resource owner's authorization, credential representing the resource owner's authorization,
expressed using one of four grant types defined in this expressed using one of four grant types defined in this
specification or using an extension grant type. The authorization specification or using an extension grant type. The authorization
skipping to change at page 6, line 34 skipping to change at page 5, line 9
validates the authorization grant, and if valid issues an access validates the authorization grant, and if valid issues an access
token. token.
(E) The client requests the protected resource from the resource (E) The client requests the protected resource from the resource
server and authenticates by presenting the access token. server and authenticates by presenting the access token.
(F) The resource server validates the access token, and if valid, (F) The resource server validates the access token, and if valid,
indicates a successful authentication. indicates a successful authentication.
Again, steps (E) and (F) are not defined in [RFC6749] (but are Again, steps (E) and (F) are not defined in [RFC6749] (but are
described in [RFC6750] instead) and are the main functionality described in, for example, [RFC6750] for the OAuth Bearer Token
specified within this document. Consequently, the message exchange instead) and are the main functionality specified within this
shown in Figure 1 is the result of this specification. The client document. Consequently, the message exchange shown in Figure 1 is
will generally need to determine the authentication endpoints (and the result of this specification. The client will generally need to
perhaps the service endpoints) before the OAuth 2.0 protocol exchange determine the authentication endpoints (and perhaps the service
messages in steps (A)-(D) are executed. The discovery of the endpoints) before the OAuth 2.0 protocol exchange messages in steps
resource owner and authorization server endpoints is outside the (A)-(D) are executed. The discovery of the resource owner and
scope of this specification. The client must discover those authorization server endpoints is outside the scope of this
endpoints using a discovery mechanisms, such as Webfinger using host- specification. The client must discover those endpoints using a
meta [I-D.ietf-appsawg-webfinger]. In band discovery is not tenable discovery mechanisms, such as Webfinger using host-meta [RFC7033].
if clients support the OAuth 2.0 password grant. Once credentials In band discovery is not tenable if clients support the OAuth 2.0
are obtained the client proceeds to steps (E) and (F) defined in this password grant. Once credentials are obtained the client proceeds to
specification. steps (E) and (F) defined in this specification.
OAuth 1.0 follows a similar model but uses a different terminology OAuth 1.0 follows a similar model but uses a different terminology
and does not separate the resource server from the authorization and does not separate the resource server from the authorization
server. server.
2. Terminology 2. 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 [RFC2119]. document are to be interpreted as described in [RFC2119].
skipping to change at page 8, line 12 skipping to change at page 6, line 6
Note that the IMAP SASL specification requires base64 encoding, see Note that the IMAP SASL specification requires base64 encoding, see
Section 4 of [RFC4648], not this memo. Section 4 of [RFC4648], not this memo.
3. OAuth SASL Mechanism Specifications 3. OAuth SASL Mechanism Specifications
SASL is used as an authentication framework in a variety of SASL is used as an authentication framework in a variety of
application layer protocols. This document defines the following application layer protocols. This document defines the following
SASL mechanisms for usage with OAuth: SASL mechanisms for usage with OAuth:
OAUTHBEARER: OAuth 2.0 bearer tokens, as described in [RFC6750]. OAUTHBEARER: OAuth 2.0 bearer tokens, as described in [RFC6750].
RFC 6750 uses Transport Layer Security (TLS) to secure the RFC 6750 uses Transport Layer Security (TLS) to secure the
protocol interaction between the client and the resource protocol interaction between the client and the resource
server. server.
OAUTH10A: OAuth 1.0a MAC tokens (using the HMAC-SHA1 keyed OAUTH10A: OAuth 1.0a MAC tokens (using the HMAC-SHA1 keyed
message digest), as described in Section 3.4.2 of [RFC5849]. message digest), as described in Section 3.4.2 of [RFC5849].
OAUTH10A-PLUS: Adds channel binding [RFC5056] capability to OAUTH10A-PLUS: Adds channel binding [RFC5056] capability to
OAUTH10A for protection against man-in-the-middle attacks. OAUTH10A for protection against man-in-the-middle attacks.
OAUTH10A-PLUS mandates the usage of Transport Layer Security OAUTH10A-PLUS mandates the usage of Transport Layer Security
(TLS). (TLS).
New extensions may be defined to add additional OAuth Access Token New extensions may be defined to add additional OAuth Access Token
Types. Such a new SASL OAuth mechanism can be added by simply Types. Such a new SASL OAuth mechanism can be added by simply
registering the new name(s) and citing this specification for the registering the new name(s) and citing this specification for the
further definition. New channel binding enabled "-PLUS" mechanisms further definition. New channel binding enabled "-PLUS" mechanisms
defined in this way MUST include message integrity protection. A defined in this way MUST include message integrity protection.
newly defined mechanism would also need to register a new GS2 OID.
These mechanisms are client initiated and lock-step, the server These mechanisms are client initiated and lock-step, the server
always replying to a client message. In the case where the client always replying to a client message. In the case where the client
has and correctly uses a valid token the flow is: has and correctly uses a valid token the flow is:
o Client sends a valid and correct initial client response. o Client sends a valid and correct initial client response.
o Server responds with a successful authentication. o Server responds with a successful authentication.
In the case where authorization fails the server sends an error In the case where authorization fails the server sends an error
skipping to change at page 9, line 11 skipping to change at page 7, line 7
o Client sends an invalid initial client response. o Client sends an invalid initial client response.
o Server responds with an error message. o Server responds with an error message.
o Client sends a dummy client response. o Client sends a dummy client response.
o Server fails the authentication. o Server fails the authentication.
3.1. Initial Client Response 3.1. Initial Client Response
Client responses are a key/value pair sequence. The initial client Client responses are a key/value pair sequence. These key/value
response includes a gs2-header as defined in GS2 [RFC5801], which pairs carry the equivalent values from an HTTP context in order to be
carries the authorization ID. These key/value pairs carry the able to complete an OAuth style HTTP authorization. Unknown key/
equivalent values from an HTTP context in order to be able to value pairs MUST be ignored by the server. The ABNF [RFC5234] syntax
complete an OAuth style HTTP authorization. Unknown key/value pairs is:
MUST be ignored by the server. The ABNF [RFC5234] syntax is:
kvsep = %x01 kvsep = %x01
key = 1*ALPHA key = 1*ALPHA
value = *(VCHAR / SP / HTAB / CR / LF ) value = *(VCHAR / SP / HTAB / CR / LF )
kvpair = key "=" value kvsep kvpair = key "=" value kvsep
client_resp = 0*kvpair kvsep client_resp = 0*kvpair kvsep
;; gs2-header = As defined in GSS-API
initial_client_resp = gs2-header kvsep client_resp
The following key/value pairs are defined in the client response: The following key/value pairs are defined in the client response:
auth (REQUIRED): The payload of the HTTP Authorization header for auth (REQUIRED): The payload of the HTTP Authorization header for
an equivalent HTTP OAuth authorization. an equivalent HTTP OAuth authorization.
host: Contains the host name to which the client connected. host: Contains the host name to which the client connected.
port: Contains the port number represented as a decimal positive port: Contains the port number represented as a decimal positive
integer string without leading zeros to which the client integer string without leading zeros to which the client
connected. connected.
qs: The HTTP query string. In non-channel binding mechanisms qs: The HTTP query string. In non-channel binding mechanisms
this is reserved, the client SHOUD NOT send it, and has the this is reserved, the client SHOUD NOT send it, and has the
default value of "". In "-PLUS" variants this carries a single default value of "". In "-PLUS" variants this carries a
key value pair "cbdata" for the channel binding data payload single key value pair "cbdata" for the channel binding data
formatted as an HTTP query string. payload formatted as an HTTP query string.
For OAuth token types that use keyed message digests the client MUST For OAuth token types that use keyed message digests the client MUST
send host and port number key/values, and the server MUST fail an send host and port number key/values, and the server MUST fail an
authorization request requiring keyed message digests that do not authorization request requiring keyed message digests that do not
have host and port values. In OAuth 1.0a for example, the so-called have host and port values. In OAuth 1.0a for example, the so-called
"signature base string calculation" includes the reconstructed HTTP "signature base string calculation" includes the reconstructed HTTP
URL. URL.
3.1.1. Reserved Key/Values 3.1.1. Reserved Key/Values
skipping to change at page 10, line 21 skipping to change at page 8, line 14
the default values MUST be used unless explicit values are provided the default values MUST be used unless explicit values are provided
in the client response. The following key values are reserved for in the client response. The following key values are reserved for
future use: future use:
mthd (RESERVED): HTTP method, the default value is "POST". mthd (RESERVED): HTTP method, the default value is "POST".
path (RESERVED): HTTP path data, the default value is "/". path (RESERVED): HTTP path data, the default value is "/".
post (RESERVED): HTTP post data, the default value is "". post (RESERVED): HTTP post data, the default value is "".
3.1.2. Use of the gs2-header
The OAuth scheme related mechanisms are also GSS-API mechanisms, see
Section 4 for further detail. The gs2-header is used as follows:
o The "gs2-nonstd-flag" MUST NOT be present.
o The "gs2-authzid" carries the authorization identity as specified
in [RFC5801]. If present the application MUST determine whether
access is granted for the identity asserted in the OAuth
credential, if it does not the server MUST fail the negotiation.
In the non "-PLUS" mechanisms the "gs2-cb-flag" MUST be set to "n"
because channel-binding [RFC5056] data is not expected. In the
OAUTH10A-PLUS mechanism (or other -PLUS variants based on this
specification) the "gs2-cb-flag" MUST be set appropriately by the
client.
3.2. Server's Response 3.2. Server's Response
The server validates the response per the specification for the OAuth The server validates the response per the specification for the OAuth
Access Token Types used. If the OAuth Access Token Type utilizes a Access Token Types used. If the OAuth Access Token Type utilizes a
keyed message digest of the request parameters then the client must keyed message digest of the request parameters then the client must
provide a client response that satisfies the data requirements for provide a client response that satisfies the data requirements for
the scheme in use. the scheme in use.
In a "-PLUS" mechanism the server examines the channel binding data, In a "-PLUS" mechanism the server examines the channel binding data,
extracts the channel binding unique prefix, and extracts the raw extracts the channel binding unique prefix, and extracts the raw
skipping to change at page 11, line 27 skipping to change at page 8, line 49
In the OAuth framework the client may be authenticated by the In the OAuth framework the client may be authenticated by the
authorization server and the resource owner is authenticated to the authorization server and the resource owner is authenticated to the
authorization server. OAuth access tokens may contain information authorization server. OAuth access tokens may contain information
about the authentication of the resource owner and about the client about the authentication of the resource owner and about the client
and may therefore make this information accessible to the resource and may therefore make this information accessible to the resource
server. server.
If both identifiers are needed by an application the developer will If both identifiers are needed by an application the developer will
need to provide a way to communicate that from the SASL mechanism need to provide a way to communicate that from the SASL mechanism
back to the application, such as a GSS-API [RFC2743] named type like back to the application.
GSS_C_NT_USER_NAME or a comparable newly defined GSS-API name type or
name attribute [RFC6680].
3.2.2. Server Response to Failed Authentication 3.2.2. Server Response to Failed Authentication
For a failed authentication the server returns a JSON [RFC4627] For a failed authentication the server returns a JSON [RFC4627]
formatted error result, and fails the authentication. The error formatted error result, and fails the authentication. The error
result consists of the following values: result consists of the following values:
status (REQUIRED): The authorization error code. Valid error status (REQUIRED): The authorization error code. Valid error
codes are defined in the IANA [[need registry name]] registry codes are defined in the IANA [[need registry name]]
specified in the OAuth 2 core specification. registry specified in the OAuth 2 core specification.
scope (OPTIONAL): An OAuth scope which is valid to access the scope (OPTIONAL): An OAuth scope which is valid to access the
service. This may be empty which implies that unscoped tokens service. This may be empty which implies that unscoped
are required, or a space separated list. Use of a space tokens are required, or a space separated list. Use of a
separated list is NOT RECOMMENDED. space separated list is NOT RECOMMENDED.
If the resource server provides a scope then the client MUST always If the resource server provides a scope then the client MUST always
request scoped tokens from the token endpoint. If the resource request scoped tokens from the token endpoint. If the resource
server provides no scope to the client then the client SHOULD presume server provides no scope to the client then the client SHOULD presume
an empty scope (unscoped token) is needed. an empty scope (unscoped token) is needed.
If channel binding is in use and the channel binding fails the server If channel binding is in use and the channel binding fails the server
responds with a status code set to 412 to indicate that the channel responds with a status code set to 412 to indicate that the channel
binding precondition failed. If the authentication scheme in use binding precondition failed. If the authentication scheme in use
does not include signing the server SHOULD revoke the presented does not include signing the server SHOULD revoke the presented
skipping to change at page 14, line 5 skipping to change at page 11, line 22
The channel binding data is computed by the client based on it's The channel binding data is computed by the client based on it's
choice of preferred channel binding type. As specified in [RFC5056], choice of preferred channel binding type. As specified in [RFC5056],
the channel binding information MUST start with the channel binding the channel binding information MUST start with the channel binding
unique prefix, followed by a colon (ASCII 0x3A), followed by a base64 unique prefix, followed by a colon (ASCII 0x3A), followed by a base64
encoded channel binding payload. The channel binding payload is the encoded channel binding payload. The channel binding payload is the
raw data from the channel binding type. For example, if the client raw data from the channel binding type. For example, if the client
is using tls-unique for channel binding then the raw channel binding is using tls-unique for channel binding then the raw channel binding
data is the TLS finished message as specified in Section 3.1 of data is the TLS finished message as specified in Section 3.1 of
[RFC5929]. [RFC5929].
4. GSS-API OAuth Mechanism Specification 4. Examples
Note: The normative references in this section are informational for
SASL implementers, but they are normative for GSS-API implementers.
A SASL OAuth mechanism is also a GSS-API mechanism and the messages
described in Section 3 are the same with the following changes to the
GS2 related elements:
1. the GS2 header on the client's first message is excluded when
used as a GSS-API mechanism.
2. the initial context token header is prefixed to the client's
first authentication message (context token), as described in
Section 3.1 of RFC 2743 [RFC2743],
The GSS-API mechanism OIDs are:
o OAUTHBEARER: [[TBD: IANA -- probably in the 1.3.6.1.5.5 tree]]
o OAUTH10A: [[TBD: IANA -- probably in the 1.3.6.1.5.5 tree]]
o OAUTH10A-PLUS: [[TBD: IANA -- probably in the 1.3.6.1.5.5 tree]]
The setting of the security context flags depends on the selected
mechanism:
o OAUTHBEARER: The mutual_state flag (GSS_C_MUTUAL_FLAG) MUST be set
to FALSE since the TLS protocol execution happens outside the
SASL/GSS-API method. Server-side authentication is accomplished
via the mandatory use of TLS at the application layer utilizing
SASL. Without TLS usage at the application layer protecting the
by OAuth Bearer Token this SASL method is insecure.
o OAUTH10A: The mutual_state flag (GSS_C_MUTUAL_FLAG) MUST be set to
FALSE since server authentication is not provided by this SASL/
GSS-API method. Since the TLS channel is managed by the
application outside of the GSS-API mechanism, the OAUTH10A
mechanism itself is unable to confirm the name while the
application is able to perform this comparison for the mechanism.
For this reason, applications MUST match the TLS server identity
with the target name using the appropriate application profile, as
discussed in [RFC6125]. For example, when SASL OAuth is run over
IMAP then the IMAP profile of RFC 6125 is used.
o OAUTH10A-PLUS: The mutual_state flag (GSS_C_MUTUAL_FLAG) MUST be
set to FALSE since only the client demonstrates possession of the
session key by applying a keyed message digest function over
various fields of the request. TLS-based server-side
authentication MUST be provided by the application using SASL.
Credential delegation is not supported by any of the SASL/GSS-API
mechanisms with this specification. Therefore, security contexts
MUST have the deleg_state flag (GSS_C_DELEG_FLAG) set to FALSE.
OAuth mechanisms do not support per-message tokens or
GSS_Pseudo_random.
OAuth supports a standard generic name syntax for acceptors, such as
GSS_C_NT_HOSTBASED_SERVICE (see Section 4.1 of [RFC2743]). These
service names MUST be associated with the "entityID" claimed by the
RP.
OAuth mechanisms support only a single name type for initiators:
GSS_C_NT_USER_NAME. GSS_C_NT_USER_NAME is the default name type.
The query, display, and exported name syntaxes for OAuth principal
names are all the same. There is no OAuth-specific name syntax;
applications SHOULD use generic GSS-API name types, such as
GSS_C_NT_USER_NAME and GSS_C_NT_HOSTBASED_SERVICE (see Section 4 of
[RFC2743]). The exported name token does, of course, conform to
Section 3.2 of [RFC2743], but the "NAME" part of the token should be
treated as a potential input string to the OAuth name normalization
rules.
5. Examples
These examples illustrate exchanges between an IMAP and SMTP clients These examples illustrate exchanges between an IMAP and SMTP clients
and servers. and servers.
Note to implementers: The SASL OAuth method names are case Note to implementers: The SASL OAuth method names are case
insensitive. One example uses "Bearer" but that could as easily be insensitive. One example uses "Bearer" but that could as easily be
"bearer", "BEARER", or "BeArEr". "bearer", "BEARER", or "BeArEr".
5.1. Successful Bearer Token Exchange 4.1. Successful Bearer Token Exchange
This example shows a successful OAuth 2.0 bearer token exchange. This example shows a successful OAuth 2.0 bearer token exchange.
Note that line breaks are inserted for readability and the underlying Note that line breaks are inserted for readability and the underlying
TLS establishment is not shown either. TLS establishment is not shown either.
S: * OK IMAP4rev1 Server Ready S: * OK IMAP4rev1 Server Ready
C: t0 CAPABILITY C: t0 CAPABILITY
S: * CAPABILITY IMAP4rev1 AUTH=OAUTHBEARER SASL-IR S: * CAPABILITY IMAP4rev1 AUTH=OAUTHBEARER SASL-IR
S: t0 OK Completed S: t0 OK Completed
C: t1 AUTHENTICATE OAUTHBEARER bixhPXVzZXJAZXhhbXBsZS5jb20BaG9zdD1zZX C: t1 AUTHENTICATE OAUTHBEARER bixhPXVzZXJAZXhhbXBsZS5jb20BaG9zdD1zZX
skipping to change at page 17, line 20 skipping to change at page 12, line 28
S: 250-8BITMIME S: 250-8BITMIME
S: 250-AUTH LOGIN PLAIN OAUTHBEARER S: 250-AUTH LOGIN PLAIN OAUTHBEARER
S: 250-ENHANCEDSTATUSCODES S: 250-ENHANCEDSTATUSCODES
S: 250 PIPELINING S: 250 PIPELINING
C: t1 AUTHENTICATE OAUTHBEARER bixhPXVzZXJAZXhhbXBsZS5jb20BaG9zdD1zZX C: t1 AUTHENTICATE OAUTHBEARER bixhPXVzZXJAZXhhbXBsZS5jb20BaG9zdD1zZX
J2ZXIuZXhhbXBsZS5jb20BcG9ydD0xNDMBYXV0aD1CZWFyZXIgdkY5ZGZ0NHFtV J2ZXIuZXhhbXBsZS5jb20BcG9ydD0xNDMBYXV0aD1CZWFyZXIgdkY5ZGZ0NHFtV
GMyTnZiM1JsY2tCaGJIUmhkbWx6ZEdFdVkyOXRDZz09AQE= GMyTnZiM1JsY2tCaGJIUmhkbWx6ZEdFdVkyOXRDZz09AQE=
S: 235 Authentication successful. S: 235 Authentication successful.
[connection continues...] [connection continues...]
5.2. OAuth 1.0a Authorization with Channel Binding 4.2. OAuth 1.0a Authorization with Channel Binding
This example shows channel binding in the context of an OAuth 1.0a This example shows channel binding in the context of an OAuth 1.0a
request using a keyed message digest. Note that line breaks are request using a keyed message digest. Note that line breaks are
inserted for readability. inserted for readability.
S: * OK [CAPABILITY IMAP4rev1 AUTH=OAUTH10A-PLUS SASL-IR] S: * OK [CAPABILITY IMAP4rev1 AUTH=OAUTH10A-PLUS SASL-IR]
IMAP4rev1 Server Ready IMAP4rev1 Server Ready
C: t1 AUTHENTICATE OAUTH10A-PLUS cD10bHMtdW5pcXVlLGE9dXNlckBleGFtcGxlL C: t1 AUTHENTICATE OAUTH10A-PLUS cD10bHMtdW5pcXVlLGE9dXNlckBleGFtcGxlL
mNvbQFob3N0PXNlcnZlci5leGFtcGxlLmNvbQFwb3J0PTE0MwFhdXRoPU9BdXRoI mNvbQFob3N0PXNlcnZlci5leGFtcGxlLmNvbQFwb3J0PTE0MwFhdXRoPU9BdXRoI
HJlYWxtPSJFeGFtcGxlIixvYXV0aF9jb25zdW1lcl9rZXk9IjlkamRqODJoNDhka HJlYWxtPSJFeGFtcGxlIixvYXV0aF9jb25zdW1lcl9rZXk9IjlkamRqODJoNDhka
nM5ZDIiLG9hdXRoX3Rva2VuPSJra2s5ZDdkaDNrMzlzanY3IixvYXV0aF9zaWduY nM5ZDIiLG9hdXRoX3Rva2VuPSJra2s5ZDdkaDNrMzlzanY3IixvYXV0aF9zaWduY
XR1cmVfbWV0aG9kPSJITUFDLVNIQTEiLG9hdXRoX3RpbWVzdGFtcD0iMTM3MTMxM XR1cmVfbWV0aG9kPSJITUFDLVNIQTEiLG9hdXRoX3RpbWVzdGFtcD0iMTM3MTMxM
jAxIixvYXV0aF9ub25jZT0iN2Q4ZjNlNGEiLG9hdXRoX3NpZ25hdHVyZT0iU1Nkd jAxIixvYXV0aF9ub25jZT0iN2Q4ZjNlNGEiLG9hdXRoX3NpZ25hdHVyZT0iU1Nkd
ElHRWdiR2wwZEd4bElIUmxZU0J3YjNRdSIBcXM9Y2JkYXRhPXRscy11bmlxdWU6U ElHRWdiR2wwZEd4bElIUmxZU0J3YjNRdSIBcXM9Y2JkYXRhPXRscy11bmlxdWU6U
0c5M0lHSnBaeUJwY3lCaElGUk1VeUJtYVc1aGJDQnRaWE56WVdkbFB3bz0BAQ== 0c5M0lHSnBaeUJwY3lCaElGUk1VeUJtYVc1aGJDQnRaWE56WVdkbFB3bz0BAQ==
S: t1 OK SASL authentication succeeded S: t1 OK SASL authentication succeeded
As required by IMAP [RFC3501], the payloads are base64-encoded. The As required by IMAP [RFC3501], the payloads are base64-encoded. The
decoded initial client response (with %x01 represented as ^A and decoded initial client response (with %x01 represented as ^A and
lines wrapped for readability) is: lines wrapped for readability) is:
p=tls-unique,a=user@example.com^A p=tls-unique,a=user@example.com^A
host=server.example.com^A host=server.example.com^A
port=143^A port=143^A
auth=OAuth realm="Example", auth=OAuth realm="Example",
oauth_consumer_key="9djdj82h48djs9d2", oauth_consumer_key="9djdj82h48djs9d2",
skipping to change at page 18, line 26 skipping to change at page 13, line 26
In this example the signature base string with line breaks added for In this example the signature base string with line breaks added for
readability would be: readability would be:
POST&http%3A%2F%2Fserver.example.com:143%2F&cbdata=tls-unique:SG93I POST&http%3A%2F%2Fserver.example.com:143%2F&cbdata=tls-unique:SG93I
GJpZyBpcyBhIFRMUyBmaW5hbCBtZXNzYWdlPwo=%26oauth_consumer_key%3D9djd GJpZyBpcyBhIFRMUyBmaW5hbCBtZXNzYWdlPwo=%26oauth_consumer_key%3D9djd
j82h48djs9d2%26oauth_nonce%3D7d8f3e4a%26oauth_signature_method%3DHM j82h48djs9d2%26oauth_nonce%3D7d8f3e4a%26oauth_signature_method%3DHM
AC-SHA1%26oauth_timestamp%3D137131201%26oauth_token%3Dkkk9d7dh3k39s AC-SHA1%26oauth_timestamp%3D137131201%26oauth_token%3Dkkk9d7dh3k39s
jv7 jv7
5.3. Failed Exchange 4.3. Failed Exchange
This example shows a failed exchange because of the empty This example shows a failed exchange because of the empty
Authorization header, which is how a client can query for the needed Authorization header, which is how a client can query for the needed
scope. Note that line breaks are inserted for readability. scope. Note that line breaks are inserted for readability.
S: * CAPABILITY IMAP4rev1 AUTH=OAUTHBEARER SASL-IR IMAP4rev1 Server S: * CAPABILITY IMAP4rev1 AUTH=OAUTHBEARER SASL-IR IMAP4rev1 Server
Ready Ready
S: t0 OK Completed S: t0 OK Completed
C: t1 AUTHENTICATE OAUTHBEARER cD10bHMtdW5pcXVlLGE9dXNlckBleGFtcG C: t1 AUTHENTICATE OAUTHBEARER cD10bHMtdW5pcXVlLGE9dXNlckBleGFtcG
xlLmNvbQFob3N0PXNlcnZlci5leGFtcGxlLmNvbQFwb3J0PTE0MwFhdXRoP xlLmNvbQFob3N0PXNlcnZlci5leGFtcGxlLmNvbQFwb3J0PTE0MwFhdXRoP
skipping to change at page 19, line 12 skipping to change at page 14, line 12
The decoded server error response is: The decoded server error response is:
{ {
"status":"401", "status":"401",
"scope":"example_scope" "scope":"example_scope"
} }
The client responds with the required dummy response. The client responds with the required dummy response.
5.4. Failed Channel Binding 4.4. Failed Channel Binding
This example shows a channel binding failure in an empty request. This example shows a channel binding failure in an empty request.
The channel binding information is empty. Note that line breaks are The channel binding information is empty. Note that line breaks are
inserted for readability. inserted for readability.
S: * CAPABILITY IMAP4rev1 AUTH=OAUTH10A-PLUS SASL-IR IMAP4rev1 Server S: * CAPABILITY IMAP4rev1 AUTH=OAUTH10A-PLUS SASL-IR IMAP4rev1 Server
Ready Ready
S: t0 OK Completed S: t0 OK Completed
C: t1 AUTHENTICATE OAUTH10A-PLUS cCxhPXVzZXJAZXhhbXBsZS5jb20BaG9z C: t1 AUTHENTICATE OAUTH10A-PLUS cCxhPXVzZXJAZXhhbXBsZS5jb20BaG9z
dD1zZXJ2ZXIuZXhhbXBsZS5jb20BcG9ydD0xNDMBYXV0aD0BY2JkYXRhPQEB dD1zZXJ2ZXIuZXhhbXBsZS5jb20BcG9ydD0xNDMBYXV0aD0BY2JkYXRhPQEB
skipping to change at page 19, line 41 skipping to change at page 14, line 41
The decoded server response is: The decoded server response is:
{ {
"status":"412", "status":"412",
"scope":"example_scope" "scope":"example_scope"
} }
The client responds with the required dummy response. The client responds with the required dummy response.
5.5. SMTP Example of a Failed Negotiation 4.5. SMTP Example of a Failed Negotiation
This example shows an authorization failure in an SMTP exchange. This example shows an authorization failure in an SMTP exchange.
Note that line breaks are inserted for readability, and that the SMTP Note that line breaks are inserted for readability, and that the SMTP
protocol terminates lines with CR and LF characters (ASCII values protocol terminates lines with CR and LF characters (ASCII values
0x0D and 0x0A), these are not displayed explicitly in the example. 0x0D and 0x0A), these are not displayed explicitly in the example.
[connection begins] [connection begins]
S: 220 mx.example.com ESMTP 12sm2095603fks.9 S: 220 mx.example.com ESMTP 12sm2095603fks.9
C: EHLO sender.example.com C: EHLO sender.example.com
S: 250-mx.example.com at your service,[172.31.135.47] S: 250-mx.example.com at your service,[172.31.135.47]
S: 250-SIZE 35651584 S: 250-SIZE 35651584
S: 250-8BITMIME S: 250-8BITMIME
S: 250-AUTH LOGIN PLAIN OAUTHBEARER S: 250-AUTH LOGIN PLAIN OAUTHBEARER
S: 250-ENHANCEDSTATUSCODES S: 250-ENHANCEDSTATUSCODES
S: 250 PIPELINING S: 250 PIPELINING
C: AUTH OAUTHBEARER bixhPT1zb21ldXNlckBleGFtcGxlLmNvbQFhdXRoPUJlYXJlciB2 C: AUTH OAUTHBEARER bixhPT1zb21ldXNlckBleGFtcGxlLmNvbQFhdXRoPUJlYXJlciB2
RjlkZnQ0cW1UYzJOdmIzUmxja0JoZEhSaGRtbHpkR0V1WTI5dENnPT0BAQ== RjlkZnQ0cW1UYzJOdmIzUmxja0JoZEhSaGRtbHpkR0V1WTI5dENnPT0BAQ==
S: 334 eyJzdGF0dXMiOiI0MDEiLCJzY2hlbWVzIjoiYmVhcmVyIG1hYyIsInNjb3BlIjoia S: 334 eyJzdGF0dXMiOiI0MDEiLCJzY2hlbWVzIjoiYmVhcmVyIG1hYyIsInNjb3BlIjoia
HR0cHM6Ly9tYWlsLmdvb2dsZS5jb20vIn0K HR0cHM6Ly9tYWlsLmdvb2dsZS5jb20vIn0K
C: AQ== C: AQ==
S: 535-5.7.1 Username and Password not accepted. Learn more at S: 535-5.7.1 Username and Password not accepted. Learn more at
S: 535 5.7.1 http://support.example.com/mail/oauth S: 535 5.7.1 http://support.example.com/mail/oauth
[connection continues...] [connection continues...]
The server returned an error message in the 334 SASL message, the The server returned an error message in the 334 SASL message, the
client responds with the required dummy response, and the server client responds with the required dummy response, and the server
finalizes the negotiation. finalizes the negotiation.
6. Security Considerations 5. Security Considerations
OAuth 1.0a and OAuth 2 allows for a variety of deployment scenarios, OAuth 1.0a and OAuth 2 allows for a variety of deployment scenarios,
and the security properties of these profiles vary. As shown in and the security properties of these profiles vary. As shown in
Figure 1 this specification is aimed to be integrated into a larger Figure 1 this specification is aimed to be integrated into a larger
OAuth deployment. Application developers therefore need to OAuth deployment. Application developers therefore need to
understand the needs of their security requirements based on a threat understand the needs of their security requirements based on a threat
assessment before selecting a specific SASL OAuth mechanism. For assessment before selecting a specific SASL OAuth mechanism. For
OAuth 2.0 a detailed security document [RFC6819] provides guidance to OAuth 2.0 a detailed security document [RFC6819] provides guidance to
select those OAuth 2.0 components that help to mitigate threats for a select those OAuth 2.0 components that help to mitigate threats for a
given deployment. For OAuth 1.0a Section 4 of RFC 5849 [RFC5849] given deployment. For OAuth 1.0a Section 4 of RFC 5849 [RFC5849]
provides guidance specific to OAuth 1.0. provides guidance specific to OAuth 1.0.
This document specifies three SASL and GSS-API Mechanisms for OAuth This document specifies three SASL Mechanisms for OAuth and each
and each comes with different security properties. comes with different security properties.
OAUTHBEARER: This mechanism borrows from OAuth 2.0 bearer tokens OAUTHBEARER: This mechanism borrows from OAuth 2.0 bearer tokens
[RFC6750]. It relies on the application using TLS to protect the [RFC6750]. It relies on the application using TLS to protect the
OAuth 2.0 Bearer Token exchange; without TLS usage at the OAuth 2.0 Bearer Token exchange; without TLS usage at the
application layer this method is completely insecure. application layer this method is completely insecure.
Consequently, TLS MUST be provided by the application when
choosing this authentication mechanism.
OAUTH10A: This mechanism re-uses OAuth 1.0a MAC tokens (using the OAUTH10A: This mechanism re-uses OAuth 1.0a MAC tokens (using the
HMAC-SHA1 keyed message digest), as described in Section 3.4.2 of HMAC-SHA1 keyed message digest), as described in Section 3.4.2 of
[RFC5849]. To compute the keyed message digest in the same way [RFC5849]. To compute the keyed message digest in the same way
was in RFC 5839 this specification conveys additional parameters was in RFC 5839 this specification conveys additional parameters
between the client and the server. This SASL/GSS-API mechanism between the client and the server. This SASL mechanism only
only supports client authentication. If server-side supports client authentication. If server-side authentication is
authentication is desireable then it must be provided by the desireable then it must be provided by the application underneath
application underneath the SASL/GSS-API layer. the SASL layer. The use of TLS is strongly RECOMMENDED.
OAUTH10A-PLUS: This mechanism adds the channel binding [RFC5056] OAUTH10A-PLUS: This mechanism adds the channel binding [RFC5056]
capability to OAUTH10A for protection against man-in-the-middle capability to OAUTH10A for protection against man-in-the-middle
attacks. OAUTH10A-PLUS mandates the usage of Transport Layer attacks. OAUTH10A-PLUS mandates the usage of Transport Layer
Security (TLS) at the application layer. Security (TLS) at the application layer.
7. Internationalization Considerations Additionally, the following aspects are worth pointing out:
An access token is not equivalent to the user's long term password.
Care has to be taken when these OAuth credentials are used for
actions like changing passwords (as it is possible with some
protocols, e.g., XMPP). The resource server should ensure that
actions taken in the authenticated channel are appropriate to the
strength of the presented credential.
Lifetime of the appliation sessions.
It is possible that SASL will be authenticating a connection and
the life of that connection may outlast the life of the access
token used to establish it. This is a common problem in
application protocols where connections are long-lived, and not a
problem with this mechanism per se. Resource servers may
unilaterally disconnect clients in accordance with the application
protocol.
Access tokens have a lifetime.
Reducing the lifetime of an access token provides security
benefits and OAuth 2.0 introduces refresh tokens to obtain new
access token on the fly without any need for a human interaction.
Additionally, a previously obtained access token may be revoked or
rendered invalid at any time by the authorization server. The
client may request a new access token for each connection to a
resource server, but it should cache and re-use valid credentials.
6. Internationalization Considerations
The identifer asserted by the OAuth authorization server about the The identifer asserted by the OAuth authorization server about the
resource owner inside the access token may be displayed to a human. resource owner inside the access token may be displayed to a human.
For example, when SASL is used in the context of IMAP the resource For example, when SASL is used in the context of IMAP the resource
server may assert the resource owner's email address to the IMAP server may assert the resource owner's email address to the IMAP
server for usage in an email-based application. The identifier may server for usage in an email-based application. The identifier may
therefore contain internationalized characters and an application therefore contain internationalized characters and an application
needs to ensure that the mapping between the identifier provided by needs to ensure that the mapping between the identifier provided by
OAuth is suitable for use with the application layer protocol SASL is OAuth is suitable for use with the application layer protocol SASL is
incorporated into. incorporated into.
At the time of writing the standardization of the assertion format At the time of writing the standardization of the various claims in
(in JSON format) is still ongoing, see the access token (in JSON format) is still ongoing, see
[I-D.ietf-oauth-json-web-token]. [I-D.ietf-oauth-json-web-token]. Once completed it will provide a
standardized format for exchanging identity information between the
authorization server and the resource server.
8. IANA Considerations 7. IANA Considerations
8.1. SASL Registration 7.1. SASL Registration
The IANA is requested to register the following SASL profile: The IANA is requested to register the following SASL profile:
SASL mechanism profile: OAUTHBEARER SASL mechanism profile: OAUTHBEARER
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.
skipping to change at page 24, line 5 skipping to change at page 18, line 14
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
Note: None Note: None
8.2. GSS-API Registration 8. References
IANA is further requested to assign an OID for these GSS mechanisms
in the SMI numbers registry, with the prefix of
iso.org.dod.internet.security.mechanisms (1.3.6.1.5.5) and to
reference this specification in the registry.
9. References
9.1. Normative References 8.1. Normative References
[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.
[RFC2473] Conta, A. and S. Deering, "Generic Packet Tunneling in
IPv6 Specification", RFC 2473, December 1998.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
[RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S.,
Leach, P., Luotonen, A., and L. Stewart, "HTTP
Authentication: Basic and Digest Access Authentication",
RFC 2617, June 1999.
[RFC2743] Linn, J., "Generic Security Service Application Program
Interface Version 2, Update 1", RFC 2743, January 2000.
[RFC3174] Eastlake, D. and P. Jones, "US Secure Hash Algorithm 1 [RFC3174] Eastlake, D. and P. Jones, "US Secure Hash Algorithm 1
(SHA1)", RFC 3174, September 2001. (SHA1)", RFC 3174, September 2001.
[RFC4422] Melnikov, A. and K. Zeilenga, "Simple Authentication and [RFC4422] Melnikov, A. and K. Zeilenga, "Simple Authentication and
Security Layer (SASL)", RFC 4422, June 2006. Security Layer (SASL)", RFC 4422, June 2006.
[RFC4627] Crockford, D., "The application/json Media Type for [RFC4627] Crockford, D., "The application/json Media Type for
JavaScript Object Notation (JSON)", RFC 4627, July 2006. JavaScript Object Notation (JSON)", RFC 4627, July 2006.
[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data
skipping to change at page 25, line 48 skipping to change at page 18, line 42
[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. and P. Overell, "Augmented BNF for Syntax [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, January 2008. 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.
[RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321,
October 2008.
[RFC5801] Josefsson, S. and N. Williams, "Using Generic Security
Service Application Program Interface (GSS-API) Mechanisms
in Simple Authentication and Security Layer (SASL): The
GS2 Mechanism Family", RFC 5801, July 2010.
[RFC5849] Hammer-Lahav, E., "The OAuth 1.0 Protocol", RFC 5849, [RFC5849] Hammer-Lahav, E., "The OAuth 1.0 Protocol", RFC 5849,
April 2010. April 2010.
[RFC5929] Altman, J., Williams, N., and L. Zhu, "Channel Bindings [RFC5929] Altman, J., Williams, N., and L. Zhu, "Channel Bindings
for TLS", RFC 5929, July 2010. for TLS", RFC 5929, July 2010.
[RFC5988] Nottingham, M., "Web Linking", RFC 5988, October 2010. [RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework", RFC
6749, October 2012.
[RFC6125] Saint-Andre, P. and J. Hodges, "Representation and
Verification of Domain-Based Application Service Identity
within Internet Public Key Infrastructure Using X.509
(PKIX) Certificates in the Context of Transport Layer
Security (TLS)", RFC 6125, March 2011.
[RFC6680] Williams, N., Johansson, L., Hartman, S., and S.
Josefsson, "Generic Security Service Application
Programming Interface (GSS-API) Naming Extensions",
RFC 6680, August 2012.
[RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework",
RFC 6749, October 2012.
[RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization
Framework: Bearer Token Usage", RFC 6750, October 2012. Framework: Bearer Token Usage", RFC 6750, October 2012.
9.2. Informative References 8.2. Informative References
[I-D.ietf-appsawg-webfinger]
Jones, P., Salgueiro, G., and J. Smarr, "WebFinger",
draft-ietf-appsawg-webfinger-10 (work in progress),
February 2013.
[I-D.ietf-oauth-json-web-token] [I-D.ietf-oauth-json-web-token]
Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token
(JWT)", draft-ietf-oauth-json-web-token-06 (work in (JWT)", draft-ietf-oauth-json-web-token-12 (work in
progress), December 2012. progress), October 2013.
[I-D.ietf-oauth-v2-http-mac] [I-D.ietf-oauth-v2-http-mac]
Richer, J., Mills, W., and H. Tschofenig, "OAuth 2.0 Richer, J., Mills, W., Tschofenig, H., and P. Hunt, "OAuth
Message Authentication Code (MAC) Tokens", 2.0 Message Authentication Code (MAC) Tokens", draft-ietf-
draft-ietf-oauth-v2-http-mac-02 (work in progress), oauth-v2-http-mac-04 (work in progress), July 2013.
November 2012.
[RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
4rev1", RFC 3501, March 2003. 4rev1", RFC 3501, March 2003.
[RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321,
October 2008.
[RFC6819] Lodderstedt, T., McGloin, M., and P. Hunt, "OAuth 2.0 [RFC6819] Lodderstedt, T., McGloin, M., and P. Hunt, "OAuth 2.0
Threat Model and Security Considerations", RFC 6819, Threat Model and Security Considerations", RFC 6819,
January 2013. January 2013.
[RFC7033] Jones, P., Salgueiro, G., Jones, M., and J. Smarr,
"WebFinger", RFC 7033, September 2013.
Appendix A. Acknowlegements Appendix A. Acknowlegements
The authors would like to thank the members of the Kitten working The authors would like to thank the members of the Kitten working
group, and in addition and specifically: Simon Josefson, Torsten group, and in addition and specifically: Simon Josefson, Torsten
Lodderstadt, Ryan Troll, Alexey Melnikov, Jeffrey Hutzelman, and Nico Lodderstadt, Ryan Troll, Alexey Melnikov, Jeffrey Hutzelman, and Nico
Williams. Williams.
This document was produced under the chairmanship of Alexey Melnikov, This document was produced under the chairmanship of Alexey Melnikov,
Tom Yu, Shawn Emery, Josh Howlett, Sam Hartman. The supervising area Tom Yu, Shawn Emery, Josh Howlett, Sam Hartman. The supervising area
directors was Stephen Farrell. directors was Stephen Farrell.
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 ]]
-12
o Removed GSS-API components from the specification.
-11
o Updated security consideration section.
-10 -10
o Clarifications throughout the document in response to the feedback o Clarifications throughout the document in response to the feedback
from Jeffrey Hutzelman. from Jeffrey Hutzelman.
-09 -09
o Incorporated review by Alexey and Hannes. o Incorporated review by Alexey and Hannes.
o Clarified the three OAuth SASL mechanisms. o Clarified the three OAuth SASL mechanisms.
skipping to change at page 29, line 34 skipping to change at page 20, line 31
-08 -08
o Fixed the channel binding examples for p=$cbtype o Fixed the channel binding examples for p=$cbtype
o More tuning of the authcid language and edited and renamed 3.2.1. o More tuning of the authcid language and edited and renamed 3.2.1.
-07 -07
o Struck the MUST langiage from authzid. o Struck the MUST langiage from authzid.
o
-06 -06
o Removed the user field. Fixed the examples again. o Removed the user field. Fixed the examples again.
o Added canonicalization language. o Added canonicalization language.
o
-05 -05
o Fixed the GS2 header language again. o Fixed the GS2 header language again.
o Separated out different OAuth schemes into different SASL o Separated out different OAuth schemes into different SASL
mechanisms. Took out the scheme in the error return. Tuned up mechanisms. Took out the scheme in the error return. Tuned up
the IANA registrations. the IANA registrations.
o Added the user field back into the SASL message. o Added the user field back into the SASL message.
o Fixed the examples (again). o Fixed the examples (again).
o
-04 -04
o Changed user field to be carried in the gs2-header, and made gs2 o Changed user field to be carried in the gs2-header, and made gs2
header explicit in all cases. header explicit in all cases.
o Converted MAC examples to OAuth 1.0a. Moved MAC to an informative o Converted MAC examples to OAuth 1.0a. Moved MAC to an informative
reference. reference.
o Changed to sending an empty client response (single control-A) as o Changed to sending an empty client response (single control-A) as
the second message of a failed sequence. the second message of a failed sequence.
o Fixed channel binding prose to refer to the normative specs and o Fixed channel binding prose to refer to the normative specs and
skipping to change at page 32, line 10 skipping to change at page 22, line 10
o Renamed draft into proper IETF naming format now that it's o Renamed draft into proper IETF naming format now that it's
adopted. adopted.
o Minor fixes. o Minor fixes.
Authors' Addresses Authors' Addresses
William Mills William Mills
Yahoo! Inc. Yahoo! Inc.
Phone:
Email: wmills@yahoo-inc.com Email: wmills@yahoo-inc.com
Tim Showalter Tim Showalter
Phone:
Email: tjs@psaux.com Email: tjs@psaux.com
Hannes Tschofenig Hannes Tschofenig
Nokia Siemens Networks Nokia Solutions and Networks
Linnoitustie 6 Linnoitustie 6
Espoo 02600 Espoo 02600
Finland Finland
Phone: +358 (50) 4871445 Phone: +358 (50) 4871445
Email: Hannes.Tschofenig@gmx.net Email: Hannes.Tschofenig@gmx.net
URI: http://www.tschofenig.priv.at URI: http://www.tschofenig.priv.at
 End of changes. 64 change blocks. 
342 lines changed or deleted 219 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/