Managing algorithm permissions in the Splunk Machine Learning Toolkit
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 following example uses the KMeans algorithm. 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
- 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 following example uses the KMeans algorithm. 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 | Algorithm support of key ML-SPL commands quick reference |
This documentation applies to the following versions of Splunk® Machine Learning Toolkit: 4.4.0, 4.4.1, 4.4.2, 4.5.0, 5.0.0, 5.1.0, 5.2.0, 5.2.1, 5.2.2, 5.3.0, 5.3.1, 5.3.3, 5.4.0, 5.4.1, 5.4.2, 5.5.0
Feedback submitted, thanks!