The The UserStoreConfigAdminService allows allows you to add, retrieve, edit, and delete user stores within the WSO2 Identity Server. This section guides you through invoking and working with the UserStoreConfigAdminService and and the operations you can work within this service.
Invoking the admin service
UserStoreConfigAdminService
is an admin service of the WSO2 Carbon platform. As admin services are secured to prevent anonymous invocations, you cannot view the WSDL of the admin service by default. Follow the steps below to view and invoke it:
...
Method | addUserStore |
---|
Description | Add a secondary user store. |
---|
Permission Level | /permission/admin |
---|
Input Parameters | Parameter | Type | Description |
---|
className | string | The user store manager class name. A list of available class names can be obtained using the getAvailableUserStoreClasses function. | description | string | Description of the user store. | disabled | boolean | Mark as true to disable the user store. Mark as false to enable the user store. | domainID | string | Domain name of the user store. This is a unique name that identifies the user store. | properties | property | Various properties related to the user store such as connection URL, connection password etc. | properties.name | string | Name of the property. | properties.value | string | Value of the property. |
Tip |
---|
For a full list of possible input parameters including optional parameters, see the relevant topic from the following list depending on the type of user store you are creating: Note that some of these parameters such as connection URL, username, password, and driver name are mandatory when creating a secondary keystore. See the relevant sample request in the code block below. |
|
---|
Localtabgroup |
---|
Localtab |
---|
active | true |
---|
title | JDBC Userstore |
---|
| Code Block |
---|
| <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://org.apache.axis2/xsd"
xmlns:xsd1="http://dto.configuration.store.user.identity.carbon.wso2.org/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:addUserStore>
<!--Optional:-->
<xsd:userStoreDTO>
<!--Optional:-->
|
| <xsd1:className>?< <xsd1:className>org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager</xsd1:className>
<!--Optional:-->
<xsd1: |
| description>?<description></xsd1:description>
<!--Optional:-->
<xsd1: |
| disabled>?<disabled>false</xsd1:disabled>
<!--Optional:-->
<xsd1: |
| domainId>?<domainId>JDBC-SECONDARY</xsd1:domainId>
<!--Zero or more repetitions:-->
<xsd1:properties>
<!--Optional:-->
<xsd1:name>url</xsd1:name>
<!--Optional:-->
<xsd1 |
| :value>?<:value>jdbc:mysql://192.168.48.154:3306/test</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>userName</xsd1:name>
<!--Optional:-->
<xsd1: |
| value>?<value>root</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>password</xsd1:name>
<!--Optional:-->
<xsd1: |
| value>?<value>root</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>driverName</xsd1:name>
<!--Optional:-->
<xsd1: |
| value>?<value>com.mysql.jdbc.Driver</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>maxActive</xsd1:name>
<!--Optional:-->
<xsd1: |
| value>?<value>50</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>maxWait</xsd1:name>
<!--Optional:-->
<xsd1: |
| value>?<value>60000</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>validationQuery</xsd1:name>
<!--Optional:-->
<xsd1: |
| value>?<value>SELECT 1</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>PasswordJavaScriptRegEx</xsd1:name>
<xsd1: |
| value>?<value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>UsernameJavaScriptRegEx</xsd1:name>
<xsd1: |
| value>?<value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>RoleNameJavaScriptRegEx</xsd1:name>
<xsd1: |
| value>?<value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>PasswordJavaRegEx</xsd1:name>
|
| <xsd1:value>?</xsd1:value><xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
</xsd:userStoreDTO>
</xsd:addUserStore>
</soap:Body>
</soap:Envelope> |
|
Localtab |
---|
title | Active Directory Userstore |
---|
| Code Block |
---|
| <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://org.apache.axis2/xsd"
xmlns:xsd1="http://dto.configuration.store.user.identity.carbon.wso2.org/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:addUserStore>
<!--Optional:-->
<xsd:userStoreDTO>
<!--Optional:-->
<xsd1:className>org.wso2.carbon.user.core.ldap.ActiveDirectoryUserStoreManager</xsd1:className>
<!--Optional:-->
<xsd1:description></xsd1:description>
<!--Optional:-->
<xsd1:disabled>false</xsd1:disabled>
<!--Optional:-->
<xsd1:domainId>AD-SECONDARY</xsd1:domainId>
<!--Zero or more repetitions:-->
<xsd1:properties>
<!--Optional:-->
<xsd1:name>url</xsd1:name>
<!--Optional:-->
<xsd1:value>jdbc:mysql://192.168.48.154:3306/test</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>userName</xsd1:name>
<!--Optional:-->
<xsd1:value>root</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>password</xsd1:name>
<!--Optional:-->
<xsd1:value>root</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>driverName</xsd1:name>
<!--Optional:-->
<xsd1:value>com.mysql.jdbc.Driver</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>maxActive</xsd1:name>
<!--Optional:-->
<xsd1:value>50</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>maxWait</xsd1:name>
<!--Optional:-->
<xsd1:value>60000</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>validationQuery</xsd1:name>
<!--Optional:-->
<xsd1:value>SELECT 1</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>PasswordJavaScriptRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>UsernameJavaScriptRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>RoleNameJavaScriptRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>PasswordJavaRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
</xsd:userStoreDTO>
</xsd:addUserStore>
</soap:Body>
</soap:Envelope> |
|
Localtab |
---|
title | Read Only LDAP Userstore |
---|
| Code Block |
---|
| <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://org.apache.axis2/xsd"
xmlns:xsd1="http://dto.configuration.store.user.identity.carbon.wso2.org/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:addUserStore>
<!--Optional:-->
<xsd:userStoreDTO>
<!--Optional:-->
<xsd1:className>org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager</xsd1:className>
<!--Optional:-->
<xsd1:description></xsd1:description>
<!--Optional:-->
<xsd1:disabled>false</xsd1:disabled>
<!--Optional:-->
<xsd1:domainId>ReadOnly-LDAP-SECONDARY</xsd1:domainId>
<!--Zero or more repetitions:-->
<xsd1:properties>
<!--Optional:-->
<xsd1:name>url</xsd1:name>
<!--Optional:-->
<xsd1:value>jdbc:mysql://192.168.48.154:3306/test</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>userName</xsd1:name>
<!--Optional:-->
<xsd1:value>root</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>password</xsd1:name>
<!--Optional:-->
<xsd1:value>root</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>driverName</xsd1:name>
<!--Optional:-->
<xsd1:value>com.mysql.jdbc.Driver</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>maxActive</xsd1:name>
<!--Optional:-->
<xsd1:value>50</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>maxWait</xsd1:name>
<!--Optional:-->
<xsd1:value>60000</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>validationQuery</xsd1:name>
<!--Optional:-->
<xsd1:value>SELECT 1</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>PasswordJavaScriptRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>UsernameJavaScriptRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>RoleNameJavaScriptRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>PasswordJavaRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
</xsd:userStoreDTO>
</xsd:addUserStore>
</soap:Body>
</soap:Envelope> |
|
Localtab |
---|
title | Read Write LDAP Userstore |
---|
| Code Block |
---|
| <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://org.apache.axis2/xsd"
xmlns:xsd1="http://dto.configuration.store.user.identity.carbon.wso2.org/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:addUserStore>
<!--Optional:-->
<xsd:userStoreDTO>
<!--Optional:-->
<xsd1:className>org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager</xsd1:className>
<!--Optional:-->
<xsd1:description></xsd1:description>
<!--Optional:-->
<xsd1:disabled>false</xsd1:disabled>
<!--Optional:-->
<xsd1:domainId>Read-write-LDAP-SECONDARY</xsd1:domainId>
<!--Zero or more repetitions:-->
<xsd1:properties>
<!--Optional:-->
<xsd1:name>url</xsd1:name>
<!--Optional:-->
<xsd1:value>jdbc:mysql://192.168.48.154:3306/test</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>userName</xsd1:name>
<!--Optional:-->
<xsd1:value>root</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>password</xsd1:name>
<!--Optional:-->
<xsd1:value>root</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>driverName</xsd1:name>
<!--Optional:-->
<xsd1:value>com.mysql.jdbc.Driver</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>maxActive</xsd1:name>
<!--Optional:-->
<xsd1:value>50</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>maxWait</xsd1:name>
<!--Optional:-->
<xsd1:value>60000</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>validationQuery</xsd1:name>
<!--Optional:-->
<xsd1:value>SELECT 1</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>PasswordJavaScriptRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>UsernameJavaScriptRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>RoleNameJavaScriptRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>PasswordJavaRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
</xsd:userStoreDTO>
</xsd:addUserStore>
</soap:Body>
</soap:Envelope> |
|
Localtab |
---|
title | Carbon Remote Userstore |
---|
| Code Block |
---|
| <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://org.apache.axis2/xsd"
xmlns:xsd1="http://dto.configuration.store.user.identity.carbon.wso2.org/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:addUserStore>
<!--Optional:-->
<xsd:userStoreDTO>
<!--Optional:-->
<xsd1:className>org.wso2.carbon.identity.user.store.remote.CarbonRemoteUserStoreManger</xsd1:className>
<!--Optional:-->
<xsd1:description></xsd1:description>
<!--Optional:-->
<xsd1:disabled>false</xsd1:disabled>
<!--Optional:-->
<xsd1:domainId>CARBON-REMOTE-SECONDARY</xsd1:domainId>
<!--Zero or more repetitions:-->
<xsd1:properties>
<!--Optional:-->
<xsd1:name>url</xsd1:name>
<!--Optional:-->
<xsd1:value>jdbc:mysql://192.168.48.154:3306/test</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>userName</xsd1:name>
<!--Optional:-->
<xsd1:value>root</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>password</xsd1:name>
<!--Optional:-->
<xsd1:value>root</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>driverName</xsd1:name>
<!--Optional:-->
<xsd1:value>com.mysql.jdbc.Driver</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>maxActive</xsd1:name>
<!--Optional:-->
<xsd1:value>50</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>maxWait</xsd1:name>
<!--Optional:-->
<xsd1:value>60000</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<!--Optional:-->
<xsd1:name>validationQuery</xsd1:name>
<!--Optional:-->
<xsd1:value>SELECT 1</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>PasswordJavaScriptRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>UsernameJavaScriptRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>RoleNameJavaScriptRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
<xsd1:properties>
<xsd1:name>PasswordJavaRegEx</xsd1:name>
<xsd1:value>^[\S]{5,30}$</xsd1:value>
</xsd1:properties>
</xsd:userStoreDTO>
</xsd:addUserStore>
</soap:Body>
</soap:Envelope> |
|
|
changeUserStoreState()
Method | changeUserStoreState |
---|
Description | Enable or disable the user store. |
---|
Permission Level | /permission/admin |
---|
Input Parameters | Parameter | Type | Description |
---|
domain | string | Domain name of the user store. | isDisable | string | Mark as true to disable the user store. Mark as false to enable the user store. |
|
---|
Output Parameters | A boolean parameter indicating if the user store is read only or not |
---|
Code Block |
---|
|
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://org.apache.axis2/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:changeUserStoreState>
<!--Optional:-->
<xsd:domain>?<domain>CARBON-REMOTE-SECONDARY</xsd:domain>
<!--Optional:-->
<xsd:isDisable>?<isDisable>true</xsd:isDisable>
</xsd:changeUserStoreState>
</soapenv:Body>
</soapenv:Envelope> |
...
Code Block |
---|
|
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://org.apache.axis2/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:deleteUserStore>
<!--Optional:-->
<xsd:domainName>?<domainName>CARBON-REMOTE-SECONDARY</xsd:domainName>
</xsd:deleteUserStore>
</soapenv:Body>
</soapenv:Envelope> |
...
Code Block |
---|
|
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://org.apache.axis2/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:deleteUserStoresSet>
<!--Zero or more repetitions:-->
<xsd:domains>?<domains>ADSECONDARY,JDBCSECONDARY</xsd:domains>
</xsd:deleteUserStoresSet>
</soapenv:Body>
</soapenv:Envelope> |
...
Method | editUserStore |
---|
Description | Edit a user store. |
---|
Permission Level | /permission/admin |
---|
Input Parameters | Parameter | Type | Description |
---|
className | string | The user store manager class name. A list of available class names can be obtained using the getAvailableUserStoreClasses function. | description | string | Description of the user store. | disabled | boolean | Mark as true to disable the user store. Mark as false to enable the user store. | domainID | string | Domain name of the user store. This is a unique name that identifies the user store. | properties | property | Various properties related to the user store such as connection URL, connection password etc. | properties.name | string | Name of the property. | properties.value | string | Value of the property. |
|
---|
...
Method | editUserStoreWithDomainName |
---|
Description | Edit a user store and change its domain name. |
---|
Permission Level | /permission/admin |
---|
Input Parameters | Parameter | Type | Description |
---|
previousDomainName | string | Current domain name of the user store. | className | string | The user store manager class name. A list of available class names can be obtained using the getAvailableUserStoreClasses function. | description | string | Description of the user store. | disabled | boolean | Mark as true to disable the user store. Mark as false to enable the user store. | domainID | string | New domain name of the user store. | properties | property | Various properties related to the user store such as connection URL, connection password etc. | properties.name | string | Name of the property. | properties.value | string | Value of the property. |
|
---|
...
Code Block |
---|
|
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://org.apache.axis2/xsd">
<soap:Header/>
<soap:Body>
<xsd:getUserStoreManagerProperties>
<!--Optional:-->
<xsd:className>?<className>org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager</xsd:className>
</xsd:getUserStoreManagerProperties>
</soap:Body>
</soap:Envelope> |
...
Code Block |
---|
|
<soap<soapenv:Envelope xmlns:soapsoapenv="http://wwwschemas.w3xmlsoap.org/2003soap/05envelope/soap-envelope" xmlns:xsd="http://org.apache.axis2/xsd">
<soap<soapenv:Header/>
<soap<soapenv:Body>
<xsd:testRDBMSConnection>
<!--Optional:-->
<xsd:domainName>?<domainName>JDBCSECONDARY</xsd:domainName>
<!--Optional:-->
<xsd:driverName>?<driverName>com.mysql.jdbc.Driver</xsd:driverName>
<!--Optional:-->
<xsd:connectionURL>?<:connectionURL>jdbc:mysql://192.168.48.154:3306/test</xsd:connectionURL>
<!--Optional:-->
<xsd:username>?<username>root</xsd:username>
<!--Optional:-->
<xsd:connectionPassword>?<connectionPassword>root</xsd:connectionPassword>
<!--Optional:-->
<xsd:messageID>?<messageID></xsd:messageID>
</xsd:testRDBMSConnection>
</soapsoapenv:Body>
</soapsoapenv:Envelope> |
Code Block |
---|
|
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:testRDBMSConnectionResponse
xmlns:ns="http://org.apache.axis2/xsd">
<ns:return>true</ns:return>
</ns:testRDBMSConnectionResponse>
</soapenv:Body>
</soapenv:Envelope> |