【问题标题】:Finding the replacement of the SOAP APIs for WSO2 identity server for 6.0.0 version查找 6.0.0 版本的 WSO2 身份服务器的 SOAP API 替换
【发布时间】:2022-09-30 18:40:03
【问题描述】:

作为 WSO2 身份服务器 6.0.0 的一部分,不推荐使用 SOAP API,建议使用基于 REST 的 API。我们在项目中使用 RemoteUserStoreManagerService.wsdl 和 UserIdentityManagementAdminService.wsdl SOAP API,希望用推荐的 REST API 替换 SOAP API。您能帮我们找到替换 RemoteUserStoreManagerService.wsdl 和 UserIdentityManagementAdminService.wsdl SOAP API 的 REST API 列表吗? API 文档不清楚。

我们无法找到特定于用户的索赔管理 API 的替代品。为 Claim management 提供的 API 不是特定于用户的,我们希望通过在请求有效载荷。 您能否提供可用于索赔管理的此类 API 的详细信息。

    标签: wso2 wso2-identity-server


    【解决方案1】:

    您提到的 REST API 与 ClaimMetadataManagementService.wsdl https://is.docs.wso2.com/en/5.11.0/develop/managing-claims-with-apis/ 匹配

    用于管理用户声明(检索、更新、删除)的唯一可用 REST API 是 SCIM 2.0 用户 API https://is.docs.wso2.com/en/latest/apis/scim2-rest-apis/#/Users%20Endpoint/getUser

    您必须记住的是,SCIM 是一种用于用户管理的协议。即使您在 SOAP 服务中直接使用本地声明 URI 来管理用户声明,但在 SCIM API 调用中,您必须使用映射到本地声明的相应 SCIM 声明。

    通过导航到管理控制台 -> 主 -> 身份 -> 声明 -> 列表来检查 SCIM 声明方言。 在那里您可以找到 SCIM 声明到本地声明的映射

    例如: 获取特定用户的名称,用户名声明。需要的属性应该添加到基于 SCIM 协议的属性参数中:

    获取https://localhost:9443/scim2/Users/<user-id>?attributes=username,name

    添加用户声明: 参考https://is.docs.wso2.com/en/latest/apis/scim2-patch-operations/#add-user-attributeshttps://medium.com/p/1c43bb218658

    删除用户声明: 参考https://is.docs.wso2.com/en/latest/apis/scim2-patch-operations/#remove-user-attributeshttps://medium.com/p/1c43bb218658

    【讨论】:

    • 我尝试使用此文档对用户声明进行修补操作,is.docs.wso2.com/en/latest/apis/scim2-patch-operations/…medium.com/p/1c43bb218658 用于添加用户声明,我提供以下有效负载 { { "schemas": [ "urn:ietf:params:scim:api :messages:2.0:PatchOp" ], "Operations": [ { "op": "replace", "path": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:country", "价值”:“印度”}]}
    • 我们正在使用来自 SCIM 2.0 API is.docs.wso2.com/en/6.0.0/apis/restapis/scim2.yaml localhost:9443/t/carbon.super/scim2/Users/user 的这个 API 我们给出错误,{ "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" ], "detail": "text/plain is not supported.", "status": "406" } 是否使用了正确的 API 和有效负载?
    • 好像你用过--header 'Content-Type: text/plain' 。您必须使用 application/json 作为请求标头中的 Content-Type (--header 'Content-Type: application/json'),因为有效负载是 json
    • 无法使用补丁操作更新声明,发送以下有效负载。 {“模式”:[“urn:ietf:params:scim:api:messages:2.0:PatchOp”],“操作”:[{“操作”:“替换”,“路径”:“wso2.org/claims/givenname”,“价值":"KIMMY" } ] }
    • 得到以下响应,{“模式”:[“urn:ietf:params:scim:api:messages:2.0:错误”],“scimType”:“noTarget”,“detail”:“没有这样的属性名称:http ", "status": "400" } 您能否检查一下问题是什么,我们需要为更新声明提供什么路径。
    【解决方案2】:

    提出了类似的问题here。检查第一个答案。

    您提到的文档是一般管理索赔的文件。请参阅介绍段落。

    API overview 页面包含有关您需要的所有 API 的所有信息。下图显示了管理用户、角色和组所需的 API(比您在问题中提出的更多)。

    注意:最好不要使用 SCIM1.1

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-07-22
      • 2012-11-18
      • 1970-01-01
      • 1970-01-01
      • 2015-07-25
      • 1970-01-01
      相关资源
      最近更新 更多