<?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: Serve a JS map app through a proxy that publishes a locally-hosted web map that contain secure content. How to? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/serve-a-js-map-app-through-a-proxy-that-publishes/m-p/720790#M66899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dirk,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; So the way I do this is add a serverUrl in the proxy.config for your ArcGIS Server services that are secure &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;serverUrl url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fxxx.xxxx.com%2Farcgis%2Frest%2Fservices" rel="nofollow" target="_blank"&gt;https://xxx.xxxx.com/arcgis/rest/services&lt;/A&gt;&lt;SPAN&gt;" matchAll="true" username="your user name" password="your password"/&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Mar 2016 16:27:58 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2016-03-17T16:27:58Z</dc:date>
    <item>
      <title>Serve a JS map app through a proxy that publishes a locally-hosted web map that contain secure content. How to?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/serve-a-js-map-app-through-a-proxy-that-publishes/m-p/720787#M66896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have the full stack of ArcGIS Server and Portal hosted on-premise. We've authored a map service that is secured. In Portal we created a web map that uses an ArcGIS Online basemap and the secured map service. We then wrote a simple JS application that serves the web map. It requires the user to enter credentials - we do not want users to enter credentials, yet the map service must remain secure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enter the proxy, download from &lt;A href="https://github.com/Esri/resource-proxy/releases" title="https://github.com/Esri/resource-proxy/releases" rel="nofollow noopener noreferrer" target="_blank"&gt;Releases · Esri/resource-proxy · GitHub&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following the instructions here: &lt;A href="https://developers.arcgis.com/javascript/jshelp/tutorial_sharing_maps_secure_layers.html" title="https://developers.arcgis.com/javascript/jshelp/tutorial_sharing_maps_secure_layers.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Sharing maps with secure layers | Guide | ArcGIS API for JavaScript, &lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;...adding the appropriate urlUtils and proxy.configs&lt;/P&gt;&lt;P&gt;Results in a 403 error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The JS is here:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;urlUtils.addProxyRule({
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; urlPrefix: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fsubdomain.domain.com" target="_blank"&gt;https://subdomain.domain.com&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; proxyUrl: "proxy/proxy.ashx"
});


&lt;SPAN&gt;arcgisUtils.arcgisUrl = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fsubdomain.domain.com%2Fportal%2Fsharing%2Fcontent%2Fitems" target="_blank"&gt;https://subdomain.domain.com/portal/sharing/content/items&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;
arcgisUtils.createMap("&amp;lt;WEB_MAP_ID&amp;gt;","map").then(function(response){});&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The content of the proxy.config has:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;serverUrl clientId="&amp;lt;ClientID&amp;gt;" clientSecret="&amp;lt;Client_Secret" rateLimit="0" 
&lt;SPAN&gt;rateLimitPeriod="1" matchAll="true" url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fsubdomain.domain.com%2Farcgis%2Frest%2Fservices%2FMapService%2FMapServer" target="_blank"&gt;https://subdomain.domain.com/arcgis/rest/services/MapService/MapServer&lt;/A&gt;&lt;SPAN&gt;"/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per the sample. Yet I still get the 403&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&lt;SPAN&gt;GET &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fsubdomain.domain.com%2Fproxytest%2Fproxy%2Fproxy.ashx%3Fhttps%3A%2F%2Fsubdomain.domain%E2%80%A6d189aa97%3Ff%3Djson%26callback%3Ddojo.io.script.jsonp_dojoIoScript1._jsonpCallback" target="_blank"&gt;https://subdomain.domain.com/proxytest/proxy/proxy.ashx?https://subdomain.domain…d189aa97?f=json&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript1._jsonpCallback&lt;/A&gt;&lt;SPAN&gt; 403 (Forbidden)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;Can anyone with experience in this realm help provide insight for me please. TIA&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:50:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/serve-a-js-map-app-through-a-proxy-that-publishes/m-p/720787#M66896</guid>
      <dc:creator>DirkVandervoort</dc:creator>
      <dc:date>2021-12-12T06:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Serve a JS map app through a proxy that publishes a locally-hosted web map that contain secure content. How to?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/serve-a-js-map-app-through-a-proxy-that-publishes/m-p/720788#M66897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dirk,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I always make my proxy.config serverUrl url less specific:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14581790082136076 jive_text_macro" data-renderedposition="86_8_1332_16" jivemacro_uid="_14581790082136076" modifiedtitle="true"&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;serverUrl clientId="&amp;lt;ClientID&amp;gt;" clientSecret="&amp;lt;Client_Secret&amp;gt;" rateLimit="0" rateLimitPeriod="1" matchAll="true" url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fsubdomain.domain.com" rel="nofollow" target="_blank"&gt;https://subdomain.domain.com&lt;/A&gt;&lt;SPAN&gt;"/&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also have to tested your proxy?&lt;/P&gt;&lt;P&gt;&lt;A href="https://subdomain.domain.com/proxytest/proxy/proxy.ashx?ping" title="https://subdomain.domain.com/proxytest/proxy/proxy.ashx?ping"&gt;https://subdomain.domain.com/proxytest/proxy/proxy.ashx?ping&lt;/A&gt; &lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;A href="https://subdomain.domain.com/proxytest/proxy/proxy.ashx?https://subdomain.domain.com/arcgis/rest/services/MapService/MapServer?f=json" title="https://subdomain.domain.com/proxytest/proxy/proxy.ashx?https://subdomain.domain.com/arcgis/rest/services/MapService/MapServer?f=json"&gt;https://subdomain.domain.com/proxytest/proxy/proxy.ashx?https://subdomain.domain.com/arcgis/rest/services/MapService/Map…&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 01:45:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/serve-a-js-map-app-through-a-proxy-that-publishes/m-p/720788#M66897</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-03-17T01:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Serve a JS map app through a proxy that publishes a locally-hosted web map that contain secure content. How to?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/serve-a-js-map-app-through-a-proxy-that-publishes/m-p/720789#M66898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Getting closer... Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://webadaptor.power360web.com/proxytest/proxy/proxy.ashx?https://webadaptor.power360web.com/arcgis/rest/services/SampleWorldCities/MapServer?f=json" title="https://webadaptor.power360web.com/proxytest/proxy/proxy.ashx?https://webadaptor.power360web.com/arcgis/rest/services/SampleWorldCities/MapServer?f=json"&gt;https://subdomain.domain.com/proxytest/proxy/proxy.ashx?https://subdomain.domain.com/arcgis/rest/services/Sa…&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;returns:&lt;/P&gt;&lt;P&gt;{"error":{"code":499,"message":"Token Required","details":[]}}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my proxy is working and interrogating the map service and is seeing that it's secure...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...which raises the question: Why is the proxy not working to access the secure services behind the scenes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm still trying to wrap my head around how this works with the ArcGIS Portal. I create a "generic" app which gives me a ClientID and ClientSecret. This is what gets registered in the proxy.config file. My question is: How is the security to the map service relate to the security of the generic app with its ClientID and ClientSecret?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'd really like to do is have a ClientID and ClientSecret for my Web map. Is there a way I can create that security? Or am I constrained to use the generic apps?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully you or someone else with more grey matter than I've got can help answer that question...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Dirk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 15:26:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/serve-a-js-map-app-through-a-proxy-that-publishes/m-p/720789#M66898</guid>
      <dc:creator>DirkVandervoort</dc:creator>
      <dc:date>2016-03-17T15:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Serve a JS map app through a proxy that publishes a locally-hosted web map that contain secure content. How to?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/serve-a-js-map-app-through-a-proxy-that-publishes/m-p/720790#M66899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dirk,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; So the way I do this is add a serverUrl in the proxy.config for your ArcGIS Server services that are secure &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;serverUrl url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fxxx.xxxx.com%2Farcgis%2Frest%2Fservices" rel="nofollow" target="_blank"&gt;https://xxx.xxxx.com/arcgis/rest/services&lt;/A&gt;&lt;SPAN&gt;" matchAll="true" username="your user name" password="your password"/&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 16:27:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/serve-a-js-map-app-through-a-proxy-that-publishes/m-p/720790#M66899</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-03-17T16:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Serve a JS map app through a proxy that publishes a locally-hosted web map that contain secure content. How to?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/serve-a-js-map-app-through-a-proxy-that-publishes/m-p/720791#M66900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Getting closer!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert: Are you using enterprise security? Or internal (AGS) security?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 20:24:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/serve-a-js-map-app-through-a-proxy-that-publishes/m-p/720791#M66900</guid>
      <dc:creator>DirkVandervoort</dc:creator>
      <dc:date>2016-03-17T20:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Serve a JS map app through a proxy that publishes a locally-hosted web map that contain secure content. How to?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/serve-a-js-map-app-through-a-proxy-that-publishes/m-p/720792#M66901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt; internal (AGS) security&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 20:25:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/serve-a-js-map-app-through-a-proxy-that-publishes/m-p/720792#M66901</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-03-17T20:25:22Z</dc:date>
    </item>
  </channel>
</rss>

