<?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: The shell script in html format is returned after the oneagent download command is executed in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/The-shell-script-in-html-format-is-returned-after-the-oneagent/m-p/206445#M25027</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/60167"&gt;@samandqq&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To me this looks like there is some MitM device interfering.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just tested against my own Managed Cluster, and was unable to reproduce this.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A valid token without the correct access gets the expected http/403 forbidden&lt;/LI&gt;
&lt;LI&gt;A valid token with the correct access gets the install package&lt;/LI&gt;
&lt;LI&gt;An invalid token gets the expected http/401 unauthorized.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;As an API endpoint accepting tokens only, a redirect to SSO should not be returned.&amp;nbsp; However, an MitM device such as a proxy that requires authentication &lt;EM&gt;would&lt;/EM&gt; redirect to authentication without any awareness that the requested URL is an API endpoint.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I second &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/59135"&gt;@alexander_dt&lt;/a&gt; recommendation to switch to using curl with the -ikvvv switches to see exactly what you are connecting to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-- Erik&lt;/P&gt;</description>
    <pubDate>Tue, 07 Mar 2023 15:39:02 GMT</pubDate>
    <dc:creator>Erik_Soderquist</dc:creator>
    <dc:date>2023-03-07T15:39:02Z</dc:date>
    <item>
      <title>The shell script in html format is returned after the oneagent download command is executed</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/The-shell-script-in-html-format-is-returned-after-the-oneagent/m-p/205919#M24898</link>
      <description>&lt;P&gt;wget -O Dynatrace-OneAgent-Linux-1.257.250.sh "&lt;A href="https://xxxxxx/e/1bde8062-2746-42a9-a9c6-xxxxx/api/v1/deployment/installer/agent/unix/default/latest?arch=x86&amp;amp;flavor=default" target="_blank" rel="noopener"&gt;https://xxxxxx/e/1bde8062-2746-42a9-a9c6-xxxxx/api/v1/deployment/installer/agent/unix/default/latest?arch=x86&amp;amp;flavor=default&lt;/A&gt;" --header="Authorization: Api-Token dt0c01.xxx.xxxxx"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dynatrace-OneAgent-Linux-1.257.250.sh script:&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;script language="JavaScript" type="text/javascript"&amp;gt;
    function redirectF()
{
        var target="HTTPS://xxx/e/xxx8/api/v1/deployment/installer/agent/unix/default/latest/metainfo?api-token=dt0c01.xxx.xxx";
        document.cookie="RELAYSTATE=" + escape(target) + ";secure";
        document.location.replace("https://xxxxxx/login?authenticateUsingSso");

}
&amp;lt;/script&amp;gt;

&amp;lt;body onload="redirectF()"&amp;gt;
&amp;lt;/body&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 03:12:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/The-shell-script-in-html-format-is-returned-after-the-oneagent/m-p/205919#M24898</guid>
      <dc:creator>samandqq</dc:creator>
      <dc:date>2023-03-01T03:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: The shell script in html format is returned after the oneagent download command is executed</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/The-shell-script-in-html-format-is-returned-after-the-oneagent/m-p/206444#M25026</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/60167"&gt;@samandqq&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Sorry for the late response. Assuming your path is&amp;nbsp;&lt;STRONG&gt;/e/1bde8062-2746-42a9-a9c6-xxxxx/api/v1/deployment/installer/agent/unix/default/latest?arch=x86&amp;amp;flavor=default&lt;/STRONG&gt;, that should be the right one.&lt;/P&gt;
&lt;P&gt;I presume you copied the wget call from the UI, but did you still verify the access token is correct? Usually there should be a clear error message if it is not, but it might be worth verifying that.&lt;/P&gt;
&lt;P&gt;Other than that, that HTML document should actually not originate from Dynatrace, could it be that you have some else (proxy?) in place which enforces an SSO login?&lt;/P&gt;
&lt;P&gt;You could also use curl instead of wget and pass the ".-ivk" parameters to get more insight on the connection and verify you are actually talking to the Dynatrace machine and not a proxy. Verify the certificates as well.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 14:19:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/The-shell-script-in-html-format-is-returned-after-the-oneagent/m-p/206444#M25026</guid>
      <dc:creator>alexander_dt</dc:creator>
      <dc:date>2023-03-07T14:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: The shell script in html format is returned after the oneagent download command is executed</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/The-shell-script-in-html-format-is-returned-after-the-oneagent/m-p/206445#M25027</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/60167"&gt;@samandqq&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To me this looks like there is some MitM device interfering.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just tested against my own Managed Cluster, and was unable to reproduce this.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A valid token without the correct access gets the expected http/403 forbidden&lt;/LI&gt;
&lt;LI&gt;A valid token with the correct access gets the install package&lt;/LI&gt;
&lt;LI&gt;An invalid token gets the expected http/401 unauthorized.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;As an API endpoint accepting tokens only, a redirect to SSO should not be returned.&amp;nbsp; However, an MitM device such as a proxy that requires authentication &lt;EM&gt;would&lt;/EM&gt; redirect to authentication without any awareness that the requested URL is an API endpoint.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I second &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/59135"&gt;@alexander_dt&lt;/a&gt; recommendation to switch to using curl with the -ikvvv switches to see exactly what you are connecting to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-- Erik&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 15:39:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/The-shell-script-in-html-format-is-returned-after-the-oneagent/m-p/206445#M25027</guid>
      <dc:creator>Erik_Soderquist</dc:creator>
      <dc:date>2023-03-07T15:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: The shell script in html format is returned after the oneagent download command is executed</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/The-shell-script-in-html-format-is-returned-after-the-oneagent/m-p/207040#M25153</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/60167"&gt;@samandqq&lt;/a&gt;,&amp;nbsp;did you manage to fix it? Was it a proxy?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 13:16:05 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/The-shell-script-in-html-format-is-returned-after-the-oneagent/m-p/207040#M25153</guid>
      <dc:creator>alexander_dt</dc:creator>
      <dc:date>2023-03-15T13:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: The shell script in html format is returned after the oneagent download command is executed</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/The-shell-script-in-html-format-is-returned-after-the-oneagent/m-p/207089#M25159</link>
      <description>&lt;P&gt;Yes, it's proxy, thanks a lot.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 00:15:55 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/The-shell-script-in-html-format-is-returned-after-the-oneagent/m-p/207089#M25159</guid>
      <dc:creator>samandqq</dc:creator>
      <dc:date>2023-03-16T00:15:55Z</dc:date>
    </item>
  </channel>
</rss>

