8000 Configuration of custom JDBC driver is broken (leads to Azure SQL cannot be used as database) · Issue #9133 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

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

Closed

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)

Activity

  1. added
    area/dist/quarkusQuarkus distribution — packaging, container images, server config (kc.sh)
    on Dec 14, 2021
  2. pedroigor commented on Dec 15, 2021

    @pedroigor
    Contributor

    @ioemat Not intended but we also did not yet stress the use case for databases other than those we support.

    Looks like we have here a good opportunity to make the necessary changes to make this fully supported and covered.

  3. added this to the 16.0.0 milestone on Dec 15, 2021
  4. self-assigned this
    on Dec 15, 2021
  5. moved this from In Progress to Ready in Keycloak: Quarkus distributionon Dec 16, 2021
  6. pedroigor commented on Dec 16, 2021

    @pedroigor
    Contributor

    @ioemat I've created #9199. Kept the same tests only changed the implementation a bit.

    Please, let me know if that PR solves the problem for you.

  7. Repository owner moved this from Ready to Done in Keycloak: Quarkus distributionon Dec 16, 2021
  8. 6 remaining items

  9. modified the milestones: 17.0.0, 16.1.0 on Dec 20, 2021
  10. added a commit that references this issue on Dec 21, 2021
    765bea4
  11. modified the milestones: 16.1.0, 17.0.0 on Dec 21, 2021
  12. added a commit that references this issue on Dec 21, 2021
    4f568df
  13. Repository owner moved this from Ready to Done in Keycloak: Quarkus distributionon Dec 21, 2021
  14. DGuhr commented on Feb 23, 2022

    @DGuhr
    Contributor

    @ioemat fyi, this behaviour will change in the next version / has changed now in latest main, see PR #10378 . you'll only need to run kc.sh build --db=mssql --transaction-xa-enabled=false, no System Properties or manually setting the driver involved anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/dist/quarkusQuarkus distribution — packaging, container images, server config (kc.sh)

Type

No type

Fields

No fields configured for issues without a type.

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

0