Captain-P-Goldfish / SCIM-SDK

a scim implementation as described in RFC7643 and RFC7644
https://github.com/Captain-P-Goldfish/SCIM/wiki
BSD 3-Clause "New" or "Revised" License
123 stars 37 forks source link

Meta Schema 'urn:ietf:params:scim:schemas:core:2.0:Schema' not correctly returned #143

Closed Captain-P-Goldfish closed 2 years ago

Captain-P-Goldfish commented 3 years ago

The meta-schema for schemas is not correctly returned from the endpoint. This is caused by the more or less hardcoded schema validation to handle only one level of nesting as it was described in RFC7644. In order to fix this smoothly a reimplementation of the SchemaValidator is necessary. The implementation of this class grew historically when I did not know what was coming at me.

Captain-P-Goldfish commented 3 years ago

I just noticed that the problem with this ticket has another origin. The problem with the Schema with URI "urn:ietf:params:scim:schemas:core:2.0:Schema" is that it is used to validate itself if accessed. The schema validation iterates over the attributes defined in the schema. But if the schema is now validating itself it starts on the first layer of the document before the definition of the attributes-field. Therefore the last layer will eventually be removed since the schemas validation is finished before reaching the end of the document. In order to fix that the definition of the base-schema that is the validation entry point for all other schemas must be restructured.