Re: [scim] draft-shahzad-scim-device-model-00

Phillip Hunt <phil.hunt@independentid.com> Wed, 26 October 2022 18:12 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 2B860C152581 for <scim@ietfa.amsl.com>; Wed, 26 Oct 2022 11:12:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 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_BLOCKED=0.001, 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=ham 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 7w4MLkH69lzu for <scim@ietfa.amsl.com>; Wed, 26 Oct 2022 11:12:18 -0700 (PDT)
Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) (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 E6DC4C1522DC for <scim@ietf.org>; Wed, 26 Oct 2022 11:12:12 -0700 (PDT)
Received: by mail-pf1-x434.google.com with SMTP id f140so16204198pfa.1 for <scim@ietf.org>; Wed, 26 Oct 2022 11:12:12 -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:message-id:reply-to; bh=oaj78tf4EblB+c+g8dievcwnlpj5hIJhbd5T2uQtpL8=; b=Uy8iq0HVzUSV7xwCq9srIvoQvw8iRksHX+AUA+QLyRhB/Z0Z/mU2afPlTETnio4qfv Vlrx22gQXX6pf2FF6ZBxN1mu972beWyv6qN6w9SXSBiZQCuzmSAlsHO7KwvMl3sal8VK 3wYUkwiuuRp4qYq6t+YiWYIJTqqES1nU/IUQWZ8BY2mcgyGHOGbecYPIxwCbFXajvfAw UYPg7fb2ZA5VprXIlqiBGeE3RB2NTQb2dEovMNdTYB3pygtAkeRfuaH4GcZyy808rBVU 0awaDV6j3F0QMMZyJeTmk/wITCvgHuEedkXKrhUuDPO5wOoEutsQy2Qfh2AP1qSRc/sD pvGw==
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:message-id:reply-to; bh=oaj78tf4EblB+c+g8dievcwnlpj5hIJhbd5T2uQtpL8=; b=Wglvw8pFzJhi2D20mWVRY6UxQ2POT/g3mED4KYXUvHHbv8sKMBb4QyDDmHSxBAkDYd QPXYYRfcR2x2KaPndwBVKPFx8ycI5miVpR8N027Qg7c31BDNzH/Lp3iMMmgEzBW7zaVV AO31siCRv09yCGQj0jc41d5ykg7nUhaL59sOW2Z3RVoCcXCmo3OU+uKIzb3VGt9GRH2M v2qU1mf4TlXSBgH6f1ywi84sreuQ9wvadAIIzeETHaZRwlFKRTT+07eqeSQ/bjQzEVEn 4PRSuevzADotcrpMuRRGSvyMctxcA+SV94FWhK5eE854IUmRoL/kqkiw48X048LtmA2R 9zhA==
X-Gm-Message-State: ACrzQf1pmNkJM7dI+dYLbXqq6bB8Dmy8y6phEmHkO2ITXTF/vxNOYld9 EfVt7WkigH26eT30uA4ltUo2fQ==
X-Google-Smtp-Source: AMsMyM5VM3E6N8JmMWtxghjL4cadfGG6MscxEu38IbfOzxS9Sq0c2XpXX6dpZVpUIr+uJywzxgIbjw==
X-Received: by 2002:a63:85c8:0:b0:46e:c387:c85f with SMTP id u191-20020a6385c8000000b0046ec387c85fmr23409607pgd.105.1666807931582; Wed, 26 Oct 2022 11:12:11 -0700 (PDT)
Received: from smtpclient.apple (node-1w7jr9plyoqwsee9oqjul373j.ipv6.telus.net. [2001:569:540c:4900:142f:60de:40b8:63af]) by smtp.gmail.com with ESMTPSA id w2-20020a170902e88200b00181e55d02dcsm3206574plg.139.2022.10.26.11.12.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Oct 2022 11:12:11 -0700 (PDT)
From: Phillip Hunt <phil.hunt@independentid.com>
Message-Id: <A1C36E2A-2859-4864-AEF7-3756EE17D097@independentid.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_E28B4A46-0F0D-4CD1-A294-0C51445E8166"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Date: Wed, 26 Oct 2022 11:12:10 -0700
In-Reply-To: <BN6PR22MB0195CC37FDB9BBEFA32A679DD0309@BN6PR22MB0195.namprd22.prod.outlook.com>
Cc: SCIM WG <scim@ietf.org>
To: Salvatore DAgostino <sal@idmachines.com>, Eliot Lear <lear@lear.ch>, hiqbal@ncsu.edu, Muhammed Shahzad <mshahza@ncsu.edu>
References: <f92a63bf-9708-84de-5a3f-bc51f52f0cd0@lear.ch> <BN6PR22MB0195CC37FDB9BBEFA32A679DD0309@BN6PR22MB0195.namprd22.prod.outlook.com>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/scim/qhOpKb0HysLr2QiK8rQjqI3u6f8>
Subject: Re: [scim] draft-shahzad-scim-device-model-00
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: Wed, 26 Oct 2022 18:12:22 -0000

Hi Elliot, Muhammed, Hassan,

Thanks for submitting this. Great to see!

Sorry for the long explanation that follows, I am hoping the wider SCIM audience will also find this useful in the SCIM”bis” discussions.

RFC7643 does in fact describe a more informal language that SCIM understands.  Its main objective was:  avoiding naming collisions, and to standardize common attributes and typing. Structure was kept to a minimum. eg. extensions to existing resoruces are placed in their own JSON attribute object (see Enterprise User example in 7643).

At the time schema for JSON was a controversial subject for those seeking shelter from XML. Ahh the joys of consensus process. Still I wish we had the option of JSON Schema back then!  :)

A couple of improvements that may be helpful:

1.  ResourceType definition.  This tells clients what the endpoints are for your resources and what the primary and allowable extension schemas are. For example take a look at RFC7643 Section 6 and an exampleJSON representation can be found in Section 8.6.  When clients query the ResourceTypes endpoint of the server, this is what tells them the device model schema is available.

2.  In 1, I think you are trying to extablish a new resource type.  “extension” typically means extending another schema.  For example the enterprise:User is an extension of the normal User. 

You may want to change your URN from urn:ietf:params:scim:schemas:extension:Endpoints:2.0:Device to urn:ietf:params:scim:schemas:Endpoints:2.0:Device. Note: the number 2 in the core schema was really meant to imply SCIM 2. You can keep that convention, but you don’t have to (as object schema can revise independently of protocol version).

In the case of the User resource type, calling
HTTP GET /ResourceTypes/Users
returns:
{
     "schemas": ["urn:ietf:params:scim:schemas:core:2.0:ResourceType"],
     "id": "User",
     "name": "User",
     "endpoint": "/Users",
     "description": "User Account",
     "schema": "urn:ietf:params:scim:schemas:core:2.0:User",
     "schemaExtensions": [
       {
         "schema":
           "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
         "required": true
       }
     ],
     "meta": {
       "location": "https://example.com/v2/ResourceTypes/User",
       "resourceType": "ResourceType"
     }
 }

This shows the primary schema is urn:ietf:params:scim:schemas:core:2.0:User for the endpoint “/Users" and in this server the extension schema "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User” is required (it could be false).  In practice most implementations ignore this.

3.  SCIM Schema declaration - Section 8.6 shows examples of SCIM Schema for the SCIM Resources. This schema declaration is worth doing as this is what the /Schemas endpoint returns when a client wants to discover what urn:ietf:params:scim:schemas:extension:Endpoints:2.0:Device is for example. For example 

GET /ResourceTypes/Devices
GET /Schemas/urn:ietf:params:scim:schemas:extension:Endpoints:2.0:Device

Note: I have written a JSON Schema definition for SCIM’s core and protocol and it is available in github at: https://github.com/i2-open/i2scim/tree/master/spec/schema

To the group at large, now that “schema” in JSON is no longer a dirty word, I would think it might be interesting using JSON Schema at some point in the future. The only issue at this stage, is that SCIM’s discovery mechanism doesn’t use JSON Schema and would be a major change.  Maintaining both formats would be a pain for implementers.  

Phillip Hunt
@independentid
phil.hunt@independentid.com




> On Oct 26, 2022, at 5:59 AM, Salvatore DAgostino <sal@idmachines.com> wrote:
> 
> Thanks for this.
>  
> I work with certifying ISO/IEC 60835-11-5 devices which is for physical access control units and peripheral devices that often include QR and BLE readers. In many cases these use serial communications to communicate between the networked (IP) ACU and the PD to implement the settings, commands, and responses to the standard. Always interested in how we bridge SCIM to the physical access control world and does this provide a way forward.
>  
> There are companies that use SCIM for driving the attributes of the access group in these physical access use cases already, and I am very interested in how they might react to this .
>  
> Kind regards,
> Sal
>  
> From: scim <scim-bounces@ietf.org> On Behalf Of Eliot Lear
> Sent: Wednesday, October 26, 2022 1:49 AM
> To: scim@ietf.org
> Cc: hiqbal@ncsu.edu; Muhammed Shahzad <mshahza@ncsu.edu>
> Subject: [scim] draft-shahzad-scim-device-model-00
>  
> Hello SCIM folk,
> 
> On behalf of Muhammed Shahzad, Hassan Iqbar, and myself, I would like to bring to your attention the first try at a device schema for SCIM.[1]  A few things to point out:
> 
> There are actually several schema in this draft.  The first is a base device schema.  The others are extensions for additional functionality.
> The intent of this schema is to demonstrate how one can provision devices that make use of different L2 technologies, some even without IP capabilities, with different bootstrapping methods.
> We've made use of JSON schema to present the work.  This has posed us one particular challenge that we have yet to clean up: line length limitations in drafts.
> We'd ask the chairs for some time to present and discuss in London.  I expect we'll need to refactor here and there, but we'd like input on the core concept, as well as the objects themselves.  A Github repository is available at https://github.com/iot-onboarding/scim-devices <https://github.com/iot-onboarding/scim-devices>.
> 
> Thanks!
> 
> Eliot
> 
> [1] https://datatracker.ietf.org/doc/html/draft-shahzad-scim-device-model <https://datatracker.ietf.org/doc/html/draft-shahzad-scim-device-model>_______________________________________________
> scim mailing list
> scim@ietf.org
> https://www.ietf.org/mailman/listinfo/scim