Re: [scim] Filter evaluation for multi-valued complex attributes

Phil Hunt <phil.hunt@oracle.com> Fri, 19 April 2019 23:41 UTC

Return-Path: <phil.hunt@oracle.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 D3C921203CD for <scim@ietfa.amsl.com>; Fri, 19 Apr 2019 16:41:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.301
X-Spam-Level:
X-Spam-Status: No, score=-4.301 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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=oracle.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 rf01jHgrc8zp for <scim@ietfa.amsl.com>; Fri, 19 Apr 2019 16:41:47 -0700 (PDT)
Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D64CA12019B for <scim@ietf.org>; Fri, 19 Apr 2019 16:41:47 -0700 (PDT)
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3JNd8BI194075; Fri, 19 Apr 2019 23:41:46 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2018-07-02; bh=eeGzegYCbGmJTn+pjd1RQNW6xCutU8EZROznZsw90+g=; b=A/60FSfQA7u8IbuWz1nL8hQeZxt3X+xzejAy83zqXRxu/ZK1U48aUB280TRFmUMSwkJn rntGpwLAP/vSnvklZzR4GYpFLgVMzJJIxbd5DJPoJX+zdEr4pl1XJekXREJuVL612Lzo /StotA7luhSdO7E5AXEi0xjBCoE66a7MDz6e1iE+E9Q/9PkXDdqJGgwL2s6Rnk6syowj lt38NLJWWnRYwouZ3j00xXl3DjXCjiERTD1jlaihcAJdkK4x1XzCzKwsaOK0x+085SkD QPUrWqeX8vuLmT4Q+Ec2XHbV7hU/XKQ8ytDxBVkidsoEir/wqCO1BQ1pWozWAwz91Pe7 Zw==
Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2ryjv90vyr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Apr 2019 23:41:45 +0000
Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3JNf780073557; Fri, 19 Apr 2019 23:41:45 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 2ryjurkxxf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Apr 2019 23:41:45 +0000
Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x3JNfiK6024486; Fri, 19 Apr 2019 23:41:44 GMT
Received: from [192.168.1.22] (/70.70.142.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 19 Apr 2019 16:41:44 -0700
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (1.0)
From: Phil Hunt <phil.hunt@oracle.com>
X-Mailer: iPhone Mail (16E227)
In-Reply-To: <CAKCnT7xEytByVT85UfmURTjtcUxgoibRrSv5EqMVWbnr_KCgfA@mail.gmail.com>
Date: Fri, 19 Apr 2019 16:41:43 -0700
Cc: scim@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <B8B9835F-DE87-48CF-99C0-55326D17FC89@oracle.com>
References: <CAKCnT7xEytByVT85UfmURTjtcUxgoibRrSv5EqMVWbnr_KCgfA@mail.gmail.com>
To: Aleksey Chernoraenko <achernoraenko@gmail.com>
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9232 signatures=668685
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904190162
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9232 signatures=668685
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904190162
Archived-At: <https://mailarchive.ietf.org/arch/msg/scim/Pm5JBClPQ6aC-2UAd7yJoXpj0T4>
Subject: Re: [scim] Filter evaluation for multi-valued complex attributes
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: Fri, 19 Apr 2019 23:41:50 -0000

Yes, they are the same for a simple filter against one sub attribute. 

The square brackets make sure the filter terms are applied against the same value record of the CMVA.  Eg [type eq “work” and value co “example”] processes differently than (emails.type eq “work” and emails.value co “example”).

Phil

> On Apr 19, 2019, at 8:03 AM, Aleksey Chernoraenko <achernoraenko@gmail.com> wrote:
> 
> Greetings,
> 
> Could you please clarify filter evaluation for multi-valued complex attributes?
> 
> "Filtering" section (3.4.2.2.) in rfc7644 demonstrates the following
> example for "emails" (which is I assume is multi-valued complex
> attribute):
> 
> 1) filter=userType ne "Employee" and not (emails co "example.com" or
> emails.value co "example.org")
> 
> 2) filter=userType eq "Employee" and (emails.type eq "work")
> 
> Is it correct that the following expressions are valid, equal, and
> should be evaluated to the same result:
> 
> a) emails[value co "example.com"]
> b) emails.value co "example.com"
> c) emails co "example.com"
> 
> b) and c) options are basically shortcuts for a) ?
> c) is valid because "value" is a default attribute for "email" ?
> 
> Thanks,
> Alexei
> 
> _______________________________________________
> scim mailing list
> scim@ietf.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_scim&d=DwICAg&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=na5FVzBTWmanqWNy4DpctyXPpuYqPkAI1aLcLN4KZNA&m=vTNKWgajF8MWgt4tfGeeCs7VAdsruY5hM9-7IIV-vDI&s=z8UV9HeKJNemdy6_GzHO7foXe70cvn6GczzA0C9RM4c&e=