This documentation is for WSO2 Open Banking version 1.4.0. View documentation for the latest release.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Copy open-banking-datasources.xml

...

  1. Configure the <WSO2_OB_KM_HOME>/repository/conf/datasources/master-datasources.xml file with the following configurations.

    1. Update the URLusernamepassword, and driverClassName with the database credentials, and relevant database driver name in the following datasources.

      Note

      If you are using Oracle, update the validationQuery in each datasource with the value below.

      Code Block
      <validationQuery>SELECT 1 FROM DUAL</validationQuery>
      Code Block
      languagexml
      <datasource>
      		<name>WSO2AM_DB</name>
              <description>The datasource used for API Manager database</description>
              <jndiConfig>
              		<name>jdbc/WSO2AM_DB</name>
              </jndiConfig>
              <definition type="RDBMS">
                  	<configuration>
                          <url>jdbc:mysql://localhost:3306/openbank_apimgtdb?autoReconnect=true&useSSL=false</url>
                          <username>root</username>
                          <password>root</password>
                          <driverClassName>com.mysql.jdbc.Driver</driverClassName>
                          <maxActive>150</maxActive>
                          <maxWait>60000</maxWait>
                          <testOnBorrow>true</testOnBorrow>
                          <validationQuery>SELECT 1</validationQuery>
                          <validationInterval>30000</validationInterval>
                          <defaultAutoCommit>false</defaultAutoCommit>
      	            </configuration>
              </definition>
      </datasource>
      <datasource>
                  <name>WSO2CONFIG_DB</name>
                  <description>The datasource used by the registry</description>
                  <jndiConfig>
                      <name>jdbc/WSO2Config_DB</name>
                  </jndiConfig>
                  <definition type="RDBMS">
                      <configuration>
                          <url>jdbc:mysql://localhost:3306/openbank_iskm_configdb?autoReconnect=true&useSSL=false</url>
                          <username>root</username>
                          <password>root</password>
                          <driverClassName>com.mysql.jdbc.Driver</driverClassName>
                          <maxActive>150</maxActive>
                          <maxWait>60000</maxWait>
                          <testOnBorrow>true</testOnBorrow>
                          <validationQuery>SELECT 1</validationQuery>
                          <validationInterval>30000</validationInterval>
                          <defaultAutoCommit>false</defaultAutoCommit>
                      </configuration>
                  </definition>
      </datasource>
      <datasource>
      		<name>REGISTRY_DB</name>
      		<description>The datasource used for registry- config/governance</description>
      		<jndiConfig>
      				<name>jdbc/WSO2RegistryDB</name>
      		</jndiConfig>
      		<definition type="RDBMS">
                     <configuration>
                      	<url>jdbc:mysql://localhost:3306/openbank_govdb?autoReconnect=true&useSSL=false</url>
                          <username>root</username>
                          <password>root</password>
                          <driverClassName>com.mysql.jdbc.Driver</driverClassName>
                          <maxActive>150</maxActive>
                          <maxWait>60000</maxWait>
                          <testOnBorrow>true</testOnBorrow>
                          <validationQuery>SELECT 1</validationQuery>
                          <validationInterval>30000</validationInterval>
                          <defaultAutoCommit>false</defaultAutoCommit>
                  	</configuration>
              </definition>
      </datasource>
      <datasource>
      		<name>WSO2_USER_DB</name>
      		<description>The datasource used for registry and user manager</description>
      		<jndiConfig>
                     <name>jdbc/WSO2UMDB</name>
      		</jndiConfig>
      		<definition type="RDBMS">
      				<configuration>
                      	<url>jdbc:mysql://localhost:3306/openbank_userdb?autoReconnect=true&useSSL=false</url>
                          <username>root</username>
                          <password>root</password>
                          <driverClassName>com.mysql.jdbc.Driver</driverClassName>
                          <maxActive>150</maxActive>
                          <maxWait>60000</maxWait>
                          <testOnBorrow>true</testOnBorrow>
                          <validationQuery>SELECT 1</validationQuery>
                          <validationInterval>30000</validationInterval>
                          <defaultAutoCommit>false</defaultAutoCommit>
                      </configuration>
              </definition>
      </datasource>
  2. Update Copy the WSO2<WSO2_OPENOB_BANKING_DB  datasource in the KM_HOME>/repository/resources/finance/scripts/wso2-obcommon-conf/open-banking-datasources.xml file into the <WSO2_OB_KM_HOME>/repository/conf/datasources directory.

    Open <WSO2_OB_KM_HOME>/repository/conf/datasources/open-banking-datasources.xml file and update the WSO2_OPEN_BANKING_DB datasource with the following configurations.:

    Note

    If you are using Oracle, update the validationQuery in each datasource with the value below.

    Code Block
    <validationQuery>SELECT 1 FROM DUAL</validationQuery>
    Code Block
    languagexml
    <datasource>
    	<name>WSO2_OPEN_BANKING_DB</name>
    	<description>The datasource used for registry and user manager</description>
    	<jndiConfig>
    		<name>jdbc/WSO2OpenBankingDB</name>
    	</jndiConfig>
    	<definition type="RDBMS">
    		<configuration>
    			<url>jdbc:mysql://localhost:3306/openbank_openbankingdb?autoReconnect=true&useSSL=false</url>
    			<username>root</username>
    			<password>root</password>
    			<driverClassName>com.mysql.jdbc.Driver</driverClassName>
    			<maxActive>150</maxActive>
    			<maxWait>60000</maxWait>
    			<testOnBorrow>true</testOnBorrow>
    			<validationQuery>SELECT 1</validationQuery>
    			<!--Use below for oracle-->
    			<!--
    <validationQuery>SELECT 1 FROM DUAL</validationQuery>
    -->
    			<validationInterval>30000</validationInterval>
    			<defaultAutoCommit>false</defaultAutoCommit>
    		</configuration>
    	</definition>
    </datasource>
  3. In the <WSO2_OB_KM_HOME>/repository/conf/registry.xml file, update the properties given below.

    Code Block
    languagexml
    <dbConfig name="configRegistry">
            <dataSource>jdbc/WSO2Config_DB</dataSource>
        </dbConfig>
    
        <remoteInstance url="https://localhost:9443/registry">
            <id>configInstance</id>
            <dbConfig>configRegistry</dbConfig>
            <readOnly>false</readOnly>
            <enableCache>true</enableCache>
            <registryRoot>/</registryRoot>
        </remoteInstance>
    
        <mount path="/_system/config" overwrite="true">
            <instanceId>configInstance</instanceId>
            <targetPath>/_system/config</targetPath>
        </mount>
    
    
        <dbConfig name="governanceRegistry">
            <dataSource>jdbc/WSO2REG_DB</dataSource>
        </dbConfig>
    
        <remoteInstance url="https://localhost:9443/registry">
            <id>governanceInstance</id>
            <dbConfig>governanceRegistry</dbConfig>
            <readOnly>false</readOnly>
            <enableCache>true</enableCache>
            <registryRoot>/</registryRoot>
        </remoteInstance>
    
        <mount path="/_system/governance" overwrite="true">
            <instanceId>governanceInstance</instanceId>
            <targetPath>/_system/governance</targetPath>
        </mount>
  4. In the <WSO2_OB_KM_HOME>/repository/conf/user-mgt.xml file, update the datasource property to point to the WSO2UM_DB.

    Code Block
    languagexml
    <Property name="dataSource">jdbc/WSO2UM_DB</Property>
    1. Enable the internal JDBC user store in the <WSO2_OB_KM_HOME>/repository/conf/user-mgt.xml file. Update the UsernameJavaRegEx, UsernameJavaScriptRegEx, CaseInsensitiveUsername, and UsernameWithEmailJavaScriptRegEx properties. Follow the sample configuration given below:

      Code Block
      languagexml
      <UserStoreManager class="org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager">
                  <Property name="TenantManager">org.wso2.carbon.user.core.tenant.JDBCTenantManager</Property>
                  <Property name="ReadOnly">false</Property>
                  <Property name="ReadGroups">true</Property>
                  <Property name="WriteGroups">true</Property>
                  <Property name="UsernameJavaRegEx">[email protected]_-{3,30}$</Property>
                  <Property name="UsernameJavaScriptRegEx">^[a-zA-Z0-9._-][email protected][a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$</Property>
                  <Property name="UsernameJavaRegExViolationErrorMsg">Username pattern policy violated</Property>
                  <Property name="PasswordJavaRegEx">^[\S]{5,30}$</Property>
                  <Property name="PasswordJavaScriptRegEx">^[\S]{5,30}$</Property>
                  <Property name="PasswordJavaRegExViolationErrorMsg">Password length should be within 5 to 30 characters</Property>
                  <Property name="RolenameJavaRegEx">^[\S]{3,30}$</Property>
                  <Property name="RolenameJavaScriptRegEx">^[\S]{3,30}$</Property>
                  <Property name="CaseInsensitiveUsername">true</Property>
                  <Property name="SCIMEnabled">false</Property>
                  <Property name="IsBulkImportSupported">false</Property>
                  <Property name="PasswordDigest">SHA-256</Property>
                  <Property name="StoreSaltedPassword">true</Property>
                  <Property name="MultiAttributeSeparator">,</Property>
                  <Property name="MaxUserNameListLength">100</Property>
                  <Property name="MaxRoleNameListLength">100</Property>
                  <Property name="UserRolesCacheEnabled">true</Property>
                  <Property name="UserNameUniqueAcrossTenants">false</Property>
      	        <Property name="UsernameWithEmailJavaScriptRegEx">^[\S]{3,30}$</Property>
              </UserStoreManager>

...