The By default configuration of , WSO2 products has have a single, embedded user store. If required, you can configure WSO2 products to connect to several multiple secondary user stores as well. After configuration, users from different stores can log in and perform operations depending on their roles/permissions. You can also als o configure your own customized user stores and connect them with the products as secondary user stores.
The topics below explain how to configure secondary user stores can be configured using one of the following methods:
Table of Contents |
---|
manually or using the management console:
Table of Contents |
---|
Tip |
---|
Tip: If you set up a database other than the default H2 that comes with the product to store user information, select the script relevant to your database type from the |
Configuring using the management console
Log in to In the management console.On the Configure menu, click , click Configure, and then click User Store Management under Configure. The User Store Management page appears
The User Store Management page appears. Initially, there are no secondary user stores.Info Note: You cannot update the PRIMARY user store at run time, so it is not visible on this page.
Click Add Secondary
User Store. The User Store
Manager page appears.
- Select the required implementation of user store manager from
In the User Store Manager Class
drop-downlist
.
The displayed property list varies, based on the selected user store manager implementation. - By default, all the WSO2 products come with four user store manager implementations, which are as follows:
- ReadWriteLDAPUserStoreManager
- ReadOnlyLDAPUserStoreManager
- ActiveDirectoryUserStoreManager
- JDBCUserStoreManager
You can also populate this drop-down Enter a unique domain name
and fill in the other data to define the user store. For details on each property, see the respective property description that is provided.with no underscore (_) characters, and optionally enter a description for this user store.
Enter values for the properties, using the descriptions in the Descriptions column for guidance. The properties that appear vary based on the user store manager class you selected, and there may be additional properties in an Optional or Advanced section at the bottom of the screen.
Ensure that all the mandatory fields are filled
and a valid domain name is given and click in and click Add.
A message appears saying indicating that the server is updating the user stores are being added.
Info The above message does not imply that user store is added successfully. This can be checked in the following step.
- Refresh the page. If the new user store has been successfully added, it will appear in the User Stores Management page.
, select the type of user store you are creating:
User store manager | Description |
---|---|
org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager | Use |
org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager | Use |
org.wso2.carbon.user.core.ldap.ActiveDirectoryUserStoreManager | Use |
org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager | Use |
You can also populate this list with custom user store manager implementations by adding them to the server.
A sample custom user store manager can be found
in thein the repository.
Info |
---|
The domain name should not include the '_' (underscore) character. |
...
. At this point, the server is attempting to add the new user store to the end of the available chain of stores.
Refresh the page after a few seconds to verify that the user store was added successfully and now appears in the list of secondary user stores.
You can now edit the properties of the new secondary user store and enable/disable it as needed.
Configuring manually
By default, the configuration of the primary user store is saved in the <
file. When you create a secondary user store using the management console as explained above, its configuration is saved to a an XML file with the same name as the domain name you specifiedspecify. If desiredAlternatively, you can create this XML file manually and save it as follows:using the following guidelines:PRODUCT_HOME>/repository/
conf/user-mgt.xml
- Each file must contain the definition for only one user store domain.
- When you configure multiple user stores, you must give a unique domain name to each user store in the
<DomainName>
element. If you configure a user store without specifying a domain name, the server throws an exception at start up. - If it is a
- the configuration of a super tenant, save the secondary user store definitions should go into
- in the <
PRODUCT_HOME>/repository/deployment/server/userstores
directory. - If it is a general tenant, save the configuration should go into
- in the <
PRODUCT_HOME>/repository/tenants/<tenantid>/userstores
directory. - The secondary user store configuration file , should
- must have the same name as the domain with an underscore (_) in place of the period. For example, if the domain is wso2
- is
wso2.com,
name - name the file as follows:
wso2_com.xml
One file only contains the definition for one user store domain.