Hello @yanwencheng , I went with a different approach. Instead of giving an API key the privilege role (in my case the role is called anonymous-role
), I gave the anonymous-role
to a newly created user and used the following code instead;
xpack.security.authc.providers:
basic.basic1:
order: 0
anonymous.anonymous1:
order: 1
credentials:
username: "[insert username here]"
password: "[insert password here]"
You can refer to my post here regarding it here