ENT-11295 ActiveMQ behaviour has changed so that CREATE_ADDRESS is perforned before CREATE_DURABLE_QUEUE in this situation

This commit is contained in:
Arshad Mahmood 2023-12-21 15:03:09 +00:00
parent d235e887fe
commit 26861ffd05
2 changed files with 4 additions and 8 deletions

View File

@ -30,7 +30,6 @@ import org.assertj.core.api.Assertions.assertThatExceptionOfType
import org.bouncycastle.asn1.x509.GeneralName import org.bouncycastle.asn1.x509.GeneralName
import org.bouncycastle.asn1.x509.GeneralSubtree import org.bouncycastle.asn1.x509.GeneralSubtree
import org.bouncycastle.asn1.x509.NameConstraints import org.bouncycastle.asn1.x509.NameConstraints
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import java.nio.file.Files import java.nio.file.Files
import javax.jms.JMSSecurityException import javax.jms.JMSSecurityException
@ -53,8 +52,7 @@ class MQSecurityAsNodeTest : P2PMQSecurityTest() {
} }
@Test(timeout=300_000) @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) assertProducerQueueCreationAttackFails(RPCApi.RPC_SERVER_QUEUE_NAME)
} }
@ -180,8 +178,7 @@ class MQSecurityAsNodeTest : P2PMQSecurityTest() {
} }
override fun `send message to notifications address`() { override fun `send message to notifications address`() {
// TODO JDK17:Fixme - permission denied assertProducerQueueCreationAttackFails(ArtemisMessagingComponent.NOTIFICATIONS_ADDRESS)
// assertProducerQueueCreationAttackFails(ArtemisMessagingComponent.NOTIFICATIONS_ADDRESS)
} }
@Test(timeout=300_000) @Test(timeout=300_000)
@ -220,7 +217,6 @@ class MQSecurityAsNodeTest : P2PMQSecurityTest() {
} }
@Test(timeout = 300_000) @Test(timeout = 300_000)
@Ignore("TODO JDK17: Fixme - intermittent")
fun `send AMQP message without header`() { fun `send AMQP message without header`() {
val attacker = amqpClientTo(alice.node.configuration.p2pAddress) val attacker = amqpClientTo(alice.node.configuration.p2pAddress)
val session = attacker.start(PEER_USER, PEER_USER) val session = attacker.start(PEER_USER, PEER_USER)

View File

@ -37,7 +37,7 @@ abstract class P2PMQSecurityTest : MQSecurityTest() {
val queue = session.createQueue(address) val queue = session.createQueue(address)
assertThatExceptionOfType(JMSException::class.java).isThrownBy { assertThatExceptionOfType(JMSException::class.java).isThrownBy {
session.createProducer(queue) session.createProducer(queue)
}.withMessageContaining(address).withMessageContaining("CREATE_DURABLE_QUEUE") }.withMessageContaining(address).withMessageContaining("CREATE_ADDRESS")
} }
@Test(timeout=300_000) @Test(timeout=300_000)