Subject: [scim] Filter grammar issues for valFilter

From: Paul Bismuth <[email-masked]>
Date: Tue, 26 Mar 2019 14:54:24 +0300

Hello,

It seems to me that there are some problems with the updated grammar
(section 3.4.2 of RFC7644) and the following errata:

==============
Errata ID: 4690
Status: Reported
Type: Technical

Reported By: Phil Hunt
Date Reported: 2016-05-10

Section 3.4.2.2 says:

valFilter = attrExp / logExp / *1"not" "(" valFilter ")"

It should say:

valFilter = attrExp / valLogExp / *1"not" "(" valFilter ")"

valLogExp = attrExp SP ("and" / "or") SP attrExp
==============

* It seems to me that the updated grammar allows expressions such as
"attr.subattr[subattr.x]", however it doesn't make sense regarding the
SCIM data model
* The rule "valLogExp = attrExp SP ("and" / "or") SP attrExp" doesn't
allow more than one "and" or "or". Therefore expression such as
"attr[subattr1 pr and subattr2 pr or subattr3 pr]" is rejected
* "valLogExp" doesn't allow the use of the "not" operand except when
negating the whole "valFilter". Is that normal?
* "valLogExp" doesn't allow precedence grouping ("( exp1 or exp2 ) and exp3")

I'd be glad to help with the grammar if these issues are confirmed.

Cheers,

Paul