| < draft-ietf-kitten-sasl-oauth-11.txt | draft-ietf-kitten-sasl-oauth-12.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: April 20, 2014 | Expires: June 18, 2014 | |||
| H. Tschofenig | H. Tschofenig | |||
| Nokia Solutions and Networks | Nokia Solutions and Networks | |||
| October 17, 2013 | December 15, 2013 | |||
| A set of SASL Mechanisms for OAuth | A set of SASL Mechanisms for OAuth | |||
| draft-ietf-kitten-sasl-oauth-11.txt | draft-ietf-kitten-sasl-oauth-12.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 | |||
| skipping to change at page 2, line 4 ¶ | skipping to change at page 2, line 4 ¶ | |||
| 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 April 20, 2014. | This Internet-Draft will expire on June 18, 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 . . . . . . . . . . . . . . . . . . . . . . . . 3 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | |||
| 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 | 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 3. OAuth SASL Mechanism Specifications . . . . . . . . . . . . . 5 | 3. OAuth SASL Mechanism Specifications . . . . . . . . . . . . . 6 | |||
| 3.1. Initial Client Response . . . . . . . . . . . . . . . . . 7 | 3.1. Initial Client Response . . . . . . . . . . . . . . . . . 7 | |||
| 3.1.1. Reserved Key/Values . . . . . . . . . . . . . . . . . 7 | 3.1.1. Reserved Key/Values . . . . . . . . . . . . . . . . . 7 | |||
| 3.2. Server's Response . . . . . . . . . . . . . . . . . . . . 8 | 3.2. Server's Response . . . . . . . . . . . . . . . . . . . . 8 | |||
| 3.2.1. OAuth Identifiers in the SASL Context . . . . . . . . 8 | 3.2.1. OAuth Identifiers in the SASL Context . . . . . . . . 8 | |||
| 3.2.2. Server Response to Failed Authentication . . . . . . 9 | 3.2.2. Server Response to Failed Authentication . . . . . . 8 | |||
| 3.2.3. Completing an Error Message Sequence . . . . . . . . 9 | 3.2.3. Completing an Error Message Sequence . . . . . . . . 9 | |||
| 3.3. OAuth Access Token Types using Keyed Message Digests . . 9 | 3.3. OAuth Access Token Types using Keyed Message Digests . . 9 | |||
| 3.4. Channel Binding . . . . . . . . . . . . . . . . . . . . . 10 | 4. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 4. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 11 | ||||
| 4.1. Successful Bearer Token Exchange . . . . . . . . . . . . 11 | 4.1. Successful Bearer Token Exchange . . . . . . . . . . . . 11 | |||
| 4.2. OAuth 1.0a Authorization with Channel Binding . . . . . . 12 | 4.2. Failed Exchange . . . . . . . . . . . . . . . . . . . . . 11 | |||
| 4.3. Failed Exchange . . . . . . . . . . . . . . . . . . . . . 13 | 4.3. SMTP Example of a Failed Negotiation . . . . . . . . . . 12 | |||
| 4.4. Failed Channel Binding . . . . . . . . . . . . . . . . . 14 | 5. Security Considerations . . . . . . . . . . . . . . . . . . . 13 | |||
| 4.5. SMTP Example of a Failed Negotiation . . . . . . . . . . 14 | 6. Internationalization Considerations . . . . . . . . . . . . . 14 | |||
| 5. Security Considerations . . . . . . . . . . . . . . . . . . . 15 | 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 | |||
| 6. Internationalization Considerations . . . . . . . . . . . . . 16 | 7.1. SASL Registration . . . . . . . . . . . . . . . . . . . . 14 | |||
| 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 | 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 15 | |||
| 7.1. SASL Registration . . . . . . . . . . . . . . . . . . . . 17 | 8.1. Normative References . . . . . . . . . . . . . . . . . . 15 | |||
| 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 | 8.2. Informative References . . . . . . . . . . . . . . . . . 16 | |||
| 8.1. Normative References . . . . . . . . . . . . . . . . . . 18 | Appendix A. Acknowlegements . . . . . . . . . . . . . . . . . . 16 | |||
| 8.2. Informative References . . . . . . . . . . . . . . . . . 19 | Appendix B. Document History . . . . . . . . . . . . . . . . . . 16 | |||
| Appendix A. Acknowlegements . . . . . . . . . . . . . . . . . . 19 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 19 | |||
| Appendix B. Document History . . . . . . . . . . . . . . . . . . 19 | ||||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 22 | ||||
| 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] specifies the interaction | The core OAuth 2.0 specification [RFC6749] specifies the interaction | |||
| skipping to change at page 6, line 6 ¶ | skipping to change at page 6, line 18 ¶ | |||
| 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 for protection against man-in-the-middle attacks. | ||||
| OAUTH10A-PLUS mandates the usage of Transport Layer Security | ||||
| (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. | |||
| defined in this way MUST include message integrity protection. | ||||
| 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 7, line 22 ¶ | skipping to change at page 7, line 24 ¶ | |||
| 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 | |||
| 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. This is reserved for future use, the | |||
| this is reserved, the client SHOUD NOT send it, and has the | client SHOUD NOT send it, and has the default value of "". | |||
| default value of "". In "-PLUS" variants this carries a | ||||
| single key value pair "cbdata" for the channel binding data | ||||
| 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 | |||
| In these mechanisms values for path, query string and post body are | In these mechanisms values for path, query string and post body are | |||
| assigned default values. OAuth authorization schemes MAY define | assigned default values. OAuth authorization schemes MAY define | |||
| usage of these in the SASL context and extend this specification. | usage of these in the SASL context and extend this specification. | |||
| For OAuth Access Token Types that use request keyed message digest | For OAuth Access Token Types that use request keyed message digest | |||
| 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". | |||
| skipping to change at page 8, line 22 ¶ | skipping to change at page 8, line 26 ¶ | |||
| post (RESERVED): HTTP post data, the default value is "". | post (RESERVED): HTTP post data, the default value is "". | |||
| 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, | ||||
| extracts the channel binding unique prefix, and extracts the raw | ||||
| channel biding data based on the channel binding type used. It then | ||||
| computes it's own copy of the channel binding payload and compares | ||||
| that to the payload sent by the client in the cbdata key/value. | ||||
| Those two must be equal for channel binding to succeed. | ||||
| The server responds to a successfully verified client message by | The server responds to a successfully verified client message by | |||
| completing the SASL negotiation. The authenticated identity reported | completing the SASL negotiation. The authenticated identity reported | |||
| by the SASL mechanism is the identity securely established for the | by the SASL mechanism is the identity securely established for the | |||
| client with the OAuth credential. The application, not the SASL | client with the OAuth credential. The application, not the SASL | |||
| mechanism, based on local access policy determines whether the | mechanism, based on local access policy determines whether the | |||
| identity reported by the mechanism is allowed access to the requested | identity reported by the mechanism is allowed access to the requested | |||
| resource. Note that the semantics of the authz-id is specified by | resource. Note that the semantics of the authz-id is specified by | |||
| the SASL framework [RFC4422]. | the SASL framework [RFC4422]. | |||
| 3.2.1. OAuth Identifiers in the SASL Context | 3.2.1. OAuth Identifiers in the SASL Context | |||
| skipping to change at page 9, line 6 ¶ | skipping to change at page 9, line 4 ¶ | |||
| 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. | back to the application. | |||
| 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]] | codes are defined in the IANA [[need registry name]] registry | |||
| registry specified in the OAuth 2 core specification. | 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 | service. This may be empty which implies that unscoped tokens | |||
| tokens are required, or a space separated list. Use of a | are required, or a space separated list. Use of a space | |||
| space separated list is NOT RECOMMENDED. | 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 10, line 47 ¶ | skipping to change at page 10, line 44 ¶ | |||
| o The query string defaults to "". | o The query string defaults to "". | |||
| 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%2Fexample.com:143%2F&oauth_consumer_key%3D9djdj82h4 | POST&http%3A%2F%2Fexample.com:143%2F&oauth_consumer_key%3D9djdj82h4 | |||
| 8djs9d2%26oauth_nonce%3D7d8f3e4a%26oauth_signature_method%3DHMAC-SH | 8djs9d2%26oauth_nonce%3D7d8f3e4a%26oauth_signature_method%3DHMAC-SH | |||
| A1%26oauth_timestamp%3D137131201%26oauth_token%3Dkkk9d7dh3k39sjv7 | A1%26oauth_timestamp%3D137131201%26oauth_token%3Dkkk9d7dh3k39sjv7 | |||
| 3.4. Channel Binding | ||||
| The channel binding data is carried in the "qs" (query string) key | ||||
| value pair formatted as a standard HTTP query parameter with the name | ||||
| "cbdata". Channel binding requires that the channel binding data be | ||||
| integrity protected end-to-end in order to protect against man-in- | ||||
| the-middle attacks. All SASL OAuth mechanisms with a "-PLUS" postfix | ||||
| MUST provide integrity protection. It should be noted that while the | ||||
| OAuth 2.0 Bearer Token mandates TLS it does not create keying | ||||
| material at the application layer and is not suitable for use with | ||||
| channel bindings. | ||||
| The channel binding data is computed by the client based on it's | ||||
| choice of preferred channel binding type. As specified in [RFC5056], | ||||
| the channel binding information MUST start with the channel binding | ||||
| unique prefix, followed by a colon (ASCII 0x3A), followed by a base64 | ||||
| encoded channel binding payload. The channel binding payload is the | ||||
| raw data from the channel binding type. For example, if the client | ||||
| 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 | ||||
| [RFC5929]. | ||||
| 4. Examples | 4. 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". | |||
| 4.1. Successful Bearer Token Exchange | 4.1. Successful Bearer Token Exchange | |||
| skipping to change at page 12, line 28 ¶ | skipping to change at page 11, line 47 ¶ | |||
| 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...] | |||
| 4.2. OAuth 1.0a Authorization with Channel Binding | 4.2. Failed Exchange | |||
| This example shows channel binding in the context of an OAuth 1.0a | ||||
| request using a keyed message digest. Note that line breaks are | ||||
| inserted for readability. | ||||
| S: * OK [CAPABILITY IMAP4rev1 AUTH=OAUTH10A-PLUS SASL-IR] | ||||
| IMAP4rev1 Server Ready | ||||
| C: t1 AUTHENTICATE OAUTH10A-PLUS cD10bHMtdW5pcXVlLGE9dXNlckBleGFtcGxlL | ||||
| mNvbQFob3N0PXNlcnZlci5leGFtcGxlLmNvbQFwb3J0PTE0MwFhdXRoPU9BdXRoI | ||||
| HJlYWxtPSJFeGFtcGxlIixvYXV0aF9jb25zdW1lcl9rZXk9IjlkamRqODJoNDhka | ||||
| nM5ZDIiLG9hdXRoX3Rva2VuPSJra2s5ZDdkaDNrMzlzanY3IixvYXV0aF9zaWduY | ||||
| XR1cmVfbWV0aG9kPSJITUFDLVNIQTEiLG9hdXRoX3RpbWVzdGFtcD0iMTM3MTMxM | ||||
| jAxIixvYXV0aF9ub25jZT0iN2Q4ZjNlNGEiLG9hdXRoX3NpZ25hdHVyZT0iU1Nkd | ||||
| ElHRWdiR2wwZEd4bElIUmxZU0J3YjNRdSIBcXM9Y2JkYXRhPXRscy11bmlxdWU6U | ||||
| 0c5M0lHSnBaeUJwY3lCaElGUk1VeUJtYVc1aGJDQnRaWE56WVdkbFB3bz0BAQ== | ||||
| S: t1 OK SASL authentication succeeded | ||||
| As required by IMAP [RFC3501], the payloads are base64-encoded. The | ||||
| decoded initial client response (with %x01 represented as ^A and | ||||
| lines wrapped for readability) is: | ||||
| p=tls-unique,a=user@example.com^A | ||||
| host=server.example.com^A | ||||
| port=143^A | ||||
| auth=OAuth realm="Example", | ||||
| oauth_consumer_key="9djdj82h48djs9d2", | ||||
| oauth_token="kkk9d7dh3k39sjv7", | ||||
| oauth_signature_method="HMAC-SHA1", | ||||
| oauth_timestamp="137131201", | ||||
| oauth_nonce="7d8f3e4a", | ||||
| oauth_signature="SSdtIGEgbGl0dGxlIHRlYSBwb3Qu"^A | ||||
| qs=cbdata=tls-unique:SG93IGJpZyBpcyBhIFRMUyBmaW5hbCBtZXNzYWdlPwo=^A^A | ||||
| In this example the signature base string with line breaks added for | ||||
| readability would be: | ||||
| POST&http%3A%2F%2Fserver.example.com:143%2F&cbdata=tls-unique:SG93I | ||||
| GJpZyBpcyBhIFRMUyBmaW5hbCBtZXNzYWdlPwo=%26oauth_consumer_key%3D9djd | ||||
| j82h48djs9d2%26oauth_nonce%3D7d8f3e4a%26oauth_signature_method%3DHM | ||||
| AC-SHA1%26oauth_timestamp%3D137131201%26oauth_token%3Dkkk9d7dh3k39s | ||||
| jv7 | ||||
| 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 14, line 12 ¶ | skipping to change at page 12, line 29 ¶ | |||
| 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. | |||
| 4.4. Failed Channel Binding | 4.3. SMTP Example of a Failed Negotiation | |||
| This example shows a channel binding failure in an empty request. | ||||
| The channel binding information is empty. Note that line breaks are | ||||
| inserted for readability. | ||||
| S: * CAPABILITY IMAP4rev1 AUTH=OAUTH10A-PLUS SASL-IR IMAP4rev1 Server | ||||
| Ready | ||||
| S: t0 OK Completed | ||||
| C: t1 AUTHENTICATE OAUTH10A-PLUS cCxhPXVzZXJAZXhhbXBsZS5jb20BaG9z | ||||
| dD1zZXJ2ZXIuZXhhbXBsZS5jb20BcG9ydD0xNDMBYXV0aD0BY2JkYXRhPQEB | ||||
| S: + ewoic3RhdHVzIjoiNDEyIiwKInNjb3BlIjoiZXhhbXBsZV9zY29wZSIKfQ== | ||||
| C: + AQ== | ||||
| S: t1 NO SASL authentication failed | ||||
| The decoded initial client response is: | ||||
| p=tls-unique,a=user@example.com,^Ahost=server.example.com^A | ||||
| port=143^Aauth=^Acbdata=^A^A | ||||
| The decoded server response is: | ||||
| { | ||||
| "status":"412", | ||||
| "scope":"example_scope" | ||||
| } | ||||
| The client responds with the required dummy response. | ||||
| 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. | |||
| 5. 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 | |||
| skipping to change at page 16, line 4 ¶ | skipping to change at page 13, line 33 ¶ | |||
| 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 | Consequently, TLS MUST be provided by the application when | |||
| choosing this authentication mechanism. | 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 mechanism only | between the client and the server. This SASL mechanism only | |||
| supports client authentication. If server-side authentication is | supports client authentication. If server-side authentication is | |||
| desireable then it must be provided by the application underneath | desireable then it must be provided by the application underneath | |||
| the SASL layer. The use of TLS is strongly RECOMMENDED. | the SASL layer. The use of TLS is strongly RECOMMENDED. | |||
| OAUTH10A-PLUS: This mechanism adds the channel binding [RFC5056] | ||||
| capability to OAUTH10A for protection against man-in-the-middle | ||||
| attacks. OAUTH10A-PLUS mandates the usage of Transport Layer | ||||
| Security (TLS) at the application layer. | ||||
| Additionally, the following aspects are worth pointing out: | Additionally, the following aspects are worth pointing out: | |||
| An access token is not equivalent to the user's long term password. | 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 | Care has to be taken when these OAuth credentials are used for | |||
| actions like changing passwords (as it is possible with some | actions like changing passwords (as it is possible with some | |||
| protocols, e.g., XMPP). The resource server should ensure that | protocols, e.g., XMPP). The resource server should ensure that | |||
| actions taken in the authenticated channel are appropriate to the | actions taken in the authenticated channel are appropriate to the | |||
| strength of the presented credential. | strength of the presented credential. | |||
| skipping to change at page 17, line 27 ¶ | skipping to change at page 15, line 4 ¶ | |||
| 7.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. | |||
| Owner/Change controller: the IETF | Owner/Change controller: the IETF | |||
| Note: None | Note: None | |||
| The IANA is requested to register the following SASL profile: | The IANA is requested to register the following SASL profile: | |||
| SASL mechanism profile: OAUTH10A | SASL mechanism profile: OAUTH10A | |||
| 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 | |||
| The IANA is requested to register the following SASL profile: | ||||
| SASL mechanism profile: OAUTH10A-PLUS | ||||
| Security Considerations: See this document | ||||
| Published Specification: See this document | ||||
| For further information: Contact the authors of this document. | ||||
| Owner/Change controller: the IETF | ||||
| Note: None | ||||
| 8. References | 8. References | |||
| 8.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. | |||
| [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. | |||
| skipping to change at page 18, line 45 ¶ | skipping to change at page 16, line 8 ¶ | |||
| [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. | |||
| [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 | ||||
| for TLS", RFC 5929, July 2010. | ||||
| [RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework", RFC | [RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework", RFC | |||
| 6749, October 2012. | 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. | |||
| 8.2. Informative References | 8.2. Informative References | |||
| [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-12 (work in | (JWT)", draft-ietf-oauth-json-web-token-13 (work in | |||
| progress), October 2013. | progress), November 2013. | |||
| [I-D.ietf-oauth-v2-http-mac] | [I-D.ietf-oauth-v2-http-mac] | |||
| Richer, J., Mills, W., Tschofenig, H., and P. Hunt, "OAuth | Richer, J., Mills, W., Tschofenig, H., and P. Hunt, "OAuth | |||
| 2.0 Message Authentication Code (MAC) Tokens", draft-ietf- | 2.0 Message Authentication Code (MAC) Tokens", draft-ietf- | |||
| oauth-v2-http-mac-04 (work in progress), July 2013. | oauth-v2-http-mac-04 (work in progress), July 2013. | |||
| [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, | [RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, | |||
| skipping to change at page 19, line 47 ¶ | skipping to change at page 17, line 4 ¶ | |||
| 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 | -12 | |||
| o Removed GSS-API components from the specification. | o Removed -PLUS components from the specification. | |||
| -11 | -11 | |||
| o Removed GSS-API components from the specification. | ||||
| o Updated security consideration section. | 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. | |||
| skipping to change at page 20, line 31 ¶ | skipping to change at page 17, line 39 ¶ | |||
| -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 22, line 10 ¶ | skipping to change at page 19, line 17 ¶ | |||
| 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. | |||
| Email: wmills@yahoo-inc.com | Email: wmills_92105@yahoo.com | |||
| Tim Showalter | Tim Showalter | |||
| Email: tjs@psaux.com | Email: tjs@psaux.com | |||
| Hannes Tschofenig | Hannes Tschofenig | |||
| Nokia Solutions and Networks | Nokia Solutions and Networks | |||
| Linnoitustie 6 | Linnoitustie 6 | |||
| Espoo 02600 | Espoo 02600 | |||
| Finland | Finland | |||
| End of changes. 39 change blocks. | ||||
| 200 lines changed or deleted | 70 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||