Closed derek-ho closed 3 weeks ago
[Triage] Hi @derek-ho thanks for filing this issue. The follow-up design you provided seems like a good way to handle this scenario and looks like you have a good start on this. Going to mark triaged.
A way to reproduce this issue:
security_rest_api_access
role mapped to it (To be able to access the Security tab in left navigation pane)A BIG QUESTION here is if the user doesn't have access to default data-source then Switch to default data-source
button is of no use since it will always bring you back to the same screen.
@DarshitChanpura @derek-ho do we have the ability to fetch a list of accessible datasources based on permissions? For instance, can we know that User A definitely has access to Datasource 1?
If so, we may be able to redirect to default if is accessible by the user and otherwise the last accessed datasource they have permission for?
If not, I suggest we enforce access for a disconnected landing page all users can hit. Similar to the login screen where they are not yet auth'd we can kick them back to a landing page regardless of their permissions and then have deterministic behavior in the case where the datasource is not permitted.
do we have the ability to fetch a list of accessible datasources based on permissions? For instance, can we know that User A definitely has access to Datasource 1?
No we do not. DataSources information is stored as saved object inside the kibana and tenant index. When aggregation view is enabled, the user will require read permissions to the tenant which contains that particular datasource.
If not, I suggest we enforce access for a disconnected landing page all users can hit. Similar to the login screen where they are not yet auth'd we can kick them back to a landing page regardless of their permissions and then have deterministic behavior in the case where the datasource is not permitted.
There is no way to enforce that right now, so instead we bring them to a page which allows them to switch to local cluster. This scenario will only be required when aggregation view is enabled. When it is disabled, the page auto-reloads with default datasource.
Corresponding PR closed. No plan to fix.
What is the bug? When no datasources available, or illegal option passed in via URL the plugin crashes
How can one reproduce the bug?
What is the expected behavior?
What is your host/environment?
Do you have any screenshots? If applicable, add screenshots to help explain your problem.
Do you have any additional context? Add any other context about the problem.