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

Release EUIs of deleted gateways #1843

Merged
merged 4 commits into from Jan 13, 2020
Merged

Release EUIs of deleted gateways #1843

merged 4 commits into from Jan 13, 2020

Conversation

bafonins
Copy link
Contributor

@bafonins bafonins commented Jan 13, 2020

Summary

Closes #1120

Changes

  • Add afterDelete hook for gateways to reset their eui.
  • Update gateway deletion modal text.

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, database and configuration, according to the stability commitments in README.md.
  • Testing: The changes are covered with unit tests. The changes are tested manually as well.
  • Documentation: Relevant documentation is added or updated.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

set the gateway_eui field to null after soft deletion
@bafonins bafonins added c/console This is related to the Console c/identity server This is related to the Identity Server ui/web This is related to a web interface labels Jan 13, 2020
@bafonins bafonins added this to the January 2020 milestone Jan 13, 2020
@bafonins bafonins self-assigned this Jan 13, 2020
@bafonins bafonins force-pushed the feature/1120-eui-release branch 2 times, most recently from dc51ab8 to a6c0b1a Compare January 13, 2020 11:25
@coveralls
Copy link

coveralls commented Jan 13, 2020

Coverage Status

Coverage decreased (-0.01%) to 73.371% when pulling 798fe98 on feature/1120-eui-release into 187be34 on master.

Copy link
Contributor

@htdvisser htdvisser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@bafonins bafonins merged commit 03e4dc8 into master Jan 13, 2020
@bafonins bafonins deleted the feature/1120-eui-release branch January 13, 2020 15:00
rvolosatovs pushed a commit to rvolosatovs/lorawan-stack-fork that referenced this pull request Apr 28, 2020
…/multi-tenant-dcs

Fix duplicate tenant prefix in DCS
@htdvisser htdvisser mentioned this pull request Jul 21, 2020
3 tasks
@t0mZ4
Copy link

t0mZ4 commented Jan 8, 2021

Hi

I still see an issue when I use the CLI to delete a gateway, and then I cannot re-add the gateway with the same id.


error:pkg/identityserver/store:id_taken (ID already taken)
    correlation_id=fc206b725e0543d691dafa5a4d8d2674

any way to workaround this!?

@htdvisser
Copy link
Contributor

The EUI was released when you deleted the gateway, but the ID is still reserved.

This is for security reasons, as historical data (in external integrations) is linked to the ID, and if someone else would register a gateway with the same ID after you delete it, they would have access to your historical data, which probably isn't what you want.

With #3467 it's possible for admin users to release the IDs, but of course that could cause some security issues like the one I described above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/console This is related to the Console c/identity server This is related to the Identity Server ui/web This is related to a web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reusing EUIs of Deleted Gateways
5 participants