-
Describe the bugThere is a running http auth backend on nginx which installed in the same host of RabbitMQ. RabbitMQ configuration: auth_backends.1 = http Any advice will be appreciated Reproduction steps
Expected behaviorHelp to correct the issue. Additional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
rabbitmqctl status: OS PID: 387655 Plugins Enabled plugin file: /etc/rabbitmq/enabled_plugins
Data directory Node data directory: /var/lib/rabbitmq/mnesia/rabbit@hqrabbitmq01l Config files
Log file(s)
Alarms (none) Memory Total memory used: 0.2733 gb reserved_unallocated: 0.0846 gb (30.94 %) File Descriptors Total: 0, limit: 32671 Free Disk Space Low free disk space watermark: 0.05 gb Totals Connection count: 0 Listeners Interface: [::], port: 15672, protocol: http, purpose: HTTP API |
Beta Was this translation helpful? Give feedback.
-
Rabbitmqctl environment as attachement. |
Beta Was this translation helpful? Give feedback.
-
@tsigcn Ranch does not "crash". A core authN module expects a different response, see https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbit/src/rabbit_access_control.erl#L213-L224. Please put together an executable way to reproduce against |
Beta Was this translation helpful? Give feedback.
-
I have known what happened, sorry for the mistake. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
Just for completeness' sake, since I have already spent some time trying to reproduce. Using our standard Spring HTTP authN/authZ backend example with a small modification to make it return log.file.level = debug
log.console.level = debug
# auth_backends.1 = cache
# auth_cache.cached_backend = http
auth_backends.1 = http
auth_http.http_method = post
auth_http.user_path = http://localhost:8080/auth/user
auth_http.vhost_path = http://localhost:8080/auth/vhost
auth_http.resource_path = http://localhost:8080/auth/resource
auth_http.topic_path = http://localhost:8080/auth/topic I can successfully publish and consume using Mosquitto CLI tools: mosquitto_sub -h localhost -t "/mosquitto/t1" -V mqttv5 mosquitto_pub -h localhost -t "/mosquitto/t1" -m "123" -V mqttv5
mosquitto_pub -h localhost -t "/mosquitto/t1" -m "123" -V mqttv5
mosquitto_pub -h localhost -t "/mosquitto/t1" -m "123" -V mqttv5 Here are the logs:
|
Beta Was this translation helpful? Give feedback.
I have known what happened, sorry for the mistake.
Nginx add a "\n" automatic, auth_user ignore it but auth_vhost and others does not.
We removed "\n", all the things go well.
Thanks in advance.