Security

search filter limit for user

duongl2
Explorer

I just want esrs user see only esrs index,but it has no data
if i command the srchfilter out. the user see all indexes.
thanks

this is my authorize.conf

role_esrs
rtsearch = enable
srchFilter = host=host*
importRoles = user
rtSrchJobsQuota = 0
srchDiskQuota = 0
srchIndexesAllowed = index
srchIndexesDefault = index
srchJobsQuota = 0
Tags (1)
0 Karma

nurtdi
Path Finder

That worked for me! Thank you, Joetron

0 Karma

RicoSuave
Builder

I think your issue here is that you are also importing the user role. And that role allows users to search all non internal indexes by default. Try removing that role from the inhereted list, then tweak the esrs role. You shouldn't have to use any search restrictions to achieve this.

0 Karma

RicoSuave
Builder

Yeah, that's because the user role has the REST_Properties Capabilities to allow the users to access it via web. An easier approach would be to just remove the all of the indexes in selected search indexes in the user role, then just specify what indexes the other roles can search. Or you could add the REST capabilities to the esrs role.

0 Karma

duongl2
Explorer

if i remove user role, i got an error when login
Internal Server Error

AuthorizationFailed: [HTTP 403] Client is not authorized to perform requested action; https://127.0.0.1:8089/servicesNS/test/search/properties/app?fillcontents=1

0 Karma

duongl2
Explorer

i use srchFilter = index=esrs.
it is ok. but i am not sure that is correct. because the user can't see others indexes. How is about the dashboard and view. The user still see all sources and hosts.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...