@@ -444,13 +444,12 @@ end}.
444
444
% % ===========================================================================
445
445
446
446
% % Choose the available SASL mechanism(s) to expose.
447
- % % The two default (built in) mechanisms are 'PLAIN' and
448
- % % 'AMQPLAIN'. Additional mechanisms can be added via
449
- % % plugins.
447
+ % % The three default (built in) mechanisms are 'PLAIN', 'AMQPLAIN' and 'ANONYMOUS'.
448
+ % % Additional mechanisms can be added via plugins.
450
449
% %
451
450
% % See https://www.rabbitmq.com/authentication.html for more details.
452
451
% %
453
- % % {auth_mechanisms, ['PLAIN', 'AMQPLAIN']},
452
+ % % {auth_mechanisms, ['PLAIN', 'AMQPLAIN', 'ANONYMOUS' ]},
454
453
455
454
{mapping , " auth_mechanisms.$name" , " rabbit.auth_mechanisms" , [
456
455
{datatype , atom }]}.
@@ -735,6 +734,22 @@ end}.
735
734
end
736
735
end }.
737
736
737
+ % % Connections that skip SASL layer or use SASL mechanism ANONYMOUS will use this identity.
738
+ % % Setting this to a username will allow (anonymous) clients to connect and act as this
739
+ % % given user. For production environments, set this value to 'none'.
740
+ {mapping , " anonymous_login_user" , " rabbit.anonymous_login_user" ,
741
+ [{datatype , [{enum , [none ]}, binary ]}]}.
742
+
743
+ {mapping , " anonymous_login_pass" , " rabbit.anonymous_login_pass" , [
744
+ {datatype , [tagged_binary , binary ]}
745
+ ]}.
746
+
747
+ {translation , " rabbit.anonymous_login_pass" ,
748
+ fun (Conf ) ->
749
+ rabbit_cuttlefish :optionally_tagged_binary (" anonymous_login_pass" , Conf )
750
+ end }.
751
+
752
+
738
753
% %
739
754
% % Default Policies
740
755
% % ====================
@@ -2649,32 +2664,6 @@ end}.
2649
2664
end
2650
2665
}.
2651
2666
2652
- % ===============================
2653
- % AMQP 1.0
2654
- % ===============================
2655
-
2656
- % % Connections that skip SASL layer or use SASL mechanism ANONYMOUS will connect as this account.
2657
- % % Setting this to a username will allow clients to connect without authenticating.
2658
- % % For production environments, set this value to 'none'.
2659
- {mapping , " amqp1_0.default_user" , " rabbit.amqp1_0_default_user" ,
2660
- [{datatype , [{enum , [none ]}, string ]}]}.
2661
-
2662
- {mapping , " amqp1_0.default_vhost" , " rabbit.amqp1_0_default_vhost" ,
2663
- [{datatype , string }]}.
2664
-
2665
- {translation , " rabbit.amqp1_0_default_user" ,
2666
- fun (Conf ) ->
2667
- case cuttlefish :conf_get (" amqp1_0.default_user" , Conf ) of
2668
- none -> none ;
2669
- User -> list_to_binary (User )
2670
- end
2671
- end }.
2672
-
2673
- {translation , " rabbit.amqp1_0_default_vhost" ,
2674
- fun (Conf ) ->
2675
- list_to_binary (cuttlefish :conf_get (" amqp1_0.default_vhost" , Conf ))
2676
- end }.
2677
-
2678
2667
{mapping , " stream.replication.port_range.min" , " osiris.port_range" , [
2679
2668
{datatype , [integer ]},
2680
2669
{validators , [" non_zero_positive_integer" ]}
0 commit comments