Re: [scim] Referencing individual subattributes in multivalued attributes

Phil Hunt <phil.hunt@oracle.com> Thu, 08 October 2015 16:04 UTC

Return-Path: <phil.hunt@oracle.com>
X-Original-To: scim@ietfa.amsl.com
Delivered-To: scim@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CD05F1A90D9 for <scim@ietfa.amsl.com>; Thu, 8 Oct 2015 09:04:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.209
X-Spam-Level:
X-Spam-Status: No, score=-4.209 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 wkCjbycbpfXa for <scim@ietfa.amsl.com>; Thu, 8 Oct 2015 09:04:47 -0700 (PDT)
Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) (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 3A5CD1A90F6 for <scim@ietf.org>; Thu, 8 Oct 2015 09:04:28 -0700 (PDT)
Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t98G4Qgi013510 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Oct 2015 16:04:27 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t98G4Qfd027741 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 8 Oct 2015 16:04:26 GMT
Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t98G4QJ8027230; Thu, 8 Oct 2015 16:04:26 GMT
Received: from [10.0.1.3] (/24.86.216.17) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 08 Oct 2015 09:04:25 -0700
Content-Type: multipart/alternative; boundary="Apple-Mail-C14C40C0-6013-4651-85B9-1F9FFB19EC54"
Mime-Version: 1.0 (1.0)
From: Phil Hunt <phil.hunt@oracle.com>
X-Mailer: iPhone Mail (13A452)
In-Reply-To: <CAAw32ShDqB5UdoF=qMPxkZ-uPDGcFfjwQiBvgs5fG7wUEmQEEA@mail.gmail.com>
Date: Thu, 08 Oct 2015 09:04:24 -0700
Content-Transfer-Encoding: 7bit
Message-Id: <3CA99430-C3DD-4F97-9C4F-32AB810C2A52@oracle.com>
References: <CAAw32ShDqB5UdoF=qMPxkZ-uPDGcFfjwQiBvgs5fG7wUEmQEEA@mail.gmail.com>
To: Eric Fazendin <efazendin@pingidentity.com>
X-Source-IP: userv0022.oracle.com [156.151.31.74]
Archived-At: <http://mailarchive.ietf.org/arch/msg/scim/O-Urx9G4jN7NrJbnOv82ZAI6vfM>
Cc: scim@ietf.org
Subject: Re: [scim] Referencing individual subattributes in multivalued attributes
X-BeenThere: scim@ietf.org
X-Mailman-Version: 2.1.15
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, 08 Oct 2015 16:04:49 -0000

Eric,

It depends on your service providers needs. 

If you allow repeat types then the client would have to use a filter like the following to return or patch a specific value since type is not unique:

filter=addresses[type eq "work" and region eq "KA"]

The server is free to decide on if it wants to enforce uniqueness. It should set uniqueness for type sub- attribute in schema if it does. 

Phil

> On Oct 8, 2015, at 07:36, Eric Fazendin <efazendin@pingidentity.com> wrote:
> 
> I'm wondering what is the best practice for extracting individual subattribute values in a multivalued attribute.
> 
> Say you had the below SCIM object and you wanted a system to extract the region value of the home address.  Barring any specific business requirements, would the right thing be to return a multivalued list of [CA, KA, KA]?
> 
> Related, how problematic would it be to enforce one time use of type for any given multivalued attribute?  With the below data, the types would need to be changed to something like home, secondary home, tertiary home.
> 
> 
> {
>   "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
>   "id": "2819c223-7f76-453a-919d-413861904646",
>   "userName": "bjensen@example.com",
>   "addresses": [
>     {
>       "type": "work",
>       "streetAddress": "100 Universal City Plaza",
>       "locality": "Hollywood",
>       "region": "CA",
>       "postalCode": "91608",
>       "country": "USA",
>       "formatted": "100 Universal City Plaza\nHollywood, CA 91608 USA",
>       "primary": true
>     },
>     {
>       "type": "home",
>       "streetAddress": "456 Hollywood Blvd",
>       "locality": "Hollywood",
>       "region": "CA",
>       "postalCode": "91608",
>       "country": "USA",
>       "formatted": "456 Hollywood Blvd\nHollywood, CA 91608 USA"
>     },
>     {
>       "type": "home",
>       "streetAddress": "123 Oak St",
>       "locality": "Topeka",
>       "region": "KA",
>       "postalCode": "55555",
>       "country": "USA",
>       "formatted": "123 Oak St\nTopeka, KA 55555 USA"
>     },
>     {
>       "type": "home",
>       "streetAddress": "987 Spruce St",
>       "locality": "Witchita",
>       "region": "KA",
>       "postalCode": "55556",
>       "country": "USA",
>       "formatted": "987 Spruce St\nWitchita, KA 55556 USA"
>     }
>   ],
>   "meta": {
>     "resourceType": "User",
>     "created": "2010-01-23T04:56:22Z",
>     "lastModified": "2011-05-13T04:42:34Z",
>     "version": "W\/\"a330bc54f0671c9\"",
>     "location":
> "https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646"
>   }
> }
> _______________________________________________
> scim mailing list
> scim@ietf.org
> https://www.ietf.org/mailman/listinfo/scim