Configure flexible roles by editing authorize.conf. Roles are defined by lists of capabilities. You can also use roles to create granular access controls by setting a search filter for each role.
Caution: Do not edit or delete any roles in $SPLUNK_HOME/etc/system/default/authorize.conf. This could break your admin capabilities. Edit this file in $SPLUNK_HOME/etc/system/local/, or your own custom application directory in $SPLUNK_HOME/etc/apps/. For more information on configuration files in general, see how configuration files work.
ConfigurationAdd the following attribute/value pairs to $SPLUNK_HOME/etc/system/local/authorize.conf.
[role_$ROLE_NAME] $CAPABILITY1 = enabled $CAPABILITY2 = enabled ... importRoles = $OTHER_ROLE srchFilter = $SEARCH_STRING
The srchFilter field can include any of the following search terms:
Note: Members of multiple roles inherit capabilities from the role with the highest permissions. To set a more restrictive search filter for such users, make a new role.
The search terms cannot include:
Once you've created a role in authorize.conf, map it to a user via Splunk Web.
Note: You must restart Splunk after making changes to authorize.conf. Otherwise, your new roles will not appear in the Role list.
lock dashboards for rolesYou can lock a dashboard for a role via web.conf.
In $SPLUNK_HOME/etc/system/local/web.conf add the following:
disablePersistedPrefs = <role>
This prevents any changes a role makes from being written to prefs.conf.
ExampleThe following example creates the role of Ninja. This user can do everything listed as capabilities (eg edit_input). Also, the Ninja role imports the capabilities of the Security and Compliance roles -- meaning Ninja can do everything (and more) that Security and Compliance can do. Additionally, there is a search filter which means that Ninja can only run searches on hosts swan or pearl.
[role_Ninja] edit_input = enabled delete_input = enabled edit_global_save_search = enabled delete_global_save_search = enabled create_alert = enabled start_alert = enabled start_global_alert = enabled stop_alert = enabled stop_global_alert = enabled save_local_eventtype = enabled edit_role_search = enabled edit_local_search = enabled edit_saved_search = enabled savesearch_tab = enabled allow_livetail = enabled importRoles = Security;Compliance srchFilter = host=swan OR host=pearl
Comments
No comments have been submitted.