Hi wazuh team and C.
rbac, readonly role.... is a nightmare :-)
I want that user1 sees only information|dashboard|events (read only role) on agents grouped in group1.
I want to do this for other users: ie. user2 and user3 to access only to agents in group2 and so on.
I follow rbac documentation and the discussion "User with read only permission" -
https://groups.google.com/d/msgid/wazuh/35b49d6e-49f8-4c85-a57d-f2c10c62be7cn%40googlegroups.com?utm_medium=email&utm_source=footerThen I created a policy named "group1_readonly_policy" where:
name: group1_readonly_policy
actions: agent:read, group:read, ciscat:read, mitre:read, rootcheck:read, sca:read, syscheck:read, syscollector:read, task:status
resources: agent:group:group1
effects: allow
Then I created a role named "group1_readonly_role" where:
name: group1_readonly_role
policies: group1_readonly_policy
Then a role mapping named "mapping group1_readonly_rolemapping" where:
name: group1_readonly_rolemapping
roles: group1_readonly_role
map internal users: user1 <- I created user1 as suggested in "User with read only permission" discussion
When I log in as user1 all is ok except sca visualization where I find this error:
You have no permissions
This section requires the permissions:
- agent:read (agent:id:*)
- sca:read (agent:id:*)
but if I change those permissions user1 see all agents.
The problem is only on the dashbord|visualization. I can see the events.
Where am I doing wrong?
Is there a better way to do this?
Thanks in advance
Simone