Versions Compared

Key

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

WSO2 Storage Server now supports dynamic configuration of multiple user stores. This also allows users to configure their own user stores, out-of-the-box. WSO2 Storage Server's default configuration The default configuration of WSO2 products has a single user store. If required, it can be configured you can configure WSO2 products to connect to multiple several secondary user stores as well. After configuration, so that users in any of the configured user stores are able to login from different stores can log in and perform operations depending on their roles/permissions. This section explains how to setup multiple user stores in WSO2 Storage Server.

To configure multiple user stores:

...

You can also configure your own customized user stores and connect them to the products as secondary stores.

Tip
titleBefore you begin:

If you are setting 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 <PRODUCT_HOME>/dbscripts folder and run it on your database. It creates the necessary tables.

The topics below show how to configure secondary user stores manually or using the management console: 

Table of Contents
maxLevel4
minLevel4

Configuring using the management console

  1. Log in to the management console and click User Store Management sub menu under Configure menu.
  2. The User Store Management page opens. Initially, there are no secondary user stores.

    Info

    You cannot update the ' PRIMARY ' user store at run time, so it is not visible in on this viewpage.

    Image Removed

     

  3. When you click the '
  4. Click Add Secondary User Store.

  5. The User Store

  6. ' link, a form is provided to define the user stores.
    Image RemovedFirst
  7. Manager page opens. Enter a unique domain name and fill in the rest of the data.

    Info

    Do not include underscore character (_) in domain names.

    For details on each property, see the respective property description that is provided. Also, select the required implementation of user store manager from

  8. the drop-down menu
  9. the User Store Manager Class drop-down list. The displayed property list varies depending on the selected user store manager implementation. By default, all

  10. the Carbon
  11. Additionally, if you want other custom user store manager implementations to be available, it is also possible. A sample custom user store manager can be found in the repository. Once it is added to the server it also appears in this drop-down menu.
  12. After selecting the preferred user store manager implementation, it displays a list of properties to be filled. It also provides a description of what each property stands for.
    Image Removed
  13. Give a unique domain name and fill all the mandatory fields with the values corresponding to the user store. 

    Info

    Domain name should not include the '_' (underscore) character.

  14. Click Add.
  15. If all the mandatory parameters
  16. WSO2 products come with four user store manager implementations as follows:

    User store managerDescription
    org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager
    1. ReadWriteLDAPUserStoreManager
    2. ReadOnlyLDAPUserStoreManager
    3. ActiveDirectoryUserStoreManager
    4. JDBCUserStoreManager
  17. Use ReadOnlyLDAPUserStoreManager to do read-only operations for LDAP user stores.

    org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager

    Use ReadWriteLDAPUserStoreManager for LDAP user stores to do both read and write operations.

    org.wso2.carbon.user.core.ldap.ActiveDirectoryUserStoreManager

    Use ActiveDirectoryUserStoreManager to configure an Active Directory Domain Service (AD DS) or Active Directory Lightweight Directory Service (AD LDS). This can be used only for read/write operations. If you need to use AD as read-only, you must use org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager.

    org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager

    Use JDBCUserStoreManager for JDBC user stores. The JDBC user store can be configured for read-only mode or read/write mode using the following property: <Property name="ReadOnly">false/true</Property>. 

    You can also populate this drop-down list with custom user store manager implementations by adding them to the server. A sample custom user store manager can be found in the repository.

    Image Added

  18. Ensure that all the mandatory fields are filled and a valid domain name is

  19. provided, the following notification displays. At this moment, WSO2 Storage Server is attempting to add the new user store to the available chain of user stores.
    Image Removed

    This is added to the very end of the chain of user stores. 

    InfoAlso note that this
  20. given and click Add

  21. A message appears saying that the user stores are being added. 
    Image Added

    Info

    The above message does not imply that the user store is added successfully. This can be checked in the following stepIt simply means that the server is attempting to add the new user store to the end of the available chain of stores.

  22. Refresh the page

    to see

    after a few seconds to check the status. 

  23. If the new user store

    in the table, if it

    is successfully added

    .
    Image RemovedNow we have a newly defined secondary (every user store which is not a primary user store is defined as secondary) user store in action. You can also

    , it will appear in the User Store Management page.

  24. After adding to the server, you can edit the properties of the

    defined

    new secondary user

    stores

    store and enable/disable

    them

    it in a dynamic manner.

...

Configuring manually

By default, user-mgt.xml manually and just drop it to the relevant configuration folder. file contains the configuration of the primary user store. When you create a secondary user store, its configuration is saved to an XML file with the same name as the domain you specified. If required, you can create this XML file manually and save it as follows:

    • If it is configuration of a super tenant,
  • the secondary user store definitions should go to 'CARBON_HOME
    • save the configuration in <PRODUCT_HOME>/repository/deployment/server/
  • userstores'
    • userstores directory.
    • If it is a general tenant, save the configuration
  • should go to 'CARBON_HOME
    • in <PRODUCT_HOME>/repository/tenants/<tenantid>/
  • userstores'
    • userstores directory.
  • Also the file name needs to be in accordance with the domain name to avoid conflicts (e.g.: if domain name is 

The secondary user store configuration file must have the same name as the domain with an underscore (_) in place of the period. For example, if the domain is wso2.com, name the file

...

as  wso2_com.xml

...

.

...

 Only one file

...

contains the definition for one user store domain.