Network Working Group G. Wilkins, Ed. Internet-Draft Intalio Intended status: Informational April 11, 2011 Expires: October 13, 2011 WebSocket Interoperability Tests draft-wilkins-hybi-websocket-tests-00 Abstract This draft describes a number of websocket sub protocols that may be used to test the interoperability of websocket client and server implementations. Status of this Memo By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on October 13, 2011. Wilkins Expires October 13, 2011 [Page 1] Internet-Draft WebSocket Tests April 2011 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . . 3 2. Overall Operation . . . . . . . . . . . . . . . . . . . . . . . 3 2.1. Client Operation . . . . . . . . . . . . . . . . . . . . . 3 2.2. Server Operation . . . . . . . . . . . . . . . . . . . . . 3 3. Passive Server Tests . . . . . . . . . . . . . . . . . . . . . 3 3.1. Echo . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3.1.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . . 4 3.1.2. Identification . . . . . . . . . . . . . . . . . . . . 4 3.1.3. Client Operation . . . . . . . . . . . . . . . . . . . 4 3.1.4. Server Operation . . . . . . . . . . . . . . . . . . . 4 3.2. Echo Broadcast . . . . . . . . . . . . . . . . . . . . . . 4 3.2.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . . 4 3.2.2. Identification . . . . . . . . . . . . . . . . . . . . 4 3.2.3. Client Operation . . . . . . . . . . . . . . . . . . . 5 3.2.4. Server Operation . . . . . . . . . . . . . . . . . . . 5 3.3. Echo Assembled . . . . . . . . . . . . . . . . . . . . . . 5 3.3.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . . 5 3.3.2. Identification . . . . . . . . . . . . . . . . . . . . 5 3.3.3. Client Operation . . . . . . . . . . . . . . . . . . . 5 3.3.4. Server Operation . . . . . . . . . . . . . . . . . . . 6 3.4. Echo Fragments . . . . . . . . . . . . . . . . . . . . . . 6 3.4.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . . 6 3.4.2. Identification . . . . . . . . . . . . . . . . . . . . 6 3.4.3. Client Operation . . . . . . . . . . . . . . . . . . . 6 3.4.4. Server Operation . . . . . . . . . . . . . . . . . . . 7 4. Active Server Tests . . . . . . . . . . . . . . . . . . . . . . 7 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 7 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 7 7. Security Considerations . . . . . . . . . . . . . . . . . . . . 7 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 7 8.1. Normative References . . . . . . . . . . . . . . . . . . . 7 8.2. Informative References . . . . . . . . . . . . . . . . . . 8 Appendix A. Additional Stuff . . . . . . . . . . . . . . . . . . . 8 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 8 Intellectual Property and Copyright Statements . . . . . . . . . . 9 Wilkins Expires October 13, 2011 [Page 2] Internet-Draft WebSocket Tests April 2011 1. Introduction The specification of the websocket protocol is described in draft-ietf-hybi-06 [thewebsocketprotocol-06]. 1.1. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. 2. Overall Operation The operations of these tests is based websocket connections with a negotiated protocol and/or extensions that identify the expected handling of the frames and messages for each test. 2.1. Client Operation The Client: o MUST connect to the server using the identified protocol and extensions. o MUST initiate a close of the connection after the tests have been completed. 2.2. Server Operation The Server: o SHOULD accept all connections with the required protocol and extension. o MUST handle control frames normally, unless otherwise noted by the specific test. o SHOULD maintain the connection open, unless otherwise noted by the specific test. 3. Passive Server Tests 3.1. Echo Wilkins Expires October 13, 2011 [Page 3] Internet-Draft WebSocket Tests April 2011 3.1.1. Purpose To test the reception and transmission of non-control frames. 3.1.2. Identification Protocol: org.ietf.websocket.test-echo Extensions: none 3.1.3. Client Operation The Client: o MAY send any legal non-control frame with any op-code or extension flag set o SHOULD expect to receive the echoed frames unaltered with the exception that extension flags should not be cleared. 3.1.4. Server Operation The Server: o MUST handle control frames normally. o MUST receive all non-control frames without errors, other than frames exceeding the servers maximum frame size. o MUST send a copy of all received frames back on the connection on which was received, unaltered in length, payload or opcode. The extensions flags SHOULD NOT be set. 3.2. Echo Broadcast 3.2.1. Purpose To test the operation of multiple client connections. 3.2.2. Identification Protocol: org.ietf.websocket.test-echo-broadcast Extensions: none Wilkins Expires October 13, 2011 [Page 4] Internet-Draft WebSocket Tests April 2011 3.2.3. Client Operation The Client: o MAY send any legal non-control frame with any op-code or extension flag set o SHOULD expect to receive the frames unaltered with the exception that extension flags should not be cleared. o MUST expect to receive the echoed frames from other clients. 3.2.4. Server Operation The Server: o SHOULD accept all connections with the required protocol and extension. o MUST handle control frames normally. o MUST receive all non-control frames without errors, other than frames exceeding the servers maximum frame size. o MUST send a copy of all received frames to all accepted connections of the same test type, unaltered in length, payload or opcode. The extensions flags SHOULD NOT be set. 3.3. Echo Assembled 3.3.1. Purpose To test the sending and reception of fragmented messages. 3.3.2. Identification Protocol: org.ietf.websocket.test-echo-assemble Extensions: none 3.3.3. Client Operation The Client: o MAY send any legal non-control frame with any op-code or extension flag set Wilkins Expires October 13, 2011 [Page 5] Internet-Draft WebSocket Tests April 2011 o SHOULD send messages fragmented into 1, 2 or more frames. o SHOULD send zero length messages as 1, 2 or more zero length frame fragments o SHOULD expect to receive a copy of all sent messages, aggregated into a single frame of unaltered opcode and payload. The extension flags SHOULD NOT be set. 3.3.4. Server Operation The Server: o SHOULD accept all connections with the required protocol and extension. o MUST handle control frames normally. o MUST receive all non-control frames without errors, other than frames exceeding the servers maximum frame size or for messages exceeding the servers maximum message size. o MUST send a copy of all received messages back on the connection on which was received, aggregated into a single frame with unaltered payload or opcode. The extensions flags SHOULD NOT be set. 3.4. Echo Fragments 3.4.1. Purpose To test the reception and sending of fragmented messages. 3.4.2. Identification Protocol: org.ietf.websocket.test-echo-fragment Extensions: none 3.4.3. Client Operation The Client: o MAY send any legal non-control frame with any op-code or extension flag set o MAY send messages fragmented into 1, 2 or more frames. Wilkins Expires October 13, 2011 [Page 6] Internet-Draft WebSocket Tests April 2011 o SHOULD expect to receive a copy of all sent messages sent as 2 or 3 frame fragments 3.4.4. Server Operation The Server: o SHOULD accept all connections with the required protocol and extension. o MUST handle control frames normally. o MUST receive all non-control frames without errors, other than frames exceeding the servers maximum frame size. o MUST send a copy of all received frames back on the connection on which was received, unaltered in payload or opcode, but fragmented into 2 or 3 fragments with randomly selected frame boundaries. The extensions flags SHOULD NOT be set. 4. Active Server Tests TBD 5. Acknowledgements Standing on the shoulders of giants 6. IANA Considerations This memo includes no request to IANA. 7. Security Considerations The tests described in this document may echo client supplied data. 8. References 8.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. Wilkins Expires October 13, 2011 [Page 7] Internet-Draft WebSocket Tests April 2011 [thewebsocketprotocol-06] Fette, I., "The WebSocket Protocol", 2011. 8.2. Informative References [DOMINATION] Mad Dominators, Inc., "Ultimate Plan for Taking Over the World", 1984, . [I-D.narten-iana-considerations-rfc2434bis] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", draft-narten-iana-considerations-rfc2434bis-09 (work in progress), March 2008. [RFC2629] Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629, June 1999. [RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, July 2003. Appendix A. Additional Stuff This becomes an Appendix. Author's Address Greg Wilkins (editor) Intalio Email: gregw@intalio.com Wilkins Expires October 13, 2011 [Page 8] Internet-Draft WebSocket Tests April 2011 Full Copyright Statement Copyright (C) The IETF Trust (2011). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Intellectual Property The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Wilkins Expires October 13, 2011 [Page 9]