Re: [scim] SCIM Synchronization Problem

"Matt Peterson (mpeterso)" <Matt.Peterson@oneidentity.com> Mon, 23 August 2021 23:49 UTC

Return-Path: <Matt.Peterson@oneidentity.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 9C01E3A0B3E for <scim@ietfa.amsl.com>; Mon, 23 Aug 2021 16:49:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.091
X-Spam-Level:
X-Spam-Status: No, score=-2.091 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=oneidentity.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 3t9JJt7jzIhj for <scim@ietfa.amsl.com>; Mon, 23 Aug 2021 16:49:34 -0700 (PDT)
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2123.outbound.protection.outlook.com [40.107.96.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AC0DD3A0B46 for <scim@ietf.org>; Mon, 23 Aug 2021 16:49:33 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q384XsELfPJNJXf+IPE3RcpzMOEkUvy2DA4HNM86olKDwVvnmbdVDAF+LtniB1GCbdXrgnNuwnKbs48eppxGQTi1lM3KA3PM2Sc/0woq+/DxF3OES8T3eVqTZA+Co+DKt4mwnLRlnv+zVzAFZmhuERycEfMUo/QoHygT708Vl58rZwJwvHTliJ8MFhaF2+gpxbYPCb8IfqJ6f753lzGFR3CajJgFTULTnMARHKEv/KFRIZXM21K0K/4XOmPSS9JK7DVd11jRj8077QyeoVYn6mTqlMv6v9E/Gfk4aM6toM0UK48w4HNUpmmrx94JqhTvdRdKWspIeADnG7WcBIE6Rg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/m4ZtXp8l2NnFn0O/q9WG1cWIhO6mLwe6O4jXeBAH7A=; b=C+yeK6dHWbHxFtWaSuJ/nt1G25vtLbvaphKKaniWke/qMleCQDYunZ8UFb58MMgz1AlR3zo5kCv7Ft9jH9FZ6cAtKsPnpIibHXqNDz7biTEIm97v/vvdGgCXaoJGMavT1yALI/hM6WA9MiJ5X4MjioiuTZOpW9xVneolFBN5ctkMddcEXdE7W+PMV6B/HsEK3uwyEXQZA0AyenCzssUlyJJCDv21WH2VmOj+FnXHK2TfUQHdOOiyq1NFkioJe3iFAnB/xptggxNiwZza5ZyazeyrAqaYV/GaupH1rGyYgO77UjfiYskGe3Nyc5xXZhvzZcRKERzZqDFEo1pdOlpPLg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oneidentity.com; dmarc=pass action=none header.from=oneidentity.com; dkim=pass header.d=oneidentity.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oneidentity.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/m4ZtXp8l2NnFn0O/q9WG1cWIhO6mLwe6O4jXeBAH7A=; b=AkOIBL9+1IIYame7x0McpVsmSRx8fqPfP2qrqvAQaxKzFx3hnKcOr0ggjPWNA6K1aIGSQ96iTs/bb5P4kH3Y6Kl0aqP2zMSA8iXamiWxJQwY+BimoNlIlMNl65PiyTudagyvb3aA51RJwO8R7bfRjfaIYmbj6mdOJ/nbtxNHd2ToRxLkj3Y44Qjy3Mxn/uZPkVp42dtYhdlin+ddZAiMYIuZ+urxn7et315rnhrcPNDgA8JrUoqCLQPVNG5HEhGUsJOU3860bBCM0yJNi6587gneHjuYk7pfqUSGTaTfEoBK+Yh5RfjeHVR+UgrHxumsmb/RIYPt3jU1m7zfb7Wtqg==
Received: from MWHPR19MB0957.namprd19.prod.outlook.com (2603:10b6:300:a4::16) by CO6PR19MB4755.namprd19.prod.outlook.com (2603:10b6:5:341::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19; Mon, 23 Aug 2021 23:49:22 +0000
Received: from MWHPR19MB0957.namprd19.prod.outlook.com ([fe80::4880:4967:c535:5783]) by MWHPR19MB0957.namprd19.prod.outlook.com ([fe80::4880:4967:c535:5783%4]) with mapi id 15.20.4436.024; Mon, 23 Aug 2021 23:49:22 +0000
From: "Matt Peterson (mpeterso)" <Matt.Peterson@oneidentity.com>
To: Danny Mayer <mayer@pdmconsulting.net>, SCIM WG <scim@ietf.org>
Thread-Topic: [scim] SCIM Synchronization Problem
Thread-Index: AQHXlD4yOJYx7decRU+u2K9sFyDQQ6t7FibQgAFlnoCABUmcsA==
Date: Mon, 23 Aug 2021 23:49:22 +0000
Message-ID: <MWHPR19MB0957723BC8FE476F68EBDEC6E1C49@MWHPR19MB0957.namprd19.prod.outlook.com>
References: <e8f9d66c-f356-61b8-d38a-b5288fb9c518@pdmconsulting.net> <MWHPR19MB0957823E52255520BD4DB305E1C09@MWHPR19MB0957.namprd19.prod.outlook.com> <0f21255e-4ea9-b42d-353d-5c0661e1be5e@pdmconsulting.net>
In-Reply-To: <0f21255e-4ea9-b42d-353d-5c0661e1be5e@pdmconsulting.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: pdmconsulting.net; dkim=none (message not signed) header.d=none;pdmconsulting.net; dmarc=none action=none header.from=oneidentity.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: f14663bb-5a9b-4ca7-79c8-08d96690a1b6
x-ms-traffictypediagnostic: CO6PR19MB4755:
x-microsoft-antispam-prvs: <CO6PR19MB4755B80B39E91FFA42D31C88E1C49@CO6PR19MB4755.namprd19.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: FG0i7ZI6Y01lO96r8mU8hsJpE4TU2PzCo6gr8KHZEJmh9KLYFWgX1YJ5PXAA8zILkcDQHCIJ/Mop3XM5Y/+SE1y6dQX/oYFwc5qS7Zs/G5xYygXkWe1k4leMsNWnfx0QYCkWdTmcrCx/Bl3ErdkKVV7Ypda18eVg5NqPXJ3yyW2cWdutgaExm8D1ifJC1oxqth1O0dUmvODd53s3Ax89WdH8K3nB0hyg1QVDVlfU5B8Nh6lJhLSWIk+EKFwPdNWJv2cxAQ3LFjQlqo1BSwQrdW0/QSJ21PT1ftYEcX3Fzg6ItXD1Igcd3v58QpS9Ay9NUOQHY/Ay2tblYvF1yuB+PsYwWpB8S5BDzoyiU7atBhDMx28UnXMpjM1DQMF2L8dQpVgKJv7Ac4RHxcMBuyt5MgOta3C2hiCAFfsNAns2KKiiXrrFr0hnyI8vBKGZsg0STE+HiMMpuK2A0rhiv8zmdOaCUpFdBzd2n6CcBnat8DBGuqHzfNQcodYImqwwSf12b1mtCRbWChcDlNDw8jSYKnUh7FCjAdfH9lzknKvKld8zONJQXgE8465qaRG70nnGPfNfg/TretfUQRz37jOhUhBehPmdZQKOueV3ELkFYFjRC/xKGdJWkJQKxQDA4bejlvdI8CUuuA00QVFtnD/VSn3xBvWjt5035nl0gfKXmr0Pisg1FsRv9344Q5oKrUIFD7fwbPaLR8P32snNzud3440WYcJel7oNaBT8oKOEqANdxgZIOMjNzcZPU0WTjpob4/cQlleqZH02KcgCoNukyJGD1nTTS5jmiJWQD+gGGew=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR19MB0957.namprd19.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(366004)(396003)(376002)(39860400002)(76116006)(66446008)(66556008)(64756008)(66476007)(38100700002)(66946007)(122000001)(8936002)(8676002)(316002)(86362001)(83380400001)(2906002)(33656002)(7696005)(110136005)(26005)(52536014)(6506007)(186003)(53546011)(5660300002)(55236004)(966005)(71200400001)(55016002)(45080400002)(9686003)(478600001)(38070700005); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2EKXtFM8apSP5QTEsHmFWO4gec37h4/X4vCDh/HPHuuECVn2LZ9WrejZP8Qr?= =?us-ascii?Q?ixzjrOP7IPakK5oksWOKs/m23SvyCV660kcE0KKMS/XpZexyWnBPGTT8u1uR?= =?us-ascii?Q?mh0+U+bQpzXnYc5sRCAVDbA7goHIsrN8gKIzmQLpnvKh9syb8ORO32NgCXjt?= =?us-ascii?Q?kp7Hq79mx+4FH1h/V9ktjqaDof3ujtcvPBW1l8AN3uL9LLC0pNPdAXUEsAVi?= =?us-ascii?Q?R4XE4Dj31ya5fjfMFuw0GCi2uMsHgIw7XIvUY/pc8TYVXa1nVmEYmMqHPOAa?= =?us-ascii?Q?B1YUbkeT4gM2cLbMiEZ8QtdoZAOvYUKZmAA78POxz6F0qWMt9u0IPtyzHZq9?= =?us-ascii?Q?2RICfhKzVWaOKHvDZZsj+v/twNIrR4oz4hb1GbriTAcxqeh2mmuwMEmNEfUP?= =?us-ascii?Q?xbcGQFsRVvAvVtGQT++BrF4ZHrez7cUcbeN6rdX5k+Bp9//L7e/xpqMX6fhP?= =?us-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transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: oneidentity.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: MWHPR19MB0957.namprd19.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: f14663bb-5a9b-4ca7-79c8-08d96690a1b6
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Aug 2021 23:49:22.3250 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 91c369b5-1c9e-439c-989c-1867ec606603
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: yuXkbnovOYu/BvHHaYE25VPg2pl2UUWZQ//95TyCtHctDv/Ha+aucJ5JwOLOoh6T7+p2qWcH4PpdfS84ljqHow==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR19MB4755
Archived-At: <https://mailarchive.ietf.org/arch/msg/scim/7gNtfKSIBMmjt4G1SFXxIYs-ssc>
Subject: Re: [scim] SCIM Synchronization Problem
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, 23 Aug 2021 23:49:52 -0000

The management server in your scenario is a SCIM client.  

If an application administrator goes in to the Application Server  and adds, removes, or modifies account,  the Management Server  has one option when using SCIM -- which is to query the Application Server (the SCIM server) for all accounts and then resolve the differences between this call and a previous call where all accounts were fetched.   This is very inefficient.  Especially when it comes to detecting deleted accounts, there is no other way in standard SCIM except to have your Management Server re-load all the accounts from your Application server.  

What you've implemented in your Management Server *is* a pure client-side cache scenario as I described it.  Except that you've recognized that the SCIM spec makes it very inefficient to keep your Management Serve up-to-date with changes happening "out-of-band" on the Application Servers.  

So... you implemented a notification system whereby your Management Server (SCIM Client) can be notified of changes that just happened on the Application Server (the SCIM server).
 
Your implementation, where the Application Server (SCIM server) notifies your Management Server (SCIM client) that a change has occurred *is* one of the proposed technical approaches identified by @Phil in a previous post to this list and was also mentioned in the BOF.  

I believe that an approach (similar to your implementation ) whereby a SCIM client can subscribe to be notified of changes on the SCIM server is an intuitive approach for solving the "Syncronization problem"

--
Matt


-----Original Message-----
From: Danny Mayer <mayer@pdmconsulting.net> 
Sent: Friday, August 20, 2021 8:46 AM
To: Matt Peterson (mpeterso) <Matt.Peterson@oneidentity.com>om>; SCIM WG <scim@ietf.org>
Subject: Re: [scim] SCIM Synchronization Problem

CAUTION: This email originated from outside of the organization. Do not follow guidance, click links, or open attachments unless you recognize the sender and know the content is safe.


It's not that simple. If an administrator goes in an adds a new account or updates an existing account and adds permissions to it, how will the management side know? The way I did it was to have the application monitor for those changes and notify the management server of the changes. I did this via a message queue for our internal applications.
The management server needs to decide how to handle these violations.

Danny

On 8/19/21 1:33 PM, Matt Peterson (mpeterso) wrote:
> Thank you, Danny, for creating a new thread.  The following are my comments from meeting minutes (some edits):
>
> There appears to be two use cases for "synchronization":
>
>    1.  Constructing and enforcing Application authorization models -  An application (acting as a SCIM client) caches users/groups data from the IdP in order to present "user/group pickers" when presenting screens used to configure the application  authorization rules (RBAC, Policy, or ACL).  Also, when the application enforces authorization, user and group data needs to be immediately available so that authorization decisions can be made quickly.
>
>    2.  Identity Management and Governance systems - implement a canonical identity model" where all accounts and groups are represented.  This model is used to build provisioning rules and calculate separation of duty violations, attestations, and approvals etc.   Management-time evaluation of the model needs to be done efficiently without external calls to the SCIM service provider.
>
> Both above use cases, are "client-cache" use cases that need only a "one-way" sync (from the SCIM server to the SCIM client).   To accomplish there are two distinct steps:  a) download the initial results (users/groups) and, b) keep the cached copy of these initial results (user/groups) up to date with changes that are being made on the SCIM Service provider.
>
> I think it could help us narrow down the list of suitable approaches if we could agree that "one-way" sync (keeping a client-side cache up to date) is our target.
>
> --
> Matt Peterson
>
> -----Original Message-----
> From: scim <scim-bounces@ietf.org> On Behalf Of Danny Mayer
> Sent: Wednesday, August 18, 2021 8:34 AM
> To: SCIM WG <scim@ietf.org>
> Subject: [scim] SCIM Synchronization Problem
>
> CAUTION: This email originated from outside of the organization. Do not follow guidance, click links, or open attachments unless you recognize the sender and know the content is safe.
>
>
> I decided that this needs it's own thread and not be part of the meeting minutes.
>
> I have had a great deal of experience dealing with the user account synchronization problem. Here's my view of the problems.
>
> I will be calling one system Management Server and the other system Application Server. I found client/server labels confusing. The Management Server is what I am defining to be the server that sends updates to add/update/remove users and groups to the Application server whose account, groups and access permissions are being managed.
>
> First some definitions of user accounts. There are usually more than one of each of these:
> 1. Builtin accounts
> 2. Special-purpose accounts
> 3. Employee
> 4. Contractor
> 5. Agent
> 6. Customer
>
> There may be more.
>
> 1. Builtin accounts: These are accounts that applications have and there may be more than one. There is always an admin account which can do anything, for example the administrator account in Active Directory or a database admin account. The application may have more accounts for other purposes.
>
> 2. Special-purpose accounts: These may be set up to provide access to other applications, for example a SCIM request to a SCIM REST API should be handled by a special account which cannot be used to login via a UI interface and only be able to perform certain functions. In addition there may be accounts set up to listen for topics or queues on a message queue among other possibilities. Keeping separate accounts like this are important for tracking in logs and applications.
>
> 3. Employee: These are accounts that employees may login to the application.
>
> 4. Contractors: These accounts that a contractor performing work for the company may use to log into an application. Unlike Employee accounts these would have an expiration date.
>
> 5. Agent: Accounts like this are for external users who may need to manage information for their own customers. An example of this is an insurance agent logging in to handle an insurance policy for their clients.
>
> 6. Customers: These are where the customers are using the application directly. For a bank it's likely to be millions of customers. The management platform should not be involved in managing these accounts.
>
> Let's now look at a few example applications.
>
> 1. Helpdesk
> All employees and contractors will need to be able to log into a helpdesk application and enter tickets. This means loading information about all employees and contractors. For a company with only 1000 employees that's manageable. For a company with 100K employees, it's a bigger challenge.
>
> 2. Customer Support
> Only employees or contractors in the department providing customer support need access plus a few other employees. In addition identified customers may need accounts.
>
> 3. Expenses
> Not all employees or contractors will be submitting expenses so it may not be necessary to have accounts for all possible users. This is something that the application owner needs to decide.
>
> Now let's look at logistics.
>
> Bulk load:
> Each application will need an initial set of accounts set up and for something like a helpdesk this could involve load 1000-100,000 accounts.
> The information needed could come from either the management server or separately, say from an HR system. Many servers that I have encountered limit the number of records to something like 1000, so the pagination requirement is needed for this. Even when dealing with a limited subset of employees or contractors you can run into this need.
>
> Synchronization
> An application that is bulk-loaded above may need to be synchronized to the management server if the data did not come from the management server.
>
> Change Management
> This is really a synchronization issue as well. Changes happen all the time and new employees/contractors need to be added, terminated ones removed and updates happen all the time. The best way of dealing with this may be to set up a message queue that each application can subscribe to and they can take the needed action when it's convenient for that application. It's not the only method but it's the one I found to be the most helpful. There are two ways of doing that: 1. send the complete user information for new accounts, send just the change for updating accounts, send the ID for terminated accounts along with some meta information. The other method which I have used is just to send the ID and whether it's new, updated or terminated.
>
> I hope this is helpful to the discussion.
>
> Danny
>
>
> _______________________________________________
> scim mailing list
> scim@ietf.org
> https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> ietf.org%2Fmailman%2Flistinfo%2Fscim&amp;data=04%7C01%7CMatt.Peterson%40oneidentity.com%7C0502a1bbffb94f6220b808d963e944e9%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637650675822236228%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=ol7Mrjj%2Bx2SGTgQegrvwVNlVeMODf6pxEOc5PTjkK1g%3D&amp;reserved=0
>