From 2aeecfd084a180dee02c7fe8e4fdbb80232173af Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Mon, 8 Jan 2024 10:31:01 -0600 Subject: [PATCH] [7.17] Manual backport of 103944 (#104016) * Manual backport of 103944 * copy RegisteredDomainProcessorTests#testBasic from main --- build-tools-internal/version.properties | 2 +- .../rest/licenses/httpclient-4.5.10.jar.sha1 | 1 - .../rest/licenses/httpclient-4.5.14.jar.sha1 | 1 + .../licenses/httpclient-4.5.10.jar.sha1 | 1 - .../licenses/httpclient-4.5.14.jar.sha1 | 1 + gradle/build.versions.toml | 2 +- gradle/verification-metadata.xml | 27 +++++++++++-------- .../licenses/httpclient-4.5.10.jar.sha1 | 1 - .../licenses/httpclient-4.5.14.jar.sha1 | 1 + .../RegisteredDomainProcessorTests.java | 25 ++++++++++++++--- .../licenses/httpclient-4.5.10.jar.sha1 | 1 - .../licenses/httpclient-4.5.14.jar.sha1 | 1 + .../licenses/httpclient-4.5.10.jar.sha1 | 1 - .../licenses/httpclient-4.5.14.jar.sha1 | 1 + .../licenses/httpclient-4.5.10.jar.sha1 | 1 - .../licenses/httpclient-4.5.14.jar.sha1 | 1 + .../licenses/httpclient-4.5.10.jar.sha1 | 1 - .../licenses/httpclient-4.5.14.jar.sha1 | 1 + .../core/licenses/httpclient-4.5.10.jar.sha1 | 1 - .../core/licenses/httpclient-4.5.14.jar.sha1 | 1 + .../licenses/httpclient-4.5.10.jar.sha1 | 1 - .../licenses/httpclient-4.5.14.jar.sha1 | 1 + 22 files changed, 49 insertions(+), 25 deletions(-) delete mode 100644 client/rest/licenses/httpclient-4.5.10.jar.sha1 create mode 100644 client/rest/licenses/httpclient-4.5.14.jar.sha1 delete mode 100644 client/sniffer/licenses/httpclient-4.5.10.jar.sha1 create mode 100644 client/sniffer/licenses/httpclient-4.5.14.jar.sha1 delete mode 100644 modules/ingest-common/licenses/httpclient-4.5.10.jar.sha1 create mode 100644 modules/ingest-common/licenses/httpclient-4.5.14.jar.sha1 delete mode 100644 modules/repository-url/licenses/httpclient-4.5.10.jar.sha1 create mode 100644 modules/repository-url/licenses/httpclient-4.5.14.jar.sha1 delete mode 100644 plugins/discovery-azure-classic/licenses/httpclient-4.5.10.jar.sha1 create mode 100644 plugins/discovery-azure-classic/licenses/httpclient-4.5.14.jar.sha1 delete mode 100644 plugins/discovery-ec2/licenses/httpclient-4.5.10.jar.sha1 create mode 100644 plugins/discovery-ec2/licenses/httpclient-4.5.14.jar.sha1 delete mode 100644 plugins/repository-s3/licenses/httpclient-4.5.10.jar.sha1 create mode 100644 plugins/repository-s3/licenses/httpclient-4.5.14.jar.sha1 delete mode 100644 x-pack/plugin/core/licenses/httpclient-4.5.10.jar.sha1 create mode 100644 x-pack/plugin/core/licenses/httpclient-4.5.14.jar.sha1 delete mode 100644 x-pack/snapshot-tool/licenses/httpclient-4.5.10.jar.sha1 create mode 100644 x-pack/snapshot-tool/licenses/httpclient-4.5.14.jar.sha1 diff --git a/build-tools-internal/version.properties b/build-tools-internal/version.properties index 1e0d027766e3..7e8e5db0ab5d 100644 --- a/build-tools-internal/version.properties +++ b/build-tools-internal/version.properties @@ -30,7 +30,7 @@ bouncycastle=1.77 randomizedrunner = 2.8.0 junit = 4.13.2 junit5 = 5.7.1 -httpclient = 4.5.10 +httpclient = 4.5.14 httpcore = 4.4.12 httpasyncclient = 4.1.4 commonslogging = 1.1.3 diff --git a/client/rest/licenses/httpclient-4.5.10.jar.sha1 b/client/rest/licenses/httpclient-4.5.10.jar.sha1 deleted file mode 100644 index b708efd0dd57..000000000000 --- a/client/rest/licenses/httpclient-4.5.10.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7ca2e4276f4ef95e4db725a8cd4a1d1e7585b9e5 \ No newline at end of file diff --git a/client/rest/licenses/httpclient-4.5.14.jar.sha1 b/client/rest/licenses/httpclient-4.5.14.jar.sha1 new file mode 100644 index 000000000000..66e05851c2e3 --- /dev/null +++ b/client/rest/licenses/httpclient-4.5.14.jar.sha1 @@ -0,0 +1 @@ +1194890e6f56ec29177673f2f12d0b8e627dec98 \ No newline at end of file diff --git a/client/sniffer/licenses/httpclient-4.5.10.jar.sha1 b/client/sniffer/licenses/httpclient-4.5.10.jar.sha1 deleted file mode 100644 index b708efd0dd57..000000000000 --- a/client/sniffer/licenses/httpclient-4.5.10.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7ca2e4276f4ef95e4db725a8cd4a1d1e7585b9e5 \ No newline at end of file diff --git a/client/sniffer/licenses/httpclient-4.5.14.jar.sha1 b/client/sniffer/licenses/httpclient-4.5.14.jar.sha1 new file mode 100644 index 000000000000..66e05851c2e3 --- /dev/null +++ b/client/sniffer/licenses/httpclient-4.5.14.jar.sha1 @@ -0,0 +1 @@ +1194890e6f56ec29177673f2f12d0b8e627dec98 \ No newline at end of file diff --git a/gradle/build.versions.toml b/gradle/build.versions.toml index 30ea1568a286..f2321138c00c 100644 --- a/gradle/build.versions.toml +++ b/gradle/build.versions.toml @@ -18,7 +18,7 @@ docker-compose = "com.avast.gradle:gradle-docker-compose-plugin:0.17.5" forbiddenApis = "de.thetaphi:forbiddenapis:3.5.1" hamcrest = "org.hamcrest:hamcrest:2.1" httpcore = "org.apache.httpcomponents:httpcore:4.4.12" -httpclient = "org.apache.httpcomponents:httpclient:4.5.10" +httpclient = "org.apache.httpcomponents:httpclient:4.5.14" idea-ext = "gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:1.1.4" json-schema-validator = "com.networknt:json-schema-validator:1.0.72" json-assert = "org.skyscreamer:jsonassert:1.5.0" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 2974a3317799..2769b30b68d1 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -2592,9 +2592,9 @@ - - - + + + @@ -2602,24 +2602,24 @@ - - - - - + + + + + - - - + + + @@ -2632,6 +2632,11 @@ + + + + + diff --git a/modules/ingest-common/licenses/httpclient-4.5.10.jar.sha1 b/modules/ingest-common/licenses/httpclient-4.5.10.jar.sha1 deleted file mode 100644 index b708efd0dd57..000000000000 --- a/modules/ingest-common/licenses/httpclient-4.5.10.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7ca2e4276f4ef95e4db725a8cd4a1d1e7585b9e5 \ No newline at end of file diff --git a/modules/ingest-common/licenses/httpclient-4.5.14.jar.sha1 b/modules/ingest-common/licenses/httpclient-4.5.14.jar.sha1 new file mode 100644 index 000000000000..66e05851c2e3 --- /dev/null +++ b/modules/ingest-common/licenses/httpclient-4.5.14.jar.sha1 @@ -0,0 +1 @@ +1194890e6f56ec29177673f2f12d0b8e627dec98 \ No newline at end of file diff --git a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/RegisteredDomainProcessorTests.java b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/RegisteredDomainProcessorTests.java index 4c527b69a8ba..81de5e45652e 100644 --- a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/RegisteredDomainProcessorTests.java +++ b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/RegisteredDomainProcessorTests.java @@ -33,14 +33,33 @@ public class RegisteredDomainProcessorTests extends ESTestCase { testRegisteredDomainProcessor(buildEvent("."), null, null, null, null); testRegisteredDomainProcessor(buildEvent("$"), null, null, null, null); testRegisteredDomainProcessor(buildEvent("foo.bar.baz"), null, null, null, null); + testRegisteredDomainProcessor(buildEvent("www.books.amazon.co.uk"), "www.books.amazon.co.uk", "amazon.co.uk", "co.uk", "www.books"); + // Verify "com" is returned as the eTLD, for that FQDN or subdomain + testRegisteredDomainProcessor(buildEvent("com"), "com", null, "com", null); + testRegisteredDomainProcessor(buildEvent("example.com"), "example.com", "example.com", "com", null); + testRegisteredDomainProcessor(buildEvent("googleapis.com"), "googleapis.com", "googleapis.com", "com", null); + testRegisteredDomainProcessor( + buildEvent("content-autofill.googleapis.com"), + "content-autofill.googleapis.com", + "googleapis.com", + "com", + "content-autofill" + ); + // Verify "ssl.fastly.net" is returned as the eTLD, for that FQDN or subdomain + testRegisteredDomainProcessor( + buildEvent("global.ssl.fastly.net"), + "global.ssl.fastly.net", + "global.ssl.fastly.net", + "ssl.fastly.net", + null + ); testRegisteredDomainProcessor( buildEvent("1.www.global.ssl.fastly.net"), "1.www.global.ssl.fastly.net", - "www.global.ssl.fastly.net", "global.ssl.fastly.net", - "1" + "ssl.fastly.net", + "1.www" ); - testRegisteredDomainProcessor(buildEvent("www.books.amazon.co.uk"), "www.books.amazon.co.uk", "amazon.co.uk", "co.uk", "www.books"); } public void testUseRoot() throws Exception { diff --git a/modules/repository-url/licenses/httpclient-4.5.10.jar.sha1 b/modules/repository-url/licenses/httpclient-4.5.10.jar.sha1 deleted file mode 100644 index b708efd0dd57..000000000000 --- a/modules/repository-url/licenses/httpclient-4.5.10.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7ca2e4276f4ef95e4db725a8cd4a1d1e7585b9e5 \ No newline at end of file diff --git a/modules/repository-url/licenses/httpclient-4.5.14.jar.sha1 b/modules/repository-url/licenses/httpclient-4.5.14.jar.sha1 new file mode 100644 index 000000000000..66e05851c2e3 --- /dev/null +++ b/modules/repository-url/licenses/httpclient-4.5.14.jar.sha1 @@ -0,0 +1 @@ +1194890e6f56ec29177673f2f12d0b8e627dec98 \ No newline at end of file diff --git a/plugins/discovery-azure-classic/licenses/httpclient-4.5.10.jar.sha1 b/plugins/discovery-azure-classic/licenses/httpclient-4.5.10.jar.sha1 deleted file mode 100644 index b708efd0dd57..000000000000 --- a/plugins/discovery-azure-classic/licenses/httpclient-4.5.10.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7ca2e4276f4ef95e4db725a8cd4a1d1e7585b9e5 \ No newline at end of file diff --git a/plugins/discovery-azure-classic/licenses/httpclient-4.5.14.jar.sha1 b/plugins/discovery-azure-classic/licenses/httpclient-4.5.14.jar.sha1 new file mode 100644 index 000000000000..66e05851c2e3 --- /dev/null +++ b/plugins/discovery-azure-classic/licenses/httpclient-4.5.14.jar.sha1 @@ -0,0 +1 @@ +1194890e6f56ec29177673f2f12d0b8e627dec98 \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/httpclient-4.5.10.jar.sha1 b/plugins/discovery-ec2/licenses/httpclient-4.5.10.jar.sha1 deleted file mode 100644 index b708efd0dd57..000000000000 --- a/plugins/discovery-ec2/licenses/httpclient-4.5.10.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7ca2e4276f4ef95e4db725a8cd4a1d1e7585b9e5 \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/httpclient-4.5.14.jar.sha1 b/plugins/discovery-ec2/licenses/httpclient-4.5.14.jar.sha1 new file mode 100644 index 000000000000..66e05851c2e3 --- /dev/null +++ b/plugins/discovery-ec2/licenses/httpclient-4.5.14.jar.sha1 @@ -0,0 +1 @@ +1194890e6f56ec29177673f2f12d0b8e627dec98 \ No newline at end of file diff --git a/plugins/repository-s3/licenses/httpclient-4.5.10.jar.sha1 b/plugins/repository-s3/licenses/httpclient-4.5.10.jar.sha1 deleted file mode 100644 index b708efd0dd57..000000000000 --- a/plugins/repository-s3/licenses/httpclient-4.5.10.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7ca2e4276f4ef95e4db725a8cd4a1d1e7585b9e5 \ No newline at end of file diff --git a/plugins/repository-s3/licenses/httpclient-4.5.14.jar.sha1 b/plugins/repository-s3/licenses/httpclient-4.5.14.jar.sha1 new file mode 100644 index 000000000000..66e05851c2e3 --- /dev/null +++ b/plugins/repository-s3/licenses/httpclient-4.5.14.jar.sha1 @@ -0,0 +1 @@ +1194890e6f56ec29177673f2f12d0b8e627dec98 \ No newline at end of file diff --git a/x-pack/plugin/core/licenses/httpclient-4.5.10.jar.sha1 b/x-pack/plugin/core/licenses/httpclient-4.5.10.jar.sha1 deleted file mode 100644 index b708efd0dd57..000000000000 --- a/x-pack/plugin/core/licenses/httpclient-4.5.10.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7ca2e4276f4ef95e4db725a8cd4a1d1e7585b9e5 \ No newline at end of file diff --git a/x-pack/plugin/core/licenses/httpclient-4.5.14.jar.sha1 b/x-pack/plugin/core/licenses/httpclient-4.5.14.jar.sha1 new file mode 100644 index 000000000000..66e05851c2e3 --- /dev/null +++ b/x-pack/plugin/core/licenses/httpclient-4.5.14.jar.sha1 @@ -0,0 +1 @@ +1194890e6f56ec29177673f2f12d0b8e627dec98 \ No newline at end of file diff --git a/x-pack/snapshot-tool/licenses/httpclient-4.5.10.jar.sha1 b/x-pack/snapshot-tool/licenses/httpclient-4.5.10.jar.sha1 deleted file mode 100644 index b708efd0dd57..000000000000 --- a/x-pack/snapshot-tool/licenses/httpclient-4.5.10.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7ca2e4276f4ef95e4db725a8cd4a1d1e7585b9e5 \ No newline at end of file diff --git a/x-pack/snapshot-tool/licenses/httpclient-4.5.14.jar.sha1 b/x-pack/snapshot-tool/licenses/httpclient-4.5.14.jar.sha1 new file mode 100644 index 000000000000..66e05851c2e3 --- /dev/null +++ b/x-pack/snapshot-tool/licenses/httpclient-4.5.14.jar.sha1 @@ -0,0 +1 @@ +1194890e6f56ec29177673f2f12d0b8e627dec98 \ No newline at end of file