Subject: [scim] SCIM patch valuePath vs subAttr

From: Daniel Gioulakis <[email-masked]>
Date: Wed, 30 Mar 2016 12:44:25 +0200

Hi,

I'd like to confirm my interpretation of the SCIM specification regarding
patch operation filters when a valuePath is specified without a subAttr and
when one is specified with a subAttr after a grouping clause.

The conversation around this originates in the Owin.Scim project at
https://github.com/PowerDMS/Owin.Scim/issues/10.  For indexing purposes,
here is a copy of the original question and my response I'd like to assert
is correct:

*Question:*
"On a patch remove operation with path:"emails[type eq "work"]" it removes
the matching email complex attribute. On a patch remove operation with
path:"emails.type eq "work" " it ALSO removes the matching email complex
attribute. I was expecting it to clear the type sub-attribute, but the spec
is not clear on how to handle this scenario."

*My Response:*
"Interesting ... I interpreted the spec as both of those are equal paths.
In fact I intentionally normalize path/filters by injecting groupings []
where . are used to designate a sub-attribute filter vs a sub-attribute
target property.

In its current state, the path normalizer will take emails.type eq "work" and
turn it into emails[type eq "work"] before being used by the lexer/parser
to create an expression-tree predicate.

It's my opinion that if you want to modify just the type sub-attribute you
have to append it after the filter.
Thus, to filter and modify email.type: emails[type eq "work"].type"

To further clarify my understanding of the spec using the examples above, a
patch remove operation with the above expressions would result in the
following actions:
> emails.type eq "work" -> will remove the entire email instance whose
'type' attribute satisfies the predicate
> emails[type eq "work"].type -> will remove ONLY the email 'type'
attribute, not the email instance

Thanks for the assistance!

Daniel Gioulakis

-- 
* <http://www.powerdms.com/>
<http://twitter.com/powerdms>  <https://www.facebook.com/PowerDMS>
<http://www.linkedin.com/company/powerdms?trk=hb_tab_compy_id_656190>*

Daniel M Gioulakis | Software Architect | [email-masked] |
407.342.5927

---

From: Phil Hunt <[email-masked]>
Date: Wed, 6 Apr 2016 12:20:15 -0300

in line...
Phil

@independentid
www.independentid.com <http://www.independentid.com/>[email-masked] <mailto:[email-masked]>

> On Mar 30, 2016, at 7:44 AM, Daniel Gioulakis <[email-masked]> wrote:
> 
> Hi,
> 
> I'd like to confirm my interpretation of the SCIM specification regarding patch operation filters when a valuePath is specified without a subAttr and when one is specified with a subAttr after a grouping clause.
> 
> The conversation around this originates in the Owin.Scim project at https://github.com/PowerDMS/Owin.Scim/issues/10 <https://github.com/PowerDMS/Owin.Scim/issues/10>.  For indexing purposes, here is a copy of the original question and my response I'd like to assert is correct:
> 
> Question:
> "On a patch remove operation with path:"emails[type eq "work"]" it removes the matching email complex attribute. On a patch remove operation with path:"emails.type eq "work" " it ALSO removes the matching email complex attribute. I was expecting it to clear the type sub-attribute, but the spec is not clear on how to handle this scenario."
> 
> My Response:
> "Interesting ... I interpreted the spec as both of those are equal paths. In fact I intentionally normalize path/filters by injecting groupings [] where . are used to designate a sub-attribute filter vs a sub-attribute target property.
> In its current state, the path normalizer will take emails.type eq "work" and turn it into emails[type eq "work"] before being used by the lexer/parser to create an expression-tree predicate.
> 
> It's my opinion that if you want to modify just the type sub-attribute you have to append it after the filter.
> Thus, to filter and modify email.type: emails[type eq "work"].type”

[PH] This is my interpretation.  The [] brackets select the value record, whereas .type selects the sub attribute allowing you to intersect with the correct attribute record.
> 
> 
> To further clarify my understanding of the spec using the examples above, a patch remove operation with the above expressions would result in the following actions:
> > emails.type eq "work" -> will remove the entire email instance whose 'type' attribute satisfies the predicate
> > emails[type eq "work"].type -> will remove ONLY the email 'type' attribute, not the email instance
> 
> 
>  <http://www.powerdms.com/>  <http://twitter.com/powerdms>  <https://www.facebook.com/PowerDMS>  <http://www.linkedin.com/company/powerdms?trk=hb_tab_compy_id_656190>
> Daniel M Gioulakis | Software Architect | [email-masked] <mailto:[email-masked]> | 407.342.5927
> 
> _______________________________________________
> scim mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/scim