drogue-iot / drogue-cloud

Cloud Native IoT
https://drogue.io
Apache License 2.0
113 stars 30 forks source link

TTN fields are not validated #298

Open lulf opened 2 years ago

lulf commented 2 years ago

Creating a device in TTN via the TTN integration in drogue cloud works, and I'm able to connect the device. But I'm noticing an error in the status of the device object:

"reason": "Request failed: 400 Bad Request: {\"code\":3,\"message\":\"error:pkg/rpcmiddleware/validator:field_mask_paths (forbidden path(s) in field mask)\",\"details\":[{\"@type\":\"type.googleapis.com/ttn.lorawan.v3.ErrorDetails\",\"namespace\":\"pkg/rpcmiddleware/validator\",\"name\":\"field_mask_paths\",\"message_format\":\"forbidden path(s) in field mask\",\"attributes\":{\"forbidden_paths\":[\"ids.dev_eui\",\"ids.join_eui\"]},\"correlation_id\":\"6c085ca7174647f2a797749437990374\",\"code\":3}]}",

The EUI fields of the ttn spec should be validated to prevent them being changed.

lulf commented 2 years ago

The underlying cause: https://github.com/TheThingsNetwork/lorawan-stack/issues/5553

We need to update the reconciling loop to not reconcile these fields.

ctron commented 2 years ago

I would re-open it, was we didn't properly fix it.

lulf commented 2 years ago

Ok, I mentioned creating a new issue for the webhooks in #301 but I can edit the description of this one instead.

ctron commented 2 years ago

Ah ok. Works both.