From 26861ffd05abedf32daabf90a48e70aca45a9af5 Mon Sep 17 00:00:00 2001 From: Arshad Mahmood <1391251+arshadm@users.noreply.github.com> Date: Thu, 21 Dec 2023 15:03:09 +0000 Subject: [PATCH] ENT-11295 ActiveMQ behaviour has changed so that CREATE_ADDRESS is perforned before CREATE_DURABLE_QUEUE in this situation --- .../net/corda/services/messaging/MQSecurityAsNodeTest.kt | 8 ++------ .../net/corda/services/messaging/P2PMQSecurityTest.kt | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/node/src/integration-test/kotlin/net/corda/services/messaging/MQSecurityAsNodeTest.kt b/node/src/integration-test/kotlin/net/corda/services/messaging/MQSecurityAsNodeTest.kt index 52f7c541c3..7107349eda 100644 --- a/node/src/integration-test/kotlin/net/corda/services/messaging/MQSecurityAsNodeTest.kt +++ b/node/src/integration-test/kotlin/net/corda/services/messaging/MQSecurityAsNodeTest.kt @@ -30,7 +30,6 @@ import org.assertj.core.api.Assertions.assertThatExceptionOfType import org.bouncycastle.asn1.x509.GeneralName import org.bouncycastle.asn1.x509.GeneralSubtree import org.bouncycastle.asn1.x509.NameConstraints -import org.junit.Ignore import org.junit.Test import java.nio.file.Files import javax.jms.JMSSecurityException @@ -53,8 +52,7 @@ class MQSecurityAsNodeTest : P2PMQSecurityTest() { } @Test(timeout=300_000) - @Ignore("TODO JDK17:Fixme - permission denied") - fun `send message to RPC requests address`() { + fun `send message to RPC requests address`() { assertProducerQueueCreationAttackFails(RPCApi.RPC_SERVER_QUEUE_NAME) } @@ -180,8 +178,7 @@ class MQSecurityAsNodeTest : P2PMQSecurityTest() { } override fun `send message to notifications address`() { - // TODO JDK17:Fixme - permission denied - // assertProducerQueueCreationAttackFails(ArtemisMessagingComponent.NOTIFICATIONS_ADDRESS) + assertProducerQueueCreationAttackFails(ArtemisMessagingComponent.NOTIFICATIONS_ADDRESS) } @Test(timeout=300_000) @@ -220,7 +217,6 @@ class MQSecurityAsNodeTest : P2PMQSecurityTest() { } @Test(timeout = 300_000) - @Ignore("TODO JDK17: Fixme - intermittent") fun `send AMQP message without header`() { val attacker = amqpClientTo(alice.node.configuration.p2pAddress) val session = attacker.start(PEER_USER, PEER_USER) diff --git a/node/src/integration-test/kotlin/net/corda/services/messaging/P2PMQSecurityTest.kt b/node/src/integration-test/kotlin/net/corda/services/messaging/P2PMQSecurityTest.kt index 1773b03380..d89bd3297d 100644 --- a/node/src/integration-test/kotlin/net/corda/services/messaging/P2PMQSecurityTest.kt +++ b/node/src/integration-test/kotlin/net/corda/services/messaging/P2PMQSecurityTest.kt @@ -37,7 +37,7 @@ abstract class P2PMQSecurityTest : MQSecurityTest() { val queue = session.createQueue(address) assertThatExceptionOfType(JMSException::class.java).isThrownBy { session.createProducer(queue) - }.withMessageContaining(address).withMessageContaining("CREATE_DURABLE_QUEUE") + }.withMessageContaining(address).withMessageContaining("CREATE_ADDRESS") } @Test(timeout=300_000) @@ -79,4 +79,4 @@ abstract class P2PMQSecurityTest : MQSecurityTest() { val user1Queue = loginToRPCAndGetClientQueue() assertConsumeAttackFailsNonexistent(user1Queue) } -} \ No newline at end of file +}