Skip to content

Configuration of custom JDBC driver is broken (leads to Azure SQL cannot be used as database) #9133

@ioemat

Description

@ioemat

Configuration of custom JDBC driver is broken (leads to Azure SQL cannot be used as database)

In previous versions of keycloak.x it was possible to configure the JDBC driver by settings the environment variable KC_DB_DRIVER .
This is e.g. required to run keycloak.x in Azure using Azure SQL (see also disussion on dev mailing list).

With keycloak.x 15.1.0 this does no longer work - the database driver is now set based on the db settings to a hard coded driver class.
In case of mssql this uses a driver that uses XA transactions which are not supported by Azure SQL.
When trying to set the jdbc driver via configuration, keycloak uses the H2 database driver always.

I added a unit test to show the behaviour to ConfigurationTest.java.

Has this been changed intentionally or is this a bug?

Originally posted by @ioemat in #8654 (comment)

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions