Re: [scim] Filter ABNF Clarifications

Shelley <randomshelley@gmail.com> Thu, 13 August 2020 19:14 UTC

Return-Path: <randomshelley@gmail.com>
X-Original-To: scim@ietfa.amsl.com
Delivered-To: scim@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 03A5D3A105B for <scim@ietfa.amsl.com>; Thu, 13 Aug 2020 12:14:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aWqaLWBRXwba for <scim@ietfa.amsl.com>; Thu, 13 Aug 2020 12:14:24 -0700 (PDT)
Received: from mail-ua1-x92c.google.com (mail-ua1-x92c.google.com [IPv6:2607:f8b0:4864:20::92c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 44C313A104E for <scim@ietf.org>; Thu, 13 Aug 2020 12:14:24 -0700 (PDT)
Received: by mail-ua1-x92c.google.com with SMTP id k18so853763uao.11 for <scim@ietf.org>; Thu, 13 Aug 2020 12:14:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1mjCKwd+4AvzyNM/t+BHQFo5YnQcWNgfWstaneBqg9U=; b=vNVcDcBBaJe7KFzCFIHO9N8ORVJ8RnqnXkbKPWqBKWqJ7uJSVrZgopUALcpXGXRB3M LVxhBJNMFmIxpaKYjfxmQoO9ESHUlsH5+Mt8DdrpJ8d4jDY0dPd6orm5jAfKa+JGwER9 SqJhQ2R1zNEfOqyAgDKikCScGMCN37q9zv71lt2qbsnNXMj+RZpgcviVdWeFvOt2Edpf lKOCnXVydbkeqpwMxT2F2syYeuyAL0jZbBnMg7X98VERSkTce6SI9rz5sVtGp6uL/aX9 bWmPYh6vtRLpdaqwXaZcscANnosjJBW+wORO4KIcn9NJxCyhVpMaIO7k4hjNfMXS5AMA Ctqw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1mjCKwd+4AvzyNM/t+BHQFo5YnQcWNgfWstaneBqg9U=; b=q7d965MI5VtNKg2J0N7nnnPa08yVTmYHPmUzFTNUVcGoJni3Luz0jIX7/MNTjmZzj5 dvd2fJ+4br6yjN9wrixTSE4MBGLutYneMkxvLhXoaazm3jNazP10ba8ViJEoRlTnZZ09 ziqABcLKRLXt1ehCuAq2fBcE6ubv85tr4Ll/OG82zhdDqZ7IbM9prRk0y/SavLWMSfsp dIhXC+eDCUh/RXLQ/SD04yPo59tjhUHeymyRxxNokZzUjwMTu4sAPJ5QP5CITCcVlBBc xOD4xeETb2BWto5hKBW7scC3noCwqzL1zmRhoScK3Yr1lj9nodi0y9O7DM5EZRJkZ8qH yvHQ==
X-Gm-Message-State: AOAM533XgEHKk3A3GKsDdLM48dEPYOOQ9MBwaALWSw/kHyaKa08Q9i2K MdDuPF4EqRw3q3wi5OSFnntIFze4GtMgZWJ9Dk4=
X-Google-Smtp-Source: ABdhPJyb6KnQ3jhXjRHpdzyZptcp9dxkpHn/1kHOKKu7xD87tE36bz9elb2L9oEbKToCzJJl/6Paw8kvvIummC7r1e0=
X-Received: by 2002:ab0:5eaa:: with SMTP id y42mr4782929uag.118.1597346063261; Thu, 13 Aug 2020 12:14:23 -0700 (PDT)
MIME-Version: 1.0
References: <CAGUsYPz7BYonmr0qXKWPAJFyQd9exV0mNcyZ38RhpsLqpg7Q4w@mail.gmail.com> <9D2B20FF-64AB-4F6A-8893-9B2CEEE2D87A@independentid.com> <CAGUsYPwhLdafN-e1E-SSEdp8SuScYFx0uD_9f4kT9fN3yz-GkQ@mail.gmail.com> <7B069C74-315D-4CCF-8D49-3A6B1B48DF41@independentid.com>
In-Reply-To: <7B069C74-315D-4CCF-8D49-3A6B1B48DF41@independentid.com>
From: Shelley <randomshelley@gmail.com>
Date: Thu, 13 Aug 2020 14:14:12 -0500
Message-ID: <CAGUsYPw-xZ+f3DtvGM_2XsX9eF4G7fs7b+JXt-LHm2j1rhYwkQ@mail.gmail.com>
To: Phil Hunt <phil.hunt@independentid.com>
Cc: scim@ietf.org
Content-Type: multipart/alternative; boundary="000000000000af27f805acc71cd1"
Archived-At: <https://mailarchive.ietf.org/arch/msg/scim/pxSlOKqf0EE7mZSJRX91aaBBWX8>
Subject: Re: [scim] Filter ABNF Clarifications
X-BeenThere: scim@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Simple Cloud Identity Management BOF <scim.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/scim>, <mailto:scim-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/scim/>
List-Post: <mailto:scim@ietf.org>
List-Help: <mailto:scim-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/scim>, <mailto:scim-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Aug 2020 19:14:27 -0000

If adding the optional space to the ABNF is not feasible, then perhaps the
non-normative example in Figure 2 that includes the space should be updated
to remove it? This example [1] is not compliant with the ABNF syntax:
not (emails co "example.com" or emails.value co "example.org")

Also, is there somewhere that changes like this are being tracked for a
future SCIM spec?

Thanks for the discussion and clarification regardless

[1] https://tools.ietf.org/html/rfc7644#page-23

On Thu, Aug 13, 2020 at 1:02 PM Phil Hunt <phil.hunt@independentid.com>
wrote:

> Shelley,
>
> I agree, the ABNF you propose may have been a better way to express “not”
> filters. AFAIK, the iETF does not allow us to make this kind of RFC update
> as technically it is a normative change.
>
> IMO this would be a good item to address as a clarification item in a
> possible future SCIM 2.1 or 3 draft.
>
> Phillip Hunt
> phil.hunt@independentid.com
>
>
>
> On Aug 13, 2020, at 10:12 AM, Shelley <randomshelley@gmail.com> wrote:
>
> OK, thanks for the clarification. I think I better understand the intent
> behind the "*1" now; this also allows for optional parentheses around any
> filter expression. I presume the space should still be allowed between the
> "not" and open parenthesis "(", though? The following updated syntax
> includes an optional space following the "not", and also includes the
> recommended parentheses grouping [1] for clarification:
>
>      FILTER    = attrExp / logExp / valuePath / ( ["not" *1SP] "(" FILTER
> ")" )
>
>      valFilter = attrExp / logExp / ( ["not" *1SP] "(" valFilter ")" )
>
> [1] https://tools.ietf.org/html/rfc5234#section-3.5
>
>
> On Thu, Aug 13, 2020 at 11:27 AM Phillip Hunt <phil.hunt@independentid.com>
> wrote:
>
>> Shelly
>>
>> The “not” is itself optional to allow bracketing of sub filter
>> expressions.
>>
>> (Filter) or not(filter)
>>
>> Phil
>>
>> On Aug 13, 2020, at 8:56 AM, Shelley <randomshelley@gmail.com> wrote:
>>
>> 
>> While reviewing the SCIM 2.0 filter ABNF syntax [1], I found what appears
>> to be a couple of issues that I wanted to confirm before submitting errata.
>>
>> Regarding the "not" filters:
>>
>>      FILTER    = attrExp / logExp / valuePath / *1"not" "(" FILTER ")"
>>
>>      valFilter = attrExp / logExp / *1"not" "(" valFilter ")"
>>
>> Specifically, if I'm not mistaken:
>>
>>    - there should be a space between "not" and "("
>>       - alternatively, the following example [2] *should not *include a
>>       space:
>>       not (emails co "example.com" or emails.value co "example.org")
>>    - the use of "*1" is not correct
>>       - this effectively makes the entire rule optional
>>
>> As such, I think the above filters should be re-written as:
>>
>>      FILTER    = attrExp / logExp / valuePath / "not" [SP] "(" FILTER ")"
>>
>>      valFilter = attrExp / logExp / "not" [SP] "(" valFilter ")"
>>
>> In case any SCIM clients/providers are relying on the existing ABNF which
>> does not define the space, the above syntax makes the space optional.
>>
>> Please confirm whether I've misinterpreted anything, otherwise, I will
>> likely report this as errata.
>>
>> [1] https://tools.ietf.org/html/rfc7644#page-21
>> [2] https://tools.ietf.org/html/rfc7644#page-23
>> _______________________________________________
>> scim mailing list
>> scim@ietf.org
>> https://www.ietf.org/mailman/listinfo/scim
>>
>>
>