I want to filter the server list for each user role based on the servers they are responsible for. During my research, I found that this can be done using "document level security"
I prepared the following JSON request to create a role in DevTools:
PUT _security/role/role_team_a
{
"indices": [
{
"names": [ "metricbeat-*", "logs-*" ],
"privileges": [ "read" ],
"query": {
"bool": {
"filter": [
{ "terms": { "host.name.keyword": [ "server-1", "server-2" ] } }
]
}
}
}
]
}
However, I received the following error:
{
"error": {
"root_cause": [
{
"type": "security_exception",
"reason": "current license is non-compliant for [field and document level security]",
"license.expired.feature": "field and document level security"
}
],
"type": "security_exception",
"reason": "current license is non-compliant for [field and document level security]",
"license.expired.feature": "field and document level security"
},
"status": 403
}
I have already enabled the following parameters in elasticsearch.yml
:
xpack.security.enabled: true
xpack.security.authc.api_key.enabled: true
I use Elastic OSS (Open Source) v8.17.2. However when license check it said 'Basic edition'. (GET _license)
{
"license": {
"status": "active",
"uid": "820c6e65-4b4e-4707-a9d8-0067dc497a1e",
"type": "basic",
"issue_date": "2025-03-10T07:14:07.783Z",
"issue_date_in_millis": 1741590847783,
"max_nodes": 1000,
"max_resource_units": null,
"issued_to": "elasticsearch",
"issuer": "elasticsearch",
"start_date_in_millis": -1
}
}
Please suggest solution for this issue.