From e9e16450f92c5870d68a506d03f72bc2e9221d5b Mon Sep 17 00:00:00 2001 From: Eric Brown <browne@vmware.com> Date: Mon, 19 Sep 2016 16:52:26 -0700 Subject: [PATCH] Set the valid choices for the rabbit login methods According to the RabbitMQ client docs [1], the only valid login methods are: PLAIN, AMQPLAIN, or RABBIT-CR-DEMO. This patch restricts the rabbit driver to only those options. [1] https://www.rabbitmq.com/authentication.html Change-Id: I193f33adf4ecc1c0fd29ddc08b35533f24f1c967 --- oslo_messaging/_drivers/impl_rabbit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py index f33a010c7..ea5984e84 100644 --- a/oslo_messaging/_drivers/impl_rabbit.py +++ b/oslo_messaging/_drivers/impl_rabbit.py @@ -133,6 +133,7 @@ rabbit_opts = [ help='The RabbitMQ password.', secret=True), cfg.StrOpt('rabbit_login_method', + choices=('PLAIN', 'AMQPLAIN', 'RABBIT-CR-DEMO'), default='AMQPLAIN', deprecated_group='DEFAULT', help='The RabbitMQ login method.'),