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

Fixed handling of Default Client Scope for deleted clients (#226) #252

Merged

Conversation

lathspell
Copy link
Contributor

I had a client with a Default Client Scope. After I deleted the client, "terraform refresh" crashed.
This should be handled better.

Terraform actually refreshed the client long before it tried to refresh the Default Client Scope so it should be aware that it makes no sense to query for its Default Client Scopes.

That knowledge seems even not necessary if it defaults to just delete the current state of the Default Client Scope if the server answers with a HTTP 404 NOT FOUND.

I saw this behavour in resource_keycloak_group_membership.go where handleNotFoundError() was called in that situation.

Doing exactly so in resource_keycloak_openid_client_default_scope.go works fine for me with Keycloak 8.0.1.

Copy link
Contributor

@mrparkers mrparkers 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, thanks for the PR!

@mrparkers mrparkers merged commit 5313139 into keycloak:master Mar 18, 2020
@lathspell lathspell deleted the 226_default_scope_for_deleted_client_v2 branch March 19, 2020 14:18
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

Successfully merging this pull request may close these issues.

2 participants