Skip to content

Database settings

Database settings are used to configure the database used by Open Banking Connector to read and write data.

In non-development environments (the default), you will at least need to at least provide a connection string setting for the configured database provider.

Database passwords

Database settings are secrets and can be supplied separately to Open Banking Connector from the connection string using a secret name and (optionally) source.

Open Banking Connector then obtains the password and adds it to the connection string as follows:

  • For PostgreSQL, the following is apprended to the connection string:
    • $";Password={password}" (C#) where password is the obtained password as a string
  • For MongoDB, the first @ is used as an insertion point for
    • $":{password}" (C#) where password is the obtained password as a string
    • For example, connection string "mongodb://my-user@localhost:27017" might become "mongodb://my-user:my-password@localhost:27017"
  • For SQLite, passwords are ignored.

Settings

Name Valid Values Default Value(s) Description
OpenBankingConnector:Database:Provider {"Sqlite", "PostgreSql", "MongoDb"} "PostgreSql" Determines which database provider Open Banking Connector uses.
OpenBankingConnector:Database:ConnectionStrings:{Provider}

where Provider ∈ {Sqlite, PostgreSql, MongoDb}

string "Data Source=./sqliteTestDb.db" (development environment and Provider = "Sqlite")

"Host=localhost;Database=test;Username=postgres" (development environment and Provider = "PostgreSql")

"mongodb://localhost:27017" (development environment and Provider = "MongoDb")

- (otherwise)

Connection strings for each database provider. Open Banking Connector only reads the one for the provider specified by OpenBankingConnector:Database:Provider. The BankTests project, however, may use multiple connection strings to test with multiple databases. A list of connection string parameters for provider PostgreSql is given here.
OpenBankingConnector:Database:Names:{Provider}

where Provider ∈ {Sqlite, PostgreSql, MongoDb}

string - Name of database for each database provider. Open Banking Connector only reads the one for the provider specified by OpenBankingConnector:Database:Provider. (Only currently implemented for MongoDb).
OpenBankingConnector:Database:PasswordSettingNames:{Provider}

where Provider ∈ {Sqlite, PostgreSql, MongoDb}

string - Name of password secret for each database provider. Open Banking Connector only reads the one for the provider specified by OpenBankingConnector:Database:Provider. The password is obtained and added to the connection string (see text above this table).
OpenBankingConnector:Database:PasswordSources:{Provider}

where Provider ∈ {Sqlite, PostgreSql, MongoDb}

{"Configuration", "AwsSsmParameterStore", "GoogleCloudSecretManagerV1"} "Configuration" Source of password secret for each database provider. Open Banking Connector only reads the one for the provider specified by OpenBankingConnector:Database:Provider. The password is obtained and added to the connection string (see text above this table).
OpenBankingConnector:Database:EnsureDatabaseCreated {"true", "false"} "false" At application start-up, ensure database is created if does not exist.
OpenBankingConnector:Database:EnsureDatabaseMigrated {"true", "false"} "true" At application start-up, apply pending migrations. Only supported for database providers with migration support (i.e. only PostgreSql at this time).