| Abstract: | This document provides a schema description for detailed information about HTTP URLs. |
| Author: | Matthew Miller |
| Copyright: | © 1999 - 2011 XMPP Standards Foundation. SEE LEGAL NOTICES. |
| Status: | Deferred |
| Type: | Standards Track |
| Version: | 0.3 |
| Last Updated: | 2004-01-20 |
WARNING: Consideration of this document has been Deferred by the XMPP Standards Foundation. Implementation of the protocol described herein is not recommended.
1. Introduction
2. Requirements
3. Basic Usage
3.1. Providing Authentication
3.2. Providing Cookies
3.3. Providing Headers
4. Implementation Notes
4.1. Cookies
4.2. Headers
5. Formal Description
5.1. Overview
5.2. <auth/> Element
5.3. <auth-param/> Element
5.4. <cookie/> Element
5.5. <header/> Element
5.6. XML Schema
6. Security Considerations
6.1. Authentication Information
7. IANA Considerations
8. XMPP Registrar Considerations
Appendices
A: Document Information
B: Author Information
C: Legal Notices
D: Relation to XMPP
E: Discussion Venue
F: Requirements Conformance
G: Notes
H: Revision History
The most common URL scheme distributed over the Internet is HTTP and HTTPS. This document defines a structure that extends URL Address Information [1] to enable more advanced access to such URLs within Jabber.
This document supplements XEP-0103 to provide more detailed information about HTTP and HTTPS URLs. The requirements this document fulfills are:
The intent of this information is to provide an HTTP client with enough information in order to construct the HTTP request and entity headers necessary, as defined in RFC 2616 [2].
The use of this document in conjunction with XEP-0103 is OPTIONAL. The entity sending the URL is not required to provide any of this information, and receiving entities MAY ignore it.
The two most typical types of information that can be necessary for accessing an HTTP URL are authentication details and cookies. In some cases, custom headers MAY also be necessary for successful use. Authentication information is provided in a scheme-independent format. Cookie data provided includes what would be necessary for a client to properly persist the value.
At a minimum, this document allows for an entity to indicate what authentication scheme is in use:
Example 1. Indicating auth scheme
<message to='client@domain.com'>
<url-data xmlns='http://jabber.org/protocol/url-data'
xmlns:http='http://jabber.org/protocol/url-data/scheme/http'
target='http://www.jabber.org/members/index.php'>
<http:auth scheme='basic'/>
</url-data>
</message>
To provide additional parameters (such as a realm and username/password), the <auth-param/> element is used:
<message to='client@domain.com'>
<url-data xmlns='http://jabber.org/protocol/url-data'
xmlns:http='http://jabber.org/protocol/url-data/scheme/http'
target='http://www.jabber.org/members/index.php'>
<http:auth scheme='basic'>
<http:auth-param name='realm' value='www.jabber.org'/>
<auth-param name='username' value='defaultuser'/>
<auth-param name='password' value='defaultpwd'/>
</http:auth>
</url-data>
</message>
Cookie information is provided by the <cookie/> element. This element can provide all of the information of the "Set-Cookie" response header [3]. The simplest usage is:
<message to='client@domain.com'>
<url-data xmlns='http://jabber.org/protocol/url-data'
xmlns:http='http://jabber.org/protocol/url-data/scheme/http'
target='http://www.jabber.org/members/index.php'>
<http:cookie name='jsessionid' value='1243asd234190sa32ds'/>
</url-data>
</message>
The above cookie is considered "transient", and will terminate when the HTTP session ends. Additional information about the cookie can be provided:
<message to='client@domain.com'>
<url-data xmlns='http://jabber.org/protocol/url-data'
xmlns:http='http://jabber.org/protocol/url-data/scheme/http'
target='http://www.jabber.org/members/index.php'>
<http:cookie name='jsessionid'
domain='jabber.org'
max-age='1234000'
path='/members'
comment='Web Session Identifier'
version='1.0'
secure='false'
value='1243asd234190sa32ds'/>
</url-data>
</message>
As demonstrated, the <cookie/> provides all the attributes provided by the "Set-Cookie" header. The only attributes required are "name" and "value".
In some cases, arbitrary headers are necessary. They are provided using the <header/> element:
<message to='client@domain.com'>
<url-data xmlns='http://jabber.org/protocol/url-data'
xmlns:http='http://jabber.org/protocol/url-data/scheme/http'
target='http://www.jabber.org/members/index.php'>
<http:header name='Custom-Data' value='some custom data'/>
</url-data>
</message>
Entities receiving cookie information SHOULD following the state management guidelines from RFC 2109 [4]. In particular, the interpretation of the "persistence details" attribute values from <cookie/> is that defined in section 4.2.2 of RFC 1209.
The attributes provided by <cookie/> MUST NOT be "pre-escaped" for HTTP message headers. it is the responsibility of the receiving entity to properly encode cookie information into the "cookie" message header, including any character escaping.
The <header/> element only provides those message headers used for an HTTP request. There is currently no mechanism to convey HTTP response headers.
The name and value attributes from <header/> MUST NOT be "pre-escaped" for HTTP message headers. It is the responsibility of the receiving entity to properly encode message headers, including any character escaping.
The namespace for this structure is "http://jabber.org/protocol/url-data/scheme/http". Because this namespace is intended to supplement the <url-data/> element, this namespace SHOULD be declared within the <url-data/> element using the "http" namespace prefix (as demonstrated in the examples above). This namespace MUST only be applied when the "target" attribute in <url-data/> uses the scheme "http" or "https".
The <auth/> element provides authentication information, including scheme. The contents of this element detail any additional parameters for authentication.
The "scheme" attribute describes the HTTP authentication scheme to use. This attribute MUST be present, and MUST be the name of an HTTP authentication scheme (such as "basic").
The <auth-param/> element provides authentication parameters. This element has attributes for the parameter name and value.
The "name" attribute specifies the (logical) name of the authentication parameter. This attribute MUST be present, and MUST be applicable to the given scheme, although "realm" is always a valid parameter.
The "value" attribute specifies the value for this authentication parameter. This attribute MUST be present, but MAY be empty if a value is not required.
The <cookie/> element provides client cookie data. This element has attributes for the cookie name and value, as well as the persistence details.
The "name" attribute specifies the name of the cookie. This attribute MUST be present, and MUST NOT be empty. It corresponds to the "name" in the "name=value" syntax.
The "value" attribute specifies the value for the cookie. This attribute MUST be present, but MAY be empty if a value is not required. It corresponds to the "value" in the "name=value" syntax.
The "comment" attribute provides the description of the cookie, as would be provided via the "Set-Cookie" header. This attribute is OPTIONAL.
The "domain" attribute provides the applicable domain of the cookie, as would be provided via the "Set-Cookie" header. This attribute is OPTIONAL.
The "path" attribute provides the applicable HTTP path of the cookie, as would be provided via the "Set-Cookie" header. This attribute is OPTIONAL.
The "max-age" attribute provides the maximum age for the cookie, as would be provided via the "Set-Cookie" header. This attribute is OPTIONAL, and MUST be a non-negative integer. If not specified, the default value is "0".
The "secure" attribute indicates if this cookie is only offered in secure environments, as would be provided via the "Set-Cookie" header. This attribute is OPTIONAL, and MUST be a boolean value of "true" or "false". The default value is "false".
The "version" attribute provides the version of the cookie, as would be provided via the "Set-Cookie" header. This attribute is OPTIONAL, and SHOULD be "1.0" unless otherwise needed. If not specified, the default value is "1.0".
The <header/> element provides generic request and entity header information, to be included in the connection attempt. This element is ONLY for message headers included in the HTTP request; it SHOULD NOT be used for message headers included in the HTTP response. The attributes for this element are the name and value of the header.
The "name" attribute specifies the name of the header. This attribute MUST be present, and MUST conform to the "field-name" pattern for RFC 2616. It corresponds to the "name" in the (simplified) "name: value" header syntax.
The "value" attribute specifies the value of the header. This attribute MUST be present, and MUST conform to the "field-value" pattern for RFC 2616. It MAY empty if a value is not required. It corresponds to the "value" in the (simplified) "name: value" header syntax.
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://jabber.org/protocol/url-data/scheme/http'
xmlns='http://jabber.org/protocol/url-data/scheme/http'
elementFormDefault='qualified'>
<xs:element name='auth'>
<xs:complexType>
<xs:attribute name='scheme' use='required' type='xs:string'/>
<xs:element name='auth-param' minOccurs='0' maxOccurs='unbounded'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:string'>
<xs:attribute name='name' use='required' type='xs:string'/>
<xs:attribute name='value' use='required' type='xs:string'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:complexType>
</xs:element>
<xs:element name='cookie'>
<xs:complexType>
<xs:attribute name='name' use='required' type='xs:string'/>
<xs:attribute name='value' use='required' type='xs:string'/>
<xs:attribute name='comment' use='optional' type='xs:string'/>
<xs:attribute name='domain' use='optional' type='xs:string'/>
<xs:attribute name='max-age' use='optional' type='xs:integer'/>
<xs:attribute name='path' use='optional' type='xs:string'/>
<xs:attribute name='secure' use='optional' type='xs:boolean'/>
<xs:attribute name='version' use='optional' type='xs:string'/>
</xs:complexType>
</xs:element>
<xs:element name='header'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:string'>
<xs:attribute name='name' use='required' type='xs:string'/>
<xs:attribute name='value' use='required' type='xs:string'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:schema>
This document allows complete authentication information to be passed. This information is only as secure as the connection-path between the provider and acceptor.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [5].
The XMPP Registrar [6] shall register the "http://jabber.org/protocol/url-data/scheme/http" namespace.
Series: XEP
Number: 0104
Publisher: XMPP Standards Foundation
Status:
Deferred
Type:
Standards Track
Version: 0.3
Last Updated: 2004-01-20
Approving Body: XMPP Council
Dependencies: XMPP Core, RFC 3986, RFC 2616, RFC 2617, XEP-0103
Supersedes: None
Superseded By: None
Short Name: N/A
Source Control:
HTML
This document in other formats:
XML
PDF
Email:
linuxwolf@outer-planes.net
JabberID:
linuxwolf@outer-planes.net
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Given that this XMPP Extension Protocol normatively references IETF technologies, discussion on the <xsf-ietf@xmpp.org> list might also be appropriate.
Errata can be sent to <editor@xmpp.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. XEP-0103: URL Address Information <http://xmpp.org/extensions/xep-0103.html>.
2. RFC 2616: Hypertext Transport Protocol -- HTTP/1.1 <http://tools.ietf.org/html/rfc2616>.
3. "Set-Cookie" is a message header for the HTTP response, and the <header/> element represents only message headers for HTTP requests. Therefore, cookies are handled differently.
4. RFC 2109: HTTP State Mangement Mechanism <http://tools.ietf.org/html/rfc2109>.
5. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
6. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://xmpp.org/registrar/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
END