cloudamqp / amqproxy

An intelligent AMQP proxy, with connection and channel pooling/reusing
https://www.cloudamqp.com
MIT License
350 stars 54 forks source link

Lost credentials when using the proxy. #165

Closed mikecruz closed 5 months ago

mikecruz commented 5 months ago

When using amqproxy v2.0.0-rc.8 and amqplib v0.10.3, credentials appear to be stripped out. I get the following error on rabbitMQ PLAIN login refused: user '' attempted to log in with a blank password, which is prohibited by the internal authN backend

This appears similar to https://github.com/cloudamqp/amqproxy/issues/1, but amqplib uses PLAIN.

We are able to connect directly to our cloudamqp rabbitMQ instance without issue.

viktorerlingsson commented 5 months ago

Hi @mikecruz ,

I tried but I'm not able to reproduce this with amqproxy v2.0.0-rc.8 and amqplib v0.10.3.

Could you provide some more information about how your upstream url looks when starting amqproxy, as well as what connection string you are using in your clients? How are you providing username and password?

My setup: amqproxy -p 5682 amqps://campbell.lmq.cloudamqp.com

const url = 'amqps://user:pass@localhost:5682/vhost'

mikecruz commented 5 months ago

Hi @viktorerlingsson,

our setup looks pretty much the same, except we are using amqp instead of amqps. I was originally using an options object in amqplib, but tried it with a url string as well and have the same result.

I'm starting to think the issue is with our vpn/networking between our workstations and the proxy. I was poking around in wireshark locally and I can see the credentials going out.

do you know if there is a verbose logging option in amqproxy, that would log something out if the credentials are missing?

viktorerlingsson commented 5 months ago

@mikecruz you can enable debug logging by using -d when starting amqproxy, amqproxy -p 5682 -d amqps://campbell.lmq.cloudamqp.com, that might give you some more information