Dashboards & Visualizations

User without rights to access default home page

manur
Explorer

Hi,

I have an app with some views/dashboards, and the right to access each view is owned by a specific role :

metadata/default.meta

[views/view1]
access = read : [ admin, access_to_view1 ], write : [ admin ]
export = none
owner = admin
...

The set of dashboards a specific (non-admin) user can see and access is defined through the list of roles given to this user. For example, user "jim" could have the roles access_to_view1 and access_to_view3in order to see the dashboards view1 and view3, but not view2.

My problem is that any user without access_to_view1 is effectively blocked out of the app, since upon login she is redirected to the default home page which is view1 for the app, and Splunk returns a 404 since this user doesn't have the right to access this dashboard.

default/data/ui/nav/default.xml

<nav search_view="search">
    <view name="view1" default="true"/>
    <view name="view2"/>
    <view name="view3"/>
</nav>

The problem is still there if I remove the default="true" part ; I think the default home page is the first view in the list in this case anyway.

How can I manage to have an app in which some users do not have read access to the default home page?

0 Karma
1 Solution

manur
Explorer

I solved the problem by using dynamic view lists in the navigation file (http://dev.splunk.com/view/SP-CAAAEP9#lists).

default/data/ui/nav/default.xml

<nav search_view="search">
    <view source="all" match="view"/>
</nav>

This will take the available views for the current user and display them. Splunk will not try to display links to views the current user doesn't have rights for, so no error.

I took care to have the name of the views (the file name) ordered in the order I need them to display (ie. view1, view2 etc. instead of something like view_summary, view_problems etc.).

View solution in original post

0 Karma

manur
Explorer

I solved the problem by using dynamic view lists in the navigation file (http://dev.splunk.com/view/SP-CAAAEP9#lists).

default/data/ui/nav/default.xml

<nav search_view="search">
    <view source="all" match="view"/>
</nav>

This will take the available views for the current user and display them. Splunk will not try to display links to views the current user doesn't have rights for, so no error.

I took care to have the name of the views (the file name) ordered in the order I need them to display (ie. view1, view2 etc. instead of something like view_summary, view_problems etc.).

0 Karma
Get Updates on the Splunk Community!

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...

Cloud Platform & Enterprise: Classic Dashboard Export Feature Deprecation

As of Splunk Cloud Platform 9.3.2408 and Splunk Enterprise 9.4, classic dashboard export features are now ...