在更新服务提供商的权限时,有时不会删除叶节点。
例如,
服务提供商中存在以下权限,
BILL/ADD
BILL/REMOVE
REPORT/ADD
REPORT/REMOVE
仅在获得以下许可的情况下进行更新
REPORT/ADD
REPORT/REMOVE
示例SOAP调用:
端点:
services / IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint /
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://org.apache.axis2/xsd" xmlns:xsd1="http://model.common.application.identity.carbon.wso2.org/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:updateApplication>
<xsd:serviceProvider>
<xsd1:applicationID>1</xsd1:applicationID>
<xsd1:applicationName>SP1</xsd1:applicationName>
<xsd1:permissionAndRoleConfig>
<xsd1:permissions>
<xsd1:value>REPORT/ADD</xsd1:value>
</xsd1:permissions>
<xsd1:permissions>
<xsd1:value>REPORT/REMOVE</xsd1:value>
</xsd1:permissions>
</xsd1:permissionAndRoleConfig>
<xsd1:inboundProvisioningConfig>
</xsd1:inboundProvisioningConfig>
<xsd1:outboundProvisioningConfig>
</xsd1:outboundProvisioningConfig>
</xsd:serviceProvider>
</xsd:updateApplication>
</soapenv:Body>
</soapenv:Envelope>
BILL / ADD和BILL / REMOVE已被删除。但是更新成功后,权限列表中仍然存在“ BILL”。
更新后:
BILL
REPORT/ADD
REPORT/REMOVE
有时,添加/删除多个权限会折叠其他权限节点
答案 0 :(得分:3)
代替更新应用程序,在应用程序中添加/删除资源将解决此问题。
例如用于应用程序示例,
SOAP API URL:
/services/ResourceAdminService.ResourceAdminServiceHttpsSoap12Endpoint /
添加资源:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="http://services.resource.registry.carbon.wso2.org">
<soap:Header/>
<soap:Body>
<ser:addCollection>
<!--Optional:-->
<ser:parentPath>/_system/governance/permission/applications/sample/REPORT</ser:parentPath>
<!--Optional:-->
<ser:collectionName>CREATE</ser:collectionName>
<!--Optional:-->
<ser:mediaType>?</ser:mediaType>
<!--Optional:-->
<ser:description>?</ser:description>
</ser:addCollection>
</soap:Body>
</soap:Envelope>
删除资源:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="http://services.resource.registry.carbon.wso2.org">
<soap:Header/>
<soap:Body>
<ser:delete>
<!--Optional:-->
<ser:pathToDelete>/_system/governance/permission/applications/sample/BILL</ser:pathToDelete>
</ser:delete>
</soap:Body>
</soap:Envelope>