<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to use an encrypted client TLS/SSL key to query an API in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-use-an-encrypted-client-TLS-SSL-key-to-query-an-API/m-p/513897#M9163</link>
    <description>&lt;P&gt;Our company policy requires an SSL private key to be encrypted. Unfortunately, my script is using the requests library which doesn't support this, as written in its documentation (feature request : &lt;A href="https://github.com/psf/requests/issues/1573" target="_blank" rel="noopener"&gt;https://github.com/psf/requests/issues/1573&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;There seems to be a workaround by using a custom adapater (&lt;A href="https://github.com/m-click/requests_pkcs12" target="_blank" rel="noopener"&gt;https://github.com/m-click/requests_pkcs12&lt;/A&gt;) which is using pkcs12 package files (which contain both the certificate and the key&amp;nbsp; and can be encrypted). I've installed this adapter under "lib" in my app directory (and I added the line of code to my script to append this path to the library path).&lt;/P&gt;&lt;P&gt;But this adapter is requiring the pyopenssl library (shipped with Splunk, installed in the python default library path) but this one, in turns, requires ndg.httpsclient.ssl_peer_verification (not shipped with Splunk!). So the adapter fails to load.&lt;/P&gt;&lt;P&gt;So in the end 2 questions:&lt;/P&gt;&lt;P&gt;1) Is anybody having to use client-side SSL authentication to query an API and is using an encrypted key ? How to make it work ?&lt;/P&gt;&lt;P&gt;2) Is there a clean way to add ndg.httpsclient.ssl_peer_verification to the libraries available to splunk so that pyopenssl can be loaded ? I've tried to add it to my app's "lib" directory but it seems that pyopenssl can not find it (maybe it expects to find it in the "default" directory ?)&lt;/P&gt;</description>
    <pubDate>Thu, 13 Aug 2020 12:35:57 GMT</pubDate>
    <dc:creator>yoho</dc:creator>
    <dc:date>2020-08-13T12:35:57Z</dc:date>
    <item>
      <title>How to use an encrypted client TLS/SSL key to query an API</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-use-an-encrypted-client-TLS-SSL-key-to-query-an-API/m-p/513897#M9163</link>
      <description>&lt;P&gt;Our company policy requires an SSL private key to be encrypted. Unfortunately, my script is using the requests library which doesn't support this, as written in its documentation (feature request : &lt;A href="https://github.com/psf/requests/issues/1573" target="_blank" rel="noopener"&gt;https://github.com/psf/requests/issues/1573&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;There seems to be a workaround by using a custom adapater (&lt;A href="https://github.com/m-click/requests_pkcs12" target="_blank" rel="noopener"&gt;https://github.com/m-click/requests_pkcs12&lt;/A&gt;) which is using pkcs12 package files (which contain both the certificate and the key&amp;nbsp; and can be encrypted). I've installed this adapter under "lib" in my app directory (and I added the line of code to my script to append this path to the library path).&lt;/P&gt;&lt;P&gt;But this adapter is requiring the pyopenssl library (shipped with Splunk, installed in the python default library path) but this one, in turns, requires ndg.httpsclient.ssl_peer_verification (not shipped with Splunk!). So the adapter fails to load.&lt;/P&gt;&lt;P&gt;So in the end 2 questions:&lt;/P&gt;&lt;P&gt;1) Is anybody having to use client-side SSL authentication to query an API and is using an encrypted key ? How to make it work ?&lt;/P&gt;&lt;P&gt;2) Is there a clean way to add ndg.httpsclient.ssl_peer_verification to the libraries available to splunk so that pyopenssl can be loaded ? I've tried to add it to my app's "lib" directory but it seems that pyopenssl can not find it (maybe it expects to find it in the "default" directory ?)&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 12:35:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-use-an-encrypted-client-TLS-SSL-key-to-query-an-API/m-p/513897#M9163</guid>
      <dc:creator>yoho</dc:creator>
      <dc:date>2020-08-13T12:35:57Z</dc:date>
    </item>
  </channel>
</rss>

