Splunk Dev

How to pass splunk UI login credentials securely to splunk server python external lookup script and then login to remote server with it?

smitapatankarso
Explorer

splunk UI search <--> external lookup script on splunk server <--> Remote server CLI

Whenever user logs in to splunk UI and does a specific search,
the python external lookup script on splunk server should get its credentials,
these credentials should then be used to login to remote server and execute linux commands and get some data
this data is sent back to python script and then to splunk UI

Labels (1)
0 Karma

nickhills
Ultra Champion

It seems your requirement is for Splunk to hold some credentials for a remote server, so that a query can remotely execute (over ssh) a command on the remote target?

If i have understood this, then firstly I would caution that this is a bad use case, and would very strongly advise against Splunk persisting credentials which can be used to access remote hosts.

A better solution (imo) would be to deploy a UF to each target host and have that UF run the script on a schedule to collect the same information.

Your use case may have specific reasons why you have not considered this so far, but the idea of using Splunk to manage remote ssh credentials should be avoided.

If my comment helps, please give it a thumbs up!
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...