Hi All,
I have an app that updates tags when needed. Problem is I am trying to make the initial curl call as secure and as ease as possible.
Does anyone know the simplest way to do this? I do not want to see my password for this app get logged in syslog or any other place. However, I simply want to encrypt the password as seen below.
I know the below command works but how to I get to bring in the password that is encrypted from my password.conf file? I set this up in /local/password.conf of the search app.
curl -k -u user:encrypted_password https://localhost:8089/servicesNS/nobody/search/search/tags/test_hosts -d add=host::testserver1.com
Curl has the ability to pull a username / password from a "netrc" file, and you can use this to fill environment variables. The format for a netrc file is likely different from the password.conf app, though.
Here's some more information:
Thanks sfrazer, I saw this. It actually has a URL option, which I wonder if I can call our pass rest that way.
--netrc url
appreciate the suggestion.
-Daniel
Hi Sfrazer and all out there doing similar stuff in Splunk, I decided to go with Python and calling the REST from that code. It will allow me to do more things and a richer set of possibilities for an all in one solution.
I really liked this link from below from Splunk using the
import splunk.entity as entity (object) 🙂
I will post an update to this when done coding. Happy to contribute.