Re: [scim] Common Attribute "schemas" Characteristics

Shelley <randomshelley@gmail.com> Sat, 12 September 2020 01:10 UTC

Return-Path: <randomshelley@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 A3DF63A09B8 for <scim@ietfa.amsl.com>; Fri, 11 Sep 2020 18:10:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, URIBL_BLOCKED=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 GN1jMt2vHgKz for <scim@ietfa.amsl.com>; Fri, 11 Sep 2020 18:10:39 -0700 (PDT)
Received: from mail-vk1-xa2f.google.com (mail-vk1-xa2f.google.com [IPv6:2607:f8b0:4864:20::a2f]) (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 53CB83A09B7 for <scim@ietf.org>; Fri, 11 Sep 2020 18:10:39 -0700 (PDT)
Received: by mail-vk1-xa2f.google.com with SMTP id r78so2802095vke.11 for <scim@ietf.org>; Fri, 11 Sep 2020 18:10:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kmFjvbmUBVZJ10U2gh+RIbZcL2NDRWsP83gJ9GuFJMM=; b=pJVO7ZiZIJVhDjCJg/itFR6BnNta67DfxbJV55lkEuljwkLQBz0cL99uFwEclN6pwz HZ2Zc0xseHvJWTGCau/Mgwq4GnHwfw8dkK1bVcaCvTbmuYXROyGNP2EiHl9ov0z8Afme lHBmw+U9OJskGdmk6C5M0JSHoXwo8xo2OLURo/7tTly7ZaJguXkFA3diCqp2DHPYACSp FM/h0SWqoSPzubChFnP4/9pDYT1NP8Weiq43mcl5AeO+fFIbbFAlagyv79thUMIvISSz lBwNf/5EP+mLP8isCNv/fF2d4IW5N7a3qJoeMfxYBHAJ/iRHEMel0EOt3qHg2cSUtGon eYWA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kmFjvbmUBVZJ10U2gh+RIbZcL2NDRWsP83gJ9GuFJMM=; b=F/qQJU5J+HEWzU4JogapWXroqMRBsRSdBRhIcFoxjjN2RfoPO+E8L/LIR2EsA4emCx 5ztSpNjhqE1dzSspKxGe32B5ZV7V0+iCbVVNPhIQfQ/T5buGU0cH/AfKvHYoIMZRbQVK yW8lniqdUF6iYzoY4r5e4m/MGuquWHRhC1roZewKwQBbRyTvnPD8HlYrLaxRMB3ZtWh3 3LejueEx8a+qITh6Zj0GkjckJfRFFyX2wV883Y5PWdt4zpeg09DqkC7dWnZ/O0Bt7pYc 2yswRO1dxMJDbv9GEJbwxXzj2pzdD2NEoqG6OhZ1XD3IEebMyN+TtN+dgN9NERbKg4wz xz2Q==
X-Gm-Message-State: AOAM532SZvzOJNtLIOZn9YOc5S2bzwi5mlcgSpTL06gkDdk5Uqw++Hq8 mORCC2qF2NQKrTWo4l8flBWfa9Q8NeT1Orro7zN6givb6ikHZQ==
X-Google-Smtp-Source: ABdhPJzMiTxW2f5FmRYK0tgQrn+wlWUphOCoeEjf1IQn2AhYuS5vk17p+0rGt2EUhLEn2UnsGkRg2hMoYG+HKxUnh/g=
X-Received: by 2002:a1f:a392:: with SMTP id m140mr2774333vke.21.1599873038406; Fri, 11 Sep 2020 18:10:38 -0700 (PDT)
MIME-Version: 1.0
References: <CAGUsYPzKO4f7gXdKdomMk7txUp91e-u=itfV0RoHeixpOSWzTA@mail.gmail.com> <1D8182AD-BF23-460B-BFF4-90587FE97667@independentid.com>
In-Reply-To: <1D8182AD-BF23-460B-BFF4-90587FE97667@independentid.com>
From: Shelley <randomshelley@gmail.com>
Date: Fri, 11 Sep 2020 20:10:27 -0500
Message-ID: <CAGUsYPzCXs5V2whYnTL73i8k+F4dmGJnzCHwc-+S3rQ_392+ww@mail.gmail.com>
To: Phillip Hunt <phil.hunt@independentid.com>
Cc: scim@ietf.org
Content-Type: multipart/alternative; boundary="00000000000023d8a205af1378d8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/scim/d-ghk9zjZGUn_4MQnwnpmEwlkpU>
Subject: Re: [scim] Common Attribute "schemas" Characteristics
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: Sat, 12 Sep 2020 01:10:42 -0000

If callers are specifying their requested attributes, then they can either
request "schemas" or they should already know the type of resource being
requested.

>From RFC 7643:

   - Section 2.2 indicates that the default "returned" characteristic is
   "default" unless otherwise specified in Section 7 [1]
   - Section 7 indicates that all attributes, other than "id", have a
   default characteristic of "default" [2]
   - "meta" explicitly indicates that it has a "returned" characteristic of
   "default" [3]
   - "id" explicitly indicates that it has a "returned" characteristic of
   "always" [4]
   - "password" explicitly indicates that it has a "returned"
   characteristic of "never" [5]

Aside from the above, I see no mention of any other attributes having
anything other than "default" returned characteristic.Given this, my
presumption would be that "schemas" should be "default," even though it's
not explicitly stated?

[1] https://tools.ietf.org/html/rfc7643#section-2.2
[2] https://tools.ietf.org/html/rfc7643#section-7
[3] https://tools.ietf.org/html/rfc7643#page-17
[4] https://tools.ietf.org/html/rfc7643#section-3.1
[5] https://tools.ietf.org/html/rfc7643#page-22


On Fri, Sep 11, 2020 at 7:26 PM Phillip Hunt <phil.hunt@independentid.com>
wrote:

> AFAIK, Schemas has to always be returned so that parsers know the
> claims/contents of the json object.
>
> I’d have to check but I think all common attributes are returned (eg
> schemas, id, meta).
>
> Phil
>
> On Sep 11, 2020, at 8:13 AM, Shelley <randomshelley@gmail.com> wrote:
>
> 
> Regarding the "*returned*" characteristic for the "*schemas*"
> attribute... RFC 7644 includes examples with conflicting behavior for the
> "schemas" returned characteristic.
>
> In section 3.4.2 [1], the example query which specifies "attributes" does *not
> *return the "schemas" by default:
>
> GET /Users*?attributes=userName*
> {
>  "schemas":["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
>  "totalResults":2,
>  "Resources":[
>
>
>
>
>
>
>
> *   {     "id":"2819c223-7f76-453a-919d-413861904646",
>  "userName":"bjensen"   },   {
>  "id":"c75ad752-64ae-4823-840d-ffa80929976c",     "userName":"jsmith"   }*
>  ]
> }
>
> However, in section 3.9 [2], "schemas" *is *returned by default in the
> response, despite the "attributes" parameter not specifying this attribute:
>
> GET /Users/2819c223-7f76-453a-919d-413861904646*?attributes=userName*
> {
>  "schemas":["urn:ietf:params:scim:schemas:core:2.0:User"],
>
> * "id":"2819c223-7f76-453a-919d-413861904646",* "userName":"bjensen"
> }
>
> RFC 7643 generally indicates throughout that "schemas" MUST be specified;
> however, it is not clear as to whether the requirement is referring to
> requests and/or responses. Unlike the "id" attribute, which clearly
> specifies that it is expected to have a returned characteristic of
> "always", the other common attributes don't clearly specify this
> characteristic. Is "default" the correct attribute, such that the example
> in RFC 7644 Section 3.9 is not correct?
>
> [1] https://tools.ietf.org/html/rfc7644#section-3.4.2
> [2] https://tools.ietf.org/html/rfc7644#section-3.9
>
> On Fri, Mar 13, 2020 at 12:10 PM Phillip Hunt <phil.hunt@independentid.com>
> wrote:
>
>> Shelley
>>
>> In practical/pragmatic terms...case insensitive.
>>
>> I treat as case insensitive since it is unlikely and unwise if two
>> separate schemas only differentiated by case.
>>
>> I would also expect iana process to reject “overlapping” registrations
>> differentiated only by case.
>>
>> Phil
>>
>> On Mar 13, 2020, at 9:16 AM, Shelley <randomshelley@gmail.com> wrote:
>>
>> 
>> What are the characteristics for the "schemas" [1] attribute?
>>
>> Here is my attempt at defining these characteristics using the Schema
>> definitions:
>>
>>    - "type" is "reference"
>>    - "referenceTypes" is ["uri"]
>>    - "required" is "true"
>>    - "multiValued" is "true"
>>    - "uniqueness" is "none"
>>    - "caseExact" as "true" (since this is a "reference" type)
>>    - "mutability" of "immutable" (although none of the mutability values
>>    seems like a perfect fit)
>>    - "returned" characteristic of "default"
>>
>> Although "schemas" and the "Common Attributes" don't define their own
>> schemas, it would be nice to have all of these attributes' characteristics
>> clearly defined in the spec using the Schema definition to help provide a
>> clear/common definition, particularly, since these characteristics are not
>> intended to be modified/defined by SPs..
>>
>> In particular, in my SCIM implementation, I have been considering whether
>> to evaluate "schemas" in resource representations* case-sensitively*
>> (exact case as defined in the ResourceType),* case-insensitively* (any
>> case allowed), or using *lexical equivalence* (e.g. for URNs,
>> case-insensitive schema and NID, case-sensitive NSS, and some components
>> ignored). The RFC doesn't seem to clearly prescribe this, but based on the
>> fact that the implied type is "reference" which (debatably [2]) has
>> "caseExact" as "true" and the fact that the attribute "MUST only contain
>> values defined as "schema" and "schemaExtensions"", I'm under the
>> assumption that this attribute is *case-sensitive*.
>>
>> Please confirm. Thanks!
>>
>> [1] https://tools.ietf.org/html/rfc7643#section-3
>> [2]
>> https://mailarchive.ietf.org/arch/msg/scim/05_K_y-V26EOfN2F7fuSO3DXoLw/
>> _______________________________________________
>> scim mailing list
>> scim@ietf.org
>> https://www.ietf.org/mailman/listinfo/scim
>>
>>