Username and password should be optional for multi-site deployment (#34511)
Fixes #34508 Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
This commit is contained in:
parent
98a4faf289
commit
0d9d2908f1
1 changed files with 2 additions and 4 deletions
|
@ -156,8 +156,6 @@ public class CacheManagerFactory {
|
||||||
Integer cacheRemotePort = Configuration.getOptionalKcValue(CACHE_REMOTE_PORT_PROPERTY)
|
Integer cacheRemotePort = Configuration.getOptionalKcValue(CACHE_REMOTE_PORT_PROPERTY)
|
||||||
.map(Integer::parseInt)
|
.map(Integer::parseInt)
|
||||||
.orElse(ConfigurationProperties.DEFAULT_HOTROD_PORT);
|
.orElse(ConfigurationProperties.DEFAULT_HOTROD_PORT);
|
||||||
String cacheRemoteUsername = requiredStringProperty(CACHE_REMOTE_USERNAME_PROPERTY);
|
|
||||||
String cacheRemotePassword = requiredStringProperty(CACHE_REMOTE_PASSWORD_PROPERTY);
|
|
||||||
|
|
||||||
org.infinispan.client.hotrod.configuration.ConfigurationBuilder builder = new org.infinispan.client.hotrod.configuration.ConfigurationBuilder();
|
org.infinispan.client.hotrod.configuration.ConfigurationBuilder builder = new org.infinispan.client.hotrod.configuration.ConfigurationBuilder();
|
||||||
builder.addServer().host(cacheRemoteHost).port(cacheRemotePort);
|
builder.addServer().host(cacheRemoteHost).port(cacheRemotePort);
|
||||||
|
@ -173,8 +171,8 @@ public class CacheManagerFactory {
|
||||||
if (isRemoteAuthenticationEnabled()) {
|
if (isRemoteAuthenticationEnabled()) {
|
||||||
builder.security().authentication()
|
builder.security().authentication()
|
||||||
.enable()
|
.enable()
|
||||||
.username(cacheRemoteUsername)
|
.username(requiredStringProperty(CACHE_REMOTE_USERNAME_PROPERTY))
|
||||||
.password(cacheRemotePassword)
|
.password(requiredStringProperty(CACHE_REMOTE_PASSWORD_PROPERTY))
|
||||||
.realm("default")
|
.realm("default")
|
||||||
.saslMechanism(SCRAM_SHA_512);
|
.saslMechanism(SCRAM_SHA_512);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue