Security

Is it possible to encrypt the admin password to install, update, and package the Splunk app?

shahk
Explorer

Hello Team,

I have made a shell script to install, update and package the Splunk app. In he shell script I have to pass Splunk web UI admin password in the command since it always asks for the credential while installing, updating, or packaging the app.

Is it possible to encrypt the admin password and get it read from other file ?

Regards,
Krimesh

0 Karma

skoelpin
SplunkTrust
SplunkTrust

I'm borrowing this answer from my buddy @jkat54

a. Create base 64 encrypted password.
eg
$ echo "kamal" |base64
a2FtYWwK
$

b. Save this encrypted password in a password file.

c. In your script, add the below code to fetch the password and then decrypt it.
source path_to_the_file
DB_PASSWORD=$(eval echo ${DB_PASSWORD} | base64 --decode)

Decrypted password is placed in variable DB_PASSWORD. 
d. Give both the files permissions 700.

jkat54
SplunkTrust
SplunkTrust

Ive edited this like 4 times now 😜

See https://stackoverflow.com/questions/3318853/hide-encrypt-password-in-bash-file-to-stop-accidentally-...

In case the above doesn't work.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...