This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Configuring an External JDBC User Store

All Carbon-based products can work with external RDBMSes. You can configure Carbon to read users/roles from your organization's RDBMSes, and if you take one extra step, you can write to it. The user core will connect to two databases:

  • Carbon database where authorization information is stored in the internal Carbon database

and

  • Your company database where users/roles reside

Accordingly, user-mgt.xml must contain details for two database connections. The connection details specified in Realm Configuration are used by the Authorization manager. If you specify another set of database connection details inside UserStoreManager, it will read/write users to that database.

Follow the instructions below to connect to an external JDBC user store in read-only mode.

1. Back up IS_HOME/repository/conf/user-mgt.xml. A sample file for the JDBC user store is available here. Download the relavent file and save it as IS_HOME/repository/conf/user-mgt.xml. Please observe the following attributes in your file:

<UserStoreManager

class="org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager">

2. Find a valid user residing in the RDBMS. For example, if a valid user name is "AdminSOA," update the Admin user section of your LDAP configuration as follows.

Tip

You don't have to update the password element. Just leave it as it is.

<AdminUser>

<UserName>AdminSOA</UserName>

<Password>XXXXXX</Password>

</AdminUser>

3. Add the JDBC driver to classpath by dropping the jar into IS_HOME/repository/components/lib.

4. Update the connection details inside the <UserStoreManager> class.

5. Start the server.

For descriptions of the main configuration elements, please visit the following pages: