OpenConext / OpenConext-manage

Stores and publishes metadata of all entities known to OpenConext
Apache License 2.0
7 stars 10 forks source link

Non existing allowed resource servers can be imported #307

Closed phavekes closed 3 weeks ago

phavekes commented 3 weeks ago

This issue is imported from pivotal - Originaly created at Jun 19, 2019 by Bart Geesink

I am able to import a JSON with an OIDC client with a list of resource servers which are not present. You don\'t see these resource servers in the resource server tab of that RP either.

Please let manage show an error when a resource server that does not exist is imported in the allowedResourceServers"

phavekes commented 3 weeks ago

Implemented generic. For all references to other entities (allowedResourceServers, disableConsent, allowedEntities) we remove the references that do not exist in a prePost and prePut hook. This ensures artificial database integrity. See https://github.com/OpenConext/OpenConext-manage/blob/master/manage-server/src/main/java/manage/hook/EntityIdConstraintsHook.java (Okke Harsta - Jul 4, 2019)