mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-10 15:32:05 -03:30
Setting protocol when initializing the LDAP provider
Closes #35758 Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
This commit is contained in:
parent
782135684c
commit
45a6b5c657
@ -83,6 +83,7 @@ public class LDAPStorageProviderFactory implements UserStorageProviderFactory<LD
|
|||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(LDAPStorageProviderFactory.class);
|
private static final Logger logger = Logger.getLogger(LDAPStorageProviderFactory.class);
|
||||||
public static final String PROVIDER_NAME = LDAPConstants.LDAP_PROVIDER;
|
public static final String PROVIDER_NAME = LDAPConstants.LDAP_PROVIDER;
|
||||||
|
private static final String LDAP_CONNECTION_POOL_PROTOCOL = "com.sun.jndi.ldap.connect.pool.protocol";
|
||||||
|
|
||||||
private LDAPIdentityStoreRegistry ldapStoreRegistry;
|
private LDAPIdentityStoreRegistry ldapStoreRegistry;
|
||||||
|
|
||||||
@ -313,6 +314,10 @@ public class LDAPStorageProviderFactory implements UserStorageProviderFactory<LD
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(Config.Scope config) {
|
public void init(Config.Scope config) {
|
||||||
|
// set connection pooling for plain and tls protocols by default
|
||||||
|
if (System.getProperty(LDAP_CONNECTION_POOL_PROTOCOL) == null) {
|
||||||
|
System.setProperty(LDAP_CONNECTION_POOL_PROTOCOL, "plain ssl");
|
||||||
|
}
|
||||||
this.ldapStoreRegistry = new LDAPIdentityStoreRegistry();
|
this.ldapStoreRegistry = new LDAPIdentityStoreRegistry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -52,17 +52,12 @@ import io.quarkus.runtime.annotations.QuarkusMain;
|
|||||||
public class KeycloakMain implements QuarkusApplication {
|
public class KeycloakMain implements QuarkusApplication {
|
||||||
|
|
||||||
private static final String INFINISPAN_VIRTUAL_THREADS_PROP = "org.infinispan.threads.virtual";
|
private static final String INFINISPAN_VIRTUAL_THREADS_PROP = "org.infinispan.threads.virtual";
|
||||||
private static final String LDAP_CONNECTION_POOL_PROTOCOL = "com.sun.jndi.ldap.connect.pool.protocol";
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// enable Infinispan and JGroups virtual threads by default
|
// enable Infinispan and JGroups virtual threads by default
|
||||||
if (System.getProperty(INFINISPAN_VIRTUAL_THREADS_PROP) == null) {
|
if (System.getProperty(INFINISPAN_VIRTUAL_THREADS_PROP) == null) {
|
||||||
System.setProperty(INFINISPAN_VIRTUAL_THREADS_PROP, "true");
|
System.setProperty(INFINISPAN_VIRTUAL_THREADS_PROP, "true");
|
||||||
}
|
}
|
||||||
// set connection pooling for plain and tls protocols by default
|
|
||||||
if (System.getProperty(LDAP_CONNECTION_POOL_PROTOCOL) == null) {
|
|
||||||
System.setProperty(LDAP_CONNECTION_POOL_PROTOCOL, "plain ssl");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user