...
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):
- openbank_am_configdb
openbank_apimgt_statsdb
openbank_apimgtdb
openbank_openbankingdb
openbank_govdb
openbank_iskm_configdb
openbank_mbstoredb
openbank_userdb
Tip Localtabgroup Localtab title MySQL For a MySQL database , use this command with the database names from the list below.:
Create the databases using the command below:
Code Block language sql CREATE DATABASE <DATABASE_NAME>;
- 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, themysql-connector-java-5.1.42-bin.jar
JDBC driver is available in these locations. - Edit the default datasource configurations in the files below with the MySQL configurations.
<WSO2_OB_APIM_HOME>/repository/conf/datasources/master-datasources.xml
<WSO2_OB_APIM_HOME>/repository/conf/datasources/open-banking-datasources.xml
<WSO2_OB_KM_HOME>/repository/conf/datasources/master-datasources.xml
<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 language xml <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 title MS SQL For a Microsoft SQL database, use this command with the database names from the list below.:
Create the databases using the command below:
Code Block language sql CREATE DATABASE <DATABASE_NAME>;
- 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. - Edit the default datasource configurations in the files below with your MS SQL configurations.
<WSO2_OB_APIM_HOME>/repository/conf/datasources/master-datasources.xml
<WSO2_OB_APIM_HOME>/repository/conf/datasources/open-banking-datasources.xml
<WSO2_OB_KM_HOME>/repository/conf/datasources/master-datasources.xml
<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 language xml <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 title Oracle For an Oracle database, use these commands with the database names from the list below.:
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;
Place the compatible Oracle JDBC drivers in the
<WSO2_OB_APIM_HOME>/repository/components/lib
and<WSO2_OB_KM_HOME>/repository/components/lib
directories.Edit the default datasource configurations in the files below with your Oracle configurations.
<WSO2_OB_APIM_HOME>/repository/conf/datasources/master-datasources.xml
<WSO2_OB_APIM_HOME>/repository/conf/datasources/open-banking-datasources.xml
<WSO2_OB_KM_HOME>/repository/conf/datasources/master-datasources.xml
<WSO2_OB_KM_HOME>/repository/conf/datasources/open-banking-datasources.xml
Make sure you update properties such as url, username, password, driverclassname in the configurations. A sample is given below:
Code Block language xml <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>
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)
For UK and Australia specifications:
Localtabgroup Localtab title MySQL / MSSQL Code Block language sql INPUTS VARCHAR(7500),
Localtab title Oracle Code Block language sql INPUTS VARCHAR(4000),
For Berlin specification:
Code Block language sql INPUTS CLOB,
Note icon false 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:Replace
FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE
withCode Block FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID)
Replace
FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID)
withCode Block FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE
To create the database schema, execute the following scripts against the given database:
Localtabgroup Localtab title MySQL Database Name Scripts 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 title MSSQL Database Name Scripts 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 title Oracle Database Name Scripts 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
...