-
Notifications
You must be signed in to change notification settings - Fork 5
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
Clashing when creating a device and a gateway with the same ID #32
Comments
When creating the device resource in Keycloak, a POST is performed with the name of the resource=MAC address. It seems that Keycloak uses the name to find the existing (gateway) resource and overwrite it. |
Keycloak works a bit strangely regarding ID/names. Both ID and names are unique and can be used to identify a resource.
But POSTing a resource without an ID and the same name as a previous resource will update that resource. |
This is the current status regarding IDs and names:
Permission: In this example, both a device and a gateway share the same Id |
The target case is:
Permission: This solves the name clash problem. The legacy devices are still supported: the Keycloak ID can still be recovered using the After the data migration, the |
When creating a gateway, and then a device with the same ID, the gateway resource created in Keycloak gets overwritten. This leads to authorization problems afterwards.
For example, in this image the ID of the resource is gateway-00155d00641b (in the URL), which identifies it as a gateway. But the data in the resource corresponds to a device.
The text was updated successfully, but these errors were encountered: