This documentation is for WSO2 API Manager 1.8.0 View documentation for the latest release.
Page Comparison - Configuring Workflows for Tenants (v.16 vs v.17) - API Manager 1.8.0 - WSO2 Documentation

Versions Compared

Key

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

...

  1. Create a database for the shared user and permission store as follows:

    Code Block
    languagesql
    mysql> create database workflow_ustore;
    Query OK, 1 row affected (0.00 sec)
    Tip

    Make sure you copy the database driver (in this case, mysql driver) to the /repository/components/lib folder before starting each server.

  2. Run the <APIM_HOME>/dbscripts/mysql.sql script (the script may vary depending on your database type) on the database to create the required tables.

  3. Open the <APIM_HOME>/repository/conf/datasources/master-datasources.xml and create a datasource pointing to the newly created database. For example,

    Code Block
    languagexml
    <datasource>
        <name>USTORE</name>
        <description>The datasource used for API Manager database</description>
        <jndiConfig>
            <name>jdbc/ustore</name>
        </jndiConfig>
        <definition type="RDBMS">
            <configuration>
                <url>jdbc:mysql://127.0.0.1:3306/workflow_ustore?autoReconnect=true&amp;relaxAutoCommit=true</url>
                <username>root</username>
                <password>root</password>
                <driverClassName>com.mysql.jdbc.Driver</driverClassName>
                <maxActive>50</maxActive>
                <maxWait>60000</maxWait>
                <testOnBorrow>true</testOnBorrow>
                <validationQuery>SELECT 1</validationQuery>
                <validationInterval>30000</validationInterval>
            </configuration>
        </definition>
    </datasource>
  4. Repeat step 2 3 in the BPS as well.
  5. Point the datasource name in <APIM_HOME>/repository/conf/user-mgt.xml to the new datasource. (note that the user store is configured using the <UserStoreManager> element).

    Tip

    If you already have a user store such as the lDAP in your environment, you can point to it from the user-mgt.xml file, instead of the user store that we created in step1.

    In the following example, the same JDBC user store ( that is shared by both the API Manager and the BPS ) is used as the permission store as well:

    Code Block
    languagexml
    <Configuration>
        <AddAdmin>true</AddAdmin>
        <AdminRole>admin</AdminRole>
            <AdminUser>
                <UserName>admin</UserName>
                <Password>admin</Password>
            </AdminUser>
        <EveryOneRoleName>everyone</EveryOneRoleName> <!-- By default users in this role sees the registry root -->
        <Property name="dataSource">jdbc/ustore</Property>
    </Configuration>
  6. Repeat step 4 5 in the BPS as well.

Sharing the data in the registry with the BPS and API Manager

...