after installing Cyrus i get the following message when i try to
connect to Broker:

 amqp:unauthorized-access: Authentication failed [mech=SCRAM-SHA-256]
            std::string MECHANISM = "SCRAM-SHA-256";
            ConnectionOptions.sasl_allowed_mechs(MECHANISM);
            ConnectionOptions.sasl_allow_insecure_mechs(true);
            ConnectionOptions.sasl_enabled(true);
            ConnectionOptions.user("guest");
            ConnectionOptions.password("guest");

when  i change the mechanism to PLAIN, the client connect the broker
without any problem
            std::string MECHANISM = "PLAIN";
            ConnectionOptions.sasl_allowed_mechs(MECHANISM);
            ConnectionOptions.sasl_allow_insecure_mechs(true);
            ConnectionOptions.sasl_enabled(true);
            ConnectionOptions.user("guest");
            ConnectionOptions.password("guest");

i have configured the broker to support both PLAIN and  SCRAM-SHA-256

the broker.xml
 <!-- AMQP Acceptor.  Listens on default AMQP port for AMQP traffic.-->
         <acceptor name="amqp">tcp://0.0.0.0:7014?saslMechanisms=PLAIN,
SCRAM-SHA-256,tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpMinLargeMessageSize=102400;amqpDuplicateDetection=true
</acceptor>


On 2024/03/19 07:57:31 abdelrhman abdelhmaed wrote:
> Hi,
> I am using the qpid proton library to connect to Broker( Apache ActiveMQ
> Artemis).
> The authentication mechanism must be  SALS SCRAM_SHA-256.
> i tried to configure Qpid proton client to use this mechanism via the
> following methods
>
>             std::string MECHANISM = "SCRAM-SHA-256";
>             ConnectionOptions.sasl_allowed_mechs(MECHANISM);
>             ConnectionOptions.sasl_allow_insecure_mechs(true);
>             ConnectionOptions.sasl_enabled(true);
>             ConnectionOptions.user("guest");
>             ConnectionOptions.password("guest");
>
> but it dont work out. I got the following error message
>
> amqp:unauthorized-access: Authentication failed [mech=none]
>
> so my question wether qpid proton client support this mechanism and if
so,
> how i am supposed to configure it
>

Reply via email to