In a standard Linux installation, the Splunk_TA_xxxx add-on typically references two distinct locations:
TA-Specific Bundle: Located within the Add-on directory:
/opt/splunk/etc/apps/Splunk_TA_xxxx/bin/splunk_ta_xxxx/aob_py3/certifi/cacert.pem
Splunk Default Python Bundle: Located in the Splunk Python library directory:
/opt/splunk/lib/python3.9/site-packages/certifi/cacert.pemBefore modifying any files, verify which certificate bundle the Python environment is actively using by running the following command:
splunk@so1:~$ /opt/splunk/bin/splunk cmd python3 -c "
import sys
sys.path.insert(0,'/opt/splunk/etc/apps/Splunk_TA_xxxx/bin/splunk_ta_xxxx/aob_py3')
import certifi, requests
print('certifi :', certifi.__file__)
print('bundle :', certifi.where())
print('requests:', requests.__file__)
"
certifi : /opt/splunk/etc/apps/Splunk_TA_xxxx/bin/splunk_ta_xxxx/aob_py3/certifi/__init__.py
bundle : /opt/splunk/etc/apps/Splunk_TA_xxxx/bin/splunk_ta_xxxx/aob_py3/certifi/cacert.pem
requests: /opt/splunk/etc/apps/Splunk_TA_xxxx/bin/splunk_ta_xxxx/aob_py3/requests/__init__.py
If the output points to /opt/splunk/lib/python3.9/site-packages/certifi/cacert.pem, the Splunk instance is using the global default certificate bundle.
splunk@so1:~$ /opt/splunk/bin/splunk cmd python3 -c "
import sys
sys.path.insert(0,'/opt/splunk/etc/apps/Splunk_TA_xxxx/bin/splunk_ta_xxxx/aob_py3')
import certifi, requests
print('certifi :', certifi.__file__)
print('bundle :', certifi.where())
print('requests:', requests.__file__)
"
certifi : /opt/splunk/lib/python3.9/site-packages/certifi/__init__.py
bundle : /opt/splunk/lib/python3.9/site-packages/certifi/cacert.pem
requests: /opt/splunk/etc/apps/Splunk_TA_xxxx/bin/splunk_ta_xxxx/aob_py3/requests/__init__.py
In scenarios where the certifi module is preloaded from sys.modules and cannot be easily redirected to the TA-specific path, the recommended workaround is to append custom CA certificates into the global Splunk default bundle.
splunk@so1:~$ /opt/splunk/bin/splunk cmd python3 -c "import sys; pre='certifi' in sys.modules; import certifi; print('preloaded:', pre, certifi.__file__)"
preloaded: True /opt/splunk/lib/python3.9/site-packages/certifi/__init__.py
Execute the following command to append custom CA into the global Splunk default bundle:
cat /path/to/your/custom_ca.pem >> /opt/splunk/lib/python3.9/site-packages/certifi/cacert.pem/opt/splunk/lib/python3.9/site-packages/certifi/cacert.pem affects all Splunk apps and scripts using the embedded Python 3.9 environment. Ensure the added CA is trusted and necessary for the environment.
/opt/splunk/lib/python3.9/site-packages/certifi/cacert.pem may be overwritten during a Splunk upgrade. It is recommended to document the need to re-apply this change after major version updates.| Revision | Publish Date | Comments |
|---|---|---|
1.0 |
25-Nov-2026
|
Initial Release |