Multiple auth ids on the auth sets

Hey,
I recently noticed that my devices (mender clients) are getting another auth_set under the auth_sets key. (as can be seen in the picture)

Normally my logic was to accept the auth_set located at position 0 in the list.
But it seems that this do not work when there are multiple auth sets in the list.
What can cause such a behavior? I added a code to the client to reset the mender client service every 20 minutes, could it be related?

And in such cases what is the right approach - which auth set should be approved? last? first? Active?
Is there a command to delete the irrelevant auth sets?

Thanks in advance! :pray:

Hi @Nir-Davidovitch,

New auth ids usually show up if the Mender Client creates a new key for whatever reason. So judging from your description, it sounds like something in your logic causes the client to do that.

So in a naive setup, the latest one would be the correct one, as it is the key that the Client tried to use last.

But this is definitely not a real solution, because whenever the Client repeats that, the device will go into “new request” state, the inventory and update mechanisms will stop working.
So you need to find out why it happens, client side.

Greetz,
Josef