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

Viewed 91

I need to find the REST/SOAP API for Password Policies (Password History and Password Pattern) and Login Policies (Account Locking and Account Disabling).

I am using WSO2 IS 5.9.0.

I am creating a Multi-tenant environment from WSO2. I am able to perform all the steps from code but not able to find API for these two settings.

I have to manually do this but this is just a workaround and need to figure out the WSO2 APIs for these.

enter image description here

enter image description here

Need curl request or documentation for these 2 settings API.

1 Answers

From WSO2 IS 5.10.0 onwards there is a rest API to update these configurations.

However, in 5.9.0 and before that, only SOAP APIs are available. You can use https://localhost:9443/services/IdentityGovernanceAdminService SOAP service for this purpose. There are 2 operations available in this service. getConnectorList and updateConfigurations.

You can use getConnectorList to find the available connectors and their property names. Then you can use updateConfigurations operation to update property value. Message body would look like below to update Password History validation count configuration.

<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>
Related