Splunk Search

how to obfuscate some text inside a python lookup script?

RiccardoV
Communicator

Hi,
in my App I have a python lookup script that do a connection with an external service.
Into this script I create a standard HTTP request, and inside the payload I have some XML tags with the credentials for the authentication for this service.

Now I have to install this App into a customer's server. There is a methon to encrypt in some way this data to make at least a little bit harder, even with a simple obfuscation algorithm, to intercept or read?

thanks!

0 Karma
1 Solution

MHibbin
Influencer

One solution that I have used before is to use base64, although it may not be the best way, it's the only way I found to be feasible (for my case at least).

You could create a script that handles the processing of the username/password through the base64 module and any other "jazz" you may want to do with the password. Once this script has been created you could import it into you main script and use in this way.

Not sure if this helps, but I hope it does.

Ref: http://docs.python.org/2/library/base64.html

View solution in original post

MHibbin
Influencer

One solution that I have used before is to use base64, although it may not be the best way, it's the only way I found to be feasible (for my case at least).

You could create a script that handles the processing of the username/password through the base64 module and any other "jazz" you may want to do with the password. Once this script has been created you could import it into you main script and use in this way.

Not sure if this helps, but I hope it does.

Ref: http://docs.python.org/2/library/base64.html

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...