Deployment Architecture

Validate an existing sslPassword hash given a plaintext input

BrandonKeep
Explorer

I am looking for a way to validate an existing sslPassword hash given a plaintext input.

I am working on an ansible deployment script and I would like to make it more idempotent. Right now, I can just reset those values on each run but it would be nice to do a check based off the correct hash. If it matches, skip the task, otherwise, replace the hashed value with a new plaintext or hashed value.

There is a utility hash-passwd where you can run splunk hash-passwd password and it will return a hashed value. However, it doesn't return the same type of hash used for pass4SymmKey or sslPassword

Is there anything like that for sslPassword?

Regards,
Brandon

Tags (2)
0 Karma
1 Solution

BrandonKeep
Explorer

I ended up taking a slightly different route for anyone who is interested. Ansible has a hash filter | hash('sha256'), which I used to write the hashed value as a comment in the file. I then check for it's existence on subsequent runs and skip it if the values match. All things considered, it seems to work pretty well as a temporary solution. I may add some obfuscation to my technique but with a strong enough password and keeping strict permissions on the server.conf file, I'm okay with it for now.

Regards,

View solution in original post

0 Karma

BrandonKeep
Explorer

I ended up taking a slightly different route for anyone who is interested. Ansible has a hash filter | hash('sha256'), which I used to write the hashed value as a comment in the file. I then check for it's existence on subsequent runs and skip it if the values match. All things considered, it seems to work pretty well as a temporary solution. I may add some obfuscation to my technique but with a strong enough password and keeping strict permissions on the server.conf file, I'm okay with it for now.

Regards,

0 Karma
Get Updates on the Splunk Community!

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...