You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by da...@apache.org on 2026/10/22 06:06:12 UTC
(jackrabbit-oak) branch issue/OAK-12468 created (now 5d98b61aca)
This is an automated email from the ASF dual-hosted git repository.
rishabhdaim pushed a change to branch issue/OAK-12468
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
at 5d98b61aca OAK-12468: Align embedded Reactor dependencies for Azure proxies
This branch includes the following new commits:
new 5d98b61aca OAK-12468: Align embedded Reactor dependencies for Azure proxies
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(jackrabbit-oak) 01/01: OAK-12468: Align embedded Reactor dependencies for Azure proxies
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rishabhdaim pushed a commit to branch issue/OAK-12468
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
commit 5d98b61acaf8f2f9e7c093da834e8ce1ab9da3dc
Author: rishabhdaim <ri...@gmail.com>
AuthorDate: Thu Oct 22 11:35:46 2026 +0530
OAK-12468: Align embedded Reactor dependencies for Azure proxies
---
oak-blob-cloud-azure/pom.xml | 3 +
.../azure/blobstorage/AzureHttpClientTest.java | 100 +++++++++++++++++++++
2 files changed, 103 insertions(+)
diff --git a/oak-blob-cloud-azure/pom.xml b/oak-blob-cloud-azure/pom.xml
index 5719f049a8..7ba5064058 100644
--- a/oak-blob-cloud-azure/pom.xml
+++ b/oak-blob-cloud-azure/pom.xml
@@ -223,6 +223,7 @@
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
+ <version>3.7.17</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
@@ -291,10 +292,12 @@
<dependency>
<groupId>io.projectreactor.netty</groupId>
<artifactId>reactor-netty-http</artifactId>
+ <version>1.2.16</version>
</dependency>
<dependency>
<groupId>io.projectreactor.netty</groupId>
<artifactId>reactor-netty-core</artifactId>
+ <version>1.2.16</version>
</dependency>
<dependency>
<groupId>net.minidev</groupId>
diff --git a/oak-blob-cloud-azure/src/test/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureHttpClientTest.java b/oak-blob-cloud-azure/src/test/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureHttpClientTest.java
new file mode 100644
index 0000000000..e50473c33f
--- /dev/null
+++ b/oak-blob-cloud-azure/src/test/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureHttpClientTest.java
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage;
+
+import java.net.InetSocketAddress;
+
+import com.azure.core.http.ProxyOptions;
+import com.azure.core.http.netty.NettyAsyncHttpClientBuilder;
+import com.azure.core.util.Configuration;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Tests for {@link NettyAsyncHttpClientBuilder} with the dependencies embedded by the Azure data store.
+ */
+public class AzureHttpClientTest {
+
+ /**
+ * Checks client construction without a proxy as a control for OAK-12468.
+ */
+ @Test
+ public void buildsWithoutProxy() {
+ Assert.assertNotNull(new NettyAsyncHttpClientBuilder()
+ .configuration(Configuration.NONE)
+ .build());
+ }
+
+ /**
+ * Exercises the Reactor Netty proxy builder that failed with NoSuchMethodError in OAK-12468.
+ */
+ @Test
+ public void buildsWithProxy() {
+ ProxyOptions proxy = new ProxyOptions(ProxyOptions.Type.HTTP,
+ InetSocketAddress.createUnresolved("proxy.example", 3128));
+
+ Assert.assertNotNull(new NettyAsyncHttpClientBuilder()
+ .configuration(Configuration.NONE)
+ .proxy(proxy)
+ .build());
+ }
+
+ /**
+ * Exercises proxy discovery without changing the process environment or global configuration.
+ */
+ @Test
+ public void buildsWithProxyFromConfiguration() {
+ Configuration configuration = Configuration.getGlobalConfiguration().clone()
+ .put("java.net.useSystemProxies", "true")
+ .put(Configuration.PROPERTY_HTTPS_PROXY, "http://proxy.example:3128");
+
+ Assert.assertNotNull(ProxyOptions.fromConfiguration(configuration, true));
+ Assert.assertNotNull(new NettyAsyncHttpClientBuilder()
+ .configuration(configuration)
+ .build());
+ }
+
+ /**
+ * Checks that bypass rules do not hide proxy construction failures before a request is sent.
+ */
+ @Test
+ public void buildsWithProxyAndNonProxyHosts() {
+ ProxyOptions proxy = new ProxyOptions(ProxyOptions.Type.HTTP,
+ InetSocketAddress.createUnresolved("proxy.example", 3128))
+ .setNonProxyHosts(".*\\.windows\\.net|login\\.microsoftonline\\.com");
+
+ Assert.assertNotNull(new NettyAsyncHttpClientBuilder()
+ .configuration(Configuration.NONE)
+ .proxy(proxy)
+ .build());
+ }
+
+ /**
+ * Checks the authenticated HTTP proxy path, which uses the Azure SDK's own proxy handler.
+ */
+ @Test
+ public void buildsWithAuthenticatedProxy() {
+ ProxyOptions proxy = new ProxyOptions(ProxyOptions.Type.HTTP,
+ InetSocketAddress.createUnresolved("proxy.example", 3128))
+ .setCredentials("test-user", "test-password");
+
+ Assert.assertNotNull(new NettyAsyncHttpClientBuilder()
+ .configuration(Configuration.NONE)
+ .proxy(proxy)
+ .build());
+ }
+}