In auth plugins, support passing information about consumer to backing service #228
Labels
idea/new plugin
[legacy] those issues belong to Kong Nation, since GitHub issues are reserved for bug reports.
Milestone
Currently, when using the
basicauth
andkeyauth
plugins, aX-Consumer-ID
header is added to the request, allowing the backing service to know who authenticated to Kong. However, unless the service has been told about the consumers through some other channel, it won't know who that consumer is.One option would be for the service to call back to Kong and do a lookup via the Admin API's
GET /consumers/{id}
endpoint. However, the Admin API (at least in its current state) has no security, and isn't really something that you'd want various services calling back to.A simpler solution would seem to be to add headers to the request to pass along the consumer's
username
/custom_id
(perhapsX-Consumer-Username
andX-Consumer-CustomID
?) This would allow the backing service to base further authorization decisions on this information without calling back to Kong. If desired, this could be an optional feature turned on via the plugin configuration.The text was updated successfully, but these errors were encountered: