Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Table of Contents
maxLevel3
minLevel3

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:

...

MethodaddUserStore
DescriptionAdd a secondary user store.
Permission Level/permission/admin
Input Parameters
ParameterTypeDescription
classNamestring

The user store manager class name.
A list of available class names can be obtained using the getAvailableUserStoreClasses function.

descriptionstringDescription of the user store.
disabledboolean

Mark as true to disable the user store.
Mark as false to enable the user store.

domainIDstringDomain name of the user store.
This is a unique name that identifies the user store.
propertiespropertyVarious properties related to the user store such as connection URL, connection password etc.
properties.namestringName of the property.
properties.valuestringValue 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
activetrue
titleJDBC Userstore
Code Block
languagexml
titleRequest
<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
titleActive Directory Userstore
Code Block
languagexml
titleRequest
<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
titleRead Only LDAP Userstore
Code Block
languagexml
titleRequest
<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
titleRead Write LDAP Userstore
Code Block
languagexml
titleRequest
<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
titleCarbon Remote Userstore
Code Block
languagexml
titleRequest
<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()
MethodchangeUserStoreState
DescriptionEnable or disable the user store.
Permission Level/permission/admin
Input Parameters
ParameterTypeDescription
domainstringDomain name of the user store.
isDisablestringMark as true to disable the user store.
Mark as false to enable the user store.
Output ParametersA boolean parameter indicating if the user store is read only or not
Code Block
languagexml
titleRequest
<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
languagexml
titleRequest
<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
languagexml
titleRequest
<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>

...

MethodeditUserStore
DescriptionEdit a user store.
Permission Level/permission/admin
Input Parameters
ParameterTypeDescription
classNamestringThe user store manager class name.
A list of available class names can be obtained using the getAvailableUserStoreClasses function.
descriptionstringDescription of the user store.
disabledboolean

Mark as true to disable the user store.
Mark as false to enable the user store.

domainIDstringDomain name of the user store.
This is a unique name that identifies the user store.
propertiespropertyVarious properties related to the user store such as connection URL, connection password etc.
properties.namestringName of the property.
properties.valuestringValue of the property.

...

MethodeditUserStoreWithDomainName
DescriptionEdit a user store and change its domain name.
Permission Level/permission/admin
Input Parameters
ParameterTypeDescription
previousDomainNamestringCurrent domain name of the user store.
classNamestringThe user store manager class name.
A list of available class names can be obtained using the getAvailableUserStoreClasses function.
descriptionstringDescription of the user store.
disabledboolean

Mark as true to disable the user store.
Mark as false to enable the user store.

domainIDstringNew domain name of the user store.
propertiespropertyVarious properties related to the user store such as connection URL, connection password etc.
properties.namestringName of the property.
properties.valuestringValue of the property.

...

Code Block
languagexml
titleRequest
<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
languagexml
titleRequest
<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
languagexml
titleResponse
<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>