noodlefrenzy / node-amqp10

amqp10 is a promise-based, AMQP 1.0 compliant node.js client
MIT License
134 stars 56 forks source link

Question : AMQP Claims Based Security (CBS) compliance ? #335

Open laurent-lemke opened 6 years ago

laurent-lemke commented 6 years ago

Hi,

I would like to use this library for retrieving messages in a topic of my Service Bus on Microsoft Azure platform.

Specifically, i'am generating a SAS (= Shared Access Signature) from my Service Bus account which is something like this

"SharedAccessSignature sr=[...]&sig=[...]&se=[...]&skn=[...]"

With the Microsoft Azure REST API it works and all is fine.

Now, I want to build a nodejs program. Thus, I use this awesome library :-) !

My program is very similar to the one posted in Stackoverflow (https://stackoverflow.com/questions/43361331/how-to-fetch-messages-from-an-azure-service-bus-queue-in-peeklock-mode-using-a).

I just replace the sasKey variable value with the String above. But i got some amqp:unauthorized-access error.

Does the library is compliant with AMQP CBS ? Is there a way to use Shared Accessed Signature with this client library ? I know that in .NET, it's possible through the "AMQP.Net Lite" library. But i don't want to use .NET language.

Note: My program works when sasKey is equals to the Shared Access Key of my account. But not when using Shared Access Signature.

Thanks a lot !