Setting access to manager consoles and apps
The local.meta file is handy for allowing you to grant and restrict access to certain parts of your Splunk instance. For example, you can:
- Restrict users in custom roles to a specific app
- Give users in custom roles the ability to access admin level features
Granting admin roles to users
Some management abilities that belong to the Admin role are unique to that specific label. These abilities are not automatically inherited from the Admin role when you configure a role in Splunk Web or
For example, say you want to create a custom role that inherits all of the Admin abilities but has limited access to your search jobs. To do this, you would create a new role called "SpecialAdmin" and set it to inherit all of the capabilities of an Admin as described in [xref to capabilities page] then set your search limits [xref to creating a role].
"SpecialAdmin" will have every capability you assign to the Admin role. However it will not automatically have access to the same manager pages as the Admin, including:
- System related functionality: The ability to view or modify your system settings and cluster configuration, update or view your license, and restart Splunk.
- Data features: The ability to view or add data inputs, configure forwarding and receiving, manage indexes, and report acceleration.
- Distributed Environment: Set up distributed search, view deployment client and sever status.
- Users and Authentication: Manage you LDAP configuration, users (other than their own) and roles.
Restricting access to specific apps
local.meta file can also be used to restrict access.
For example, say you want to allow a user access to only one dashboard view. To accomplish this, you could create an app for that view and assign the user's role to that app. You should use meta.local to permit the role to view that app.
How to add and remove access via local.meta files
You can give or restrict access by editing the local.meta file to add the new role wherever you want it.
1. Locate the
local.meta file. If you are editing access for the main search page (ie, the manager controls), look in
$SPLUNK_HOME/etc/system/metadata/. If you want to edit access to a particular app, look in
$SPLUNK_HOME/etc/apps/<app_name>/metadata/. If the directory for the desired location does not contain the file, you can copy the default version
default.meta and rename it.
Note: Do NOT edit the
default.meta file directly, you may need the default values in that file at a future time.
2. In the
local.meta file, add the name of the new role to the stanza that corresponds with the desired access.
|Default stanza||What it does|
||Allow all users to read this app's contents, or access functions in the Splunk Manager page, depending on the directory you are in. Unless overridden by other metadata, allows only admin and power users to share objects into this app.|
||Determines the access controls for the Manager page access.|
3. When you have made all of your changes, restart Splunk.
Example 1: A new role called "usermanager" only inherits capabilities from a user and has no searches or indexes inherited. The intent is to create a role that has no access to data and is solely used to create and manage user accounts.
To create this role you would edit the following stanza:
[manager/accesscontrols] access = read : [ admin ], write : [ admin ]
To include the following:
[manager/accesscontrols] access = read : [ admin, usermanager ], write : [ admin, usermanager ]
You have just given "usermanager" the ability to see and edit stuff in the "Access controls" pages in Manager.
Example 2: To enable the role "userview," to access but not edit the pages, only add the role to the read value:
[manager/accesscontrols] access = read : [ admin, userview, usermanager ], write : [ admin, usermanager ]
You can also grant access to read the manager pages to EVERY role using the wildcard:
[manager/accesscontrols] access = read : [ * ], write : [ admin ]
Example 3: You want to have a subset of users who can only read sales data that you specify. To accomplish this you can create an app for the dashboard and then create a new role "salesusers."
local.meta file in your app directory (remember that you can create one from the
default.meta file), you then edit the following stanza:
[viewstates] access = read : [ * ], write : [ * ] to read: [viewstates] access = read : [ salesusers ], write : [ admin ]
Add and edit roles
About managing indexes
This documentation applies to the following versions of Splunk® Enterprise: 4.3, 4.3.1, 4.3.2, 4.3.3, 4.3.4, 4.3.5, 4.3.6, 4.3.7