keycloak/quarkus/tests
Tanner Smith c9627d98e4
Validate .conf extension for --config-file option (#47696)
* Validate .conf extension for --config-file option

The --config-file option and KC_CONFIG_FILE environment variable
silently ignored configuration files that did not use the .conf
extension. This happened because the underlying SmallRye config
source loader filters by file extension, returning an empty list
for non-.conf files without any indication to the user.

Added explicit validation in both the CLI option setter and the
config source file resolution to reject files that do not end
with .conf, giving the user a clear error message instead of
silently ignoring their configuration.

Closes #46978

Signed-off-by: Tanner Smith <griffonbyte@proton.me>

* fix: validate config file extension before checking existence

Move the .conf extension check before the file existence check in
setConfigFile(). When a file with a wrong extension does not exist
relative to the working directory, the existence check would fire
first, masking the more specific extension validation error.

Closes keycloak/keycloak#47696

Signed-off-by: Tanner Smith <griffonbyte@proton.me>

---------

Signed-off-by: Tanner Smith <griffonbyte@proton.me>
2026-04-07 15:54:47 +00:00
..
integration Validate .conf extension for --config-file option (#47696) 2026-04-07 15:54:47 +00:00
junit5 Disable async startup when health probe is not enabled 2026-03-26 10:11:07 -03:00
pom.xml Add missing artifact descriptions to allow Maven Central Portal Publisher pass validation process. (#40822) 2025-08-12 16:50:17 +02:00