Knowledge Management

Rest api for authorization

dvg06
Path Finder

Hi Splunkers, 

Trying to disable certain capabilities from roles via rest api, but havent been successful yet. Please help.

What is the rest endpoint url that I should use to disable.

I tried something like https://127.0.0.1:8089/services/authorization/roles/power/capabilities/rtsearch/disable, but this is invalid end point. Splunk documentation has not been very helpful. 

Labels (1)

dvg06
Path Finder

thanks @manjunathmeti 

I can update the capabilities using the above command.

But any idea how to delete this particular capability? what flag should I use instead of -d?

0 Karma

manjunathmeti
Champion

First, you can GET list of capabilities and remove the role from the list and POST it back.

0 Karma

manjunathmeti
Champion

You can use /authorization/roles/<rolename> enpoint to get and update capabilities of a role. Refer this https://docs.splunk.com/Documentation/Splunk/8.1.1/RESTREF/RESTaccess#authorization.2Froles.2F.7Bnam....

curl -k -u admin:changeme https://localhost:8089/services/authorization/roles/power -d capabilities=search 

 

0 Karma
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf24, and Community Connections

Thank you to everyone in the Splunk Community who joined us for .conf24 – starting with Splunk University and ...

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

 (view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...