Skip to content
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

Read Only Dashboard User Role causes Forbidden Errors on visualizations on a doashboard with tenants enabled #916

Closed
Tracked by #2701
inf17101 opened this issue Mar 7, 2022 · 7 comments
Labels
bug Something isn't working help wanted Extra attention is needed, need help from community triaged

Comments

@inf17101
Copy link

inf17101 commented Mar 7, 2022

If you create a Read Only Role according to the documentation (https://opensearch.org/docs/latest/security-plugin/access-control/users-roles/#set-up-a-read-only-user-in-opensearch-dashboards) then a "Forbidden" error is thrown of some visualizations.

image

If you create a read only user with the documentated role settings some visualizations on a dashoard shows an errror.
If you hit multiple times CTRL + F5, the visualization loads correct but other visualizations show this error instead.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Read Only Dashboard User according to the Opensearch documentation
  2. Create a Tenant
  3. Create some dashboards
  4. Log in with the user into the tenant

Expected behavior
A clear and concise description of what you expected to happen.

OpenSearch Version
1.2.2

Dashboards Version
1.2.0

Plugins

Please list all plugins currently enabled.
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • Opensearch and Opensearch Dashboards are running on Linux Ubuntu Server 20.04
  • Win10 / Chrome Version 98.0.4758.102

Additional Information
Sometimes you can see the following exception in the log:
{"type":"log","@timestamp":"2022-03-07T10:27:06Z","tags":["error","opensearch","data"],"pid":338569,"message":"[security_exception]: no permissions for [indices:data/read/search] and User [name=eagle_01, backend_roles=[], requestedTenant=null]"}

It is very confusing that "requestedTenant" for such a request is empty, because multi tenancy is enabled. And the user has full read only permissions according to documentation.

@inf17101 inf17101 added bug Something isn't working untriaged labels Mar 7, 2022
@kavilla
Copy link
Member

kavilla commented Mar 7, 2022

Hello @inf17101, thank you for opening! Re-routing to the security plugin repo for more insight.

@kavilla kavilla transferred this issue from opensearch-project/OpenSearch-Dashboards Mar 7, 2022
@peternied
Copy link
Member

@jimishs Do you know if we have an update on this issue?

@jimishs
Copy link

jimishs commented Apr 2, 2022

@inf17101 Could you share whether the said user has the right index permissions to the indices that are being visualized?

From the error above i see that the said user may not have read permissions on the index being visualized.

@zydyka
Copy link

zydyka commented Apr 13, 2022

I join the problem, I also have multitenancy, and several indexes for which only reading and filtering at the document level are configured. in discover, i can see everything as needed. in the dashboard, some panels are "Forbidden" or "The request for this panel failed", which change if the page is refreshed
opendistro 7.10.2

@peternied peternied added the help wanted Extra attention is needed, need help from community label May 2, 2022
@omar-chaabouni
Copy link

Try this,
image

@jseiser
Copy link

jseiser commented Jun 8, 2022

We are dealing with this now on Opensearch 1.2

Using the above setup, the users can login but they get an empty top left menu. The only way users can actually see the discover section of the Kibana menu is if they are in the security_manager group. Which then lets them change the group itself, which is not good.

@nibix
Copy link

nibix commented May 19, 2023

See opensearch-project/security#2701 (comment) for a analysis of the dashboards read only functionality.

Regarding the configuration shown at #916 (comment) : This seems to achieve a read only tenant, but it is wrong on two levels:

Regarding the randomly appearing Forbidden error: My gut feeling is that there is another issue interfering as well. This would need more thorough information for analysing and reproducing the issue like user and role config and more context from the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed, need help from community triaged
Projects
None yet
Development

No branches or pull requests

9 participants