The string construction for the device_identity JSON substring needs to be documented in the Mender documentation and the examples corrected.
The issue is that the "device_identity" JSON substring is compared via an exact string match including the JSON itself. This means, that i.e.
is not the same as
The spaces matter, and so does the ordering. It appears that the board client formats the strings without spaces in between colons, and also it puts them in alphabetical order.
So for the abstract device_identity set:
The board mender client would build and POST a JSON string that looks like the following:
However, the examples in the documentation show this as it would be:
Notice all the extra spaces in the substring with the attributes, those won't actually be there, so this example is incorrect and confusing especially considering this behavior doesn't seem to be documented.
This should probably be mentioned here:
and maybe here too (or at least linked)
Note that this appears to be identical in newer versions of Mender that use the v1 API. I haven't looked at v2 so I understand it may be different, but either way this should be documented.