ace-wg / mqtt-tls-profile

Document for MQTT-TLS-profile
Other
0 stars 2 forks source link

Will scope and publish on Disconnect #25

Closed ciseng closed 5 years ago

ciseng commented 5 years ago
  1. It is not clear to me, how in the scope string is the ability to have a "will" indicated?

If the Will Flag is set to 1, the Will Topic follows the Client ID and Will Properties in the Payload. This is where the broker learns the Will Topic. Then the scope would be publish. And subscribes would need to subscribe to receive this message. Will clarify in text.

  1. Not sure if this goes here or in the connect documentation. There needs to be a check that the will topic is a topic that the client is going to be permitted to publish on. Corner case, if the ability to publish a will in the event that this permission is lost. Does this kill the session or the will message? I.e. should the permission for the will message be rechecked before sending it allowing for the time based expiration of the token.

We have been thinking about this. If the disconnect is due to a token expiration, and hence, also includes the will topic as well, you have to decide between: 1) publish the will 2) do not publish the will. At the moment, it's written like we publish the will - but on second consideration, it seems safer to say "Publish the Will on Server Disconnect or unusual disconnect if the token (the will permission) has not expired".

ciseng commented 5 years ago

[JLS] I would be fine with either position, after all at the time the “publish” event occurred the token was valid, this is just deferring relaying it to subscribers.

[CS] Yes, indeed, when the RS accepted the will in Connect it was valid.

ciseng commented 5 years ago

OK clarified the scope of the will is "publish_" followed by Will Topic. Agree that on connect accept, the scope was in the token, so the server should publish the will in case of unexpected disconnections.