-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RBAC] Issues detected when using RBAC #2579
Comments
Hi @AdriiiPRodri, Regarding the issue about the query in Dev Tools From the app, when the token is generated with {
method: 'POST',
headers: { 'content-type': 'application/json' },
auth: { username: 'wazuh-wui', password: 'wazuh-wui' },
url: 'https://localhost:55000/security/user/authenticate/run_as',
data: {
user_name: 'test',
is_reserved: false,
is_hidden: false,
is_internal_user: true,
user_requested_tenant: null,
backend_roles: [],
custom_attribute_names: [],
tenants: { test: true, global_tenant: true },
roles: [ 'admin', 'kibana_user', 'own_index' ]
}
} The token obtained is: If we sent a curl with this token to the endpoint In conclusion, both queries are sent with the same token, so we think that maybe is the API who isn't taking into account the user permissions for the endpoint Can you check this, please? |
Hi @frankeros, We have been testing and it is correct, the endpoint We have the fix ready and it will be merge as soon as possible. Thanks for the report. |
Hi @AdriiiPRodri, |
Hi team,
Recently we have had three problems using the APP with Wazuh version 4.0. The first of these problems is related to the dev-tools. The endpoint
/security/users/me
is not working properly. It always returns all system permissions. For example, in this screenshot we only have permission to see the agents that belong to the group US_WEST:We see that the permissions have been correctly applied as only agent 002 belongs to this group. However, when we make a request with the endpoint
/security/users/me
all the permissions are returned to us:Note: This error may occur with more security endpoints.
The second problem is related to the overview of the Wazuh APP. Despite having the permission to see the agents of the group US_WEST, we see that we have 0 agents. Investigating the requests that are made to obtain this information, we see that it is called the endpoint
/agents/summary/status
which returns a correct output taking into account our permissions:{active: 1, disconnected: 0, never_connected: 0, pending: 0, total: 1}
The third problem is related to the 'Agents' tab, when we click on it no agent appears. In order to obtain this information, the endpoint
/agents/000/config/request/remote
is used. However, our user does not have permissions on agent 000 as it does not belong to the US_WEST group. This causes users to always have to add agent 000 to the permissions.These are the permissions we have used to perform these tests:
Regards
The text was updated successfully, but these errors were encountered: