Hello,
I have created a consumer with username=XXX and custom.id=XXX and attached to him the rate-limit plug-in.
Then I have set the global LDAP authentication plugin name=“ldap-auth”. The ldap-auth plug-in works well having
“Authentication base64(username:password)” headers. But it seems that the “username=XXX” is not matched with the consumer XXX as rate-limits are not applied.
I have created the rate-limit plug-in with the following request:
curl -X POST http://localhost:8001/consumers/XXX/plugins
–data “name=rate-limiting”
–data “config.minute=2”
–data “config.policy=cluster”
When I send 3 requests on behalf of the user XXX, it does not prevent me from sending more requests.
On the other hand, when I set the rate-limit plug-in on route, it works.
How is the mapping of the API request to the consumer entity done?
I use docker image of the latest Kong version (2.6.0)
Update on troubleshooting:
I’ve used “key-auth” to match API request with the consumer. So i assume it is matched with the defined consumer, however no information headers are returned back to client, such as:
RateLimit-Limit: 6
RateLimit-Remaining: 4
RateLimit-Reset:
On the other hand, when I set rate-limiting plug-in on a route then I get these headers back and it works.
Update: I have cleared by Postgres DB of Kong and completely redone the following basic scenario
The result is the same. Only route rate-limiting plugin is applied.
Thanks for any hint or suggestions how to better troubleshoot it.