Splunk Search

How to block access to the search bar for users in an app?

DavidHourani
Super Champion

Hello,

I would like to create an app where users can only check out the existing dashboards, but cannot run searches themselves.

Is there a way to block the access to the search ui and still allow the users to see dashboard outputs ?

Best regards,
David

1 Solution

jlhamlet
Path Finder

Hi,

@David, hope you solved your problem. Here is what i would do:

1 - Give my "normal users" access to the application containing all my dashboards. (by selecting their roles)
Handle the Users rights by changing the permissions on your app
2- Set a default dashboard. (users will fall on the dashboard as they log on and falls directly on your app)
3- On each dashboard panels, hide the followings:

   <dashboard hideEdit="true">          # will hide on the dashboard: Edit, More Info, export PDF and Print
           ...
<option name="link.openSearch.visible">false</option>   # will hide Open in Search from under the panel
<option name="link.openPivot.visible">false</option>        # will hide Open in Pivot from under the panel
<option name="link.inspectSearch.visible">false</option>   # will hide Inspect from under the panel
<option name="link.exportResults.visible">false</option>     # will hide Export from under the panel

4- The SEARCH page is a "view" that is set to GLOBAL.
so i would change the permissions on that view so that my normal users could not access to it (even by changing the url)

Hope this helps some of you.

Happy Splunking,

Lloyd,

View solution in original post

jlhamlet
Path Finder

Hi,

@David, hope you solved your problem. Here is what i would do:

1 - Give my "normal users" access to the application containing all my dashboards. (by selecting their roles)
Handle the Users rights by changing the permissions on your app
2- Set a default dashboard. (users will fall on the dashboard as they log on and falls directly on your app)
3- On each dashboard panels, hide the followings:

   <dashboard hideEdit="true">          # will hide on the dashboard: Edit, More Info, export PDF and Print
           ...
<option name="link.openSearch.visible">false</option>   # will hide Open in Search from under the panel
<option name="link.openPivot.visible">false</option>        # will hide Open in Pivot from under the panel
<option name="link.inspectSearch.visible">false</option>   # will hide Inspect from under the panel
<option name="link.exportResults.visible">false</option>     # will hide Export from under the panel

4- The SEARCH page is a "view" that is set to GLOBAL.
so i would change the permissions on that view so that my normal users could not access to it (even by changing the url)

Hope this helps some of you.

Happy Splunking,

Lloyd,

DavidHourani
Super Champion

Thanks for your reply M. Lloyd 😉

It Fixed my problem. I replaced:

 <option name="link.openSearch.visible">false</option>   # will hide Open in Search from under the panel
 <option name="link.openPivot.visible">false</option>        # will hide Open in Pivot from under the panel
 <option name="link.inspectSearch.visible">false</option>   # will hide Inspect from under the panel
 <option name="link.exportResults.visible">false</option>     # will hide Export from under the panel

With:

<option name="link.visible">false</option> 

To keep the source small ^^

Thanks for your help!
David

jeffland
SplunkTrust
SplunkTrust

Maybe have a look here?

paramagurukarth
Builder

I don't know about the access level blocking of search bar..
but by changing the css.. you can hide it...
Copy the below code to application.css (MyApp\appserver\static\application.css) of your application

.search-bar{
   display:none !important;
}

paramagurukarth
Builder

Sorry..... My suggestion on application.css won't work as it will be loaded only in dash boards

DavidHourani
Super Champion

Wow thanks a lot man 😄 any idea how i can hide that for normal users only and allow it for users that have a bit more privileges ?

0 Karma

Raghav2384
Motivator

How about
1. create an app by taking out the search/Alerts/Reports views from the nav bar
2. Build all the report content etc
3. Create a role
4. Assign users only to that app?

DavidHourani
Super Champion

That's a smart way to do it but users can still modify the URL and get access to the search bar that way 🙂

0 Karma
Get Updates on the Splunk Community!

Optimize Cloud Monitoring

  TECH TALKS Optimize Cloud Monitoring Tuesday, August 13, 2024  |  11:00AM–12:00PM PST   Register to ...

What's New in Splunk Cloud Platform 9.2.2403?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2403! Analysts can ...

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...