Algorithm permissions
In the Splunk Machine Learning Toolkit, you can define the read permissions for each algorithm. Read permissions dictate whether a user can access the algorithms. Administrators have write permissions by default. To change permission settings, either modify the REST API ACL endpoint in the algos.conf
file, or modify the manual configuration of local.meta
file.
Manage permissions in REST API
The example below uses the algorithm KMeans, although this process works the same way with any algorithm in the Splunk Machine Learning Toolkit.
- To change the algorithm settings, modify the API ACL endpoint in the
algos.conf
file.- To assign read permissions to all roles:
$ curl -k -u admin:<admin password> \ https://localhost:8089/servicesNS/nobody/Splunk_ML_Toolkit/configs/conf-algos/KMeans/acl \ -d owner=nobody \ -d sharing=app \ -d perms.read=*
- To assign read permissions to the user and power role:
$ curl -k -u admin:<admin password> \ https://localhost:8089/servicesNS/nobody/Splunk_ML_Toolkit/configs/conf-algos/KMeans/acl \ -d owner=nobody \ -d sharing=app \ -d perms.read=user,power
- To assign read permissions to all roles:
- You do not need to restart splunkd after you change the permission settings in the REST API.
The read permission in the REST API also controls the GET method. If you are unfamiliar with the REST method subset, see HTTP Status Codes in the Rest API User Manual. For more information on ACL REST API endpoint, see Access Control list in the Rest API User Manual.
Manage permissions manually in the configuration file
You cannot modify the default.meta
file directly. Instead, you can make changes in the local.meta
file, and the new content will override the default.meta
file. For further information on the structure of the default.meta
file, see default.meta.conf
in the Admin Manual.
The example below uses the algorithm KMeans, although this process works the same way with any algorithm in the Splunk Machine Learning Toolkit.
- If you do not have a
local.meta
file, create one. - Open the local.meta file.
$SPLUNK_HOME/etc/apps/Splunk_ML_Toolkit/metadata/local.meta
- To assign read permissions to all roles:
[algos/KMeans] access = read : [ * ]
- To assign read permissions to the user and power roles:
[algos/KMeans] access = read : [ user,power ]
- Restart splunkd.
The process to change permissions in the REST API endpoint also changes the content of a local.meta
file in the directory.
$SPLUNK_HOME/etc/apps/Splunk_ML_Toolkit/metadata
Import a machine learning algorithm from Splunkbase | Experiments overview |
This documentation applies to the following versions of Splunk® Machine Learning Toolkit: 2.4.0, 3.0.0, 3.1.0, 3.2.0, 3.3.0, 3.4.0, 4.0.0, 4.1.0, 4.2.0, 4.3.0
Feedback submitted, thanks!