As mentioned in the official documentation of Elasticsearch, using file realm to define all roles in Elasticsearch is not a preferred approach:
"Please note however, that the roles.yml file is provided as a minimal administrative function and is not intended to cover and be used to define roles for all use cases."
https://www.elastic.co/guide/en/elasticsearch/reference/8.3/defining-roles.html
What is the reason? can anyone argue pros and cons of using Elasticsearch file realm for all roles and users instead of using its native realm (roles and users APIs)?