Security

Navigation Menu

Sriram
Communicator

I need to build a navigation menu for an app based on user roles. For example, I need a navigation menu which has views 'view1', 'view2' for users who are in 'user' role, I need a navigation menu which has views 'view1', 'view3' for users who are in 'admin role'. Any suggestions on how to accomplish this.

The navigation menu has only 'default.xml' and no easy way to customize it. Appreciate any feedback.

Tags (3)
1 Solution

Drainy
Champion

Users will only see the dashboards they have permissions to. As an Admin you will see them all, if you have a user group without permissions to view a dashboard then that dashboard will not appear in that users navigation view, despite it being in the default.xml

EDIT: Have a look here for a similar question I hit before, http://splunk-base.splunk.com/answers/37926/multiple-defaultxml-navs-specify-which-user-gets-what

View solution in original post

Drainy
Champion

Users will only see the dashboards they have permissions to. As an Admin you will see them all, if you have a user group without permissions to view a dashboard then that dashboard will not appear in that users navigation view, despite it being in the default.xml

EDIT: Have a look here for a similar question I hit before, http://splunk-base.splunk.com/answers/37926/multiple-defaultxml-navs-specify-which-user-gets-what

Drainy
Champion

Hm, I would treat it as a bug. Splunk can modify it if they disagree but since the permissions system is meant to work silently in the background and not show links to dashboards that users can't see, this is clearly failing in this instance as it will still try to load the default. It needs to be looking for the next "user permission approved" dashboard to use as the default

Sriram
Communicator

Yes. We do. Do you suggest to file a bug report or enhancement request.

0 Karma

Drainy
Champion

I would argue that if the navigation isn't displaying the options per user permissions then it should move onto the next option by default which would be a bug. Either way its not behaving the way you would obviously expect. Do you have a support license?

Sriram
Communicator

Cool. Although it is not exactly what I want, the suggestion you gave worked. My menu options are mutually exclusive for the roles. For now, I made as visible to both roles and made it default. I will go with it for now. Do you think it is a bug ? Thanks for your help.

0 Karma

Drainy
Champion

Right, the first one is the default, Splunk is probably still trying to load it. Try setting one that all can access as a default and see what happens.

Sriram
Communicator

Here is the sample navigation menu

0 Karma

Sriram
Communicator

I assumed the same. Unfortunately that is not happening. The first option in the menu is a "Supervisor_Dashboard" view which is visible only to admin, when a user who has 'user' role logs in. Splunk is throwing this error. "Splunk cannot find the "Supervisor_Dashboard" view."

0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...