[scim] Referencing individual subattributes in multivalued attributes

Eric Fazendin <efazendin@pingidentity.com> Thu, 08 October 2015 14:36 UTC

Return-Path: <efazendin@pingidentity.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 34CC81A1A29 for <scim@ietfa.amsl.com>; Thu, 8 Oct 2015 07:36:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.322
X-Spam-Level: *
X-Spam-Status: No, score=1.322 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=no
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 VD_sR3j9aJFE for <scim@ietfa.amsl.com>; Thu, 8 Oct 2015 07:36:05 -0700 (PDT)
Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (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 88F901A1A28 for <scim@ietf.org>; Thu, 8 Oct 2015 07:36:05 -0700 (PDT)
Received: by wiclk2 with SMTP id lk2so28415840wic.1 for <scim@ietf.org>; Thu, 08 Oct 2015 07:36:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pingidentity.com; s=gmail; h=mime-version:date:message-id:subject:from:to:content-type; bh=hF3bCCjCOQ5kILUNnJo538Ui0oJCYnJ4iZVDoPNevyU=; b=f82RHH/vdWxP7oyeRS7CQACB6fgdq7wFIsf4D81/3NFaEGq3W2dkv2afb5yIg8bdNU EXm/K0/XzBGI8nwyz5QxVXc41mR8Jz9mRa0VfbJiMxz0D/we1k/uwASBKrq3bd9Bx2Ix 3dqbZVYnzqJbya+OUDcwp3RtbzFj41v+QMfho=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=hF3bCCjCOQ5kILUNnJo538Ui0oJCYnJ4iZVDoPNevyU=; b=HVRZ7SEgM2WVSd+Q5R2QYH7dQeBMF0TdAeokYiLbPqnPPWz+4EAC4/E0ZtZeNUHjq7 j12gg3Gylk84eCTzrim/gDjlW/7N3YgNbMy80sc/stBzdSAWi3HxOptfhg4laSxPOAhH XK8+oysveKwNotuVpVR7LiPe8lOEgbbDKipwfwvBmb5X+SXMnQgO0B78BRBAc2bm41Kl 4JthQlTgXzcti3ijUbKZFyoC+oNCQ9GjFam1NwDcxh66f/GFOKaf+1U1TAXUjKTOmyZm SEZ+BoRrpwng7gqfh6fPpXxLKFmsWFzVEgVI0CKog2ZqbU9n+1HoZKFWnqAD6q38Dm2a 3BnA==
X-Gm-Message-State: ALoCoQlDMXDQp5VhE4PCTPXB7DqOj4tTSYG1TRUB67lt9AH+ujngX8QeT8hvdiwjxFUlcOpLPsmD
MIME-Version: 1.0
X-Received: by 10.180.223.102 with SMTP id qt6mr4360132wic.11.1444314963996; Thu, 08 Oct 2015 07:36:03 -0700 (PDT)
Received: by 10.27.205.134 with HTTP; Thu, 8 Oct 2015 07:36:03 -0700 (PDT)
Date: Thu, 08 Oct 2015 08:36:03 -0600
Message-ID: <CAAw32ShDqB5UdoF=qMPxkZ-uPDGcFfjwQiBvgs5fG7wUEmQEEA@mail.gmail.com>
From: Eric Fazendin <efazendin@pingidentity.com>
To: scim@ietf.org
Content-Type: multipart/alternative; boundary="001a1135f0b25fa0b3052198c8ac"
Archived-At: <http://mailarchive.ietf.org/arch/msg/scim/dp33cxH_j7mxy9PqKQ0f-hi2Z1I>
Subject: [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 14:36:07 -0000

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