Subject: Re: [scim] PATCH Multi-Valued Attribute Value Type

From: Shelley <[email-masked]>
Date: Thu, 1 Oct 2020 08:29:36 -0500

Thanks for the clarification.

Should the "add" descriptions [1] be corrected to account for arrays and
other literals being provided? Current text:

>    The value MAY be a quoted value, or it may be a JSON object containing the sub-attributes of the complex attribute specified in the operation's "path".
>
> Should it instead be something more like the following?

>    The value MUST contain a value with the data type of the attribute specified in the operation's "path".
>
> (And, similar clarifications for "replace" would be useful, too, with the
additional clarification that CMVA value paths must replace with only a
single element value, and may not provide an array.)

[1] https://tools.ietf.org/html/rfc7644#section-3.5.2.1

On Wed, Sep 30, 2020 at 8:25 PM Phillip Hunt <[email-masked]>
wrote:

> If the path is a simple attribute than the patch value is the actual
> simple assignment.
>
> If the path is a complex attribute than Patch value is the set of
> attributes that constitute a value.
>
> CMVA then follows that value is an array unless a [value path filter] was
> specified.
>
> The idea is that path can be either fine-grained or point to a whole
> object much like in the json patch spec. The big difference is scim uses a
> filter for multivalue arrays over indexing.  Thus value of “value” depends
> on what path points to.
>
> Phil
>
> On Sep 30, 2020, at 3:39 PM, McAdams, Darin <darinm=
> [email-masked]> wrote:
>
> 
>
> I’m curious as well. We are proposing a SCIM interop profile in FastFed
> and now I’m hoping we got it right!
>
> https://openid.net/specs/fastfed-scim-1_0-02.html#rfc.section.4.3.7
>
>
>
> *From: *scim <[email-masked]> on behalf of Shelley <
> [email-masked]>
> *Date: *Wednesday, September 30, 2020 at 2:23 PM
> *To: *"[email-masked]" <[email-masked]>
> *Subject: *[EXTERNAL] [scim] PATCH Multi-Valued Attribute Value Type
>
>
>
> 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!
> _______________________________________________
> scim mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/scim
>
>