Abstract: | This specification defines an XMPP binding of the supporting functions for the CLIENT-KEY SASL mechanism. |
Author: | Dave Cridland |
Copyright: | © 1999 – 2017 XMPP Standards Foundation. SEE LEGAL NOTICES. |
Status: | Experimental |
Type: | Standards Track |
Version: | 0.1.0 |
Last Updated: | 2018-01-25 |
WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems are advised to carefully consider whether it is appropriate to deploy implementations of this protocol before it advances to a status of Draft.
1. Introduction
2. Typical Flow
3. Client Key Support Operations
3.1. Client Registration
3.2. Key Revocation
3.3. Key Enumeration
4. Determining Support
5. Security 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 CLIENT-KEY SASL mechanism defined in draft-cridland-kitten-clientkey-00.txt suggests supporting protocol messages to be present in the application protocol. This specification defines these for XMPP.
A typical client might use this protocol alongside that of TOTP, Extensible SASL Profile (XEP-0388) [1], and draft-cridland-kitten-clientkey-00.txt as follows.
On first use, a client will use a traditional SASL mechanism using SASL2, such as SCRAM. The server will then prompt using <next-authenticate/> to initiate, or perform, TOTP.
The client will then request a Client Key to reauthenticate later. This may be one or both of a short-term Client Key intended for in-memory storage, perhaps for use with ISR, and a longer-term Client Key used for a "remember this client" to suppress 2FA for a period.
Later authentications will use CLIENT-KEY or CLIENT-KEY-PLUS, and the server SHOULD suppress TOTP in such cases.
Client registration requests a Client Key from the server. It is typically used to speed reauthentication during a session, and to elide a full reauthentication at the start of a subsequent session.
In order to register and obtain a Client Key, a client sends an <iq/> of type "set" containing an XML representation of the data required, within a <register/> element qualified by the 'urn:xmpp:client-key:0' namespace, containing four elements in any order. Descriptions of values are here informative; the canonical definition is in draft-cridland-kitten-clientkey-00.txt.
<id/> has a text value of the ClientID, a suitable identifier for the client instance, unique within the scope of the authenticated (<localpart@domain.tld> or <domain.tld>).
<name/> has a text value of the Client Name, a human-readable name for the client instance.
<key/> has a text value of the ValidationKey, encoded using Base 64. Implementors are strongly advised to take careful note of the requirements of the ValidationKey as discussed in draft-cridland-kitten-clientkey-00.txt.
<ttl/> has a text value containing a integer string representation of the number of seconds the Client Key is requested to last for.
In the following example, the ValidationKey is H("Random"), and the TTL is for 30 days - a reasonable "Remember this client" option.
<iq type='set' id='123456'> <register xmlns='urn:xmpp:client-key:0'> <id>213456-987123-123987</iq> <name>SuperChatBiscuit on Honest Pete's Mobile OS</name> <key>WNiIwIqlYfNw44zul2EhUyqIPXE=</key> <ttl>2592000</ttl> </register> </iq>
The server responds with two items of information in a <registered/> element qualified by the 'urn:xmpp:client-key:0' namespace. The EncryptedSecret is contained within a <encrypted-secret/> element as a base64-encoded value, and the <expiry/> element contains a timestamp for expiry.
<iq type='result' id='123456'> <registered xmlns='urn:xmpp:client-key:0'> <encrypted-secret>WNiIwIqlYfNw44zul2EhUyqIPXE=</encrypted-secret> <expiry>2017-10-15T12:00:00Z</expiry> </registered> </iq>
Note that the expiry time might not be 30 days simply because the client has requested it - the server is free to shorten expiry times.
Any authenticated client may revoke a key belonging to the same user by sending an <iq/> of type "set" containing a <revoke/> element qualified by the 'urn:xmpp:client-key:0' namespace, containing a <key/> element whose text value is the ClientID corresponding to the key to be revoked.
<iq type='set' id='123456'> <revoke xmlns='urn:xmpp:client-key:0'> <id>213456-987123-123987</iq> </revoke> </iq>
Any authenticated client may enumerate keys belonging to the same user by sending an <iq/> of type "get" containing a <list/> element qualified by the 'urn:xmpp:client-key:0' namespace.
<iq type='get' id='123456'> <list xmlns='urn:xmpp:client-key:0'/> </iq>
The server responds with an <iq/> of type 'result', containing the <list/> element qualified by the 'urn:xmpp:client-key:0' namespace. This element contains a sequence of <key/> elements each containing (in any order) the <id/>, <name/> and <expiry/> elements as in registration.
<iq type='result' id='123456'> <list xmlns='urn:xmpp:client-key:0'> <key> <id>213456-987123-123987</iq> <name>SuperChatBiscuit on Honest Pete's Mobile OS</name> <expiry>2017-10-15T12:00:00Z</expiry> </key> <key> <id>313456-987123-123987</iq> <name>SuperChatChocolate on Honest Bob's Mobile OS</name> <expiry>2018-01-08T12:00:00Z</expiry> </key> </list> </iq>
Support for this protocol is advertised as the Disco feature 'urn:xmpp:client-key:0'; however clients MAY infer support if the CLIENT-KEY or CLIENT-KEY-PLUS SASL mechanism is supported.
Security considerations for this specification are covered within the Internet-Draft draft-cridland-kitten-clientkey-00.txt - this specification introduces no further considerations by design, but relies heavily on the guidance given there.
Series: XEP
Number: 0399
Publisher: XMPP Standards Foundation
Status:
Experimental
Type:
Standards Track
Version: 0.1.0
Last Updated: 2018-01-25
Approving Body: XMPP Council
Dependencies: None
Supersedes: None
Superseded By: None
Short Name: client-key
Registry:
<http://xmpp.org/registrar/client-key.html>
Source Control:
HTML
This document in other formats:
XML
PDF
Email:
dave.cridland@surevine.com
JabberID:
dave.cridland@surevine.com
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) 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.
There exists a special venue for discussion related to the technology described in this document: the <standards@xmpp.org> mailing list.
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.
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-0388: Extensible SASL Profile <https://xmpp.org/extensions/xep-0388.html>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
First draft
(dwd)END