Archive

m2crypto in python3

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

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

Explorer

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

0 Karma

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

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

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