On Splunk Enterprise, you can create and manage roles by editing the authorize.conf configuration file. This option is not available in Splunk Cloud, you can instead use Splunk Web to create and manage roles.
Users hold roles that determine their level of access and the tasks that they can perform. For more information about roles and capabilities, see About role-based user access.
When you make changes to the authorize.conf file to edit roles you must reload authentication or restart Splunk Enterprise for those changes to take effect. If you do not restart or reload, the roles you added do not appear in the Roles list in Splunk Web. See Refresh the authentication scheme in this topic for instructions to refresh authentication without restarting the Splunk platform.
Never edit or delete roles in the default location of
$SPLUNK_HOME/etc/system/default/authorize.conf. Making edits to this file can cause problems with administrator capabilities on the platform instance. Instead, make role edits in the local version at
$SPLUNK_HOME/etc/system/local/authorize.conf, or in your own custom application directory in
For more information about editing configuration files like authorize.conf, see
Distributed search configurations have slightly different authorization needs. When you use search head clustering, you must make sure that the search heads and the search peers all use the same set of authorize.conf files. To confirm that your authorization is properly set up for search pooling, see How authorization works in distributed searches.
Create and manage roles
The general procedure for creating a role to your Splunk Enterprise instance is as follows:
- Use a text editor to edit $SPLUNK_HOME\etc\system\local\authorize.conf.
- Add role stanzas and settings to the file, based on the roles that you want to add to the instance.
- Confirm that your roles stanzas comply with stanza syntax requirements. Failure to do this can result in the platform not creating your roles.
- Save the authorize.conf file and close it.
- Use either Splunk Web or the CLI to either restart Splunk Enterprise or reload authentication.
The syntax for adding roles using the authorize.conf file is as follows:
[role_<roleName>] <setting> = <value> <setting> = <value> ...
<roleName>in the stanza header is the name you want to give your role.
- You must include the
role_in the stanza name.
- Role names must use lowercase characters only.
- Role names cannot contain spaces, colons, semicolons, or forward slashes.
See the following examples:
|Role name||Role stanza name|
Manage an existing role
Managing a role means editing the authorize.conf file and making the changes that you want to the roles that are in the file. The same syntax rules apply for modifying roles as do for creating them. The Splunk platform does not see any changes until you save the file and either reload the authentication system or restart the platform.
You can include or change the following settings in the stanza for your role:
|Setting||Definition||Default||For more information|
||You can add any number of capabilities to a role. To add a capability to a role, set that capability to "enabled".||
||See About defining roles with capabilities.|
||When this setting has a value, the role that you are defining inherits the capabilities from each role you specify in the value. Members assigned to multiple roles inherit properties from the role with the broadest permissions. If you enter multiple roles, separate them with semicolons.||No roles set.||See Role inheritance.|
||This setting lets you define detailed data access controls. Users with this role will have their searches filtered by this expression.||No filters are set.||See Search filter format.|
||The earliest time, in seconds, from which Splunk Enterprise can return results for a search, from the current time.||Not set. There is no limit to when Splunk Enterprise can return search results.|
||The maximum time window, in seconds, that a search executed by a user with this role can use.||Not set. There is no limit to the range of search time.|
||The maximum amount of disk space, in megabytes, that search jobs performed by a user with this role can take.||100|
||The maximum number of concurrently running historical searches that all members of this role can have. For this setting to apply, you must also set
When a user belongs to multiple roles, the user uses searches from the roles with the largest cumulative search quota first. When the quota for that role is completely used up, roles with lower quotas are used.
||The maximum number of concurrently running real-time searches that all members of this role can have. For this setting to apply, you must also set
If the user belongs to multiple roles, the user uses searches from the roles with the largest cumulative search quota first. When the quota for that role is completely used up, roles with lower quotas are used.
||The maximum number of concurrently running searches that a user with this role can have.||3|
||The maximum number of concurrently running real-time searches that a user with this role can have.||6|
||A semicolon-delimited list of default indexes to search when the user does not specify an index in the search.
The list can include both event indexes and metrics indexes. When the user runs an event search that does not specify an index, the search runs over the default event indexes. When the user runs a metrics search that does not specify an index, the search runs over the default metrics indexes.
||A semicolon-delimited list of indexes that this role can search. The list can include both event and metrics indexes.
You can use wildcards in your entries. However the wildcard '*' will not match internal indexes. To match internal indexes, start with '_'. All internal indexes are represented by '_*'.
Search filter format
srchFilter field can include any of the following search terms:
host=and host tags
index=and index names
eventtype=and event type tags
- search fields
ORto use multiple terms, or
ANDto make searches more restrictive.
The search terms cannot include:
- saved searches
- time operators
- regular expressions
- any fields or modifiers Splunk Web can overwrite
The following example creates the "ninja" role, which inherits capabilities from the default "user" role. The "ninja" role has almost the same capabilities as the default "power" role, except it cannot schedule searches. In addition:
- The search filter limits ninja to searching on
- ninja can search all public indexes, that do not start with _, and will search the indexes
mainif a user with the ninja role does not specify an index in the search.
- ninja can run up to 8 search jobs and 8 real-time search jobs concurrently.
- ninja can take up to 500MB total space on disk for all its jobs.
- Click Reload authentication configuration. This refreshes the authentication caches but does not boot current users from the system.
Refresh the authentication system using the CLI
- On the Splunk platform instance where you want to reload authentication, open a shell prompt or PowerShell window.
- Switch to the
- Use the CLI command
./splunk reload auth:
./splunk reload auth
The authentication system cache resets immediately.
Create and manage roles with Splunk Web
Setting access to manager consoles and apps in Splunk Enterprise
This documentation applies to the following versions of Splunk® Enterprise: 8.2.0, 8.2.1, 8.2.2