I’ve set-up opendistro 0.10.0.0
with LDAP authentication and authorization and now trying to set-up role-mapping for backend LDAP users. Reason for choosing version 0.10.0.0
is because it corresponds to ES version 6.8.1
This is what I have done so far:
- A set of few users identified as
Admins
. Achieved this by configuring a rolesuperuser
havingunlimited
access to bothcluster
andindices
. Mapped this to thebackend
roleDL-ES-AdminUsers
. Works fine. - A second set of users identified as
End Users
. Achieved this by configuring a roleend_users
havingread
access toall indices
andINDICES_ALL
access to.kibana*
indices and alsoCLUSTER_COMPOSITE_OPS_RO
access. Mapped this to thebacked
roleDL-ES-EndUsers
.
Now I want to create a 3rd set
of users who have only RO access. I created a role users
with RO
access to all indices and CLUSTER_COMPOSITE_OPS_RO
. The point where I’m stuck is in backend
mapping since I need to map the users
role to all who are NOT
in 1
and 2
i.e. NOT in DL-ES-AdminUsers
and NOT in DL-ES-EndUsers
. How can I achieve that?
In normal elasticsearch with x-pack, I would have done the following:
{
"ReadOnlyUsers" : {
"enabled" : true,
"roles" : [
"user"
],
"rules" : {
"all" : [
{
"except" : {
"field" : {
"groups" : [
"CN=DL-ES-EndUsers,OU=Distribution,OU=Groups,DC=FOO,DC=BAR,DC=COM",
"CN=DL-ES-AdminUsers,OU=Distribution,OU=Groups,DC=FOO,DC=BAR,DC=COM"
]
}
}
}
]
},
"metadata" : { }
}
}
But I don’t see any option to do similar thing in opendistro.
This is how I have configured role mapping for 1
and 2
:
{
"end_user" : {
"backendroles" : [
"DL-ES-EndUsers"
],
"hosts" : [ ],
"users" : [ ]
},
....
"superuser" : {
"backendroles" : [
"DL-ES-AdminUsers"
],
"hosts" : [ ],
"users" : [ ]
}
}
Will appreciate some inputs on this. Thanks.