Configure index-based search targeting for transparent mode federated providers
Index-based search targeting lets administrators route federated search requests to specific transparent mode federated providers based on the indexes in a search. This gives you more control over which remote Splunk platform deployments receive search requests.
Use index-based search targeting to reduce unnecessary requests to federated providers and limit where searches and search logs are sent. This can improve search performance, reduce system overhead, and give administrators more control over sensitive search activity in distributed Federated Search for Splunk environments. For example, by targeting searches only to relevant providers, you can minimize exposure of sensitive information and help ensure that search logs are available only where they are needed.
Administrators can use the following REST endpoint parameters to configure index-based provider selection for Federated Search for Splunk by specifying which indexes federated search heads can access from federated providers when operating in transparent mode:
- The
allowIndexBasedProviderFilteringparameters, on the data/federated/settings/general endpoint, which turns on index-based filtering for federated providers. - The
fedSrchIndexesAllowedparameters, on the data/federated/provider/{federated_provider_name} endpoint, which specifies indexes that are accessible from each federated provider.
How index-based search targeting works
When the allowIndexBasedProviderFiltering parameters is set to true, the federated search head compares the indexes in a search with the fedSrchIndexesAllowed value for each transparent mode federated provider.
If at least one index in the search matches the provider fedSrchIndexesAllowed value, the provider is included in the federated search. If none of the indexes match, the provider is excluded.
For example, if a provider has fedSrchIndexesAllowed set to prod_*, the provider is included for the following search:
index=prod_data OR index=test_data
The same provider is excluded for this search:
index=test_data OR index=test_user
The fedSrchIndexesAllowed setting adds to, but does not override, role-based access control (RBAC). A search can target a provider, but users receive results only from indexes that their roles permit them to search.
Set up index-based search targeting
Use Splunk REST API for federated search endpoints to turn on index-based provider filtering and configure allowed indexes for each transparent mode federated provider, which is necessary to configure index-based search targeting for transparent mode federated providers.
- Turn on index-based provider filtering:
- Configure allowed indexes for each transparent mode federated provider:
The following example turns on index-based provider filtering and configures a transparent mode federated provider named east_provider that is targeted only by searches that include indexes matching prod_* or security_*.
curl -k -u admin:changeme -X POST \ https://localhost:8089/services/data/federated/settings/general \ -d allowIndexBasedProviderFiltering=true
curl -k -u admin:changeme -X POST \ https://localhost:8089/services/data/federated/provider/east_provider \ -d 'fedSrchIndexesAllowed=prod_*;security_*'