[scim] How to patch multi-valued nested attributes?

Aleksey Chernoraenko <achernoraenko@gmail.com> Mon, 25 February 2019 18:37 UTC

Return-Path: <achernoraenko@gmail.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 81E5D130F13 for <scim@ietfa.amsl.com>; Mon, 25 Feb 2019 10:37:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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 ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XrmrLcDWbra9 for <scim@ietfa.amsl.com>; Mon, 25 Feb 2019 10:37:19 -0800 (PST)
Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) (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 8385D130EFE for <scim@ietf.org>; Mon, 25 Feb 2019 10:37:19 -0800 (PST)
Received: by mail-ot1-x331.google.com with SMTP id z19so8772794otm.2 for <scim@ietf.org>; Mon, 25 Feb 2019 10:37:19 -0800 (PST)
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=bpOOxHhaR8hxzZsL12YLPYIFhX3/jU+RGZrfwIBH+nE=; b=JkkO//iNkSmoqIi3Nq3uqABzNUEaegYzZtk9k5/PT7nlhsCZ/1ERHWt/AeS+HGhiCH 14S0mL6umWYW4w3hhHLdlaMsQ7BWdUuIqikv+1+HbYlXI3kCjt1ufum4gbY61fVqgzy0 CJBDEG/0pYcAUvAjm25MCrK6Z2xymOkvh2RUUWH1Y/rlCCeuN9F7U37WVn21MMWxglkM Y4HtNuzkwkSU33NcioJDH22Epud7CKgDpo8ze/l88mpMBKOTpipROOvaWKUfQ+AoM47F PL0XdAa7Bfz4Mqker+uoRVO+WVUBs+BJ4ElN83JAkjEj7bVsOqtv8OU4KxI3C2EGDEBp /sdw==
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=bpOOxHhaR8hxzZsL12YLPYIFhX3/jU+RGZrfwIBH+nE=; b=JswvrMBogNoNX3JzGn1tQJTvx/Iy6Wa3dV6d6fap9glfmNYdm14VHqlXOLPddANUbL NVP9cxYO+87Y4mOyLF6WS5Wqa9CooV80y2N90GTz+tces8qkgKQ2wgk6qVATOeDPtqHQ Dp6G3ttt/2qgPgfqX1HAb1ks+4/6R7ReLlsHrMXq6hKfJyF52WBXTLImKS/66yIPRd55 vc423weEpLZVq7mjdi1S+ZOBlNM03OGuGlyo5jzoorU6cz5a1yow+bIWPXQZfxJqxaBE F5zMTf1R66jeIjCUNt5NXT54iypJkL0ydk6+09ISEN1LZtTR9U5hFkpgrP8BnfDTXGc6 INAw==
X-Gm-Message-State: AHQUAuZyQmvaykZacagVcGum4oE76EE54Na8jnY7wS23+vvypML3Kh/q X2VcNIqJjXJm0n6Ne82cJrOd8g5ScmvZpzeEnnAwUH64
X-Google-Smtp-Source: AHgI3Ibjpuj5w++uVe/O/QBk5QHL85IrqIjPrPb9XaU3avkcqD3NoY+LEpqn6WqtLapeoEzHbnWFmwBL9bhmDticwQc=
X-Received: by 2002:a9d:1a7:: with SMTP id e36mr12374039ote.270.1551119838301; Mon, 25 Feb 2019 10:37:18 -0800 (PST)
MIME-Version: 1.0
From: Aleksey Chernoraenko <achernoraenko@gmail.com>
Date: Mon, 25 Feb 2019 12:37:07 -0600
Message-ID: <CAKCnT7w5-o7N=TdOLwLD+dWEMCOSzyuQYYpQBKtrZs+CMo22Rw@mail.gmail.com>
To: scim@ietf.org
Content-Type: multipart/alternative; boundary="000000000000f753680582bc3af2"
Archived-At: <https://mailarchive.ietf.org/arch/msg/scim/ZfI0gW-m29jDWUR4delu4mFriWs>
Subject: [scim] How to patch multi-valued nested 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: Mon, 25 Feb 2019 18:37:21 -0000

Hello,

In our SCIM Resource Provider we have resources that have the nested
multi-valued attributes. It looks like this:
GET /GroupSets/98ae2a7c-40a5-4fff-b59a-5b922908239e
{    ...
    "name": "collection #1",
    "groups": [ {
        "value": "a0115001-0fd7-4b50-b7b4-ac29d57cc623",
        "$ref": ".../groups/a0115001-0fd7-4b50-b7b4-ac29d57cc623",
        ...
        }, ...
    ], ...
}

We use groups endpoint when we update group members, like
PATCH /Groups/a0115001-0fd7-4b50-b7b4-ac29d57cc623
{   ...
    "operations": [ {
        "op": "add", "path": "members", "value":
"db81119f-5ee0-464e-b7e3-51573b62b56a"
        } ]
}

I understand how the request should look like if I want to update one group
members via parent (groupset) endpoint:
PATCH /GroupSets/98ae2a7c-40a5-4fff-b59a-5b922908239e
{   ...
    "operations": [ {
        "op": "add", "path": "groups[value eq
\"a0115001-0fd7-4b50-b7b4-ac29d57cc623\"].members", ...
        } ]
}

but wonder how I can specify "members" from all or a filtered set of
"groups" without enumeration all of them on client side?

The path value might look like "groups[].members", or "groups[*].members",
or even "groups.members".

It seems that the spec leaves this question open. What should or can happen
if more than one group would be found?

---
Thank you,
Alexei