Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force store device with apikey for legacy cases without apikey defined at device level #1394

Open
AlvaroVega opened this issue Jun 27, 2023 · 1 comment

Comments

@AlvaroVega
Copy link
Member

Component

No response

Is your feature request related to a problem? Please describe

SInce some times ago we encourage to store an apikey with a device, typically the same than group.
But some time ago we still allow use a device with different apikeys (promiscuity case).
These legacy case should force to use just one apikey, storing one provided with measure.

Describe the solution you'd like

Legacy cases about devices without an apikey should store apikey provided with measure

Describe alternatives you've considered

No response

The systemd version you checked that didn't have the feature you are asking for

No response

@AlvaroVega AlvaroVega changed the title Force store device with apikey Force store device with apikey for legacy cases without apikey defined at device level Jun 27, 2023
@AlvaroVega
Copy link
Member Author

When a measure arrives, if device has a empty apikey then group apikey is stored in device

https://github.com/telefonicaid/iotagent-node-lib/blob/69bb271393898b548c83a1ee55e9ee3229cc0752/lib/services/devices/deviceService.js#L624C1-L630C14

So maybe we just need to check it with some tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant