You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by abdelrhman abdelhmaed <ab...@gmail.com> on 2024/03/19 07:57:31 UTC

does qpid proton c++ support SASL SCRAM-SHA-256

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

Re: does qpid proton c++ support SASL SCRAM-SHA-256

Posted by Robbie Gemmell <ro...@gmail.com>.
I haven't tried it to know for sure, but I would expect it to if you
have installed the relevant cyrus-sasl packages to provide support for
it (e.g cyrus-sasl-devel and cyrus-sasl-scram). Proton certainly
supports SCRAM-SHA-1 from way back, when thats all cyrus did, so I'd
expect it to work with SCRAM-SHA-256 now that is supported by cyrus.

The mech=none error suggests the client and server couldn't agree on a
mech they both supported, i.e perhaps that either you dont have the
necessary cyrus packages installed for it to work, or your broker isnt
actually set up to offer SCRAM-SHA-256.

On Tue, 19 Mar 2024 at 11:26, abdelrhman abdelhmaed <ab...@gmail.com> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: does qpid proton c++ support SASL SCRAM-SHA-256

Posted by Gordon Sim <gs...@redhat.com>.
On linux, proton uses the cyrus-sasl libraries. Different mechanisms
are often pacakged separately. So if on linux, check that you have the
right cyrus sasl plugin installed.

On Tue, Mar 19, 2024 at 11:33 AM abdelrhman abdelhmaed
<ab...@gmail.com> 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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org