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

URNs of extension schemas are removed during processing, losing their namespace protection. #130

Open
pond opened this issue Jun 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pond
Copy link
Member

pond commented Jun 13, 2024

SCIM JSON payloads include the URN of extension schemas, which serve as namespaces for attributes therein.

Internally, a significant limitation of Scimitar v1 and v2 is that schema URNs are removed during payload processing. The same is true when handling filter strings in GET requests. This is why scim_attributes_map does not namespace the added extension's attributes. Attribute names must therefore be unique across the entire arising schema. If an extension uses an attribute name that's already used in the base schema or another included extension, it will collide; you'd realise this as soon as you tried to add to scim_attributes_map, since an existing same-named attribute would already be declared there.

This is not believed to be a problem with the extension schema currently described by the SCIM RFCs, but it might be an issue for someone with a custom schema one day. It's also just obviously fragile - for all its excessive complexity, the SCIM specification's use of URNs to make sure that extensions don't collide with one another is clearly a good idea and Scimitar should respect it.

Fixing this would very likely require significant breaking changes to Scimitar's public API, with an arising increase to Scimitar's major version number and discontinuation of the v1 branch entirely.

@pond
Copy link
Member Author

pond commented Jun 13, 2024

Note diff in #131 as part of doing this work (in particular comments about QueryParser#parse API extension).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant