diff --git a/build-tools-internal/src/main/groovy/elasticsearch.ide.gradle b/build-tools-internal/src/main/groovy/elasticsearch.ide.gradle index d6250d3c6b76d..2d7e35e3c4b63 100644 --- a/build-tools-internal/src/main/groovy/elasticsearch.ide.gradle +++ b/build-tools-internal/src/main/groovy/elasticsearch.ide.gradle @@ -88,7 +88,7 @@ if (System.getProperty('idea.active') == 'true') { tasks.register('buildDependencyArtifacts') { group = 'ide' description = 'Builds artifacts needed as dependency for IDE modules' - dependsOn ':client:rest-high-level:shadowJar', ':plugins:repository-hdfs:hadoop-common:shadowJar' + dependsOn ':client:rest-high-level:shadowJar', ':plugins:repository-hdfs:hadoop-common:shadowJar', ':plugins:repository-azure:azure-storage-blob:shadowJar' } idea { diff --git a/build-tools-internal/version.properties b/build-tools-internal/version.properties index e4242eaa37a10..6cb185ef14b47 100644 --- a/build-tools-internal/version.properties +++ b/build-tools-internal/version.properties @@ -9,8 +9,8 @@ checkstyle = 8.42 # optional dependencies spatial4j = 0.7 jts = 1.15.0 -jackson = 2.12.2 -snakeyaml = 1.27 +jackson = 2.10.4 +snakeyaml = 1.26 icu4j = 62.1 supercsv = 2.4.0 # when updating log4j, please update also docs/java-api/index.asciidoc diff --git a/client/sniffer/licenses/jackson-core-2.10.4.jar.sha1 b/client/sniffer/licenses/jackson-core-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..f83a4ac442b33 --- /dev/null +++ b/client/sniffer/licenses/jackson-core-2.10.4.jar.sha1 @@ -0,0 +1 @@ +8796585e716440d6dd5128b30359932a9eb74d0d \ No newline at end of file diff --git a/client/sniffer/licenses/jackson-core-2.12.2.jar.sha1 b/client/sniffer/licenses/jackson-core-2.12.2.jar.sha1 deleted file mode 100644 index 953c420544bd5..0000000000000 --- a/client/sniffer/licenses/jackson-core-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -8df50138521d05561a308ec2799cc8dda20c06df \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-core-2.10.4.jar.sha1 b/libs/x-content/licenses/jackson-core-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..f83a4ac442b33 --- /dev/null +++ b/libs/x-content/licenses/jackson-core-2.10.4.jar.sha1 @@ -0,0 +1 @@ +8796585e716440d6dd5128b30359932a9eb74d0d \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-core-2.12.2.jar.sha1 b/libs/x-content/licenses/jackson-core-2.12.2.jar.sha1 deleted file mode 100644 index 953c420544bd5..0000000000000 --- a/libs/x-content/licenses/jackson-core-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -8df50138521d05561a308ec2799cc8dda20c06df \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-cbor-2.10.4.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-cbor-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..d34470c70b916 --- /dev/null +++ b/libs/x-content/licenses/jackson-dataformat-cbor-2.10.4.jar.sha1 @@ -0,0 +1 @@ +c854bb2d46138198cb5d4aae86ef6c04b8bc1e70 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-cbor-2.12.2.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-cbor-2.12.2.jar.sha1 deleted file mode 100644 index 0a1d23830b327..0000000000000 --- a/libs/x-content/licenses/jackson-dataformat-cbor-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -71866a16d9678d8d7718baea0a28c7d0e1a67360 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-smile-2.10.4.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-smile-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..a8611e152f971 --- /dev/null +++ b/libs/x-content/licenses/jackson-dataformat-smile-2.10.4.jar.sha1 @@ -0,0 +1 @@ +c872c2e224cfdcc5481037d477f5890f05c001b4 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-smile-2.12.2.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-smile-2.12.2.jar.sha1 deleted file mode 100644 index bdad17e1c7a4c..0000000000000 --- a/libs/x-content/licenses/jackson-dataformat-smile-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -110be3a2ac0acf51e68967669db47ca9a507e057 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-yaml-2.10.4.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-yaml-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..5fe3ec1a7e3a4 --- /dev/null +++ b/libs/x-content/licenses/jackson-dataformat-yaml-2.10.4.jar.sha1 @@ -0,0 +1 @@ +8a7f3c6b640bd89214807af6d8160b4b3b16af93 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-yaml-2.12.2.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-yaml-2.12.2.jar.sha1 deleted file mode 100644 index 3455d5aadd435..0000000000000 --- a/libs/x-content/licenses/jackson-dataformat-yaml-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -8c549fb29f390f6fd0c20cf0a1d83f7e38dc7ffb \ No newline at end of file diff --git a/libs/x-content/licenses/snakeyaml-1.26.jar.sha1 b/libs/x-content/licenses/snakeyaml-1.26.jar.sha1 new file mode 100644 index 0000000000000..fde3aba8edad0 --- /dev/null +++ b/libs/x-content/licenses/snakeyaml-1.26.jar.sha1 @@ -0,0 +1 @@ +a78a8747147d2c5807683e76ec2b633e95c14fe9 \ No newline at end of file diff --git a/libs/x-content/licenses/snakeyaml-1.27.jar.sha1 b/libs/x-content/licenses/snakeyaml-1.27.jar.sha1 deleted file mode 100644 index 36080993df858..0000000000000 --- a/libs/x-content/licenses/snakeyaml-1.27.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -359d62567480b07a679dc643f82fc926b100eed5 \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-annotations-2.10.4.jar.sha1 b/modules/ingest-geoip/licenses/jackson-annotations-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..0c548bb0e7711 --- /dev/null +++ b/modules/ingest-geoip/licenses/jackson-annotations-2.10.4.jar.sha1 @@ -0,0 +1 @@ +6ae6028aff033f194c9710ad87c224ccaadeed6c \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-annotations-2.12.2.jar.sha1 b/modules/ingest-geoip/licenses/jackson-annotations-2.12.2.jar.sha1 deleted file mode 100644 index 8e6b8be3e084d..0000000000000 --- a/modules/ingest-geoip/licenses/jackson-annotations-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -0a770cc4c0a1fb0bfd8a150a6a0004e42bc99fca \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-databind-2.10.4.jar.sha1 b/modules/ingest-geoip/licenses/jackson-databind-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..27d5a72cd27af --- /dev/null +++ b/modules/ingest-geoip/licenses/jackson-databind-2.10.4.jar.sha1 @@ -0,0 +1 @@ +76e9152e93d4cf052f93a64596f633ba5b1c8ed9 \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-databind-2.12.2.jar.sha1 b/modules/ingest-geoip/licenses/jackson-databind-2.12.2.jar.sha1 deleted file mode 100644 index 8e574b75a883f..0000000000000 --- a/modules/ingest-geoip/licenses/jackson-databind-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5f9d79e09ebf5d54a46e9f4543924cf7ae7654e0 \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/jackson-annotations-2.10.4.jar.sha1 b/plugins/discovery-ec2/licenses/jackson-annotations-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..0c548bb0e7711 --- /dev/null +++ b/plugins/discovery-ec2/licenses/jackson-annotations-2.10.4.jar.sha1 @@ -0,0 +1 @@ +6ae6028aff033f194c9710ad87c224ccaadeed6c \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/jackson-annotations-2.12.2.jar.sha1 b/plugins/discovery-ec2/licenses/jackson-annotations-2.12.2.jar.sha1 deleted file mode 100644 index 8e6b8be3e084d..0000000000000 --- a/plugins/discovery-ec2/licenses/jackson-annotations-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -0a770cc4c0a1fb0bfd8a150a6a0004e42bc99fca \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/jackson-databind-2.10.4.jar.sha1 b/plugins/discovery-ec2/licenses/jackson-databind-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..27d5a72cd27af --- /dev/null +++ b/plugins/discovery-ec2/licenses/jackson-databind-2.10.4.jar.sha1 @@ -0,0 +1 @@ +76e9152e93d4cf052f93a64596f633ba5b1c8ed9 \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/jackson-databind-2.12.2.jar.sha1 b/plugins/discovery-ec2/licenses/jackson-databind-2.12.2.jar.sha1 deleted file mode 100644 index 8e574b75a883f..0000000000000 --- a/plugins/discovery-ec2/licenses/jackson-databind-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5f9d79e09ebf5d54a46e9f4543924cf7ae7654e0 \ No newline at end of file diff --git a/plugins/repository-azure/azure-storage-blob/build.gradle b/plugins/repository-azure/azure-storage-blob/build.gradle new file mode 100644 index 0000000000000..1101ac2cd9bef --- /dev/null +++ b/plugins/repository-azure/azure-storage-blob/build.gradle @@ -0,0 +1,47 @@ +import org.elasticsearch.gradle.internal.JavaClassPublicifier; + +apply plugin: 'elasticsearch.java' +apply plugin: 'com.github.johnrengelman.shadow' + +configurations { + originalJar { + transitive = false + } +} + +dependencies { + originalJar "com.azure:azure-storage-blob:${project.parent.versions.azure}" + implementation "com.azure:azure-storage-blob:${project.parent.versions.azure}" +} + +// We have to rewrite the service classes to make them public to avoid +// granting the permission "java.lang.reflect.ReflectPermission" "newProxyInPackage" +// to this plugin. +// +// There are plans to make those public in the azure sdk side, but in the meanwhile +// we just do this workaround +// https://github.com/Azure/azure-sdk-for-java/issues/12829#issuecomment-736755543 +List classesToRewrite = ['com/azure/storage/blob/implementation/AppendBlobsImpl$AppendBlobsService.class', + 'com/azure/storage/blob/implementation/BlobsImpl$BlobsService.class', + 'com/azure/storage/blob/implementation/BlockBlobsImpl$BlockBlobsService.class', + 'com/azure/storage/blob/implementation/ContainersImpl$ContainersService.class', + 'com/azure/storage/blob/implementation/DirectorysImpl$DirectorysService.class', + 'com/azure/storage/blob/implementation/PageBlobsImpl$PageBlobsService.class', + 'com/azure/storage/blob/implementation/ServicesImpl$ServicesService.class'] + +tasks.register('extractClientClasses', Copy).configure { + from({ zipTree(configurations.originalJar.singleFile) }) { + include "com/azure/storage/blob/implementation/**" + } + into project.file('build/original') +} + +def modifiedOutput = project.layout.buildDirectory.dir('modified') +def makePublic = tasks.register('makeClientClassesPublic', JavaClassPublicifier) { + dependsOn 'extractClientClasses' + classFiles = classesToRewrite + inputDir = project.layout.buildDirectory.dir('original') + outputDir = modifiedOutput +} + +sourceSets.main.output.dir(modifiedOutput, builtBy: makePublic) diff --git a/plugins/repository-azure/build.gradle b/plugins/repository-azure/build.gradle index 13c41e719dedf..d808b58b45c96 100644 --- a/plugins/repository-azure/build.gradle +++ b/plugins/repository-azure/build.gradle @@ -22,35 +22,38 @@ esplugin { } versions << [ - 'azure': '12.11.1', - 'azureCore': '1.16.0', - 'azureCoreHttpNetty': '1.9.1', - 'azureAvro': '12.0.4', + 'azure': '12.9.0', + 'azureCore': '1.10.0', + 'azureCoreHttpNetty': '1.6.3', 'jakartaActivation': '1.2.1', 'jakartaXMLBind': '2.3.2', 'stax2API': '4.2', - 'woodstox': '6.2.4', + 'woodstox': '6.0.2', - 'azureNetty': '4.1.63.Final', - 'reactorNetty': '1.0.6', - 'reactorCore': '3.4.5', + 'reactorNetty': '0.9.12.RELEASE', + 'reactorCore': '3.3.10.RELEASE', 'reactiveStreams': '1.0.3', ] dependencies { + api project(path: 'azure-storage-blob', configuration: 'shadow') + if (isEclipse) { + /* + * Eclipse can't pick up the shadow dependency so we point it at *something* + * so it can compile things. + */ + api project(path: 'azure-storage-blob') + } api "com.azure:azure-storage-common:${versions.azure}" - api "com.azure:azure-storage-blob:${versions.azure}" api "com.azure:azure-core-http-netty:${versions.azureCoreHttpNetty}" api "com.azure:azure-core:${versions.azureCore}" - api "com.azure:azure-storage-internal-avro:${versions.azureAvro}" // jackson api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" - api "com.fasterxml.jackson:jackson-bom:${versions.jackson}" // jackson xml api "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${versions.jackson}" @@ -62,24 +65,19 @@ dependencies { api "com.fasterxml.woodstox:woodstox-core:${versions.woodstox}" // netty - api "io.netty:netty-buffer:${versions.azureNetty}" - api "io.netty:netty-codec:${versions.azureNetty}" - api "io.netty:netty-codec-dns:${versions.azureNetty}" - api "io.netty:netty-codec-http:${versions.azureNetty}" - api "io.netty:netty-codec-http2:${versions.azureNetty}" - api "io.netty:netty-codec-socks:${versions.azureNetty}" - api "io.netty:netty-common:${versions.azureNetty}" - api "io.netty:netty-handler:${versions.azureNetty}" - api "io.netty:netty-handler-proxy:${versions.azureNetty}" - api "io.netty:netty-resolver:${versions.azureNetty}" - api "io.netty:netty-resolver-dns:${versions.azureNetty}" - api "io.netty:netty-transport:${versions.azureNetty}" - api "io.netty:netty-transport-native-unix-common:${versions.azureNetty}" + api "io.netty:netty-buffer:${versions.netty}" + api "io.netty:netty-codec-http:${versions.netty}" + api "io.netty:netty-codec-http2:${versions.netty}" + api "io.netty:netty-codec-socks:${versions.netty}" + api "io.netty:netty-codec:${versions.netty}" + api "io.netty:netty-common:${versions.netty}" + api "io.netty:netty-handler-proxy:${versions.netty}" + api "io.netty:netty-handler:${versions.netty}" + api "io.netty:netty-resolver:${versions.netty}" + api "io.netty:netty-transport:${versions.netty}" // reactor api "io.projectreactor.netty:reactor-netty:${versions.reactorNetty}" - api "io.projectreactor.netty:reactor-netty-core:${versions.reactorNetty}" - api "io.projectreactor.netty:reactor-netty-http:${versions.reactorNetty}" api "io.projectreactor:reactor-core:${versions.reactorCore}" api "org.reactivestreams:reactive-streams:${versions.reactiveStreams}" @@ -109,7 +107,6 @@ tasks.named("dependencyLicenses").configure { mapping from: /netty-.*/, to: 'netty' mapping from: /jaxb-.*/, to: 'jaxb' mapping from: /stax-.*/, to: 'stax' - mapping from: /reactor-netty-.*/, to: 'reactor-netty' mapping from: /reactive-streams.*/, to: 'reactive-streams' } @@ -253,23 +250,14 @@ tasks.named("thirdPartyAudit").configure { // it uses NIO 'io.netty.channel.kqueue.KQueue', 'io.netty.channel.kqueue.KQueueDatagramChannel', - 'io.netty.channel.kqueue.KQueueDomainSocketChannel', 'io.netty.channel.kqueue.KQueueEventLoopGroup', - 'io.netty.channel.kqueue.KQueueServerDomainSocketChannel', 'io.netty.channel.kqueue.KQueueServerSocketChannel', 'io.netty.channel.kqueue.KQueueSocketChannel', 'io.netty.channel.epoll.Epoll', 'io.netty.channel.epoll.EpollDatagramChannel', - 'io.netty.channel.epoll.EpollDomainSocketChannel', 'io.netty.channel.epoll.EpollEventLoopGroup', - 'io.netty.channel.epoll.EpollServerDomainSocketChannel', 'io.netty.channel.epoll.EpollServerSocketChannel', 'io.netty.channel.epoll.EpollSocketChannel', - 'io.netty.incubator.channel.uring.IOUring', - 'io.netty.incubator.channel.uring.IOUringDatagramChannel', - 'io.netty.incubator.channel.uring.IOUringEventLoopGroup', - 'io.netty.incubator.channel.uring.IOUringServerSocketChannel', - 'io.netty.incubator.channel.uring.IOUringSocketChannel', // from reactor.netty.http.server.HttpServer (reactor-netty) 'io.netty.handler.codec.haproxy.HAProxyMessage', @@ -279,11 +267,13 @@ tasks.named("thirdPartyAudit").configure { 'org.osgi.framework.BundleActivator', 'org.osgi.framework.BundleContext', + // from com.ctc.wstx.shaded.msv_core.driver.textui.Driver (woodstox-core) + 'com.sun.org.apache.xml.internal.resolver.Catalog', + 'com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver', + 'org.slf4j.impl.StaticLoggerBinder', 'org.slf4j.impl.StaticMDCBinder', 'org.slf4j.impl.StaticMarkerBinder', - - 'com.ctc.wstx.shaded.msv_core.driver.textui.Driver', ) ignoreViolations( @@ -309,7 +299,11 @@ tasks.named("thirdPartyAudit").configure { 'javax.activation.MailcapCommandMap', 'javax.activation.MimetypesFileTypeMap', + 'reactor.core.publisher.MultiProducerRingBuffer', + 'reactor.core.publisher.RingBufferFields', 'reactor.core.publisher.Traces$SharedSecretsCallSiteSupplierFactory$TracingException', + 'reactor.core.publisher.UnsafeSequence', + 'reactor.core.publisher.UnsafeSupport' ) } boolean useFixture = false diff --git a/plugins/repository-azure/licenses/azure-core-1.10.0.jar.sha1 b/plugins/repository-azure/licenses/azure-core-1.10.0.jar.sha1 new file mode 100644 index 0000000000000..87047850d545e --- /dev/null +++ b/plugins/repository-azure/licenses/azure-core-1.10.0.jar.sha1 @@ -0,0 +1 @@ +d5e1258ba153b5e27c90b7c9cad262e6fc171d24 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/azure-core-1.16.0.jar.sha1 b/plugins/repository-azure/licenses/azure-core-1.16.0.jar.sha1 deleted file mode 100644 index c338532043815..0000000000000 --- a/plugins/repository-azure/licenses/azure-core-1.16.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -4942bfa35a89a1fc9cabd18427a9b450d392215b \ No newline at end of file diff --git a/plugins/repository-azure/licenses/azure-core-http-netty-1.6.3.jar.sha1 b/plugins/repository-azure/licenses/azure-core-http-netty-1.6.3.jar.sha1 new file mode 100644 index 0000000000000..59ae7ea8c65b4 --- /dev/null +++ b/plugins/repository-azure/licenses/azure-core-http-netty-1.6.3.jar.sha1 @@ -0,0 +1 @@ +1c72bdc36faad65f53dd160becc38dd93a7356e2 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/azure-core-http-netty-1.9.1.jar.sha1 b/plugins/repository-azure/licenses/azure-core-http-netty-1.9.1.jar.sha1 deleted file mode 100644 index c1fbd78d70d4e..0000000000000 --- a/plugins/repository-azure/licenses/azure-core-http-netty-1.9.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -b78134e2715eaef150ae3786806ff640bd0439ba \ No newline at end of file diff --git a/plugins/repository-azure/licenses/azure-storage-blob-12.11.1.jar.sha1 b/plugins/repository-azure/licenses/azure-storage-blob-12.11.1.jar.sha1 deleted file mode 100644 index b7114857449f6..0000000000000 --- a/plugins/repository-azure/licenses/azure-storage-blob-12.11.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -ac89edaa19ee481c832970e944af16b3b772881a \ No newline at end of file diff --git a/plugins/repository-azure/licenses/azure-storage-common-12.11.1.jar.sha1 b/plugins/repository-azure/licenses/azure-storage-common-12.11.1.jar.sha1 deleted file mode 100644 index 86e795bf2b9bc..0000000000000 --- a/plugins/repository-azure/licenses/azure-storage-common-12.11.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -61b336d02e1d8839d68db47d884574fe41535e04 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/azure-storage-common-12.9.0.jar.sha1 b/plugins/repository-azure/licenses/azure-storage-common-12.9.0.jar.sha1 new file mode 100644 index 0000000000000..f486ffca2bb46 --- /dev/null +++ b/plugins/repository-azure/licenses/azure-storage-common-12.9.0.jar.sha1 @@ -0,0 +1 @@ +42d0439a676e51bb1dea809c60e8a925bb07477c \ No newline at end of file diff --git a/plugins/repository-azure/licenses/azure-storage-internal-avro-12.0.4.jar.sha1 b/plugins/repository-azure/licenses/azure-storage-internal-avro-12.0.4.jar.sha1 deleted file mode 100644 index 7b086febb3673..0000000000000 --- a/plugins/repository-azure/licenses/azure-storage-internal-avro-12.0.4.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -39733586ba04415ce64b186e17e1f8d9e28f2972 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-annotations-2.10.4.jar.sha1 b/plugins/repository-azure/licenses/jackson-annotations-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..0c548bb0e7711 --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-annotations-2.10.4.jar.sha1 @@ -0,0 +1 @@ +6ae6028aff033f194c9710ad87c224ccaadeed6c \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-annotations-2.12.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-annotations-2.12.2.jar.sha1 deleted file mode 100644 index 8e6b8be3e084d..0000000000000 --- a/plugins/repository-azure/licenses/jackson-annotations-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -0a770cc4c0a1fb0bfd8a150a6a0004e42bc99fca \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-databind-2.10.4.jar.sha1 b/plugins/repository-azure/licenses/jackson-databind-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..27d5a72cd27af --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-databind-2.10.4.jar.sha1 @@ -0,0 +1 @@ +76e9152e93d4cf052f93a64596f633ba5b1c8ed9 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-databind-2.12.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-databind-2.12.2.jar.sha1 deleted file mode 100644 index 8e574b75a883f..0000000000000 --- a/plugins/repository-azure/licenses/jackson-databind-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5f9d79e09ebf5d54a46e9f4543924cf7ae7654e0 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-dataformat-xml-2.10.4.jar.sha1 b/plugins/repository-azure/licenses/jackson-dataformat-xml-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..b079e3798154d --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-dataformat-xml-2.10.4.jar.sha1 @@ -0,0 +1 @@ +ffd80322264922e7edb6b35139ec1f2f55824156 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-dataformat-xml-2.12.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-dataformat-xml-2.12.2.jar.sha1 deleted file mode 100644 index 4a95dfceeb805..0000000000000 --- a/plugins/repository-azure/licenses/jackson-dataformat-xml-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -dac1d21b5fe602d492273d35eb28918a91fc5412 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.10.4.jar.sha1 b/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..33135389f24df --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.10.4.jar.sha1 @@ -0,0 +1 @@ +de00203e6fee3493c8978a0064a3dda2e8373545 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.12.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.12.2.jar.sha1 deleted file mode 100644 index e01942eb4ab44..0000000000000 --- a/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -00012e36d12f47b4648e2cfe0b12bdcc2c4649bf \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.10.4.jar.sha1 b/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..ef26c940dbbe1 --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.10.4.jar.sha1 @@ -0,0 +1 @@ +68364602aed552c0dcfc5743b393bad95c85b009 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.12.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.12.2.jar.sha1 deleted file mode 100644 index 4283eed674744..0000000000000 --- a/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -f226bd0766b4e81493822e8c81eaa6cab27e589f \ No newline at end of file diff --git a/plugins/repository-azure/licenses/netty-codec-dns-4.1.63.Final.jar.sha1 b/plugins/repository-azure/licenses/netty-codec-dns-4.1.63.Final.jar.sha1 deleted file mode 100644 index 0d878e271dd56..0000000000000 --- a/plugins/repository-azure/licenses/netty-codec-dns-4.1.63.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -91c445232b12e13bf6757579a39bab81e1233af5 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/netty-resolver-dns-4.1.63.Final.jar.sha1 b/plugins/repository-azure/licenses/netty-resolver-dns-4.1.63.Final.jar.sha1 deleted file mode 100644 index 9a14a2e73102b..0000000000000 --- a/plugins/repository-azure/licenses/netty-resolver-dns-4.1.63.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -f44dc8ed52ff8528a88c157879c9baffe464fa46 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/netty-transport-native-unix-common-4.1.63.Final.jar.sha1 b/plugins/repository-azure/licenses/netty-transport-native-unix-common-4.1.63.Final.jar.sha1 deleted file mode 100644 index 7b47441ef5d9a..0000000000000 --- a/plugins/repository-azure/licenses/netty-transport-native-unix-common-4.1.63.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -85bd91382ec54b300ad3ff59efccbb4fccb22a88 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-core-3.3.10.RELEASE.jar.sha1 b/plugins/repository-azure/licenses/reactor-core-3.3.10.RELEASE.jar.sha1 new file mode 100644 index 0000000000000..181cb897756ed --- /dev/null +++ b/plugins/repository-azure/licenses/reactor-core-3.3.10.RELEASE.jar.sha1 @@ -0,0 +1 @@ +f5787f994a9a810c0986418232e06fcf4afc1216 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-core-3.4.5.jar.sha1 b/plugins/repository-azure/licenses/reactor-core-3.4.5.jar.sha1 deleted file mode 100644 index 011a1f162a537..0000000000000 --- a/plugins/repository-azure/licenses/reactor-core-3.4.5.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c8adeb48f74b16c2dfb4f06a880820b9eaed50cf \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-netty-0.9.12.RELEASE.jar.sha1 b/plugins/repository-azure/licenses/reactor-netty-0.9.12.RELEASE.jar.sha1 new file mode 100644 index 0000000000000..92f7fafc27375 --- /dev/null +++ b/plugins/repository-azure/licenses/reactor-netty-0.9.12.RELEASE.jar.sha1 @@ -0,0 +1 @@ +41022546d07f1499fb9d8617bba4a1a89d3549db \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-netty-1.0.6.jar.sha1 b/plugins/repository-azure/licenses/reactor-netty-1.0.6.jar.sha1 deleted file mode 100644 index 7d93a719037cb..0000000000000 --- a/plugins/repository-azure/licenses/reactor-netty-1.0.6.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -82e9508698715725c3e1882d3056cd3a743d6bfc \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-netty-core-1.0.6.jar.sha1 b/plugins/repository-azure/licenses/reactor-netty-core-1.0.6.jar.sha1 deleted file mode 100644 index bcbf8c15fe60a..0000000000000 --- a/plugins/repository-azure/licenses/reactor-netty-core-1.0.6.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c24e7e989913d50c2ed592892e55ce1284364ac4 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-netty-http-1.0.6.jar.sha1 b/plugins/repository-azure/licenses/reactor-netty-http-1.0.6.jar.sha1 deleted file mode 100644 index f1cbbf2eb81d8..0000000000000 --- a/plugins/repository-azure/licenses/reactor-netty-http-1.0.6.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -6a76dd233bdb1e6dc5364ae1b5c8627c2cb0288f \ No newline at end of file diff --git a/plugins/repository-azure/licenses/woodstox-core-6.0.2.jar.sha1 b/plugins/repository-azure/licenses/woodstox-core-6.0.2.jar.sha1 new file mode 100644 index 0000000000000..7d2fa5254ef55 --- /dev/null +++ b/plugins/repository-azure/licenses/woodstox-core-6.0.2.jar.sha1 @@ -0,0 +1 @@ +bbd163bbdb4d6340298b61a6789cc174fb589868 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/woodstox-core-6.2.4.jar.sha1 b/plugins/repository-azure/licenses/woodstox-core-6.2.4.jar.sha1 deleted file mode 100644 index 15f15488fca43..0000000000000 --- a/plugins/repository-azure/licenses/woodstox-core-6.2.4.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -16b9f8ab972e67eb21872ea2c40046249d543989 \ No newline at end of file diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureClientProvider.java b/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureClientProvider.java index e40e97ef1ccea..8143c30e59896 100644 --- a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureClientProvider.java +++ b/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureClientProvider.java @@ -28,7 +28,6 @@ import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; -import io.netty.resolver.DefaultAddressResolverGroup; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.component.AbstractLifecycleComponent; @@ -88,7 +87,6 @@ class AzureClientProvider extends AbstractLifecycleComponent { private final EventLoopGroup eventLoopGroup; private final ConnectionProvider connectionProvider; private final ByteBufAllocator byteBufAllocator; - private final reactor.netty.http.client.HttpClient nettyHttpClient; private final ClientLogger clientLogger = new ClientLogger(AzureClientProvider.class); private volatile boolean closed = false; @@ -96,14 +94,12 @@ class AzureClientProvider extends AbstractLifecycleComponent { String reactorExecutorName, EventLoopGroup eventLoopGroup, ConnectionProvider connectionProvider, - ByteBufAllocator byteBufAllocator, - reactor.netty.http.client.HttpClient nettyHttpClient) { + ByteBufAllocator byteBufAllocator) { this.threadPool = threadPool; this.reactorExecutorName = reactorExecutorName; this.eventLoopGroup = eventLoopGroup; this.connectionProvider = connectionProvider; this.byteBufAllocator = byteBufAllocator; - this.nettyHttpClient = nettyHttpClient; } static int eventLoopThreadsFromSettings(Settings settings) { @@ -121,7 +117,7 @@ static AzureClientProvider create(ThreadPool threadPool, Settings settings) { final TimeValue openConnectionTimeout = OPEN_CONNECTION_TIMEOUT.get(settings); final TimeValue maxIdleTime = MAX_IDLE_TIME.get(settings); - ConnectionProvider connectionProvider = + ConnectionProvider provider = ConnectionProvider.builder("azure-sdk-connection-pool") .maxConnections(MAX_OPEN_CONNECTIONS.get(settings)) .pendingAcquireMaxCount(PENDING_CONNECTION_QUEUE_SIZE) // This determines the max outstanding queued requests @@ -131,22 +127,9 @@ static AzureClientProvider create(ThreadPool threadPool, Settings settings) { ByteBufAllocator pooledByteBufAllocator = createByteBufAllocator(); - reactor.netty.http.client.HttpClient nettyHttpClient = reactor.netty.http.client.HttpClient.create(connectionProvider) - .runOn(eventLoopGroup) - .option(ChannelOption.ALLOCATOR, pooledByteBufAllocator) - .resolver(DefaultAddressResolverGroup.INSTANCE) - .port(80) - .wiretap(false); - // Just to verify that this executor exists threadPool.executor(REPOSITORY_THREAD_POOL_NAME); - return new AzureClientProvider(threadPool, - REPOSITORY_THREAD_POOL_NAME, - eventLoopGroup, - connectionProvider, - pooledByteBufAllocator, - nettyHttpClient - ); + return new AzureClientProvider(threadPool, REPOSITORY_THREAD_POOL_NAME, eventLoopGroup, provider, pooledByteBufAllocator); } private static ByteBufAllocator createByteBufAllocator() { @@ -177,6 +160,17 @@ AzureBlobServiceClient createClient(AzureStorageSettings settings, throw new IllegalStateException("AzureClientProvider is already closed"); } + reactor.netty.http.client.HttpClient nettyHttpClient = reactor.netty.http.client.HttpClient.create(connectionProvider); + nettyHttpClient = nettyHttpClient + .port(80) + .wiretap(false); + + nettyHttpClient = nettyHttpClient.tcpConfiguration(tcpClient -> { + tcpClient = tcpClient.runOn(eventLoopGroup); + tcpClient = tcpClient.option(ChannelOption.ALLOCATOR, byteBufAllocator); + return tcpClient; + }); + final HttpClient httpClient = new NettyAsyncHttpClientBuilder(nettyHttpClient) .disableBufferCopy(true) .proxy(proxyOptions) diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepositoryPlugin.java b/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepositoryPlugin.java index ddc9f391d092a..db281c6038eec 100644 --- a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepositoryPlugin.java +++ b/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepositoryPlugin.java @@ -34,8 +34,6 @@ import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; -import java.security.AccessController; -import java.security.PrivilegedAction; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -55,17 +53,6 @@ public class AzureRepositoryPlugin extends Plugin implements RepositoryPlugin, R // Trigger static initialization with the plugin class loader // so we have access to the proper xml parser JacksonAdapter.createDefaultSerializerAdapter(); - - // Even though we don't use it, we need to force static init - // of the default resolver which reads /etc/hosts so it doesn't init later - AccessController.doPrivileged((PrivilegedAction) () -> { - try { - Class.forName("io.netty.resolver.HostsFileEntriesResolver"); - } catch (Exception e) { - throw new RuntimeException(e); - } - return null; - }); } // protected for testing diff --git a/plugins/repository-azure/src/main/plugin-metadata/plugin-security.policy b/plugins/repository-azure/src/main/plugin-metadata/plugin-security.policy index ced54e7bb17ef..8bc2c35fd170b 100644 --- a/plugins/repository-azure/src/main/plugin-metadata/plugin-security.policy +++ b/plugins/repository-azure/src/main/plugin-metadata/plugin-security.policy @@ -14,9 +14,4 @@ grant { // Used by jackson bean deserialization permission java.lang.RuntimePermission "accessDeclaredMembers"; permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; - // needed by netty dns resolver - permission java.io.FilePermission "/etc/hosts", "read"; - permission java.io.FilePermission "/etc/resolv.conf", "read"; - permission java.io.FilePermission "/etc/resolver", "read"; - permission java.io.FilePermission "/etc/resolver/-", "read"; }; diff --git a/plugins/repository-s3/licenses/jackson-annotations-2.10.4.jar.sha1 b/plugins/repository-s3/licenses/jackson-annotations-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..0c548bb0e7711 --- /dev/null +++ b/plugins/repository-s3/licenses/jackson-annotations-2.10.4.jar.sha1 @@ -0,0 +1 @@ +6ae6028aff033f194c9710ad87c224ccaadeed6c \ No newline at end of file diff --git a/plugins/repository-s3/licenses/jackson-annotations-2.12.2.jar.sha1 b/plugins/repository-s3/licenses/jackson-annotations-2.12.2.jar.sha1 deleted file mode 100644 index 8e6b8be3e084d..0000000000000 --- a/plugins/repository-s3/licenses/jackson-annotations-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -0a770cc4c0a1fb0bfd8a150a6a0004e42bc99fca \ No newline at end of file diff --git a/plugins/repository-s3/licenses/jackson-databind-2.10.4.jar.sha1 b/plugins/repository-s3/licenses/jackson-databind-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..27d5a72cd27af --- /dev/null +++ b/plugins/repository-s3/licenses/jackson-databind-2.10.4.jar.sha1 @@ -0,0 +1 @@ +76e9152e93d4cf052f93a64596f633ba5b1c8ed9 \ No newline at end of file diff --git a/plugins/repository-s3/licenses/jackson-databind-2.12.2.jar.sha1 b/plugins/repository-s3/licenses/jackson-databind-2.12.2.jar.sha1 deleted file mode 100644 index 8e574b75a883f..0000000000000 --- a/plugins/repository-s3/licenses/jackson-databind-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5f9d79e09ebf5d54a46e9f4543924cf7ae7654e0 \ No newline at end of file diff --git a/x-pack/plugin/sql/jdbc/licenses/jackson-core-2.10.4.jar.sha1 b/x-pack/plugin/sql/jdbc/licenses/jackson-core-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..f83a4ac442b33 --- /dev/null +++ b/x-pack/plugin/sql/jdbc/licenses/jackson-core-2.10.4.jar.sha1 @@ -0,0 +1 @@ +8796585e716440d6dd5128b30359932a9eb74d0d \ No newline at end of file diff --git a/x-pack/plugin/sql/jdbc/licenses/jackson-core-2.12.2.jar.sha1 b/x-pack/plugin/sql/jdbc/licenses/jackson-core-2.12.2.jar.sha1 deleted file mode 100644 index 953c420544bd5..0000000000000 --- a/x-pack/plugin/sql/jdbc/licenses/jackson-core-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -8df50138521d05561a308ec2799cc8dda20c06df \ No newline at end of file diff --git a/x-pack/plugin/sql/jdbc/licenses/jackson-dataformat-cbor-2.10.4.jar.sha1 b/x-pack/plugin/sql/jdbc/licenses/jackson-dataformat-cbor-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..d34470c70b916 --- /dev/null +++ b/x-pack/plugin/sql/jdbc/licenses/jackson-dataformat-cbor-2.10.4.jar.sha1 @@ -0,0 +1 @@ +c854bb2d46138198cb5d4aae86ef6c04b8bc1e70 \ No newline at end of file diff --git a/x-pack/plugin/sql/jdbc/licenses/jackson-dataformat-cbor-2.12.2.jar.sha1 b/x-pack/plugin/sql/jdbc/licenses/jackson-dataformat-cbor-2.12.2.jar.sha1 deleted file mode 100644 index 0a1d23830b327..0000000000000 --- a/x-pack/plugin/sql/jdbc/licenses/jackson-dataformat-cbor-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -71866a16d9678d8d7718baea0a28c7d0e1a67360 \ No newline at end of file diff --git a/x-pack/plugin/sql/sql-action/licenses/jackson-core-2.10.4.jar.sha1 b/x-pack/plugin/sql/sql-action/licenses/jackson-core-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..f83a4ac442b33 --- /dev/null +++ b/x-pack/plugin/sql/sql-action/licenses/jackson-core-2.10.4.jar.sha1 @@ -0,0 +1 @@ +8796585e716440d6dd5128b30359932a9eb74d0d \ No newline at end of file diff --git a/x-pack/plugin/sql/sql-action/licenses/jackson-core-2.12.2.jar.sha1 b/x-pack/plugin/sql/sql-action/licenses/jackson-core-2.12.2.jar.sha1 deleted file mode 100644 index 953c420544bd5..0000000000000 --- a/x-pack/plugin/sql/sql-action/licenses/jackson-core-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -8df50138521d05561a308ec2799cc8dda20c06df \ No newline at end of file diff --git a/x-pack/plugin/sql/sql-client/licenses/jackson-core-2.10.4.jar.sha1 b/x-pack/plugin/sql/sql-client/licenses/jackson-core-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..f83a4ac442b33 --- /dev/null +++ b/x-pack/plugin/sql/sql-client/licenses/jackson-core-2.10.4.jar.sha1 @@ -0,0 +1 @@ +8796585e716440d6dd5128b30359932a9eb74d0d \ No newline at end of file diff --git a/x-pack/plugin/sql/sql-client/licenses/jackson-core-2.12.2.jar.sha1 b/x-pack/plugin/sql/sql-client/licenses/jackson-core-2.12.2.jar.sha1 deleted file mode 100644 index 953c420544bd5..0000000000000 --- a/x-pack/plugin/sql/sql-client/licenses/jackson-core-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -8df50138521d05561a308ec2799cc8dda20c06df \ No newline at end of file diff --git a/x-pack/plugin/sql/sql-proto/licenses/jackson-core-2.10.4.jar.sha1 b/x-pack/plugin/sql/sql-proto/licenses/jackson-core-2.10.4.jar.sha1 new file mode 100644 index 0000000000000..f83a4ac442b33 --- /dev/null +++ b/x-pack/plugin/sql/sql-proto/licenses/jackson-core-2.10.4.jar.sha1 @@ -0,0 +1 @@ +8796585e716440d6dd5128b30359932a9eb74d0d \ No newline at end of file diff --git a/x-pack/plugin/sql/sql-proto/licenses/jackson-core-2.12.2.jar.sha1 b/x-pack/plugin/sql/sql-proto/licenses/jackson-core-2.12.2.jar.sha1 deleted file mode 100644 index 953c420544bd5..0000000000000 --- a/x-pack/plugin/sql/sql-proto/licenses/jackson-core-2.12.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -8df50138521d05561a308ec2799cc8dda20c06df \ No newline at end of file