Dashboards & Visualizations

m2crypto in python3

rwellum
Explorer

I am running the 'Splunk Platform Upgrade Readiness' tool against my application as part of preparation for Splunk v 8.0.

One of the errors is:

Check 4: Removed libraries
Status:Blocker? If you upgrade your Splunk Enterprise instance without addressing this check, this app may break.
Required Action: Remove dependencies on the M2Crypto and Swig libraries. Learn more

First note that the 'learn more' link is just opening the general docs - and there's nothing specific to this issue I can find.

Secondly, while m2crypto did not have python3 support for a while it now does have it for 3.5+:

https://github.com/mcepl/M2Crypto/blob/master/INSTALL.rst

The following is required to use M2Crypto (once installed):

Python 2.6, 2.7, 3.5, or newer
OpenSSL 1.0.1e or newer

I'm thinking it's just a question of adding or updating the correct libraries to Splunk? Or maybe it's a false error?

0 Karma

atammana_splunk
Splunk Employee
Splunk Employee

Hi @rwellum, the M2Crypto library was removed from Splunk Enterprise as part of an audit. You may add the library yourself if necessary, but it no longer ships out-of-box with Splunk Enterprise core. We'll be sure to update the documentation to reflect this.

0 Karma

rwellum
Explorer

Could you please guide me on how to add the library myself?

0 Karma

atammana_splunk
Splunk Employee
Splunk Employee

Take a look here - there should be plenty of documentation & answers on the topic: https://answers.splunk.com/answers/484369/how-can-i-add-python-modules-to-the-splunk-environ-1.html

0 Karma

rwellum
Explorer

Thank you.

Follow up question, if m2crypto is removed, have you an alternative available in the code base? I just need something that can encrypt passwords etc.

0 Karma

atammana_splunk
Splunk Employee
Splunk Employee

@rwellum there's plenty of Python projects that can be used and installed in your app; natively to Splunk, you can use the splunk.secret file: https://docs.splunk.com/Documentation/Splunk/8.0.0/Security/Deploysecurepasswordsacrossmultipleserve... and https://answers.splunk.com/answers/577353/any-tool-to-encrypt-passwords-based-on-a-splunksec.html

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!

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2026-2027 SplunkTrust is officially open. If ...