From c1d96e179aca02eb65dd44c94913a38ff8e7aa30 Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Mon, 23 Sep 2024 14:04:29 +0100 Subject: [PATCH] [NO-ISSUE] update federation security test config with federation prefix in 2.37.0 --- .../activemqartemis_pub_sub_scale_test.go | 15 +++++---------- .../activemqartemis_work_queue_test.go | 19 ++++++++----------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/controllers/activemqartemis_pub_sub_scale_test.go b/controllers/activemqartemis_pub_sub_scale_test.go index 4df43abda..cb616d270 100644 --- a/controllers/activemqartemis_pub_sub_scale_test.go +++ b/controllers/activemqartemis_pub_sub_scale_test.go @@ -163,16 +163,11 @@ var _ = Describe("pub sub scale", func() { "securityRoles.COMMANDS.control-plane.consume=true", "securityRoles.COMMANDS.control-plane.send=true", - "securityRoles.$ACTIVEMQ_ARTEMIS_FEDERATION.control-plane.createNonDurableQueue=true", - "securityRoles.$ACTIVEMQ_ARTEMIS_FEDERATION.control-plane.consume=true", - "securityRoles.$ACTIVEMQ_ARTEMIS_FEDERATION.control-plane.send=true", - - // federation uses a dynamic event address that needs a prefix as it has a uuid at the end - // to cover that permission, we need the wildcard permisison set for control-plane - "securityRoles.#.control-plane.createNonDurableQueue=true", - "securityRoles.#.control-plane.createAddress=true", - "securityRoles.#.control-plane.consume=true", - "securityRoles.#.control-plane.send=true", + "# federation internal links etc use the ACTIVEMQ_ARTEMIS_FEDERATION prefix", + "securityRoles.\"$ACTIVEMQ_ARTEMIS_FEDERATION.#\".control-plane.createNonDurableQueue=true", + "securityRoles.\"$ACTIVEMQ_ARTEMIS_FEDERATION.#\".control-plane.createAddress=true", + "securityRoles.\"$ACTIVEMQ_ARTEMIS_FEDERATION.#\".control-plane.consume=true", + "securityRoles.\"$ACTIVEMQ_ARTEMIS_FEDERATION.#\".control-plane.send=true", // with properties update - can have this static with dns "# federate the address, publish on N goes to [0..N]", diff --git a/controllers/activemqartemis_work_queue_test.go b/controllers/activemqartemis_work_queue_test.go index 6732a5089..1fa6fe2cd 100644 --- a/controllers/activemqartemis_work_queue_test.go +++ b/controllers/activemqartemis_work_queue_test.go @@ -159,16 +159,11 @@ var _ = Describe("work queue", func() { "securityRoles.JOBS.control-plane.consume=true", "securityRoles.JOBS.control-plane.send=true", - "securityRoles.$ACTIVEMQ_ARTEMIS_FEDERATION.control-plane.createNonDurableQueue=true", - "securityRoles.$ACTIVEMQ_ARTEMIS_FEDERATION.control-plane.consume=true", - "securityRoles.$ACTIVEMQ_ARTEMIS_FEDERATION.control-plane.send=true", - - // federation uses a dynamic event address that needs a prefix as it has a uuid at the end - // to cover that permission, we need the wildcard permisison set for control-plane - "securityRoles.#.control-plane.createNonDurableQueue=true", - "securityRoles.#.control-plane.createAddress=true", - "securityRoles.#.control-plane.consume=true", - "securityRoles.#.control-plane.send=true", + "# federation internal links etc use the ACTIVEMQ_ARTEMIS_FEDERATION prefix", + "securityRoles.\"$ACTIVEMQ_ARTEMIS_FEDERATION.#\".control-plane.createNonDurableQueue=true", + "securityRoles.\"$ACTIVEMQ_ARTEMIS_FEDERATION.#\".control-plane.createAddress=true", + "securityRoles.\"$ACTIVEMQ_ARTEMIS_FEDERATION.#\".control-plane.consume=true", + "securityRoles.\"$ACTIVEMQ_ARTEMIS_FEDERATION.#\".control-plane.send=true", "# federate the queue in both directions", "broker-0.AMQPConnections.target.uri=tcp://${CR_NAME}-ss-1.${CR_NAME}-hdls-svc:61616", @@ -181,8 +176,10 @@ var _ = Describe("work queue", func() { "AMQPConnections.target.password=passwd", "AMQPConnections.target.autostart=true", - "# in pull mode", + "# in pull mode, batch=100", "AMQPConnections.target.federations.peerN.properties.amqpCredit=0", + "AMQPConnections.target.federations.peerN.properties.amqpPullConsumerCredits=100", + "AMQPConnections.target.federations.peerN.localQueuePolicies.forJobs.includes.justJobs.queueMatch=JOBS", // brokerCrd.Spec.DeploymentPlan.EnableMetricsPlugin