Can't setup roles with active directory

Greetings,

I am trying to give the superuser role to my user, but I'm failing miserably.

When I try:
curl 'localhost:9200' -u myuser

I get the response:
'
{
"error" : {
"root_cause" : [
{
"type" : "security_exception",
"reason" : "action [cluster:monitor/main] is unauthorized for user [myuser]"
}
],
"type" : "security_exception",
"reason" : "action [cluster:monitor/main] is unauthorized for user [myuser]"
},
"status" : 403
}
'

So I know my active group is configured, it's just that my user don't have the correct permissions
But when I try:
x-pack/users roles myuser -a superuser

I get the response:
ERROR: User [myuser] doesn't exist

Does anyone know how do I give the superuser role to my active group user?

Thanks in advance.

Edit: Sorry for the code formatting, I'm still a newbie with this forum

Hello there,

I solved my own problem haha

If anyone is having the same problem
I've edited my x-pack/roles_mapping.yml file with

superuser:
  - "cn=myuser, dc=example, dc=com"

And it works fine now!

Hi Arthur,

I'm glad that you found the solution to your problem ! For future reference, please take a look at our documentation regarding role mapping , the behavior you witnessed is explicitly described.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.