Fixing the condition for remote TLS and username/password (#28950)

Closes #28949

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
Alexander Schwartz 2024-04-22 13:38:46 +02:00 committed by GitHub
parent b553fc2ae0
commit 5ae1712f73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@ import org.keycloak.quarkus.runtime.Environment;
import io.smallrye.config.ConfigSourceInterceptorContext;
import static java.util.Optional.of;
import static org.keycloak.quarkus.runtime.configuration.Configuration.getOptionalValue;
import static org.keycloak.quarkus.runtime.configuration.Configuration.getOptionalKcValue;
import static org.keycloak.quarkus.runtime.configuration.mappers.PropertyMapper.fromOption;
import java.io.File;
@ -79,7 +79,7 @@ final class CachingPropertyMappers {
}
private static boolean remoteHostSet() {
return getOptionalValue(CachingOptions.CACHE_REMOTE_HOST_PROPERTY).isPresent();
return getOptionalKcValue(CachingOptions.CACHE_REMOTE_HOST_PROPERTY).isPresent();
}
private static Optional<String> resolveConfigFile(Optional<String> value, ConfigSourceInterceptorContext context) {

View file

@ -147,8 +147,8 @@ public class CacheManagerFactory {
}
private static boolean isRemoteAuthenticationEnabled() {
return Configuration.getOptionalValue(CACHE_REMOTE_USERNAME_PROPERTY).isPresent() ||
Configuration.getOptionalValue(CACHE_REMOTE_PASSWORD_PROPERTY).isPresent();
return Configuration.getOptionalKcValue(CACHE_REMOTE_USERNAME_PROPERTY).isPresent() ||
Configuration.getOptionalKcValue(CACHE_REMOTE_PASSWORD_PROPERTY).isPresent();
}
private static SSLContext createSSLContext() {