diff --git a/kafka-rest/src/test/java/io/confluent/kafkarest/testing/KafkaRestFixture.java b/kafka-rest/src/test/java/io/confluent/kafkarest/testing/KafkaRestFixture.java
index 5a34aa5793..0df859fbf5 100644
--- a/kafka-rest/src/test/java/io/confluent/kafkarest/testing/KafkaRestFixture.java
+++ b/kafka-rest/src/test/java/io/confluent/kafkarest/testing/KafkaRestFixture.java
@@ -76,6 +76,11 @@ public void before() throws Exception {
server = application.createServer();
server.start();
baseUri = server.getURI();
+ if (certificates != null && baseUri.getScheme().equals("http")) {
+ // If PROXY protocol is enabled, the base URI will come back as http because the first connection
+ // factory is not the SSL factory. If we want SSL, explicitly set the scheme here
+ baseUri = new URI(baseUri.toString().replace("http", "https"));
+ }
}
private KafkaRestConfig createConfigs() {
diff --git a/kafka-rest/src/test/java/io/confluent/kafkarest/testing/SchemaRegistryFixture.java b/kafka-rest/src/test/java/io/confluent/kafkarest/testing/SchemaRegistryFixture.java
index b6cebdf840..58e77f8bf0 100644
--- a/kafka-rest/src/test/java/io/confluent/kafkarest/testing/SchemaRegistryFixture.java
+++ b/kafka-rest/src/test/java/io/confluent/kafkarest/testing/SchemaRegistryFixture.java
@@ -85,6 +85,11 @@ public void before() throws Exception {
server = new SchemaRegistryRestApplication(createConfigs()).createServer();
server.start();
baseUri = server.getURI();
+ if (certificates != null && baseUri.getScheme().equals("http")) {
+ // If PROXY protocol is enabled, the base URI will come back as http because the first connection
+ // factory is not the SSL factory. If we want SSL, explicitly set the scheme here
+ baseUri = new URI(baseUri.toString().replace("http", "https"));
+ }
client =
new CachedSchemaRegistryClient(
singletonList(baseUri.toString()),
diff --git a/pom.xml b/pom.xml
index 87ca7dbaea..53b95c874f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,8 @@
io.confluent
rest-utils-parent
- [7.1.0-0, 7.1.1-0)
+ 7.1.0-0
+
kafka-rest-parent