Presentation on theme: "SCIM Ticket #50 “Filter semantics for complex plural attributes”"— Presentation transcript:
1SCIM Ticket #50 “Filter semantics for complex plural attributes” Summary for IETF-88Vancouver, November 2013
2Issue #50 How to write a search filter like to < s>< ><type>work</type><primary>true</primary></ ><type>home</type></ s>How to write a search filter like tofind users whose primaryaddress containsfilter= s coands.primary eq "true"When:is a multi-valued attributeThe value and “primary” are different sub-attributesThus the “ s.” value instance matched may be different in the two clauses, leading to unexpected results.Realization: SCIM filters need a syntax for indicating that two or more criteria apply to the same instance of a multi-valued attribute
3Options to Consider Use a filter dot notation Use a filter operator Use a back referenceUse structured JSON filter definitionsSomething else…Each has both pros and cons
41. Use a Filter dot Notation Proposed by Jeff MooreUse the attribute name plus [ ] with . to group clauses that refer to the same attribute instance:s[.type eq "work" and .value cos[.type eq "work" and .value co or ims[.type eq "xmpp" and .value coaddresses[.state eq "CA" and .rooms[.type eq "bedroom" and .number gt 2]]If the dot “.” is missing - then it would be an absolute reference.Could also have “..” to move scope up one.
52. Use the instance() Filter Operator Proposed by ?Use a grouping operator for clauses that refer to the same attribute instance:instance( s.type eq "work" and s.value coorinstance( s.type eq “home" and s.primary eq true)instance(addresses.state eq "CA" andinstance(addresses.rooms.type eq "bedroom" and addresses.room.number gt 2))Nesting is possibleIs it ok to refer to other attributes within the instance( ) ?
63. Use a Back-Reference Proposed by Bjorn Aannestad Use the attribute name plus a “%1” to indicate the same instances%1.type eq "work" and s%1.value cos%1.type eq "work" and s%1.value co or s%2.primary eq trues%1.type eq “home” and s%2.ims.type eq "xmpp" and s%2addresses%1.state eq "CA" and addresses%1.rooms%2.type eq "bedroom" and rooms%2.number gt 2Supports criteria involving multiple, different, instances of an attributeTerms in the filter do not have to be adjacent
74. Use a JSON Filter Structure Many examples (e.g. MetaWeb Query, Jaql)
8Comparison Y N w/escape e.g. RegEx No e.g. MetaWeb, Jaql Complete? Concise?Usable in URL?Clauses can be separated?Handles Multiple Instances & NestingPrecedent?1. Filter dot NotationYN2. Instance( ) operator3. Back-reference variable %nw/escapee.g. RegEx4. JSON StructureNoe.g. MetaWeb, Jaql