<?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 Re: CWPP SSL Certificate, self-signed or chain in Prisma Cloud Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cwpp-ssl-certificate-self-signed-or-chain/m-p/524141#M841</link>
    <description>&lt;P&gt;Is your CWP Console self hosted or a SaaS tenant?&lt;BR /&gt;&lt;BR /&gt;Is the machine attempting to make API calls using a VPN?&lt;BR /&gt;&lt;BR /&gt;Are you able to generate a JWT Token successfully with the API? Or is the only operation that is failing the defender call you have included an example of?&lt;BR /&gt;&lt;BR /&gt;"&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Given&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;that I am programming a custom https client&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;When&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;I invoke CWPP APIs over https&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Then&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;I encounter SSLErrors&lt;BR /&gt;"&lt;BR /&gt;&lt;BR /&gt;Can you include any API endpoints that you have attempted to call that result in you getting an SSL Error?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Dec 2022 01:17:20 GMT</pubDate>
    <dc:creator>AHamilton-Sutherland</dc:creator>
    <dc:date>2022-12-15T01:17:20Z</dc:date>
    <item>
      <title>CWPP SSL Certificate, self-signed or chain</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cwpp-ssl-certificate-self-signed-or-chain/m-p/524095#M840</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Given&lt;/STRONG&gt; that I am programming a custom https client&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;When&lt;/STRONG&gt; I invoke CWPP APIs over https&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Then&lt;/STRONG&gt; I encounter SSLErrors&lt;/P&gt;
&lt;PRE class=""&gt;&lt;SPAN class=""&gt;[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Where can I get a .pem or .crt file containing the CWPP certificates that I should trust?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Although I found this resource in the documentation,&amp;nbsp;&amp;nbsp;&lt;A href="https://prisma.pan.dev/api/cloud/cwpp/defenders/#operation/get-defenders-install-bundle" target="_blank" rel="noopener"&gt;https://prisma.pan.dev/api/cloud/cwpp/defenders/#operation/get-defenders-install-bundle&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I invoke that API, I get this json...&lt;/P&gt;
&lt;PRE class=""&gt;&lt;SPAN class=""&gt;$ curl -k \&lt;BR /&gt;&lt;SPAN class=""&gt;&amp;gt; &lt;SPAN class=""&gt;&amp;nbsp; -H "Authorization: Bearer $token" \&lt;BR /&gt;&lt;SPAN class=""&gt;&amp;gt; &lt;SPAN class=""&gt;&amp;nbsp; -H 'Content-Type: application/json' \&lt;BR /&gt;&lt;SPAN class=""&gt;&amp;gt; &lt;SPAN class=""&gt;&amp;nbsp; -X GET "${PRISMA_CLOUD_COMPUTE_CONSOLE_API_ADDR}/api/v1/defenders/install-bundle?consoleaddr=${PRISMA_CLOUD_COMPUTE_SVC_ADDR}"&lt;BR /&gt;&lt;SPAN class=""&gt;{"wsAddress":"wss://us-east1.cloud.twistlock.com:443","installBundle":"eyJzZWNyZXRzIjp7fSwiZ2xvYmFsUHJveHlPcHQiOnsiaHR0cFByb3h5IjoiIiwibm9Qcm94eSI6IiIsImNhIjoiIiwidXNlciI6IiIsInBhc3N3b3JkIjp7ImVuY3J5cHRlZCI6IiJ9fSwiY3VzdG9tZXJJRCI6InVzLTEtMTExNTc0MzIzIiwiYXBpS2V5IjoiV09FcHBSWjlPZHk0UTgxeTNkNG5nUDdIbzJ6U2xVeWpqSy95VThJM2FwTVNhTXRDaXIrTnFXVkk5L2NsQUp5d0dFVThrTGNkQ1U1d1MvQnlUZUxXVXc9PSIsIm1pY3Jvc2VnQ29tcGF0aWJsZSI6ZmFsc2V9"}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;What is that?&amp;nbsp; How is that "installBundle" intended to be used?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 15:13:31 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cwpp-ssl-certificate-self-signed-or-chain/m-p/524095#M840</guid>
      <dc:creator>TommyHunt</dc:creator>
      <dc:date>2022-12-14T15:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: CWPP SSL Certificate, self-signed or chain</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cwpp-ssl-certificate-self-signed-or-chain/m-p/524141#M841</link>
      <description>&lt;P&gt;Is your CWP Console self hosted or a SaaS tenant?&lt;BR /&gt;&lt;BR /&gt;Is the machine attempting to make API calls using a VPN?&lt;BR /&gt;&lt;BR /&gt;Are you able to generate a JWT Token successfully with the API? Or is the only operation that is failing the defender call you have included an example of?&lt;BR /&gt;&lt;BR /&gt;"&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Given&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;that I am programming a custom https client&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;When&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;I invoke CWPP APIs over https&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Then&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;I encounter SSLErrors&lt;BR /&gt;"&lt;BR /&gt;&lt;BR /&gt;Can you include any API endpoints that you have attempted to call that result in you getting an SSL Error?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 01:17:20 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cwpp-ssl-certificate-self-signed-or-chain/m-p/524141#M841</guid>
      <dc:creator>AHamilton-Sutherland</dc:creator>
      <dc:date>2022-12-15T01:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: CWPP SSL Certificate, self-signed or chain</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cwpp-ssl-certificate-self-signed-or-chain/m-p/524266#M842</link>
      <description>&lt;OL&gt;
&lt;LI&gt;Saas Tenant&lt;/LI&gt;
&lt;LI&gt;Yes, my workstation connects via VPN.&lt;/LI&gt;
&lt;LI&gt;I can generate a token from bash via curl command; that error is from python.requests package invoking &lt;A href="https://api.prismacloud.io/login" target="_blank"&gt;https://api.prismacloud.io/login&lt;/A&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;IMO, its a python configuration problem.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 19:31:31 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cwpp-ssl-certificate-self-signed-or-chain/m-p/524266#M842</guid>
      <dc:creator>TommyHunt</dc:creator>
      <dc:date>2022-12-15T19:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: CWPP SSL Certificate, self-signed or chain</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cwpp-ssl-certificate-self-signed-or-chain/m-p/524267#M843</link>
      <description>&lt;P&gt;Ultimately, I want to tell python's requests package where to find the certificate chain file for this host.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;I added the &lt;EM&gt;verify parameter to my python statement / function-call.&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;resp&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN&gt;requests&lt;SPAN&gt;.&lt;SPAN&gt;post&lt;SPAN&gt;(&lt;SPAN&gt;url&lt;SPAN&gt;,&amp;nbsp;&lt;SPAN&gt;json&lt;SPAN&gt;=&lt;SPAN&gt;payload&lt;SPAN&gt;,&amp;nbsp;&lt;SPAN&gt;headers&lt;SPAN&gt;=&lt;SPAN&gt;headers&lt;SPAN&gt;,&amp;nbsp;&lt;SPAN&gt;verify&lt;SPAN&gt;=&lt;SPAN&gt;'/Users/TAHV/Downloads/cloud-twistlock-com-chain.pem'&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/LI&gt;
&lt;LI&gt;Then... where do I get the certificate chain in a pem file format for prisma domain?&lt;/LI&gt;
&lt;LI&gt;Navigate my browser to the endpoint's URL, for example&lt;SPAN&gt;&amp;nbsp;&lt;A class="" href="https://us-east1.cloud.twistlock.com/us-1-111574323/api/v1/defenders/install-bundle?consoleaddr=us-east1.cloud.twistlock.com" target="_blank" rel="nofollow noopener"&gt;https://us-east1.cloud.twistlock.com/us-1-111574323/api/v1/defenders/install-bundle?consoleaddr=us-east1.cloud.twistlock.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Then, save the certificate to a pem file.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;In Safari:&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Click the padlock icon in the URL bar&lt;/LI&gt;
&lt;LI&gt;Click the Show Certificate button in the dialog that appears&lt;/LI&gt;
&lt;LI&gt;Click on the certificate icon, and drag it to a Finder window (or the Desktop)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;In Google Chrome:&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Click the padlock icon in the URL bar&lt;/LI&gt;
&lt;LI&gt;If the dialog that appears has a "Connection is secure" line, click on that&lt;/LI&gt;
&lt;LI&gt;Click the "Certificate is valid" or "Certificate (Valid)" area in the dialog&lt;/LI&gt;
&lt;LI&gt;Click on the certificate icon, and drag it to a Finder window (or the Desktop)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;In Firefox:&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Click the padlock icon in the URL bar&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Click the "Show connection details" (right-arrow) button to the right of "Connection secure" in the dialog that appears&lt;/LI&gt;
&lt;LI&gt;Click the "More information" area&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Under the Security tab, click the "View Certificate" button&lt;/LI&gt;
&lt;LI&gt;A "about:certificate?cert=..." browser tab will open; scroll down to the Miscellaneous section&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;In the "Download" line, click "PEM (cert)" to save the site's leaf certificate to your Downloads folder, or "PEM (chain)" to save the entire trust chain
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 15 Dec 2022 19:35:57 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cwpp-ssl-certificate-self-signed-or-chain/m-p/524267#M843</guid>
      <dc:creator>TommyHunt</dc:creator>
      <dc:date>2022-12-15T19:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: CWPP SSL Certificate, self-signed or chain</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cwpp-ssl-certificate-self-signed-or-chain/m-p/524270#M844</link>
      <description>&lt;P&gt;Your answer is correct.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Based on your statement "&lt;SPAN&gt;programming a custom https client&lt;/SPAN&gt;". I recommend you check out these 2 Github repos that provide Pythons libraries for handling Authentication and Sessions with Prisma Cloud.&lt;BR /&gt;&lt;A href="https://github.com/PaloAltoNetworks/pc-python-integration" target="_blank" rel="noopener"&gt;https://github.com/PaloAltoNetworks/pc-python-integration&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/PaloAltoNetworks/prismacloud-api-python" target="_blank" rel="noopener"&gt;https://github.com/PaloAltoNetworks/prismacloud-api-python&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;They may be of use to you. They are very similar in feature set. The first link, PCPI, is a lightweight implementation with only Authentication and Session management features while the second link, Prisma Cloud API for Python has lots of bre-baked API calls to help speed up your development.&lt;BR /&gt;&lt;BR /&gt;Both of these libraries have support to handle the SSL Issue you were encountering since they both implement the "verify" option in Python Requests. They also both include the same script that can generate Prisma Cloud Certificates for you instead of pulling them out of your browser.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 20:01:03 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cwpp-ssl-certificate-self-signed-or-chain/m-p/524270#M844</guid>
      <dc:creator>AHamilton-Sutherland</dc:creator>
      <dc:date>2022-12-15T20:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: CWPP SSL Certificate, self-signed or chain</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cwpp-ssl-certificate-self-signed-or-chain/m-p/524275#M845</link>
      <description>&lt;P&gt;*Moved Reply to accepted answer for visibility*&lt;BR /&gt;&lt;BR /&gt;Your answer is correct.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Based on your statement "&lt;SPAN&gt;programming a custom https client&lt;/SPAN&gt;". I recommend you check out these 2 Github repos that provide Pythons libraries for handling Authentication and Sessions with Prisma Cloud.&lt;BR /&gt;&lt;A href="https://github.com/PaloAltoNetworks/pc-python-integration" target="_blank" rel="noopener"&gt;https://github.com/PaloAltoNetworks/pc-python-integration&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/PaloAltoNetworks/prismacloud-api-python" target="_blank" rel="noopener"&gt;https://github.com/PaloAltoNetworks/prismacloud-api-python&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;They may be of use to you. They are very similar in feature set and the configuration files are cross-compatible. They are both updated regularly. I am partial to PCPI as I created it. The first link, PCPI, is a lightweight implementation with only Authentication and Session management features while the second link, Prisma Cloud API for Python has lots of bre-baked API calls to help speed up your development.&lt;BR /&gt;&lt;BR /&gt;Both of these libraries have support to handle the SSL Issue you were encountering since they both implement the "verify" option in Python Requests. They also both include the same script that can generate Prisma Cloud Certificates for you instead of pulling them out of your browser.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 20:03:56 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cwpp-ssl-certificate-self-signed-or-chain/m-p/524275#M845</guid>
      <dc:creator>AHamilton-Sutherland</dc:creator>
      <dc:date>2022-12-15T20:03:56Z</dc:date>
    </item>
  </channel>
</rss>

