Skip to content

Rename h2-file/h2-mem to dev-file/dev-mem and remove default values for username/password #9973

Description

@pedroigor

Describe the bug

When configuring a database and providing only a JDBC URL containing credentials, the default values for db-username and db-password are always considered instead of using the credentials from the JDBC URL.

./kc.sh start-dev --db mssql --cache local --db-url "\"jdbc:sqlserver://localhost;databaseName=keycloak;username=user;password=pw\""

When running the example above, the credentials set in the JDBC URL are ignored and the connection is estabilished using the default values sa and password set to the db-username and db-password, respectively.

Version

16.1.1

Expected behavior

If credentials are set in the JDBC URL, they should take precedence over the defaults for db-username and db-password.

If both options are explicitly set, then their values should take effect.

Actual behavior

Credentials set in JDBC URL are ignored even though db-username and db-password weren't set.

How to Reproduce?

./kc.sh start-dev --db mssql --cache local --db-url "\"jdbc:sqlserver://localhost;databaseName=keycloak;username=user;password=pw\""

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions