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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...