一旦 SCIM 与我的服务提供商集成,我该如何创建新资源?

问题描述

我是 SCIM 新手。

在 SCIM 工作流程中,我只是好奇如何在服务提供商端创建新用户。 如果我在服务提供商端的本地用户表中创建新用户,然后发送 SCIM 发布用户请求。此请求可能由于多种原因而失败,例如:网络断开、服务关闭、数据验证失败等。

所以我打算在服务提供商端使用SCIM api来创建新用户。工作流程将如下所示Desgin#1

Desgin#2 我认为这是不正确的,因为我可以发现在这种设计中会出现一些问题,例如竞态条件。

我的想法正确吗?

  (1) Design#1: I intend to use this. All user operations are performed by IdP side.
                I can avoid some problem like race condition.
      ┌───────────────────┐              ┌───────────────────────┐
      │                   │              │                       │
      │   SCIM IdP Side   │              │ Service Provider Side │
      │                   │              │                       │
      │ (ex: Okta,Azure )│              │ (ex: my website)      │
      │                   │              │                       │
      │  [IdP]            │              │  [SP]                 │
      │                   │              │                       │
      └────────┬──────────┘              └────────────┬──────────┘
               │                                      │
               │                                      │
               │                                      │
               │◄─────────────────────────────────────┤
               │  (1) POST USER Through SCIM Protocol │
               │                                      │
               │                                      │
               │                                      │
               │                                      │
               │                                      │
               ├─────────────────────────────────────►│
               │  (2) IdP created successfully,│
               │      got by SP and the create        │
               │      user entry in SP's database     │
               │                                      │
               │      Also notify other SP by SCIM    │
               │      protocol(new user created)      │
               ▼                                      ▼



  (2) Design#2: I think this will cause race conditon,once we have lots of SP resouce creating

     ┌───────────────────┐              ┌───────────────────────┐
     │                   │              │                       │
     │   SCIM IdP Side   │              │ Service Provider Side │
     │                   │              │                       │
     │ (ex: Okta,Azure )│              │ (ex: my website)      │
     │                   │              │                       │
     │  [IDP]            │              │  [SP]                 │
     │                   │              │                       │
     └────────┬──────────┘              └────────────┬──────────┘
              │                                      │
              │                                      ├────────┐
              │                                      │        │ (1) SP create new user in
              │                                      │        │     local Database
              │                                      │        │
              │                                      │        │
              │                                      │        │
              │                                      │        │
              │◄─────────────────────────────────────┤◄───────┘
              │  (2) After user is created locally,│
              │      POST USER Through SCIM Protocol │
              │      to remote IdP Side.             │
              │                                      │
              │                                      │
              ├─────────────────────────────────────►│
              │  (3) Also notify other SP by SCIM    │
              │      protocol(new user created)      │
              ▼                                      ▼

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)