Skip to content

Upgrade log4j to 2.15.0 #81709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build-tools-internal/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ snakeyaml = 1.26
icu4j = 68.2
supercsv = 2.4.0
# when updating log4j, please update also docs/java-api/index.asciidoc
log4j = 2.11.1
log4j = 2.15.0
slf4j = 1.6.2
ecsLogging = 1.2.0

Expand Down
3 changes: 2 additions & 1 deletion modules/repository-url/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ tasks.named("thirdPartyAudit").configure {
'javax.servlet.ServletContextListener',
'org.apache.avalon.framework.logger.Logger',
'org.apache.log.Hierarchy',
'org.apache.log.Logger'
'org.apache.log.Logger',
'javax.jms.Message'
)
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bc960fe2acbe6f3952011f88a771de18301534e7
1 change: 1 addition & 0 deletions plugins/discovery-azure-classic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ tasks.named("thirdPartyAudit").configure {
'org.apache.avalon.framework.logger.Logger',
'org.apache.log.Hierarchy',
'org.apache.log.Logger',
'javax.jms.Message',
'org.eclipse.persistence.descriptors.ClassDescriptor',
'org.eclipse.persistence.internal.oxm.MappingNodeValue',
'org.eclipse.persistence.internal.oxm.TreeObjectBuilder',
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bc960fe2acbe6f3952011f88a771de18301534e7
1 change: 1 addition & 0 deletions plugins/discovery-ec2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ tasks.named("thirdPartyAudit").configure {
'org.apache.avalon.framework.logger.Logger',
'org.apache.log.Hierarchy',
'org.apache.log.Logger',
'javax.jms.Message',
'javax.xml.bind.DatatypeConverter',
'javax.xml.bind.JAXBContext'
)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bc960fe2acbe6f3952011f88a771de18301534e7
2 changes: 2 additions & 0 deletions plugins/discovery-gce/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ tasks.named("thirdPartyAudit").configure {
'org.apache.avalon.framework.logger.Logger',
'org.apache.log.Hierarchy',
'org.apache.log.Logger',
'org.apache.avalon.framework.logger.Logger',
'javax.jms.Message',
'org.apache.http.ConnectionReuseStrategy',
'org.apache.http.Header',
'org.apache.http.HttpEntity',
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bc960fe2acbe6f3952011f88a771de18301534e7
2 changes: 2 additions & 0 deletions plugins/repository-gcs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ tasks.named("thirdPartyAudit").configure {
'org.apache.avalon.framework.logger.Logger',
'org.apache.log.Hierarchy',
'org.apache.log.Logger',
'javax.jms.Message',

// optional apache http client dependencies
'org.apache.http.ConnectionReuseStrategy',
'org.apache.http.Header',
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bc960fe2acbe6f3952011f88a771de18301534e7

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bc960fe2acbe6f3952011f88a771de18301534e7

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8bb417869ab3baa19f2fc70e6d776d041f0a8ebc
1 change: 1 addition & 0 deletions plugins/repository-s3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ tasks.named("thirdPartyAudit").configure {
'org.apache.avalon.framework.logger.Logger',
'org.apache.log.Hierarchy',
'org.apache.log.Logger',
'javax.jms.Message',
'software.amazon.ion.IonReader',
'software.amazon.ion.IonSystem',
'software.amazon.ion.IonType',
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bc960fe2acbe6f3952011f88a771de18301534e7
2 changes: 0 additions & 2 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,9 @@ tasks.named("thirdPartyAudit").configure {
'org.apache.commons.compress.utils.IOUtils',
'org.apache.commons.csv.CSVFormat',
'org.apache.commons.csv.QuoteMode',
'org.apache.kafka.clients.producer.Callback',
'org.apache.kafka.clients.producer.Producer',
'org.apache.kafka.clients.producer.RecordMetadata',
'org.codehaus.stax2.XMLStreamWriter2',
'org.jctools.queues.MessagePassingQueue$Consumer',
'org.jctools.queues.MpscArrayQueue',
'org.osgi.framework.Bundle',
'org.osgi.framework.BundleActivator',
Expand Down
1 change: 0 additions & 1 deletion server/licenses/log4j-api-2.11.1.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/log4j-api-2.15.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4a5aa7e55a29391c6f66e0b259d5189aa11e45d0
1 change: 0 additions & 1 deletion server/licenses/log4j-core-2.11.1.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/log4j-core-2.15.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ba55c13d7ac2fd44df9cc8074455719a33f375b9
3 changes: 2 additions & 1 deletion x-pack/plugin/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ tasks.named("thirdPartyAudit").configure {
'org.apache.log.Logger',
//commons-logging provided dependencies
'javax.servlet.ServletContextEvent',
'javax.servlet.ServletContextListener'
'javax.servlet.ServletContextListener',
'javax.jms.Message'
)
}

Expand Down
1 change: 0 additions & 1 deletion x-pack/plugin/core/licenses/log4j-1.2-api-2.11.1.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions x-pack/plugin/core/licenses/log4j-1.2-api-2.15.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bc960fe2acbe6f3952011f88a771de18301534e7

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8bb417869ab3baa19f2fc70e6d776d041f0a8ebc

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8bb417869ab3baa19f2fc70e6d776d041f0a8ebc
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.time.Clock;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -247,7 +249,12 @@ public static void lookupPatternLayout() throws Exception {
assertThat(properties.getProperty("appender.audit_rolling.layout.type"), is("PatternLayout"));
final String patternLayoutFormat = properties.getProperty("appender.audit_rolling.layout.pattern");
assertThat(patternLayoutFormat, is(notNullValue()));
patternLayout = PatternLayout.newBuilder().withPattern(patternLayoutFormat).withCharset(StandardCharsets.UTF_8).build();
patternLayout = AccessController.doPrivileged(
(PrivilegedAction<PatternLayout>) () -> PatternLayout.newBuilder()
.withPattern(patternLayoutFormat)
.withCharset(StandardCharsets.UTF_8)
.build()
);
customAnonymousUsername = randomAlphaOfLength(8);
reservedRealmEnabled = randomBoolean();
}
Expand Down
5 changes: 5 additions & 0 deletions x-pack/plugin/sql/qa/server/multi-node/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ testClusters.matching { it.name == "integTest" }.configureEach {
setting 'xpack.license.self_generated.type', 'trial'
plugin ':x-pack:qa:freeze-plugin'
}

tasks.named("integTest").configure {
// Disabled because of log4j Security Manager permission issues in CLI tools
systemProperty 'tests.security.manager', 'false'
}
3 changes: 3 additions & 0 deletions x-pack/plugin/sql/qa/server/security/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ subprojects {
"${-> testClusters.integTest.singleNode().getAuditLog()}"
nonInputProperties.systemProperty 'tests.audit.yesterday.logfile',
"${-> testClusters.integTest.singleNode().getAuditLog().getParentFile()}/integTest_audit-${new Date().format('yyyy-MM-dd')}-1.json.gz"

// Disabled because of log4j Security Manager permission issues in CLI tools
systemProperty 'tests.security.manager', 'false'
}

tasks.named("testingConventions").configure { enabled = false }
Expand Down
5 changes: 5 additions & 0 deletions x-pack/plugin/sql/qa/server/single-node/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ testClusters.matching { it.name == "integTest" }.configureEach {
setting 'xpack.license.self_generated.type', 'trial'
plugin ':x-pack:qa:freeze-plugin'
}

tasks.named("integTest").configure {
// Disabled because of log4j Security Manager permission issues in CLI tools
systemProperty 'tests.security.manager', 'false'
}
2 changes: 0 additions & 2 deletions x-pack/plugin/sql/sql-action/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,9 @@ tasks.named("thirdPartyAudit").configure {
'org.apache.commons.compress.utils.IOUtils',
'org.apache.commons.csv.CSVFormat',
'org.apache.commons.csv.QuoteMode',
'org.apache.kafka.clients.producer.Callback',
'org.apache.kafka.clients.producer.Producer',
'org.apache.kafka.clients.producer.RecordMetadata',
'org.codehaus.stax2.XMLStreamWriter2',
'org.jctools.queues.MessagePassingQueue$Consumer',
'org.jctools.queues.MpscArrayQueue',
'org.osgi.framework.Bundle',
'org.osgi.framework.BundleActivator',
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4a5aa7e55a29391c6f66e0b259d5189aa11e45d0

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ba55c13d7ac2fd44df9cc8074455719a33f375b9

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8bb417869ab3baa19f2fc70e6d776d041f0a8ebc