Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Python AMQP authentication for topics

$
0
0

Hi!

I have been trying to get AMQP work from Python (in ubuntu) to Azure bus service topics.

I installed the following packages:

https://pypi.python.org/pypi/qpid-python
https://pypi.python.org/pypi/python-qpid-proton/0.10

Openssl has also been installed.

I am able to import libraries ok but I am having troubles with the authentication. There is e.g. the following document describing the address supposed to be used with subscribe method.

https://azure.microsoft.com/en-us/documentation/articles/service-bus-amqp-python/

The document uses terms:

-username

-password

Some older documentation refers to the connection string like:

amqps://[issuer-name]:[issuer-key]@[namespace].servicebus.windows.net

However, all of the above seems to be outdated. So how the connection string to the subscribe method should actually be generated:

username =-> policy_name ??

password ==> URL encoded Shared Access Signature??

Shared access signature for the the root key is in form (part of the key removed):

'SharedAccessSignature sr=sb%3A%2F%2Ftrenissian.servicebus.windows.net%2F&sig=hnh6Yn1nb%2.....2BhKPPlEG2fwqsk%3D&se=1447334425&skn=RootManageSharedAccessKey'

and URL encoded version of the connection string to subscribe method is in form of (part of the key removed):

amqps://RootManageSharedAccessKey:SharedAccessSignature+sr%3Dsb%253A%252F%252Ftrenissian.servicebus.windows.net%252F%26sig%3Dhnh6Yn1nb....2BhKPPlEG2fwqsk%253D%26se%3D1447334425%26skn%3DRootManageSharedAccessKey@trenissian.servicebus.windows.net/topic_antti_02/Subscriptions/subs_high_antti_02

I have been trying numerous combinations, but none of them seems to work. Traffic to topics and subscriptions with Python SDK using http works just fine.

Do you have up to date documentation that has working example?

BR, Antti


Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>