drogue-iot/drogue-cloud

Consider allowing in process of deletion to receive commands/send data

lulf opened this issue · 0 comments

lulf commented

A useful pattern when writing Drogue Cloud extensions is to hook into the lifecycle of devices: when device is created, an operator can detect that and send commands to a device for it to 'initialize'.

The operator can add itself to finalizers for the device to ensure it can follow some process when the device is being deleted. This can be sending some command to the device, and also expecting some confirmation message back from the device, before the operator removes itself from the finalizers.

At present, the authentication service considers devices under deletion as unauthenticated, which prevents the above shutdown process. Changing this policy to allow devices under deletion to authenticate would allow extensions to hook into the 'shutdown lifecycle' of a device.