Opening/Closing Indexes

Hi, I’m trying to allow kibana users to close and open their own indexes. I tried to give “indices:admin/open” and “indices:admin/close” but that didnt work, when i gave the same permissions to index roles that i created it worked so got that one figured out. But the problem is even though i gave both permissions, users are only able to open the indexes and i get an error like the one below when i try to close an index from a useraccount :

{
“acknowledged” : false,
“shards_acknowledged” : false,
“indices” : {
“exampleindice” : {
“closed” : false,
“failedShards” : {
“0” : {
“failures” : [
{
“shard” : 0,
“index” : “exampleindex”,
“status” : “FORBIDDEN”,
“reason” : {
“type” : “security_exception”,
“reason” : “no permissions for [indices:admin/close[s]] and User [name=username, backend_roles=, requestedTenant=user]”
}
}
]
}
}
}
}
}

i also tried adding backend roles as i said in the beginning. Tried every possible combination of permissions(meaning indices:admin/open and close combinations on both user permissions and index role permissions) but can’t get users to be able to close indexes. Is there a way to do this?

You can add indices:admin/close* in allowed_actions.

As you can see [1], indices:admin/close[s] exists:
org.elasticsearch.action.admin.indices.close.[TransportVerifyShardBeforeCloseAction](https://www.javadoc.io/static/org.elasticsearch/elasticsearch/7.8.1/org/elasticsearch/action/admin/indices/close/TransportVerifyShardBeforeCloseAction.html)

contains

public static final java.lang.String 	NAME 	"indices:admin/close[s]"

[1] constant field values - elasticsearch 7.8.1 javadoc

@nyquillus Can you confirm if above method has solved your issue.