OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

mqtt message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [OASIS Issue Tracker] Commented: (MQTT-8) Create a new CONNACK return code to indicate that the CONNECT packet was malformed.

    [ http://tools.oasis-open.org/issues/browse/MQTT-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33866#action_33866 ] 

Andrew Banks commented on MQTT-8:

Here is a summary of this issue to try and move  the discussion forward.

1) CONNECT in MQTT is unique in that the CONNACK response can convey a negative outcome.
2) Other commands PUBLISH SUBSCRIBE UNSUBSRCIBE etc. do not allow for the possibility of a negative outcome so the only action 
    the server can take is to disconnect the client if it cannot process the command. 
3) In the case of CONNECT processing, there is a conflict between wanting to provide some feedback to the client as to why its connect request could 
    not be processed, versus not giving the client information which might help it perform a denial of service attack. 

Related / dependent issues are:
MQTT-15 Should the CONNECT packet Protocol Name and Protocol Version fields be changed?
MQTT-6 What should a server do if it receives a connect packet with and incorrect protocol name?
MQTT-22 Specification is ambiguous with regards to dynamic topics.
MQTT-38 Malformed QoS for topics in SUBSCRIBE packet.

Straw man proposal.
If an MQTT Packet cannot be processed by the server or client then the server or client MUST immediately disconnect the TCP session.
The client or server might want to log some diagnostics locally as to why the TCP connection was disconnected.

The server should attempt to flow  the following connack return code before disconnecting the TCP session if the CONNECT packet can be processed but the Protocol name and version are not as specified by issue MQTT-15.
1	0x01	Connection Refused: unacceptable protocol version   - The server does not support the level of the MQTT protocol requested by the client.

The following CONNACK return codes are never used.
2	0x02	Connection Refused: identifier rejected
3	0x03	Connection Refused: server unavailable 
4	0x04	Connection Refused: bad user name or password
5	0x05	Connection Refused: not authorized 

> Create a new CONNACK return code to indicate that the CONNECT packet was malformed.
> -----------------------------------------------------------------------------------
>                 Key: MQTT-8
>                 URL: http://tools.oasis-open.org/issues/browse/MQTT-8
>             Project: OASIS Message Queuing Telemetry Transport (MQTT) TC
>          Issue Type: Improvement
>          Components: core
>         Environment: MQTT Server
>            Reporter: Andrew Banks
> The server should flow a new CONNACK with a new return code before disconnecting the TCP session if it receives a CONNECT message which is malformed.
> Malformed means that the protocol name and version are correct but something else is incorrect, for example a User Name flag is set to indicate there is a User Name in the payload but the payload is empty.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]