rabbitmq / rabbitmq-auth-backend-http

HTTP-based authorisation and authentication for RabbitMQ
Other
199 stars 72 forks source link

Add remote client ip and routing key for resources #15

Closed yombo closed 9 years ago

yombo commented 9 years ago

First, thanks for this great plugin. I don't know erlang and trying to figure this out: How to add the client IP address to the request and for resources, is it possible to get the routing key?

I want to restrict access by routing key and I'd like to capture the client ip as well. Thanks.

michaelklishin commented 9 years ago

Routing key is only present on a few AMQP 0-9-1 methods, namely queue.(un)bind and basic.publish.

This kind of decision making does not belong to this plugin. Rather, it should be a separate mechanism, e.g. there is a plugin for source IP range-based authentication.

You can limit access to specific exchanges, and make your apps use more of those instead of routing key.