在 WSO2 IS 5.9.0 中如何在 API 的帮助下配置密码策略和登录策略?

In WSO2 IS 5.9.0 how to configure Password Policies And Login Policies with help of an API?

我需要找到 REST/SOAP API 密码策略(密码历史和密码模式)和登录策略(帐户锁定和帐户禁用)。

我正在使用 WSO2 IS 5.9.0。

我正在从 WSO2 创建一个多租户环境。我能够执行代码中的所有步骤,但无法找到这两个设置的 API。

我必须手动执行此操作,但这只是一种解决方法,需要为这些找出 WSO2 APIs。

需要这 2 个设置的 curl 请求或文档 API。

从 WSO2 IS 5.10.0 开始有休息API更新这些配置。

但是,在 5.9.0 及之前的版本中,只有 SOAP API 可用。为此,您可以使用 https://localhost:9443/services/IdentityGovernanceAdminService SOAP 服务。此服务中有 2 个可用操作。 getConnectorListupdateConfigurations.

您可以使用 getConnectorList 查找可用的连接器及其 属性 名称。然后你可以使用 updateConfigurations 操作来更新 属性 值。消息正文如下所示,以更新 Password History validation count 配置。

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:gov="http://governance.identity.carbon.wso2.org" xmlns:xsd="http://model.common.application.identity.carbon.wso2.org/xsd">
   <soapenv:Header/>
   <soapenv:Body>
      <gov:updateConfigurations>
         <gov:configurations>
            <xsd:name>passwordHistory.count</xsd:name>
            <xsd:value>6</xsd:value>
         </gov:configurations>
      </gov:updateConfigurations>
   </soapenv:Body>
</soapenv:Envelope>