Hi Maciej,
thanks! My responses inline:
On Fri, Jun 8, 2018 at 11:57 AM, Maciej Mrowiec
<maciej....@northern.tech> wrote:
> Device ID is not directly available to the device, it's a completely server
> side identifier which is tied to device identity object.
Yes, but it would be nice if it was passed to the client and stored.
That's my feature request.
> You can get it on device two ways:
> 1) After device is accepted it will receive authentication token - eg JWT
> token, server side device ID is part of tokens claims. Can be extracted from
> there. No sure where device is storing this exactly (most likely local db),
Yeah, that's the hacky way we came up with last time I asked this question ;-)
> 2) API lookup to translate device identity attributes to device id thorough
> auth or inventory API's, this requires caller to be able to authenticate to
> API which I would not recommend to put on the device. However if you have 3d
> party service your devices already ask for that update it can do it.
Yes, that's what I'm doing now via our own APIs:
1) user in the field decides they want to change from beta to stable firmware.
2) they trigger a request using custom Muuselabs API.
3) Muuselabs server calls Mender api to modify group and trigger deployment.
The question is, how do I identify the device in step 3 to Mender?
I have a complex and buggy system using mac address (one of my device
identity attributes)
Ideally I would have /var/lib/mender/device_id in step 2 and pass it
to my server which would pass it directly to Mender API in step 3. No
complex lookups, no duplicate MAC problems.
regards,
--Will