Skip to main content
Solved

How to post messages to Azure Service Bus w/ Azure Shared Key


Forum|alt.badge.img+1

We’re trying to use an Event Action to POST a message to azure service bus. We are trying to use the Azure Shared Key and  using the Azure Service Bus Primary Key value in the Event Action key field. Is there a special format for the key to get this to work?

 

Rest End Point POST: https://namespae.servicebus.windows.net/default/messages

Authentication: Azure Shared Key

 

Application Message Response:
ExecutionException from Sender thread 
Caused by: ifs.fnd.connect.senders.ConnectSender$TemporaryFailureException: Exception while sending data 
Caused by: ifs.fnd.connect.http.HTTPClient$UnauthorizedAccessException: POST error #401: Unauthorized access

Best answer by dsj

Hi @ZYDBSHERMAN 

It seems like the Azure shared key can be used for accessing only the Azure blob storage endpoint.

Since Azure Service Bus SAS generation is a different than shared key for Az blob storage, I don’t think you can use this method for accessing service bus .

Configure the REST Transport Connector - Technical Documentation For IFS Cloud

 

Instead, try to setup an app registration and use the OAurh2 credentials to access the endpoint

Hope following documentation would help you to set this up.

https://learn.microsoft.com/en-us/azure/service-bus-messaging/authenticate-application

 

Cheers!

Damith

View original
Did this topic help you find an answer to your question?

dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • June 10, 2024

Hi @ZYDBSHERMAN 

It seems like the Azure shared key can be used for accessing only the Azure blob storage endpoint.

Since Azure Service Bus SAS generation is a different than shared key for Az blob storage, I don’t think you can use this method for accessing service bus .

Configure the REST Transport Connector - Technical Documentation For IFS Cloud

 

Instead, try to setup an app registration and use the OAurh2 credentials to access the endpoint

Hope following documentation would help you to set this up.

https://learn.microsoft.com/en-us/azure/service-bus-messaging/authenticate-application

 

Cheers!

Damith


Forum|alt.badge.img+2
  • Do Gooder (Customer)
  • June 12, 2024

Hi @ZYDBSHERMAN 
Maybe you cannot do it this way, but what what worked for me, was creating a SharedAccessSignatur using the SB Key and then using IFs Connect.
In Ifs Connect for the Routing Address then add the SAS as additional Header (Authorization=SharedAccessSignature sr=.....)
The post itself we did using  plsql_rest_sender_API.Call_Rest_EndPoint2

 

Regards
Stefan


Forum|alt.badge.img+1
  • Do Gooder (Customer)
  • June 12, 2024

using @dsg Damith’s advice, I was able to get this to work using an Azure Registered Application client secret, granting the Registered Application access to the Azure Service Bus and then using OAuth2 (Client Credentials).

I will explore using a routing address as we will be configuring a bunch of event actions and it would be nice to not have to maintain the client secret on every endpoint. It would also be nice to more easily rectify event cross contamination after cloning from Prod to other environments.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings