If an OICD App is created or edited into an invalid state, it should not become undeleteable/uneditable. #394
Labels
No labels
bug
chore
documentation
enhancement
help
in-progress
question
ready-for-release
released
translation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
adam/gate#394
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug:
When using end-point GET
/api/admin/client/{client_key}where client_key refers to a client left in an invalid state, a 400 was returned. In the web UI, this prevents editing the OIDC App to correct the configuration, or even deleting the app to to free the client key and replace with a new configuration.To Reproduce:
b. use Web UI to click delete button of your client and see 'Could not delete app.'
Expected behavior:
API and/or web UI should attempt to provide graceful degradation so that a recovery may be made in the general case of an invalid OIDC App configuration.
Database Driver:
DB_ADAPTER: postgres # this is the default value
Screenshots:
Image of a successful reproduction

Additional context:
Additionally, investigating and resolving the specific case given in reproduction step 2 could be considered. A 400 is returned to the PATCH request, but persistent changes are still made.
I will take a look at this when I get the chance
Thank you for opening this issue, I am able to replicate the problem. I have a tentative fix that may be released soon, it appears the issue is caused by two things.
response types=id_token, token, andgrant types=authorization_code, refresh_token, this client will be retrieved havinggrant types=implicit, refresh_token. I assume this is because the grant types imply an implicit flow, but this is opaque to me and happens inside the oidc-provider package. Implicit grant clients may not use insecure protocols, as the error suggests.The fix will address both of these problems. I will start by validating (again) the client metadata after is has been saved and rolling back update if the validation fails either time, and also decoupling the client response retrieval from the oidc-provider package allowing the update or deletion of invalid clients.
Fix was able to be verified. Thank you for resolving the issue!