[scim] PATCH Multi-Valued Attribute Value Type

Shelley <randomshelley@gmail.com> Wed, 30 September 2020 21:22 UTC

Return-Path: <randomshelley@gmail.com>
X-Original-To: scim@ietfa.amsl.com
Delivered-To: scim@ietfa.amsl.com
Received: from localhost (localhost []) by ietfa.amsl.com (Postfix) with ESMTP id 34C043A0B8F for <scim@ietfa.amsl.com>; Wed, 30 Sep 2020 14:22:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Status: No, score=-2.098 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] 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 ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id hMJwa89DNDnE for <scim@ietfa.amsl.com>; Wed, 30 Sep 2020 14:22:34 -0700 (PDT)
Received: from mail-vk1-xa35.google.com (mail-vk1-xa35.google.com [IPv6:2607:f8b0:4864:20::a35]) (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 6D6E03A0BB0 for <scim@ietf.org>; Wed, 30 Sep 2020 14:22:34 -0700 (PDT)
Received: by mail-vk1-xa35.google.com with SMTP id b4so652494vkh.9 for <scim@ietf.org>; Wed, 30 Sep 2020 14:22:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=LS4dbhqYtgpwS+xg60H06ebzZG1JXGTC1bz+18oLe/k=; b=HiiqXXv3oybjDT3NWcYJvZba5ancdVKPFKAW4NiTYJ3PUqQXMGJpSDUohxSz7e7zAE dNYGwHA1H8mV2TDN+CKc62/QIBl70dtRNAC/E0s7/6VqOeFEL87GdSy5dh1QfYPt6rm8 Dh3GAAOJUV+bnEsJBx0F4UtZzQV/Pnsr2AnC5MWG2S/qpAIAFXFioOaFXPu9DoHJDY1r RBGq2r1FtyaC4pq/nA4/pz7UBbwhUqry4UyQYqyAv8MmMGq+ffl8NsdJd4iRI92mMIa0 vVwlN/x9u5gzOSClCOIejPigBMG4VQq1cAXTQQDyPJqjHoeu8q4pf70b1OU+wIPdAHJ9 sbAw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=LS4dbhqYtgpwS+xg60H06ebzZG1JXGTC1bz+18oLe/k=; b=CVEInbksT986UKtTcMvWqyw5IJ/lLNC/kgjjAuVJTgXjf8Gfkz/1gBBKsuVk//aGQS SCkuaCEnXqY8xbvl0AgdXLWQ+W+b0oyM+Mmh5KYU6+A8XnZuNd5bumwifHbyZJHBAvJf TwyMmh4x7Hu3CZbwJ7EiurSwgtG/PYYkcthx78D4ZFN6ZfR8CNWwMG+6Qaj41LdypiYg /QJCo8BaRhI8FtJmC4qJQDIjlQjzI9Llh8PPVOG5SuXtiSFaby/qTTcrX7KEA7Lq1QsI UaHQT5gGYp4pUDtGYkgKN4ZE3dwOFSlm4EuL0Ea6cXd+FnSeRxQC3KCCkDBDEMTDrfqj Feug==
X-Gm-Message-State: AOAM533bP4Ewm4g9lQZ5/6FBBxVtqd62Cst0SGlpxeGcnBYAw9vxTcX4 5oCEwRZ4Z4sc2E/vjxqdHtQQDAWzbENuTkxS/PL3/dHLIDc6PQ==
X-Google-Smtp-Source: ABdhPJxkrmEJy+0PTaSJbWY5xE5GXqdLhHVHk0fKKdyaX7iN8N3sVnhvhZ1yb7Lf9HuMNfgc2da+aCQx3jR6RssI58E=
X-Received: by 2002:a1f:9381:: with SMTP id v123mr2857104vkd.20.1601500953195; Wed, 30 Sep 2020 14:22:33 -0700 (PDT)
MIME-Version: 1.0
From: Shelley <randomshelley@gmail.com>
Date: Wed, 30 Sep 2020 16:22:22 -0500
Message-ID: <CAGUsYPy0bKZ6jt0+xU_9kvuPkkz1K7hKejP43xnx441DKY0cng@mail.gmail.com>
To: scim@ietf.org
Content-Type: multipart/alternative; boundary="0000000000006c3aad05b08e7ff5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/scim/Kyn_VJMAwWf_FEpWy4hEhS3KZzY>
Subject: [scim] PATCH Multi-Valued Attribute Value Type
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: Wed, 30 Sep 2020 21:22:36 -0000

For "add" and "replace" PATCH operations that specify multi-valued
attributes, is the content of the "*value*" attribute supposed to be an *array
*containing the new/replaced element(s) or a single *JSON object *containing
the new/replaced element? The RFC seems to contain examples for both, and I
would like to better understand the difference.

*Add Operation "Value" Type for Multi-Valued Attributes*
There is an "*add*" example on page 37 which specifies an *array *for a
multi-valued attribute:
  "op": "add",
  "path": "members",
  "value": *[*{
    "display": "Babs Jensen",
    "$ref": "https://example.com/v2/Users/2819c223...413861904646",
    "value": "2819c223-7f76-453a-919d-413861904646"

The description of "add", however, indicates that it contains "*a "value"
member whose content specifies the value to be added.*" In the case of
"add", the value being added is the individual element, not an array.

Also, the "add" description indicates that the "*value MAY be a quoted
value, or it may be a JSON object containing the sub-attributes*" but does *not
*seem to allow arrays (nor JSON literals, such as booleans or numbers,
which is a separate question...).

*Is the description or the example incorrect? Should the operation "value"
here be a JSON object or an array?*

*Replace Operation "Value" Type for Multi-Valued Attributes *
For "*replace*", there is an example on page 44 that specifies an *array *for
the "value" of a multi-valued attribute:
  "op": "replace",
  "path": "members",
  "value": *[*{
      "display": "Babs Jensen",
      "$ref": "https://example.com/v2/Users/2819c223...413861904646",
      "value": "2819c223...413861904646"
      "display": "James Smith",
      "$ref": "https://example.com/v2/Users/08e1d05d...473d93df9210",
      "value": "08e1d05d...473d93df9210"
However, there is also a "*replace*" example on page 45 that specifies
an *object
*(not an array) for the "value" of a multi-valued attribute:
  "op": "replace",
  "path": "addresses[type eq \"work\"]",
  "value": *{*
    "type": "work",
    "streetAddress": "911 Universal City Plaza",
    "locality": "Hollywood",
    "region": "CA",
    "postalCode": "91608",
    "country": "US",
    "formatted": "911 Universal City Plaza\nHollywood, CA 91608 US",
    "primary": true

The use of the array for "replace" on "members" seems appropriate since it
is replacing the entire attribute with one or more values. For the
"addresses" value path, it's a little less clear to me. The use of an
object seems to imply that even if multiple addresses are matched by the
filter, only one new element may be specified to take it's/their place. Can
someone provide clarification on when to use *array vs. object *here?

Thank you!