Splunk Search

Password storage during setup of an app

nlloyd
Loves-to-Learn Lots

Hi all,

Very new to Splunk so apologies if this is a very basic question. I've looked around and haven't found a conclusive answer so far. I'm building an app that will require an API token from a 3rd party system during the setup step. What I don't understand is how I can store that API token via a call to storage/passwords without also requiring the user to enter their Splunk credentials or a Splunk API token.

Would really appreciate if someone could point out how I can do this! Ideally, I'm looking to use the JS SDK, so I'd need some way to create an instance of the Service object without needing admin user credentials being manually entered. 

Thanks in advance!

Labels (1)
0 Karma

mattymo
Splunk Employee
Splunk Employee

dev docs have been nicely updated over the last little while! shout to tedd!

https://dev.splunk.com/enterprise/docs/developapps/manageknowledge/secretstorage

Theres API and SDK examples, and a nice post on how to control secret access, which has gotten better, and could still be better with more ppl pushing on it. 

https://dev.splunk.com/enterprise/docs/developapps/manageknowledge/secretstorage/secretstoragerbac


your app just needs the proper role and capabilities to interact with the storage endpoint and can be scoped further from there. 

- MattyMo
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @nlloyd,

see :

how to store encrypted credentials in Splunk at

https://www.splunk.com/en_us/blog/security/storing-encrypted-credentials.html

in other words, you have to run the script by Splunk so you can store credentials in encrypted mode in Splunk conf files.

Then you cas see here

https://www.splunk.com/en_us/blog/tips-and-tricks/enable-first-run-app-configuration-with-setup-page....

how to configure your Add-On to show a page to insert password to store in a conf file in encrypted mode.

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...