Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [hono-dev] Question regarding connection events

Thx for the quick response:


Is the background of your question to do tests without always connecting/deconnecting the device?


No, mi concern is mainly about managing misuses and identification of the source.

I agree with you regarding MQTT since it has no Content-Type header, actually I was thinking a piece of software connecting with the same id but using a "direct" AMQP connection, if this is possible. Thinking forward, MQTT v5.0 should support Content-Type. 

If this scenario is realistic it would be more difficult to establish who actually issued the message.



Stefano 



From: hono-dev-bounces@xxxxxxxxxxx <hono-dev-bounces@xxxxxxxxxxx> on behalf of Frank Karsten (INST/ECS4) <Karsten.Frank2@xxxxxxxxxxxx>
Sent: Wednesday, May 30, 2018 5:21 PM
To: hono developer discussions
Subject: Re: [hono-dev] Question regarding connection events
 

> Hi all,

 

Hi Stefano,

 

>

> We were discussing about the latest work in Hono regarding connection events in the perspective of integrating with Kapua lifecycle events.

>

> For the current implementation, correct me If I’m wrong, Hono connection events are (optionally) generated by the (Mqtt)Adapter and sent as events to the event/tenant address.

 

That is correct.

 

> We were wondering whether it would be possible for a device to purposely create and send a (fake) connection event. If so the next question is if there's a requirement in Hono to prevent such behavior by enforcing some kind of authorization or if it is the downstream application that have to handle the case. Finally in the latter case if there's a mechanism to distinguish the source of the connection event.

 

While devices can send any event payload to Hono, the problem is rather the MQTT protocol, which intentionally does not let the device provide a specific Content-Type (like

HTTP e.g.).

So at the moment, I cannot see how to send such a fake event that is looking exactly like the one the MQTT protocol adapter generates.

There is no part in Hono preventing this, but the MQTT protocol.

 

The content-type for the connection event is "application/vnd.eclipse-hono-dc-notification+json".

 

We are planning to eventually support property bags for command and control in the MQTT adapter for 0.7, but currently we do not support them. If desirable, we can discuss if this

would make sense for a kind Content-Type via MQTT as well.

 

 

Is the background of your question to do tests without always connecting/deconnecting the device?

 

Best regards,

Karsten


Back to the top