<?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: Docker running as non-root, but hardening script fails? in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/docker-running-as-non-root-but-hardening-script-fails/m-p/470340#M624</link>
    <description>&lt;P&gt;Thanks will review -&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Mar 2022 23:14:44 GMT</pubDate>
    <dc:creator>jboyd98</dc:creator>
    <dc:date>2022-03-03T23:14:44Z</dc:date>
    <item>
      <title>Docker running as non-root, but hardening script fails?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/docker-running-as-non-root-but-hardening-script-fails/m-p/470261#M616</link>
      <description>&lt;P&gt;Relatively new admin to XSOAR; previous admin has left.&lt;/P&gt;&lt;P&gt;Just completed upgrade to latest 6.5 version.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Could anyone help me understand the following:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a service account that seems to run xsoar demisto server containers; used ps-ef|grep demisto and return a number of containers; "demisto" is the user below.&lt;/P&gt;&lt;P class=""&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;demisto&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;32710&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;3808&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;0 10:56 ?&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;00:00:02 docker run -i --rm --name &lt;/SPAN&gt;&lt;SPAN class=""&gt;demisto&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN class=""&gt;&lt;EM&gt;server_pyexec-63f590f3-2b4f-4182-8894-&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;Why is it that docker hardening script check fails with the following:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN class=""&gt;Non-root User&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN class=""&gt;Failed: Running as root with uid: 0. It seems that you haven't set the docker container to run with a non-root internal user.&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jboyd98_0-1646331218200.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/39443i0416D23ABD0D0E88/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="jboyd98_0-1646331218200.png" alt="jboyd98_0-1646331218200.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thanks,&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;Boyd&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 18:15:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/docker-running-as-non-root-but-hardening-script-fails/m-p/470261#M616</guid>
      <dc:creator>jboyd98</dc:creator>
      <dc:date>2022-03-03T18:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Docker running as non-root, but hardening script fails?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/docker-running-as-non-root-but-hardening-script-fails/m-p/470333#M623</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/208132"&gt;@jboyd98&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To set Docker containers to run as non-root internal users, please set the server configuration &lt;STRONG&gt;docker.run.internal.asuser&lt;/STRONG&gt; to&amp;nbsp;&lt;STRONG&gt;true&lt;/STRONG&gt;, as per this document:&amp;nbsp;&lt;A href="https://docs.paloaltonetworks.com/cortex/cortex-xsoar/6-5/cortex-xsoar-admin/docker/docker-hardening-guide/run-docker-with-non-root-internal-users.html" target="_blank" rel="noopener"&gt;https://docs.paloaltonetworks.com/cortex/cortex-xsoar/6-5/cortex-xsoar-admin/docker/docker-hardening-guide/run-docker-with-non-root-internal-users.html&lt;/A&gt;. After setting that server config and running&amp;nbsp;&lt;STRONG&gt;/reset_containers&lt;/STRONG&gt;, all docker hardening checks should pass.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You are seeing the user &lt;STRONG&gt;demisto&amp;nbsp;&lt;/STRONG&gt;in your&amp;nbsp;&lt;STRONG&gt;ps -ef | grep demisto&lt;/STRONG&gt; output because the&amp;nbsp;&lt;STRONG&gt;demisto&amp;nbsp;&lt;/STRONG&gt;user kicks off the docker process. If you have&amp;nbsp;&lt;STRONG&gt;docker.run.internal.asuser&lt;/STRONG&gt;&amp;nbsp;set to&amp;nbsp;&lt;STRONG&gt;true&lt;/STRONG&gt;, you will see the arg&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;--user &amp;lt;UID&amp;gt;&lt;/STRONG&gt; is passed to the docker process. Otherwise, the&amp;nbsp;&lt;STRONG&gt;--user&amp;nbsp;&lt;/STRONG&gt;arg does not get passed, so the docker container runs as root, the default behavior.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;XSOAR launches a docker container by running a python loop script&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;_script_docker_python_loop.py&lt;/STRONG&gt;, which you will see at the end of the line in the&amp;nbsp;&lt;STRONG&gt;ps&amp;nbsp;&lt;/STRONG&gt;output. The user that&amp;nbsp;&lt;STRONG&gt;_script_docker_python_loop.py&lt;/STRONG&gt;&amp;nbsp;runs as will vary depending on the&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;docker.run.internal.asuser&lt;/STRONG&gt;&lt;/SPAN&gt; server config value. You can verify this by running:&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;ps -ef | grep _script_docker_python_loop.py&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;The loop script is explained in more detail here:&amp;nbsp;&lt;A href="https://xsoar.pan.dev/docs/integrations/docker#advanced-server---container-communication" target="_blank" rel="noopener"&gt;https://xsoar.pan.dev/docs/integrations/docker#advanced-server---container-communication&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Hope that helps!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 22:55:15 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/docker-running-as-non-root-but-hardening-script-fails/m-p/470333#M623</guid>
      <dc:creator>asawyer</dc:creator>
      <dc:date>2022-03-03T22:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Docker running as non-root, but hardening script fails?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/docker-running-as-non-root-but-hardening-script-fails/m-p/470340#M624</link>
      <description>&lt;P&gt;Thanks will review -&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 23:14:44 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/docker-running-as-non-root-but-hardening-script-fails/m-p/470340#M624</guid>
      <dc:creator>jboyd98</dc:creator>
      <dc:date>2022-03-03T23:14:44Z</dc:date>
    </item>
  </channel>
</rss>

