Hi all, I created a job in Rundeck that lets you select a Splunk app and a time period, then enables/disables the app and sends an email alert out. I figured out how to initiate the job using command line curl to communicate with the Rundeck rest API.
I have a dashboard in Splunk where you select the app from a drop down then type the time period into a text box. I would like to extract the token values you provide and input them into a curl command, which is then initiated when you press submit.
Does anyone know if this would be possible and if so, how I should go about doing it.
... View more
SOLUTION
Example (add roles user and power):
"curl -X POST -u admin:password -k https ://servername:8089/servicesNS/-/admin/LDAP-groups/endpointgoeshere%2usersnametoedit -d roles = user -d roles = power"
To remove all roles you would just leave the " -d roles = " part blank.
... View more
I see, I was trying to remove role via local authentication. Our org organizes the LDAP configuration file like
roleA: person1, person2, person3. roleB: person1, person5, person9. So I now I need to figure out a way to automate the removal of a instance of a users name in the configuration file. Down another rabbit hole I go.
... View more
I am trying to create an automation script using Python. Part of the script needs to be able to remove roles for a specified user. I have not found any documentation about how to remove ALL user roles or even specific roles using curl commands with the rest api. There has to be a way, does anyone have any insight on how to do this? The resources that I have found only talk about adding a role to a user, or manually removing roles from a user (which defeats the purpose of automating the process).
LDAP
... View more