When a user is assignedmultiple rolesin Splunk and each has a defined srchFilter, Splunk combines these filters using alogical ANDoperation. This ensures that the user can only search within the intersection of constraints imposed by each role.
From Splunk Docs:
"If a user has multiple roles assigned and multiple roles specify srchFilter, Splunk softwareANDs the filters together."
— Source: Splunk Documentation – authorize.conf
Let’s break it down:
role_A specifies: sourcetype!=json AND index=main
role_B specifies: sourcetype=csv
To evaluate the effective search filter for the user, Splunk willANDthe two conditions:
(sourcetype=csv) AND (sourcetype!=json AND index=main)
This means the user's search is limited to events where:
sourcetype=csv (from role_B)
sourcetype!=json AND index=main (from role_A)
Combining them together logically:
srchFilter = ((sourcetype=csv) AND (sourcetype!=json AND index=main))
This is exactly what is shown inOption A.
Submit