smallrye / smallrye-reactive-messaging

SmallRye Reactive Messaging
http://www.smallrye.io/smallrye-reactive-messaging/
Apache License 2.0
239 stars 177 forks source link

Azure Role Based Access control with AMQP 1.0 #2506

Closed antoinechamot closed 3 months ago

antoinechamot commented 7 months ago

Hi, I need to use smallrye with Azure service Bus. For security reasons, I can only use the recommended passwordless connections using Role Based Access control

Is it possible to configure smallrye to connect this way or not ? When I look at the AMQP connector, it don't see anything else than simple username /password.

cescoffier commented 7 months ago

I do not think we can. There is a AMQPOptioncusotmizer, maybe you can hook something here, but I doubt.

I think you will need a custom connector.

artragis commented 7 months ago

Hello, I see that the azure sdk is using the project-reactor lib. Do you think that we can easily use their SDK if we use the mutiny-reactor library? https://smallrye.io/smallrye-mutiny/1.6.0/guides/converters/#picking-the-right-dependency

artragis commented 3 months ago

Hello, I think we can close this ticket. On our side we manage to create a custom connector that allows us to use Azure Service Bus with default identity. We indeed had to use the mutiny-reactor lib and a custom message mapper to get the object:

return FlowAdapters.toFlowPublisher(
                ReactiveStreams.fromPublisher(receiver.receiveMessages()).map(AzureServiceBusMapper::convertToMessage)
                               .buildRs());
cescoffier commented 3 months ago

Thanks for the feedback - closing.