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

PATCH does not allow valid FilterPath in a custom extension #140

Open
larsilus opened this issue Apr 9, 2021 · 0 comments
Open

PATCH does not allow valid FilterPath in a custom extension #140

larsilus opened this issue Apr 9, 2021 · 0 comments

Comments

@larsilus
Copy link

larsilus commented Apr 9, 2021

Hi,

the valid patch operation
{ "schemas": [ "urn:ietf:params:scim:api:messages:2.0:PatchOp" ], "Operations": [ { "op":"remove", "path":"urn:sap:cloud:scim:schemas:extension:custom:2.0:rus:ChannelPersonalization:User:productGroup[value eq \"ProductGroupToRemove\"]" } ] } fails with
{ "status": "400", "scimType": "invalidPath", "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" ], "detail": "Attribute with name 'urn:ietf:params:scim:schemas:core:2.0:User:urn:sap:cloud:scim:schemas:extension:custom:2.0:rus:ChannelPersonalization:User:productGroup' does not exist" }
but the path is perfectly valid, as it works in my other calls for Patch add/replace/remove with the exact same path WITHOUT the [value eq "ProductGroupToRemove"].
So what happens here, is that PathAttributeExistenceValidator class fails, because
schemaAPI.getComplexAttributePath(fullAttrNotation) delivers an empty set.
This happens, because in SchemasCallback.getComplexAttributePath the attr path splitter is COMPLEX_ATTRIBUTE_DELIMETER_REGEX, which splits this array in the unexpected:
["User:urn:sap:cloud:scim:schemas:extension:custom:2", "0:rus:ChannelPersonalization:User:productGroup"].
.

P.S.
There is also no workaround possible, as i cannot change the custom schema extension prefix e.g., as this is predefined by scimono and if using a different urn here, other functions fail.

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

No branches or pull requests

1 participant