H2 as Airlock IAM database
This page describes how to use an H2 database with the Airlock IAM database schema. For more information on H2, refer to http://www.h2database.com.
The chosen data layer has to be well managed and monitored. IAM is not responsible for the operation and backup/recovery. For production usage, the data layer should be clustered.
Performance Limitations
H2 has known performance limitations:
- H2 uses only one index per logical table at a time in each query.
- The H2 cluster feature imposes additional limitations on performance (result sets are completely loaded into memory).
We, therefore, recommend using H2 only for small production scenarios with hundreds of users.
There are two ways how to use H2 as IAM database:
Deployment | Description | Usage |
|---|---|---|
External | Standard deployment outside of Airlock IAM (as with any other database system). Documentation can be found at http://www.h2database.com. | Testing and Integration Demos Production (small deployments with few users). |
Internal | Airlock IAM can be started with an embedded H2 database. To enable it, add “h2” to the list of IAM modules in property “iam.modules” in the instance configuration (instances/<instance-name>/instance.properties). | Testing and Integration Demos not for productive usage |
Database schema files
SQL scripts for H2 databases are available here:
SQL File | Description |
|---|---|
Creates tables used for Airlock IAM. | |
Upgrades IAM 8.5 database schema for release IAM 8.6. | |
Upgrades IAM 8.4 database schema for release IAM 8.5. | |
Upgrades IAM 8.3 database schema for release IAM 8.4. | |
Upgrades IAM 8.2 database schema for release IAM 8.3. | |
Inserts an administrator “admin” with password “password” (works with demo configuration). |
Database schema version
The database schema includes a table named schema_metadata, which stores the schema version. Additional information may be added to this table in future releases.
The schema version information serves two purposes:
- Schema upgrade scripts can be made more robust by asserting the correct previous schema version.
- It enables automated database schema upgrades.
Do not manually modify the schema version value in the database. Futurae migration scripts may rely on it.
Further information and links
Internal links:
- For the minimal required database version, see System requirements.