Azure / azure-service-bus

☁️ Azure Service Bus service issue tracking and samples
https://azure.microsoft.com/services/service-bus
MIT License
580 stars 775 forks source link

How to identify the publisher of a message in a multi-publisher to the same topic scenario? #680

Open svirchenko opened 8 months ago

svirchenko commented 8 months ago

Hi everyone,

Is there any way to know which Publisher published a particular message in ASB premium in scenario where multiple publishers are publishing to the same topic.

According to the official documentation, I see that it might be possible to get IP Address of client application (Publisher) only for aggregated diagnostic information for various data plane access operations (such as send or receive messages) in Premium Service Bus

EldertGrootenboer commented 8 months ago

Thank you for suggesting this feature. We have opened an investigation task for this in our backlog, and will update this issue when we have more information. To help us get this prioritized, it would be helpful to see others vote and support this feature, as well as explain their scenarios.

AlbozDroid commented 8 months ago

We had the same issue and ended up with a custom solution involving the publishers sending additional metadata (the solution relies on Publishers behaving correctly).

It'd be great to see this as a built-in/native feature.

Sandeep7OnShell commented 8 months ago

We also have a similar use case with multiple subscribers publishing on the same topic. We have also built a custom solution but this could be a great feature for end-to-end tracking and to take custom actions.

msundman78 commented 5 months ago

I came here to post a request for a similar feature. Now with support for RBAC in Azure Service Bus, I've been able to create an Angular SPA application using MSAL.js to authenticate the user against Entra ID. By giving my app User Impersonation rights to Azure Servicebus, the SPA app can securely connect directly to the Servicebus to post messages, for an on-prem Windows Server agent to pick up and process.

The only missing part is that my on-prem agent can't trust the identity of who posted the request to the service bus based on the information inside the message as it can easily be forged by the user.

But if the servicebus could be configured to mark each message with the UPN or ObjectID of the RBAC authenticated user that posts a message, then such an architecture could be made secure enough without having to introduce back-end functions.

EldertGrootenboer commented 2 months ago

This item in our backlog, however we currently don't have an ETA on when development might start on this. For now, to help us give this the right priority, it would be helpful to see others vote and support this item.

sandeepiiit commented 1 month ago

I came here to +1 this feature request. A non-forgeable publisher identification is sorely missing, and would be useful.

Sandeep7OnShell commented 1 month ago

+1