%ents; ]>
Non-SASL Authentication This document specifies a protocol for authentication with Jabber servers and services using the jabber:iq:auth namespace. Note Well: The protocol specified herein has been deprecated in favor of SASL authentication as specified in RFC 3920. &LEGALNOTICE; 0078 Deprecated Standards Track Standards JIG XMPP Core RFC 3174 RFC 3920 iq-auth http://jabber.org/protocol/iq-auth/iq-auth.xsd 2007-03-13 2.3 2006-09-13 psa

Per a vote of the Jabber Council, changed status to Deprecated.

2.2 2005-06-28 psa

Corrected error in schema and example (username is not required in IQ-get).

2.1 2004-12-09 psa

Changed SHOULD to MUST regarding priority of SASL (RFC 3920) over jabber:iq:auth (JEP-0078).

2.0 2004-10-20 psa

Per a vote of the Jabber Council, advanced status to Final.

&stpeter; 1.8 2004-10-18 psa

Specified advertising iq-auth stream feature is implementation-specific; clarified several small matters in the text.

1.7 2004-07-27 psa

Added reference to character escaping in digest authentication; required inclusion of stream feature when server supports stream features and it is safe to advertise non-SASL authentication.

1.6 2004-07-21 psa

Removed reference to UTF-16, which is disallowed by XMPP Core; removed reference to character escaping in digest authentication pending list discussion.

1.5 2004-02-18 psa

Added optional stream feature.

1.4 2004-02-03 psa

Clarified that username and resource are required for authentication.

1.3 2003-11-26 psa

Added XMPP error handling.

1.2 2003-11-06 psa

Addressed case of attempting jabber:iq:auth after SASL failure.

1.1 2003-10-02 psa

Moved change password use case to JEP-0077.

1.0 2003-06-18 psa

Per a vote of the Jabber Council, advanced status to Draft.

0.8 2003-06-18 psa

Changes to address Council concerns.

0.7 2003-06-13 psa

Added change password use case; added more details to security considerations.

0.6 2003-06-12 psa

Added digest example; clarified escaping requirements; further specified error conditions; added more details to security considerations.

0.5 2003-06-06 psa

Removed XMPP-style error conditions until formats are stable.

0.4 2003-05-30 psa

Removed "enhanced digest" content, added information about expiration date.

0.3 2003-05-28 psa

Added "enhanced digest" method.

0.2 2003-05-20 psa

Slight editorial revisions.

0.1 2003-04-10 psa

Initial version.

Note Well: The protocol specified herein has been deprecated in favor of SASL authentication as specified in &rfc3920;.

Jabber technologies have long included a wire protocol that enables a client to authenticate with a server. Component authentication is out of scope for this JEP, and is specified separately in &jep0114;. The method originally used in the Jabber community makes use of the 'jabber:iq:auth' namespace and has been documented variously in Internet-Drafts and elsewhere. Because the XMPP specifications required upgraded authentication methods using SASL (see &rfc4422;) in order to progress through the Internet Standards Process, documentation of the 'jabber:iq:auth' namespace was removed from those specifications.

The 'jabber:iq:auth' method specified herein has been deprecated. However, because it will take some time for existing implementations and deployments to be upgraded to SASL, client and server software implementations still need to include support for 'jabber:iq:auth' in order to interoperate, and this document provides canonical documentation of the 'jabber:iq:auth' method. Nevertheless, implementation and deployment of SASL authentication is strongly recommended, since the 'jabber:iq:auth' method will eventually be obsoleted entirely.

The 'jabber:iq:auth' namespace must make it possible for a Jabber client to authenticate with a server. In particular, the client must provide a username and appropriate credentials for the specific authentication method used. The methods defined herein are:

  1. plaintext
  2. digest (using the SHA1 algorithm specified in &rfc3174;)

Note: This JEP does not include the so-called "zero-knowledge" method; that method did not provide stronger security than digest authentication and thus is unnecessary.

In order to determine which fields are required for authentication with a server, a client SHOULD first send an IQ get to the server. A client SHOULD NOT attempt to guess at the required fields, since the nature of the required data is subject to service provisioning.

]]> ]]> ]]> ]]>

If the client included a username with the IQ-get but there is no such username, the server SHOULD NOT return an error, but instead SHOULD return the normal authentication fields (this helps to prevent unknown users from discovering which usernames are in use). If the server does not support non-SASL authentication (e.g., because it supports only SASL authentication as defined in RFC 3920), it MUST return a &unavailable; error. If the client previously attempted SASL authentication but that attempt failed, the server MUST return a <policy-violation/> stream error (see RFC 3920 regarding stream error syntax).

Both the username and the resource are REQUIRED for client authentication using the 'jabber:iq:auth' namespace; if more flexible authentication and resource provisioning are desired, a server SHOULD implement SASL authentication and resource binding as defined in RFC 3920 (e.g., to enable the server to provide the resource). The <username/> and <resource/> elements MUST be included in the IQ result returned by the server in response to the initial IQ get, and also MUST be included in the IQ set sent by the client when providing authentication credentials.

The foregoing stanza shows that the server supports both plaintext authentication (via the <password/> element) and digest authentication with SHA1-encrypted passwords (via the <digest/> element).

Therefore, in order to successfully authenticate with the server in this example, a client MUST provide a username, a resource, and one of password or digest.

bill Calli0pe globe ]]>

Plaintext passwords are straightforward (obviously, characters that map to predefined XML entities MUST be escaped according to the rules defined in section 4.6 of the XML specification, and any non-US-ASCII characters MUST be encoded according to the encoding of XML streams as specified in RFC 3920, i.e., UTF-8 as defined in &rfc3269;).

The value of the <digest/> element MUST be computed according to the following algorithm:

  1. Concatenate the Stream ID received from the server with the password. In Digest authentication, password characters that map to predefined XML entities SHOULD NOT be escaped as they are for plaintext passwords, but non-US-ASCII characters MUST be encoded as UTF-8 since the SHA-1 hashing algorithm operates on byte arrays.
  2. Hash the concatenated string according to the SHA1 algorithm, i.e., SHA1(concat(sid, password)).
  3. Ensure that the hash output is in hexidecimal format, not binary or base64.
  4. Convert the hash output to all lowercase characters.
bill 48fc78be9ec8f86d8ce1c39c320c97c21d62334d globe ]]>

The character data shown in the <digest/> element is the output produced as a result of following the algorithm defined above when the stream ID is '3EE948B0' and the password is 'Calli0pe'.

If the credentials provided match those known by the server, the client will be successfully authenticated.

]]>

Alternatively, authentication may fail. Possible causes of failure include:

  1. The user provided incorrect credentials.
  2. There is a resource conflict (i.e., there is already an active session with that resource identifier associated with the same username). The RECOMMENDED behavior is for the server to terminate the existing session and create the new one; however, the server MAY provide the opposite behavior if desired, leading to a conflict error for the newly requested login.
  3. The user did not provide all of the required information (e.g., did not provide a username or resource).

Although RFC 3920 specifies that error stanzas SHOULD include the original XML sent, error stanzas qualified by the 'jabber:iq:auth' namespace SHOULD NOT do so given the sensitive nature of the information being exchanged.

]]> ]]> ]]>

RFC 3920 defines methods for advertising feature support during stream negotiation. It may be desirable for a server to advertise support for non-SASL authentication as a stream feature. The namespace for reporting support within <stream:features/> is "http://jabber.org/features/iq-auth". Upon receiving a stream header qualified by the 'jabber:client' namespace, a server that returns stream features SHOULD also announce support for non-SASL authentication by including the relevant stream feature. Exactly when a server advertises the iq-auth stream feature is up to the implementation or deployment (e.g., a server MAY advertise this feature only after successful TLS negotiation or if the channel is encrypted via the older SSL method). Obviously, this does not apply to servers that do not support stream features (e.g., older servers that do not comply with XMPP 1.0).

... DIGEST-MD5 PLAIN ... ]]>

A server SHOULD NOT advertise non-SASL authentication to another server (i.e., if the initial stream header was qualified by the 'jabber:server' namespace).

As defined herein, the 'jabber:iq:auth' namespace supports both the old (HTTP-style) error codes and the extensible error classes and conditions specified in RFC 3920. A compliant server or service implementation MUST support both old-style and new-style error handling. A compliant client implementation SHOULD support both.

In accordance with Section 8 of &jep0001;, on 2004-10-20 this JEP was advanced to a status of Final with the understanding that it would expire in six months. On 2006-09-13, the Jabber Council changed the status of this JEP to Deprecated. The Jabber Council will review this JEP every six months to determine whether to change its status to Obsolete or to extend the expiration date for an additional six months; this process will continue until the JEP is obsoleted. For the latest expiration date, refer to the JEP Information block at the beginning of this document.

Use of the 'jabber:iq:auth' method for client-server authentication is not as secure as SASL authentication (defined in RFC 3920). If both client and server implement SASL, they MUST use SASL. If a client attempts to authenticate using the 'jabber:iq:auth' namespace after an attempt at SASL authentication fails, the server MUST refuse the 'jabber:iq:auth' attempt by returning a <policy-violation/> stream error to the client.

Client implementations MUST NOT make plaintext the default mechanism, and SHOULD warn the user that the plaintext mechanism is insecure. The plaintext mechanism SHOULD NOT be used unless the underlying stream is encrypted (using SSL or TLS) and the client has verified that the server certificate is signed by a trusted certificate authority. A given domain MAY choose to disable plaintext logins if the stream is not properly encrypted, or disable them entirely. If a client implements the plaintext mechanism and a server allows both the digest mechanism and the plaintext mechanism when channel encryption is not in use, a downgrade attack is possible, in which a man-in-the-middle tricks the client into revealing the user's plaintext password.

Authentication using the 'jabber:iq:auth' method is known to be less secure than SASL authentication, which is one reason why the 'jabber:iq:auth' method has been deprecated.

This JEP requires no interaction with &IANA;.

The ®ISTRAR; includes the 'jabber:iq:auth' namespace in its registry of protocol namespaces.

The Jabber Registrar includes the 'http://jabber.org/features/iq-auth' namespace in its registry of stream feature namespaces.

The protocol documented by this schema is defined in JEP-0078: http://www.jabber.org/jeps/jep-0078.html ]]> The protocol documented by this schema is defined in JEP-0078: http://www.jabber.org/jeps/jep-0078.html ]]>