I have an error "org.apache.qpid.jms.provider.exceptions.ProviderSecurityException: InvalidSignature: The token has an invalid signature." when using ServiceBus with JMS in SpringBoot app

Artur Liwocha 5 Reputation points
2023-07-11T12:15:52.53+00:00

I am using SpringBoot 2.7.6, Java 17 and followed all the steps to configure ServiceBus using this guide here: https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-service-bus?tabs=use-a-service-bus-topic, but somehow I cannot connect to Azure ServiceBus and I keep receiving the error which is in the topic of this thread. My app is deployed as Kubernetes Service to Azure, all the permissions seems to be fine in terms of Azure. Also I double checked credentials like connection string etc.

I did pretty all the same like in the guide above, nothing special. I am using ServiceBus topic, therefore I provided connection string, pricing-tier and topic-client-id in application.properties. Also I configured JmsListener providing topic name and subscription name as well as topicJmsListenerContainerFactory.

What am I doing wrong?

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
700 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 19,151 Reputation points Moderator
    2023-07-26T18:32:20.1166667+00:00

    Hi @Artur Liwocha , we are sorry to hear you're facing this issue.

    The error "org.apache.qpid.jms.provider.exceptions.ProviderSecurityException: InvalidSignature: The token has an invalid signature." means that there is an issue with the authentication token used to connect to Azure Service Bus.

    Please make sure that the authentication token used to connect to Azure Service Bus is correct and that it has not expired. You can generate a new authentication token in the Azure portal under the Service Bus namespace.

    You can also enable diagnostics for the Service Bus namespace to get more detailed information about the issue. You can enable diagnostics in the Azure portal under the Service Bus namespace.

    Azure Service Bus Premium tier supports JMS 1.1 and JMS 2.0.

    Azure Service Bus - Standard tier supports limited JMS 1.1 functionality. For more details, please refer to this documentation.

    Can you please share how set up you authentication? did you use DefaultAzureCredential ?Are you using the standard or premium tier?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.