Versions Compared

Key

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

WSO2 Carbon's default configuration has The default configurations of WSO2 products have a single, embedded 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 users from different stores can log in and perform operations depending on their roles/permissions. In addition, users are able to configure their own user stores out-of-the-box. This section explains how to set up multiple user stores in WSO2 products.You can also configure your own customized user stores and connect them with the products as secondary stores.

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

Table of Contents
maxLevel4
minLevel4

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.

...

...

Manually

...

Configuring using the management console

  1. Log in to the WSO2 Carbon management console.On the Configure menu, management console and click User Store Management under  sub menu under Configure menu.
  2. When The User Store Management page opens. Initially, there are no multiple secondary user stores defined, the default view is as follows:.

    Info

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

  3. Click Add Secondary User Store.

  4. The User Store

  5. .Select
  6. Manager page opens. Enter a unique domain name and fill in the rest of the data.

    Info

    Domain names must be unique and must not include underscore character (_).

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

  7. the drop
  8. the User Store Manager Class drop-down

  9. menu
  10. list.

  11.  The
  12. The displayed property list

  13. will vary, based
  14. varies depending on the selected user store manager implementation.


  15. By default, all

  16. the
  17. WSO2 products

  18. are shipped
  19. come with four user store manager implementations

  20. , which are
  21. as follows:

    • ReadWriteLDAPUserStoreManager
    • ReadOnlyLDAPUserStoreManager
    • ActiveDirectoryUserStoreManager
    • JDBCUserStoreManager
  22. Additionally, if you want other
  23. You can also populate this drop-down list with custom user store manager implementations

  24. to be available, it is also possible. A
  25. by adding them to the server. A sample custom user store manager can be found in the repository.

  26. When it is added to the server, it also appears in this drop-down menu.
  27. 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.

    Info

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

  28. Click Add . 
    If all the mandatory parameters
  29. Image Added

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

  31. provided, the following notification displays. At this moment, WSO2 Carbon is attempting to add the new user store to the available chain of user stores.

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

    Info
  32. given and click Add

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

    Info

    Note: 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.

  34. Refresh the page after a few seconds to check the status. 

  35. If the new user store

    has been

    is successfully added, it will appear in

    the table.

...

  1. the User Store Management page.

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

...

  1. new secondary user

...

  1. store and enable/disable

...

  1. it in a dynamic manner.

Configuring

...

manually

By default, the configuration of the primary user store is saved in the user-mgt.xml file. When you create a secondary user store using the management console as explained above, its configuration is saved to 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:

    • 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 the configuration of a super tenant, save the secondary user store definitions should go into the in <PRODUCT_HOME>/repository/deployment/server/userstores/ userstores directory.
    • If it is a general tenant, save the configuration should go into the <CARBONin <PRODUCT_HOME>/repository/tenants/<tenantid>/userstores directory.
    • The 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  wso2is wso2.com, name  name the file as follows:  as wso2_com.xml.
    • One file only contains the definition for one user store domain.