Re: [scim] Clarification on SCIM schema extension URN naming rules

Phillip Hunt <phil.hunt@independentid.com> Tue, 04 October 2022 21:26 UTC

Return-Path: <phil.hunt@independentid.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 AAE99C14CE3C for <scim@ietfa.amsl.com>; Tue, 4 Oct 2022 14:26:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.903
X-Spam-Level:
X-Spam-Status: No, score=-6.903 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=independentid-com.20210112.gappssmtp.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cdMBVLsQIKXe for <scim@ietfa.amsl.com>; Tue, 4 Oct 2022 14:26:09 -0700 (PDT)
Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 00AC8C1524A4 for <scim@ietf.org>; Tue, 4 Oct 2022 14:26:08 -0700 (PDT)
Received: by mail-pj1-x1030.google.com with SMTP id p3-20020a17090a284300b0020a85fa3ffcso57942pjf.2 for <scim@ietf.org>; Tue, 04 Oct 2022 14:26:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=independentid-com.20210112.gappssmtp.com; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date; bh=Sw0nO73RPdsPUI4d3qO9vfozhxVl2biKKWVl4EJS/C0=; b=J6yyG/jg3JILGnzPvT7W33CGVnmgeRamJui21uURYr/HuwvgMNbZxw8rQ3OeoYfruQ dzuCZ0lo8wQw8sOk+X2XaUtELUqTyF+PLeodUQrasuVJ2OBk9hV6S2IXgcC1RzU13vYy c5ya+QZ0Sp+K4qpwma2+g9E4wVLrkOw9rDSxVtb8dqwpIZoQiL8ObH/HpZFySa5apkUf lvq5eWefM3WJncB4KDf73erd7jGPRh/RIOVH/beMyumePFlHqfEQhfbmsBYHPvQLGolu XqUE1iNAW2uqSC1dYgdxQOSifhswIhfL8t0IoVWT7CyraST8010oARmPk+OWjakRFdej ru8Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date; bh=Sw0nO73RPdsPUI4d3qO9vfozhxVl2biKKWVl4EJS/C0=; b=iMWZwOnXer1sZHo3vEYZ+qv/5NOVc9KhFjU6M3fFqyaeJHqDAB4A4/KVrWXKNPTlHr jURuxJQUedYigWsJHerSA8Jc+5tvF/CJbc0NR7RJH3zcvjPs46GG0L4JZfzGEcXCZsgM DqFe2d33SmkibxEJbiSOZM87cSZjqomhijv6ykWc4iYxduboo6gV/RrywnLjGqQIuAOH bVMaPIZZ3rOKPucjM1NjDFcWdGPxNZ58GikOga3eaFrzX6c5kAm4Ndd6yFkkIRvzLols YJH9sPGipG0DWxtiGZK8k1AC3meiU1NyIXpCG3Whswi+Cc4ziljnl8TDNCC1RE/fVaX9 lSlw==
X-Gm-Message-State: ACrzQf1mCRKnz8b4WOZHa8CDy/v7+ae+8TSoAHVFGRvAQsarBHauqiKB kASVjqZYIvlE5bedh1C2st5JLk7rEGiGPQ==
X-Google-Smtp-Source: AMsMyM6bQuwQUReQq10iPqymCgE8Mv4tr2WM8k71IrINxyO2iwr7suSJSxJWOMQiVAOEUm+1v9v31w==
X-Received: by 2002:a17:90a:9ec:b0:20a:e8e0:3f60 with SMTP id 99-20020a17090a09ec00b0020ae8e03f60mr1115487pjo.100.1664918767952; Tue, 04 Oct 2022 14:26:07 -0700 (PDT)
Received: from smtpclient.apple (d207-6-202-204.bchsia.telus.net. [207.6.202.204]) by smtp.gmail.com with ESMTPSA id t12-20020a170902e84c00b0017f5ad327casm3975492plg.103.2022.10.04.14.26.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Oct 2022 14:26:07 -0700 (PDT)
From: Phillip Hunt <phil.hunt@independentid.com>
Message-Id: <0F316F63-F163-431F-8C3B-65D996D09DBB@independentid.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_8DC1B627-118C-4FC6-A7E5-558EAFF4FDA3"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Date: Tue, 04 Oct 2022 14:26:06 -0700
In-Reply-To: <CAH9eYVpfLofyHUu1iT=sxg2vXpKnzfLj-1W5RxKHxFUPJ3pdgg@mail.gmail.com>
Cc: SCIM WG <scim@ietf.org>, Danny Zollner <Danny.Zollner=40microsoft.com@dmarc.ietf.org>, Stanimir Bozhilov <stanimir@audriga.com>
To: Brian Demers <brian.demers@gmail.com>
References: <3250F090-BCCB-4999-9D90-4D428D3100B6@gmail.com> <3E25E547-C68D-45A1-8C51-B4676B7164B8@independentid.com> <CAH9eYVpfLofyHUu1iT=sxg2vXpKnzfLj-1W5RxKHxFUPJ3pdgg@mail.gmail.com>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/scim/NKugeCcZYeKdeC696BcQJktwE50>
Subject: Re: [scim] Clarification on SCIM schema extension URN naming rules
X-BeenThere: scim@ietf.org
X-Mailman-Version: 2.1.39
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: Tue, 04 Oct 2022 21:26:13 -0000

Section 10.2.1 of RFC7643 describes the structure:

>  urn:ietf:params:scim:{type}:{name}{:other}
> 
>       The keywords have the following meaning:
> 
>       type
>          The entity type, which is either "schemas" or "api".
> 
>       name
>          A required US-ASCII string that conforms to the URN syntax
>          requirements (see [RFC2141 <https://www.rfc-editor.org/rfc/rfc2141>]) and defines a major namespace of a
>          schema used within SCIM (e.g., "core", which is reserved for
>          SCIM specifications).  The value MAY also be an industry name
>          or organization name.
> 
>       other
>          Any US-ASCII string that conforms to the URN syntax
>          requirements (see [RFC2141 <https://www.rfc-editor.org/rfc/rfc2141>]) and defines the sub-namespace
>          (which MAY be further broken down in namespaces delimited by
>          colons) as needed to uniquely identify a schema.

So this process is about managing the URN namespace and avoiding conflicts. IANA is in charge of this.

Any URI starting urn:ietf:params:scim is in the SCIM namespace. The next level “type” is used to dsitinguish between protocol schemas (eg.”api") vs. resource schemas (“schemas”).  For example “api” is used to describe the JSON schemas for a SCIM PATCH request, a SCIM SEARCH request via (POST), and List Response.

The next level is the “name” which can be any major name you want (like a company).  “core” is the one that indicates a SCIM WG specification.

So as an example a third party (e.g.  “hralliance”) might want to publish there own specification and register with IANA per the process described. They might choose a namespace like:

urn:ietf:params:scim:schemas:hralliance:employee

Section 10.3 describes how to do formal registration. The main reason for registration is to:
a) reserve a URN namespace for schemas
b) advertise the availability of the specification to others.

This is not unlike how IANA is used to register mime types (e.g. application/scim+json).

Phillip Hunt
@independentid
phil.hunt@independentid.com




> On Oct 4, 2022, at 2:09 PM, Brian Demers <brian.demers@gmail.com> wrote:
> 
> Sorry, my last message wasn't clear.
> 
> This line:
> > The spec states the URN prefix for the IANA registered schema.
> probably should have read:
> > RFC7643 states the URN prefix for the IANA registered schema.
> 
> Because of this, I'm assuming URN's starting with the prefix `urn:ietf:params:scim:` _should_ be avoided unless the schema is being developed through or reviewed by the working group (per 10.3.1)?
> 
> 
> On Tue, Oct 4, 2022 at 10:24 AM Phillip Hunt <phil.hunt@independentid.com <mailto:phil.hunt@independentid.com>> wrote:
> I would take a look at the IANA section of RFC7643. It details the namespace and registration process for SCIM urns. 
> 
> Phil
> 
> > On Oct 4, 2022, at 7:33 AM, Brian Demers <brian.demers@gmail.com <mailto:brian.demers@gmail.com>> wrote:
> > 
> > Same question here!
> > 
> > I gave a SCIM talk yesterday, and Iglossed over this topic, because it was not clear to me.
> > The spec states the URN prefix for the IANA registered schema.
> > But that may suggest that non-registered schema should avoid that prefix? 🤷
> > 
> > -Brian
> > 
> >>> On Oct 4, 2022, at 9:13 AM, Stanimir Bozhilov <stanimir@audriga.com <mailto:stanimir@audriga.com>> wrote:
> >>> 
> >>> On 2022-09-30 07:37, Danny Zollner wrote:
> >>> Hi SCIM-ers,
> >>> In RFC 7643, as best I can tell, all of the examples of schemas for
> >>> SCIM resources begin with the prefix of
> >>> urn:ietf:params:scim:schemas:…, with the sole exception of the text
> >>> on page 29 that refers to the schema for the ResourceType resource.
> >>> This text describing the schema for the ResourceType resource contains
> >>> the following:
> >>> schemaExtensions
> >>>     A list of URIs of the resource type's schema extensions.
> >>>     OPTIONAL.
> >>>     schema  The URI of an extended schema, e.g.,
> >>> "urn:edu:2.0:Staff".
> >>>        This MUST be equal to the "id" attribute of a "Schema"
> >>>        resource.  REQUIRED.
> >>> This example uses urn:edu:2.0:Staff as the example for an extension
> >>> schema, but all other examples of schemas in RFC 7643 that I could
> >>> find use the ietf namespace. In a discussion I was having with a
> >>> colleague of mine a few months ago, it was stated that the only schema
> >>> URNs that should be using the urn:ietf:.. namespace are ones contained
> >>> in IETF-managed drafts or RFCs. I've worked with dozens of SCIM
> >>> service provider implementers in the past few years, and possibly
> >>> without exception all implementers that have custom schema extensions
> >>> do something equivalent to
> >>> urn:ietf:params:scim:schemas:extension:CompanyName:2.0:User.
> >>> I'd like to get input from others in the working group - is it correct
> >>> that for non-IETF managed schemas - such as those that are custom to a
> >>> single SCIM implementation - that a schema extension URN should not
> >>> begin with urn:ietf:… but instead virtually anything else - i.e.:
> >>> urn:foo:bar, or the example above of urn:edu:2.0:Staff?
> >>> If it is the case, then I've got the following questions:
> >>>   * Does improper schema URN naming(improper usage of urn:ietf:.. )
> >>> have any negative impact?
> >>>   * For future guidance on this topic as part of the SCIM 2.0 standard,
> >>> should any consideration be given to the fact that the overwhelming
> >>> majority of SCIM 2.0 implementers have implemented their extensions
> >>> starting with urn:ietf:..?
> >>>   * If a future version increase of SCIM happens - 2.1, 3.0, etc -
> >>> should clearer guidance on proper versus improper schema URN naming be
> >>> given, including explicit guidance that urn:ietf:… is reserved?
> >>> Thanks,
> >>> Danny Zollner
> >>> _______________________________________________
> >>> scim mailing list
> >>> scim@ietf.org <mailto:scim@ietf.org>
> >>> https://www.ietf.org/mailman/listinfo/scim <https://www.ietf.org/mailman/listinfo/scim>
> >> 
> >> 
> >> Hi Danny,
> >> 
> >> We're currently facing the same issue where it's not completely clear how one is supposed to define the URN of new resources or extensions in SCIM.
> >> 
> >> For the time being, we took the approach where we have the "urn:ietf:..." prefix and at the end of the URN we have "CompanyName:2.0:SomeResourceType". However, we weren't really sure whether this was actually proper naming and so we could easily change the URN naming in case it turns out that this is not the right way to go about naming new resources and/or schema extensions.
> >> Regarding this matter, we'd also be particularly interested in feedback and official guidance on how such naming should be done in general.
> >> 
> >> Best regards,
> >> Stanimir Bozhilov
> >> 
> >> -- 
> >> Stanimir Bozhilov
> >> Tel: +49 721 170293 16
> >> Fax: +49 721 170293 179
> >> 
> >> http://www.audriga.com <http://www.audriga.com/> | http://www.twitter.com/audriga <http://www.twitter.com/audriga>
> >> 
> >> --------------------------------------------------------------------------
> >> audriga GmbH |  Alter Schlachthof 57  | 76137 Karlsruhe
> >> Sitz der Gesellschaft: Karlsruhe - Amtsgericht Mannheim - HRB 713034
> >> Geschäftsführer: Dr. Frank Dengler, Dr.-Ing. Hans-Jörg Happel
> >> --------------------------------------------------------------------------
> >> 
> >> _______________________________________________
> >> scim mailing list
> >> scim@ietf.org <mailto:scim@ietf.org>
> >> https://www.ietf.org/mailman/listinfo/scim <https://www.ietf.org/mailman/listinfo/scim>
> > 
> > _______________________________________________
> > scim mailing list
> > scim@ietf.org <mailto:scim@ietf.org>
> > https://www.ietf.org/mailman/listinfo/scim <https://www.ietf.org/mailman/listinfo/scim>