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!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...