Skip to content

Fortified IDDocs

Database

Database requirements, connection configuration, and schema management for FortifiedID EID Server.

EID Server requires a MariaDB database. The database is the primary store for identity applications, credentials, accounts, and organization data. Schema management is handled automatically by Liquibase on every startup.

Component Requirement
Database MariaDB
Character set utf8mb4 recommended
Collation utf8mb4_unicode_ci recommended

Create an empty database before the first startup:

CREATE DATABASE fortifiedid CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

The database connection is configured in the jdbc block of the Eid module:

"jdbc": {
"url": "jdbc:mysql://<host>:3306/<database>?dumpQueriesOnException=true",
"username": "<username>",
"password": "<password>",
"preferredTestQuery": "SELECT 1",
"testConnectionOnCheckout": true,
"idleConnectionTestPeriod": 60,
"maxIdleTime": 1800
}

The db_driver property at the Eid module level must also be set:

"db_driver": "com.mysql.cj.jdbc.Driver"

See Eid — jdbc for the full list of connection pool properties.

EID Server uses C3P0 as its connection pool. The recommended production settings are:

Property Recommended value Description
preferredTestQuery SELECT 1 Query used to validate connections
testConnectionOnCheckout true Validate each connection before use
idleConnectionTestPeriod 60 Seconds between idle connection tests
maxIdleTime 1800 Seconds before an idle connection is closed

For additional C3P0 properties, see the C3P0 documentation.

EID Server uses Liquibase to manage the database schema. On every startup, Liquibase connects to the database and applies any changesets that have not yet been run. This covers both first-time initialisation and upgrades.

The Eid module requires two properties pointing to the Liquibase configuration:

"changelog": "changelog-prod.xml",
"changelog_dir": "db/liquibase"
Property Description
changelog Entry-point changelog filename, relative to changelog_dir
changelog_dir Directory containing the Liquibase migration scripts

The production container image bundles the changelog files internally. The db/liquibase/ host directory must still exist and be bind-mounted, as Liquibase requires it for file resolution at runtime — but you do not need to populate it manually.

EID Server does not manage database backups. Schedule regular backups of the MariaDB database using standard tooling such as mariadb-dump or a snapshot mechanism appropriate to your infrastructure.

Example using mariadb-dump:

Terminal window
mariadb-dump -u <username> -p<password> --databases fortifiedid > fortifiedid-$(date +%Y%m%d).sql