Re: [scim] Filter ABNF Clarifications

Shelley <randomshelley@gmail.com> Thu, 13 August 2020 17:12 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 783F03A0F0C for <scim@ietfa.amsl.com>; Thu, 13 Aug 2020 10:12:20 -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 m1W9La99yZ7P for <scim@ietfa.amsl.com>; Thu, 13 Aug 2020 10:12:19 -0700 (PDT)
Received: from mail-ua1-x92d.google.com (mail-ua1-x92d.google.com [IPv6:2607:f8b0:4864:20::92d]) (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 2AAAE3A0F0A for <scim@ietf.org>; Thu, 13 Aug 2020 10:12:19 -0700 (PDT)
Received: by mail-ua1-x92d.google.com with SMTP id v20so1860108ual.4 for <scim@ietf.org>; Thu, 13 Aug 2020 10:12:19 -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=6ebvkI8lYQtvi3bCeK/M4FqiHq8sAg1uPLAU7oNB2Y8=; b=cpH8hnq6awG48EGB8+oIKFyRel4j2l1w4XGjB5AJTAbQVz+EwMidsagQDa9gSUv8Ru zcbxMvV3vNVQp9MJYQuCpaGJDDyk+zLyA5/ecJwFaN7MRTWVZCpjiqPY+4PuZ2XITqJW UucHI4VOKDhrXlmmINaat1ww8ZBVTHVV2w6/6ScztUN8d7XwRFZmPF3CgN7/AU7Zva0/ IxtlZafrkolmWdqT9X0JPjTgi3G2p+ivQwMuwuFaMyQred1PiqPrWkeHfJc4ia+k2wJe u5gIaUpOAItR2tvqINMpUhl27toyg1dDgwvGsewn5PhXfuE5QNhlHuM6hkZM9n0C+3xZ nYmg==
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=6ebvkI8lYQtvi3bCeK/M4FqiHq8sAg1uPLAU7oNB2Y8=; b=eW9UzCX4rj4mhuuHxqgNJoFdrCBM8llNtC86TG1hLTvgtp2N4Q2fQXFDAcqblb9mp5 Tb6ZqtIKdgEJvkrc/Nv0UqQIU+cG0jXgBrt1+VOngCMuOuJefETM2uxqEJ9fIWXUHvDd hzVxQg7u1+5AbonCDbFvAhB6e1tNyWMbYIBSFTBynT3vshA4x8eWgfaDK8+Mx7vNpyAe c2szLzsSzlU/dA5NBa+x0eJDmzXp1lwTTCzpxK15naKrM4OebgE+wgYtsLCB/CaPFmen 52mk3ka7CR0a1ym8KlSaKxQKb0dn+A4XMe0XzNsotYGZawAkF4zuc1ZpYafr1FEbqFgD NXgw==
X-Gm-Message-State: AOAM533yXJXqQS8bDH+hVbpS/5m1uptGfHSNayzDUPLZ1wMaWwJMtnwq a/WjqGo3IZyDH2m6BHUKrcdjmsJuPLWO7fEFVPchPxbC
X-Google-Smtp-Source: ABdhPJxDPuyUFKvywaQHyQeiMhht6LrpkTHwdy9byaVkubHmR5xMN+OZkam3CERJWrxFKbXyteRXCbqKcsVBrDK69V0=
X-Received: by 2002:ab0:c3:: with SMTP id 61mr4319463uaj.106.1597338738200; Thu, 13 Aug 2020 10:12:18 -0700 (PDT)
MIME-Version: 1.0
References: <CAGUsYPz7BYonmr0qXKWPAJFyQd9exV0mNcyZ38RhpsLqpg7Q4w@mail.gmail.com> <9D2B20FF-64AB-4F6A-8893-9B2CEEE2D87A@independentid.com>
In-Reply-To: <9D2B20FF-64AB-4F6A-8893-9B2CEEE2D87A@independentid.com>
From: Shelley <randomshelley@gmail.com>
Date: Thu, 13 Aug 2020 12:12:07 -0500
Message-ID: <CAGUsYPwhLdafN-e1E-SSEdp8SuScYFx0uD_9f4kT9fN3yz-GkQ@mail.gmail.com>
To: Phillip Hunt <phil.hunt@independentid.com>
Cc: scim@ietf.org
Content-Type: multipart/alternative; boundary="00000000000013930405acc56882"
Archived-At: <https://mailarchive.ietf.org/arch/msg/scim/AxI5EfuORIuYnOhLmpe9b0KOGSQ>
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 17:12:20 -0000

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
>
>