From 2510064fbb6d9b1b69e1c0553073988dff3ae620 Mon Sep 17 00:00:00 2001 From: Joanna Ko Date: Fri, 28 Jun 2024 12:08:53 -0700 Subject: [PATCH 1/2] Fix: Bump io.netty.netty-bom to v4.1.108.Final to address CVE-2024-29025 --- proxy/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/pom.xml b/proxy/pom.xml index 386f1194e..3f74f3e48 100644 --- a/proxy/pom.xml +++ b/proxy/pom.xml @@ -337,7 +337,7 @@ io.netty netty-bom - 4.1.107.Final + 4.1.108.Final pom import From 86061fa69ef0b0b1b692be6cee4518c1dbc05501 Mon Sep 17 00:00:00 2001 From: Joanna Ko Date: Mon, 1 Jul 2024 23:29:13 -0700 Subject: [PATCH 2/2] Fix failing unit test --- .../agent/ProxyCheckInSchedulerTest.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/proxy/src/test/java/com/wavefront/agent/ProxyCheckInSchedulerTest.java b/proxy/src/test/java/com/wavefront/agent/ProxyCheckInSchedulerTest.java index 2ad049840..aa700384a 100644 --- a/proxy/src/test/java/com/wavefront/agent/ProxyCheckInSchedulerTest.java +++ b/proxy/src/test/java/com/wavefront/agent/ProxyCheckInSchedulerTest.java @@ -56,7 +56,7 @@ public void testNormalCheckin() { eq(true))) .andReturn(returnConfig) .once(); - expect(apiContainer.getProxyV2APIForTenant(CENTRAL_TENANT_NAME)) + expect(apiContainer.getProxyV2APIForTenant(EasyMock.anyObject(String.class))) .andReturn(proxyV2API) .anyTimes(); proxyV2API.proxySaveConfig(eq(proxyId), anyObject()); @@ -108,7 +108,7 @@ public void testNormalCheckinWithRemoteShutdown() { eq(true))) .andReturn(returnConfig) .anyTimes(); - expect(apiContainer.getProxyV2APIForTenant(CENTRAL_TENANT_NAME)) + expect(apiContainer.getProxyV2APIForTenant(EasyMock.anyObject(String.class))) .andReturn(proxyV2API) .anyTimes(); proxyV2API.proxySaveConfig(eq(proxyId), anyObject()); @@ -166,7 +166,7 @@ public void testNormalCheckinWithBadConsumer() { eq(true))) .andReturn(returnConfig) .anyTimes(); - expect(apiContainer.getProxyV2APIForTenant(CENTRAL_TENANT_NAME)) + expect(apiContainer.getProxyV2APIForTenant(EasyMock.anyObject(String.class))) .andReturn(proxyV2API) .anyTimes(); proxyV2API.proxySaveConfig(eq(proxyId), anyObject()); @@ -210,7 +210,7 @@ public void testNetworkErrors() { returnConfig.setPointsPerBatch(1234567L); replay(proxyConfig); UUID proxyId = ProxyUtil.getOrCreateProxyId(proxyConfig); - expect(apiContainer.getProxyV2APIForTenant(CENTRAL_TENANT_NAME)) + expect(apiContainer.getProxyV2APIForTenant(EasyMock.anyObject(String.class))) .andReturn(proxyV2API) .anyTimes(); proxyV2API.proxySavePreprocessorRules(eq(proxyId), anyObject()); @@ -312,7 +312,7 @@ public void testHttpErrors() { AgentConfiguration returnConfig = new AgentConfiguration(); replay(proxyConfig); UUID proxyId = ProxyUtil.getOrCreateProxyId(proxyConfig); - expect(apiContainer.getProxyV2APIForTenant(CENTRAL_TENANT_NAME)) + expect(apiContainer.getProxyV2APIForTenant(EasyMock.anyObject(String.class))) .andReturn(proxyV2API) .anyTimes(); // we need to allow 1 successful checking to prevent early termination @@ -474,7 +474,7 @@ public void testRetryCheckinOnMisconfiguredUrl() { eq(true))) .andThrow(new ClientErrorException(Response.status(404).build())) .once(); - expect(apiContainer.getProxyV2APIForTenant(CENTRAL_TENANT_NAME)) + expect(apiContainer.getProxyV2APIForTenant(EasyMock.anyObject(String.class))) .andReturn(proxyV2API) .anyTimes(); apiContainer.updateServerEndpointURL(CENTRAL_TENANT_NAME, "https://acme.corp/zzz/api/"); @@ -537,7 +537,7 @@ public void testRetryCheckinOnMisconfiguredUrlFailsTwiceTerminates() { eq(true))) .andThrow(new ClientErrorException(Response.status(404).build())) .times(2); - expect(apiContainer.getProxyV2APIForTenant(CENTRAL_TENANT_NAME)) + expect(apiContainer.getProxyV2APIForTenant(EasyMock.anyObject(String.class))) .andReturn(proxyV2API) .anyTimes(); proxyV2API.proxySaveConfig(eq(proxyId), anyObject()); @@ -579,7 +579,7 @@ public void testDontRetryCheckinOnMisconfiguredUrlThatEndsWithApi() { returnConfig.setPointsPerBatch(1234567L); replay(proxyConfig); UUID proxyId = ProxyUtil.getOrCreateProxyId(proxyConfig); - expect(apiContainer.getProxyV2APIForTenant(CENTRAL_TENANT_NAME)) + expect(apiContainer.getProxyV2APIForTenant(EasyMock.anyObject(String.class))) .andReturn(proxyV2API) .anyTimes(); expect( @@ -629,7 +629,7 @@ public void testDontRetryCheckinOnBadCredentials() { returnConfig.setPointsPerBatch(1234567L); replay(proxyConfig); UUID proxyId = ProxyUtil.getOrCreateProxyId(proxyConfig); - expect(apiContainer.getProxyV2APIForTenant(CENTRAL_TENANT_NAME)) + expect(apiContainer.getProxyV2APIForTenant(EasyMock.anyObject(String.class))) .andReturn(proxyV2API) .anyTimes(); expect( @@ -700,7 +700,7 @@ public void testCheckinConvergedCSPWithLogServerConfiguration() { eq(true))) .andReturn(returnConfig) .once(); - expect(apiContainer.getProxyV2APIForTenant(CENTRAL_TENANT_NAME)) + expect(apiContainer.getProxyV2APIForTenant(EasyMock.anyObject(String.class))) .andReturn(proxyV2API) .anyTimes(); proxyV2API.proxySaveConfig(eq(proxyId), anyObject()); @@ -760,7 +760,7 @@ public void testCheckinConvergedCSPWithoutLogServerConfiguration() { eq(true))) .andReturn(returnConfig) .once(); - expect(apiContainer.getProxyV2APIForTenant(CENTRAL_TENANT_NAME)) + expect(apiContainer.getProxyV2APIForTenant(EasyMock.anyObject(String.class))) .andReturn(proxyV2API) .anyTimes(); proxyV2API.proxySaveConfig(eq(proxyId), anyObject());