Elasticsearch version: 5.6+master
Description of the problem including expected versus actual behavior:
_cat/aliases performs very slowly when cluster security is enabled. The issue was reported from a user upgrading 1.7.5 to 5.6.15 who noticed the API call was performing much slower on the later version. @imotov is able to reproduce on master.
Steps to reproduce:
- enable security
 
- create a 90000 aliases
 
- call 
_cat/aliases