diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 247face4e56..50893bfd204 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -110,6 +110,9 @@
Improve PatternLayout performance by reducing unnecessary indirection and branching.
+
+ Limit the protocols JNDI can use by default. Limit the servers and classes that can be accessed via LDAP.
+
Enable immediate flush on RollingFileAppender when buffered i/o is not enabled.
diff --git a/src/site/xdoc/manual/appenders.xml b/src/site/xdoc/manual/appenders.xml
index 72497446009..d634b8a9e26 100644
--- a/src/site/xdoc/manual/appenders.xml
+++ b/src/site/xdoc/manual/appenders.xml
@@ -1555,6 +1555,33 @@ public class ConnectionFactory {
Default |
Description |
+
+ allowdLdapClasses |
+ String |
+ null |
+
+ A comma separated list of fully qualified class names that may be accessed by LDAP. The classes
+ must implement Serializable. Only applies when the JMS Appender By default only Java primative classes are allowed.
+ |
+
+
+ allowdLdapHosts |
+ String |
+ null |
+
+ A comma separated list of host names or ip addresses that may be accessed by LDAP. By default only
+ the local host names and ip addresses are allowed.
+ |
+
+
+ allowdJndiProtocols |
+ String |
+ null |
+
+ A comma separated list of protocol names that JNDI will allow. By default only java, ldap, and ldaps
+ are the only allowed protocols.
+ |
+
factoryBindingName |
String |
diff --git a/src/site/xdoc/manual/configuration.xml.vm b/src/site/xdoc/manual/configuration.xml.vm
index e298599e79f..5393fed53c1 100644
--- a/src/site/xdoc/manual/configuration.xml.vm
+++ b/src/site/xdoc/manual/configuration.xml.vm
@@ -2146,6 +2146,32 @@ public class AwesomeTest {
before falling back to the default class loader.
+
+ log4j2.allowedLdapClasses |
+ LOG4J_ALLOWED_LDAP_CLASSES |
+ |
+
+ System property that specifies fully qualified class names that may be accessed by LDAP. The classes
+ must implement Serializable. By default only Java primative classes are allowed.
+ |
+
+
+ log4j2.allowedLdapHosts |
+ LOG4J_ALLOWED_LDAP_HOSTS |
+ |
+
+ System property that adds host names or ip addresses that may be access by LDAP. By default it only allows
+ the local host names and ip addresses.
+ |
+
+
+ log4j2.allowedJndiProtocols |
+ LOG4J_ALLOWED_JNDI_PROTOCOLS |
+ |
+
+ System property that adds protocol names that JNDI will allow. By default it only allows java, ldap, and ldaps.
+ |
+
log4j2.uuidSequence
diff --git a/src/site/xdoc/manual/extending.xml b/src/site/xdoc/manual/extending.xml
index ba04d68e00e..04c742aa808 100644
--- a/src/site/xdoc/manual/extending.xml
+++ b/src/site/xdoc/manual/extending.xml
@@ -92,7 +92,10 @@
Associates LoggerContexts with the ClassLoader that created the caller of the getLogger call. This is
the default ContextSelector.
JndiContextSelector
- Locates the LoggerContext by querying JNDI.
+ Locates the LoggerContext by querying JNDI. Please see log4j2.allowedJndiProtocols,
+ log4j2.allowedLdapClasses, and
+ log4j2.allowedLdapHosts for restrictions on using JNDI
+ with Log4j.
AsyncLoggerContextSelector
Creates a LoggerContext that ensures that all loggers are AsyncLoggers.
BundleContextSelector
diff --git a/src/site/xdoc/manual/lookups.xml b/src/site/xdoc/manual/lookups.xml
index d699e784ce7..cc6a66f0a6f 100644
--- a/src/site/xdoc/manual/lookups.xml
+++ b/src/site/xdoc/manual/lookups.xml
@@ -270,6 +270,13 @@
The JndiLookup allows variables to be retrieved via JNDI. By default the key will be prefixed with
java:comp/env/, however if the key contains a ":" no prefix will be added.
+ By default the JDNI Lookup only supports the java, ldap, and ldaps protocols or no protocol. Additional
+ protocols may be supported by specifying them on the log4j2.allowedJndiProtocols property.
+ When using LDAP Java classes that implement the Referenceable interface are not supported for security
+ reasons. Only the Java primative classes are supported by default as well as any classes specified by the
+ log4j2.allowedLdapClasses property. When using LDAP only references to the local host name
+ or ip address are supported along with any hosts or ip addresses listed in the
+ log4j2.allowedLdapHosts property.
|