0

I have a django application that routinely injects messages into an Azure service bus. I am receiving intermittent errors indicating that its messages are unauthorized. I would say that 95% of messages are successfully authorized, with about 5% unauthorized).

I have not changed anything in months related to access (shared access signatures, access keys etc) to the service bus, and I have validated that my python code is still using all the correct values (service bus namespace, topic, access key, etc).

Despite this, I am receiving intermittent errors related to having an invalid authorization token signature: "AzureHttpError('SubCode=40103: Invalid authorization token signature',)`

How can I correct this, and how can I find out the cause?

Extranomical
  • 385
  • 1
  • 3
  • 13

1 Answers1

0

From what I can see here in the documentation, the token is generated using a few things:

SharedAccessSignature sig=<signature-string>&se=<expiry>&skn=<keyName>&sr=<URL-encoded-resourceURI>

You said you've checked the access key, so maybe you should check is your time on your server/computer/device has a correct and stable clock.

For debugging you can just write a log before the service bus call to print the current timestamp of your server and work out whether it is correct.

xinsnake
  • 21
  • 1
  • 5