Splunk Search

Password storage during setup of an app

nlloyd
Engager

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!

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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...