mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
set default ldap connection pooling to plain and ssl (#35763)
* set default ldap connection pooling to plain and ssl closes #35758
This commit is contained in:
parent
3fca2f3b7f
commit
2639f3ee43
@ -175,6 +175,8 @@ The LDAP connection pool configuration is configured using the following system
|
||||
| `com.sun.jndi.ldap.connect.pool.debug` | A string that indicates the level of debug output to produce. Valid values are "fine" (trace connection creation and removal) and "all" (all debugging information)
|
||||
|===
|
||||
|
||||
By default, connection pooling is enabled for both `plain` and `ssl` protocols.
|
||||
|
||||
For more details, see the link:https://docs.oracle.com/javase/jndi/tutorial/ldap/connect/config.html[Java LDAP Connection Pooling Configuration] documentation.
|
||||
|
||||
To set any of these properties, you can set the `JAVA_OPTS_APPEND` environment variable:
|
||||
|
||||
@ -52,12 +52,17 @@ import io.quarkus.runtime.annotations.QuarkusMain;
|
||||
public class KeycloakMain implements QuarkusApplication {
|
||||
|
||||
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 {
|
||||
// enable Infinispan and JGroups virtual threads by default
|
||||
if (System.getProperty(INFINISPAN_VIRTUAL_THREADS_PROP) == null) {
|
||||
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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user