It would be good to allow devices (protocol endpoints) to send arbitrary header fields, which translate into CloudEvents (CE) extension attributes.
As some extension attributes cannot be allowed to be set by external actors (like the id value, the "partition key" , or distributed tracing information) such fields need to be either filtered out, or rejected. An alternative would be to simply prefix everything with e.g. drogue-, which would scope/namespace such attributes and prevent any collision.
While the core attributes of CE are known (at this point), the full set of attributes (including all extensions) is not. So using a prefix makes the implementation much easier.
The proposed solution is:
Allow any endpoint to provide additional extension attributes (which must be able to be translated into CE attributes)
Have each endpoint provide a way (API) to let devices specify such attributes (start with HTTP)
Translate the incoming attributes to CE attributes, prefixing them with (e.g.) drogue-.
For HTTP this could simply mean adding every query parameter that starts with attr. (or meta. or ext.) to the extension attributes. Like:
Summarizing the chat discussion with @rmja …
It would be good to allow devices (protocol endpoints) to send arbitrary header fields, which translate into CloudEvents (CE) extension attributes.
As some extension attributes cannot be allowed to be set by external actors (like the
id
value, the "partition key" , or distributed tracing information) such fields need to be either filtered out, or rejected. An alternative would be to simply prefix everything with e.g.drogue-
, which would scope/namespace such attributes and prevent any collision.While the core attributes of CE are known (at this point), the full set of attributes (including all extensions) is not. So using a prefix makes the implementation much easier.
The proposed solution is:
drogue-
.For HTTP this could simply mean adding every query parameter that starts with
attr.
(ormeta.
orext.
) to the extension attributes. Like:Resulting in: