Hi Daniel,
You have to differentiate between Wazuh API users and Elastic users.
To create Wazuh API users, you have to use the
API itself or go to the
Wazuh > Security section in Kibana.
To create Elastic users, in Kibana, go to Security > Internal users. (users like the default admin user)
The
RBAC feature can be applied to
Wazuh API users. The Wazuh Security module is used for these features: Wazuh API users, policies, roles, etc.
What you want to do is create an Elastic user with RBAC permissions. This is possible using run_as.
Here you have a question I answered about RBAC. If you want to create an Elastic user with RBAC permissions, follow the steps detailed in that discussion.
Note that if you have already created an Elastic user (Security > internal users) and you have an error with a "Forbidden" message, you will have to add the role kibana_user to that user. Go to Security > Roles in order to do that. Afterwards, click on kibana_user > mapped users > manage mappings and add the user to internal users.
Note: these roles are not the same roles we have for the RBAC in the Wazuh API.
You will also need to add run_as: true to the API configuration of /usr/share/kibana/data/wazuh/config/wazuh.yml as now it is not enabled by default.
I hope this helps, don't hesitate to ask if you have more doubts about this proccess!