Hello Mauro,
You're almost there. You only need to map that internal user to the readonly rule within the Wazuh application.
Bear
in mind that since this option affects the Wazuh API, which is separate
from Elasticsearch, this step is done separately from the rest of the
configuration of the account.
I agree a proper
guide should be available, so for future reference I'll start from a
clean installation while simplifying some of the steps you have already
taken, but feel free to jump to the last three images.
First, select from the top left menu Security, then Internal users and Create internal user:
Provide the username and credentials, I have chosen readonly as an example:
Then select Roles and Create Role, provide a name for the role (I have chosen readonly as an example) and give it cluster_composite_ops_ro and kibana_all_read Cluster permissions, then type in into "Index" wazuh* andย .kibana* and select read as the permissions given to these indices and click Create:
Then select Mapped users and click on Map users:
Select the user and click on Map:
Then repeat this process but for the built-in kibana_user role:
Finally, go back into the Wazuh application, then select Security and Roles mapping and click on Create Role mapping:
Give it a name, assign the built-in readonly Role and select the internal user you previously created before clicking Save role mapping:
It's important, as mentioned by John previously to modify the run_as setting in /usr/share/kibana/data/wazuh/config/wazuh.yml and set it to true
before restarting the Kibana service. And ensuring that the there
aren't any pre-existing cookies when testing the new user's role.
This
user will be able to see but not modify the groups, write options will
be greyed out and hovering over them will specify the missing
permissions:
For
reference, I created this guide using Wazuh 4.1.5 and Open Distro
1.13.2 (which is equivalent to Elastic v7.10.2) from a newly imported
Wazuh OVA
Please let me know if you have any questions.
Best Regards,
Juan Carlos Tello