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_consentdb

      5. openbank_govdb

      6. openbank_iskm_configdb       

      7. openbank_mbstoredb

      8. openbank_userdb

    Tip
    Localtabgroup
    Localtab
    titleMySQL

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

    Code Block
    languagesql
    CREATE DATABASE <DATABASE_NAME>;
    
    Localtab
    titleMS SQL

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

    Code Block
    languagesql
    CREATE DATABASE <DATABASE_NAME>;
    Localtab
    titleOracle

    For Oracle database, use these commands with the database names from the list 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;
    1. Place the compatible Oracle JDBC drivers in <WSO2_OB_APIM_HOME>/repository/components/lib and <WSO2_OB_KM_HOME>/repository/components/lib

    2. Edit the default datasource configurations in the files below with the 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

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

      Code Block
      <datasource>
          <name>WSO2CONFIG_DB</name>
          <description>Description for the datasource</description>
          <jndiConfig>
              <name>jdbc/WSO2Config_DB</name>
          </jndiConfig>
          <definition type="RDBMS">
              <configuration>
                  <url>jdbc:oracle:thin:@SERVER_NAME:PORT/SID</url>
                  <username><DATABASE_NAME></username>
                  <password><PASSWORD></password>
                  <driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>
                  <maxActive>300</maxActive>
                  <maxWait>60000</maxWait>
                  <minIdle>5</minIdle>
                  <testOnBorrow>true</testOnBorrow>
                  <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 specification:

      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_OB_KM_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. Anchor
    dbScripts
    dbScripts
    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_consentdb

    For UK specification:

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

    <WSO2_OB_APIM_HOME/dbscripts/dynamic-client-registration/migration-3.1_to_3.2/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_OBKM_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_consentdb

    For UK specification:

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

    <WSO2_OB_APIM_HOME/dbscripts/dynamic-client-registration/migration-3.1_to_3.2/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_consentdb

    For UK specification:

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

    <WSO2_OB_APIM_HOME/dbscripts/dynamic-client-registration/migration-3.1_to_3.2/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