{"id":43,"date":"2020-03-11T12:12:05","date_gmt":"2020-03-11T11:12:05","guid":{"rendered":"https:\/\/blog.vaglid.net\/?p=43"},"modified":"2020-03-11T12:13:10","modified_gmt":"2020-03-11T11:13:10","slug":"add-trusted-root-certificate-to-python-running-under-splunk-context-draft","status":"publish","type":"post","link":"https:\/\/blog.vaglid.net\/index.php\/2020\/03\/11\/add-trusted-root-certificate-to-python-running-under-splunk-context-draft\/","title":{"rendered":"Add trusted root certificate to python running under Splunk context [DRAFT]"},"content":{"rendered":"\n<p>Create a .py file with the following content:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from requests.utils import DEFAULT_CA_BUNDLE_PATH; print(DEFAULT_CA_BUNDLE_PATH)<\/code><\/pre>\n\n\n\n<p>Run the script in the context of Splunk:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[splunker@splunk splunk]$ splunk cmd python ca.py\n\/exp\/splunk\/lib\/python2.7\/site-packages\/certifi\/cacert.pem\n<\/code><\/pre>\n\n\n\n<p>Then add your certificate in base64-format to this file to let Splunk trust your SSL-inspecting proxy. Bear in mind that this file is write-protected, so you might need to chmod u+w \/exp\/splunk\/lib\/python2.7\/site-packages\/certifi\/cacert.pem and then chmod u-w after changing the file.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create a .py file with the following content: Run the script in the context of Splunk: Then add your certificate in base64-format to this file to let Splunk trust your [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"_EventAllDay":false,"_EventTimezone":"","_EventStartDate":"","_EventEndDate":"","_EventStartDateUTC":"","_EventEndDateUTC":"","_EventShowMap":false,"_EventShowMapLink":false,"_EventURL":"","_EventCost":"","_EventCostDescription":"","_EventCurrencySymbol":"","_EventCurrencyCode":"","_EventCurrencyPosition":"","_EventDateTimeSeparator":"","_EventTimeRangeSeparator":"","_EventOrganizerID":[],"_EventVenueID":[],"_OrganizerEmail":"","_OrganizerPhone":"","_OrganizerWebsite":"","_VenueAddress":"","_VenueCity":"","_VenueCountry":"","_VenueProvince":"","_VenueState":"","_VenueZip":"","_VenuePhone":"","_VenueURL":"","_VenueStateProvince":"","_VenueLat":"","_VenueLng":"","_VenueShowMap":false,"_VenueShowMapLink":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-43","post","type-post","status-publish","format-standard","hentry","category-splunk"],"_links":{"self":[{"href":"https:\/\/blog.vaglid.net\/index.php\/wp-json\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.vaglid.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.vaglid.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.vaglid.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.vaglid.net\/index.php\/wp-json\/wp\/v2\/comments?post=43"}],"version-history":[{"count":2,"href":"https:\/\/blog.vaglid.net\/index.php\/wp-json\/wp\/v2\/posts\/43\/revisions"}],"predecessor-version":[{"id":45,"href":"https:\/\/blog.vaglid.net\/index.php\/wp-json\/wp\/v2\/posts\/43\/revisions\/45"}],"wp:attachment":[{"href":"https:\/\/blog.vaglid.net\/index.php\/wp-json\/wp\/v2\/media?parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.vaglid.net\/index.php\/wp-json\/wp\/v2\/categories?post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.vaglid.net\/index.php\/wp-json\/wp\/v2\/tags?post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}