Versions Compared

Key

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

...

  1. Create the following databases that are used in WSO2 Open Banking Key Manager (WSO2_OB_KM) and WSO2 Open Banking API Manager (WSO2_OB_APIM):

      1. openbank_am_configdb   
      2. openbank_apimgt_statsdb

      3. openbank_apimgtdb

      4. openbank_openbankingdb

      5. openbank_govdb

      6. openbank_iskm_configdb       

      7. openbank_mbstoredb

      8. openbank_userdb

    Tip
    Localtabgroup
    Localtab
    titleMySQL

    For a MySQL database , use this command with the database names from the list below.:

    1. Create the databases using the command below:

      Code Block
      languagesql
      CREATE DATABASE <DATABASE_NAME>;
      
    2. Place the compatible MySQL JDBC drivers in the <WSO2_OB_APIM_HOME>/repository/components/lib and <WSO2_OB_KM_HOME>/repository/components/lib  directories. By default, the mysql-connector-java-5.1.42-bin.jar JDBC driver is available in these locations. 
    3. Edit the default datasource configurations in the files below with the MySQL configurations.
      1. <WSO2_OB_APIM_HOME>/repository/conf/datasources/master-datasources.xml
      2. <WSO2_OB_APIM_HOME>/repository/conf/datasources/open-banking-datasources.xml
      3. <WSO2_OB_KM_HOME>/repository/conf/datasources/master-datasources.xml
      4. <WSO2_OB_KM_HOME>/repository/conf/datasources/open-banking-datasources.xml
    4. Make sure you update the properties such as the url, username, password, driverclassname in the configurations. A sample is given below: 

      Code Block
      languagexml
      <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_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>
      			<validationInterval>30000</validationInterval>
      			<defaultAutoCommit>false</defaultAutoCommit>
      		</configuration>
      	</definition>
      </datasource>
    Localtab
    titleMS SQL

    For Microsoft SQL database, use this command with the database names from the list below.:

    1. Create the databases using the command below:

      Code Block
      languagesql
      CREATE DATABASE <DATABASE_NAME>;
    2. Place the compatible MS SQL JDBC drivers in the <WSO2_OB_APIM_HOME>/repository/components/lib and <WSO2_OB_KM_HOME>/repository/components/lib  directories. 
    3. Edit the default datasource configurations in the files below with your MS SQL configurations.
      1. <WSO2_OB_APIM_HOME>/repository/conf/datasources/master-datasources.xml
      2. <WSO2_OB_APIM_HOME>/repository/conf/datasources/open-banking-datasources.xml
      3. <WSO2_OB_KM_HOME>/repository/conf/datasources/master-datasources.xml
      4. <WSO2_OB_KM_HOME>/repository/conf/datasources/open-banking-datasources.xml
    4. Make sure you update the properties such as the url, username, password, driverclassname in the configurations. A sample is given below: 

      Code Block
      languagexml
      <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:sqlserver://localhost:1433;databaseName=openbank_openbankingdb</url>
      			<username>root</username>
      			<password>root</password>
      			<driverClassName>com.microsoft.sqlserver.jdbc.SQLServerDriver</driverClassName>
      			<maxActive>300</maxActive>
      			<maxWait>60000</maxWait>
      			<testOnBorrow>true</testOnBorrow>
      			<validationQuery>SELECT 1</validationQuery>
      			<validationInterval>30000</validationInterval>
      			<defaultAutoCommit>false</defaultAutoCommit>
      		</configuration>
      	</definition>
      </datasource>


    Localtab
    titleOracle

    For an Oracle database, use these commands with the database names from the list below.:

    1. Create the databases using the commands below:

      Code Block
      CREATE USER <DATABASE_NAME> IDENTIFIED BY <PASSWORD>;
      GRANT SELECT ANY TABLE TO <DATABASE_NAME>;
      GRANT DELETE ANY TABLE TO <DATABASE_NAME>;
      GRANT INSERT ANY TABLE TO <DATABASE_NAME>;
      GRANT CREATE SESSION, CREATE TABLE, CREATE SEQUENCE, CREATE TRIGGER to <DATABASE_NAME>;
      
      ALTER USER <DATABASE_NAME> QUOTA <SPACE_QUOTA_SIZE_IN_MEGABYTES> ON USERS;
    2. Place the compatible Oracle JDBC drivers in the <WSO2_OB_APIM_HOME>/repository/components/lib and <WSO2_OB_KM_HOME>/repository/components/lib  directories.

    3. Edit the default datasource configurations in the files below with your Oracle configurations.

      1. <WSO2_OB_APIM_HOME>/repository/conf/datasources/master-datasources.xml

      2. <WSO2_OB_APIM_HOME>/repository/conf/datasources/open-banking-datasources.xml

      3. <WSO2_OB_KM_HOME>/repository/conf/datasources/master-datasources.xml

      4. <WSO2_OB_KM_HOME>/repository/conf/datasources/open-banking-datasources.xml

    4. Make sure you update properties such as url, username, password, driverclassname in the configurations. A sample is given below:

      Code Block
      languagexml
      <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:oracle:thin:openbank_openbankingdb/password@localhost:1521:root</url>
      			<username>openbank_openbankingdb</username>
      			<password>password</password>
      			<driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>
      			<maxActive>150</maxActive>
      			<maxWait>60000</maxWait>
      			<validationQuery>SELECT 1 from dual</validationQuery>
      			<validationInterval>30000</validationInterval>
      			<defaultAutoCommit>false</defaultAutoCommit>
      		</configuration>
      	</definition>
      </datasource>
  2. Update the INPUTS field size in AM_APPLICATION_REGISTRATION table in the sql file according to your database. The sql scripts are available in the <WSO2_OB_KM_HOME>/dbscripts/apimgt directory. (mysql5.7.sql, mssql.sql, oracle.sql)

    1. For UK and Australia specifications:

      Localtabgroup
      Localtab
      titleMySQL / MSSQL
      Code Block
      languagesql
      INPUTS VARCHAR(7500),
      Localtab
      titleOracle
      Code Block
      languagesql
      INPUTS VARCHAR(4000),
    2. For Berlin specification: 

      Code Block
      languagesql
      INPUTS CLOB,
    Note
    iconfalse
    Note

    If you are using Microsoft SQL, do the following changes, in addition to the step above.

    Update the IDN_OIDC_REQ_OBJECT_REFERENCE table in <WSO2_OBKM_HOME>/dbscripts/apimgt/mssql.sql file, by replacing the following lines:

    1. Replace FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE with

      Code Block
      FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID)
    2. Replace FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) with

      Code Block
      FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE
  3. To create the database schema, execute the following scripts against the given database:

    Localtabgroup
    Localtab
    titleMySQL
    Database NameScripts to execute
    openbank_am_configdb

    <WSO2_OB_APIM_HOME>/dbscripts/mysql5.7.sql

    openbank_mbstoredb<WSO2_OB_APIM_HOME>/dbscripts/mb-store/mysql-mb.sql
    openbank_openbankingdb

    For UK specification:

    <WSO2_OB_APIM_HOME>/dbscripts/finance/dynamic-client-registration/mysql-5-7.sql

    <WSO2_OB_KM_HOME>/dbscripts/finance/openbanking.org.uk/mysql-5-7.sql

    <WSO2_OB_KM_HOME>/dbscripts/finance/event-notification/mysql-5-7.sql


    For Berlin specification:

    <WSO2_OB_KM_HOME>dbscripts/finance/berlin-group.org/mysql-5-7.sql

    openbank_govdb

    <WSO2_OB_KM_HOME>/dbscripts/mysql5.7.sql

    openbank_iskm_configdb 

    <WSO2_OB_KM_HOME>/dbscripts/mysql5.7.sql

    openbank_userdb

    <WSO2_OB_KM_HOME>/dbscripts/mysql5.7.sql

    openbank_apimgtdb

    <WSO2_OB_KM_HOME>/dbscripts/apimgt/mysql5.7.sql

    Localtab
    titleMSSQL
    Database NameScripts to execute
    openbank_am_configdb

    <WSO2_OB_APIM_HOME>/dbscripts/mssql.sql

    openbank_mbstoredb

    <WSO2_OB_APIM_HOME>/dbscripts/mb-store/mssql-mb.sql

    openbank_openbankingdb

    For UK specification:

    <WSO2_OB_APIM_HOME>/dbscripts/finance/dynamic-client-registration/mssql.sql

    <WSO2_OB_KM_HOME>/dbscripts/finance/openbanking.org.uk/mssql.sql

    <WSO2_OB_KM_HOME>/dbscripts/finance/event-notification/mssql.sql


    For Berlin specification:

    <WSO2_OB_KM_HOME>/dbscripts/finance/berlin-group.org/mssql.sql

    openbank_govdb

    <WSO2_OB_KM_HOME>/dbscripts/mssql.sql

    openbank_iskm_configdb 

    <WSO2_OB_KM_HOME>/dbscripts/mssql.sql

    openbank_userdb

    <WSO2_OB_KM_HOME>/dbscripts/mssql.sql

    openbank_apimgtdb

    <WSO2_OB_KM_HOME>/dbscripts/apimgt/mssql.sql

    Localtab
    titleOracle
    Database NameScripts to execute
    openbank_am_configdb

    <WSO2_OB_APIM_HOME>/dbscripts/oracle.sql

    openbank_mbstoredb

    <WSO2_OB_APIM_HOME>/dbscripts/mb-store/oracle-mb.sql

    openbank_openbankingdb

    For UK specification:

    <WSO2_OB_APIM_HOME>/dbscripts/finance/dynamic-client-registration/oracle.sql

    <WSO2_OB_KM_HOME>/dbscripts/finance/openbanking.org.uk/oracle.sql

    <WSO2_OB_KM_HOME>/dbscripts/finance/event-notification/oracle.sql


    For Berlin specification:

    <WSO2_OB_KM_HOME>/dbscripts/finance/berlin-group.org/oracle.sql

    openbank_govdb

    <WSO2_OB_KM_HOME>/dbscripts/oracle.sql

    openbank_iskm_configdb 

    <WSO2_OB_KM_HOME>/dbscripts/oracle.sql

    openbank_userdb

    <WSO2_OB_KM_HOME>/dbscripts/oracle.sql

    openbank_apimgtdb

    <WSO2_OB_KM_HOME>/dbscripts/apimgt/oracle.sql

...