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
Fix logic around what happens to client when client type is deleted #29111
Fix logic around what happens to client when client type is deleted #29111
Conversation
…leted, the client type gets set to null and the client is successfully retrieved. closes keycloak#29061 Signed-off-by: vibrown <vibrown@redhat.com>
@vickeybrown I am not 100% sure about this change. When client-type is not available and there are some clients of this type, there should be either error thrown or at least the client should not be available at all in Keycloak. With the change, I can imagine various sorts of issues like for instance:
My vote is either to keep current behaviour or ignore all clients with the undeployed client-type and log the warning into log about such client being ignored, as unavailable client-type probably means that something bad is going on. Any particular use-case for this change? |
My thought for a use case was mainly if we made a custom client type. If we made a type of client called "foo" that was for a specific application, and later on that application gets shut down, we probably wouldn't need that client type anymore but we might still want those clients to be around. Thinking about it though, maybe if the client type wasn't necessary anymore, the clients wouldn't be either? @jsorah @patrickjennings got any thoughts? |
Talking with the team, I suppose it does make sense to just let the client error out if the client type is removed. If you don't need the client type anymore, do you really need its corresponding clients? Maybe if we encounter a case where we need a client but not the client type, we could just change the client's client type to something else so it's still usable. |
If you try to retrieve a client that has a client type that's been deleted, the client type gets set to null and the client is successfully retrieved.
closes #29061