<?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 Proper configuration for proxy.config / config.json for self hosted Web Appbuilder to show OAuth2 Popup in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/proper-configuration-for-proxy-config-config-json/m-p/544646#M14441</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;The security workflow for desired authentication workflow seems convoluted, so I'm hoping I can find some clarity here. &lt;/P&gt;&lt;P&gt;I can't seem to get an OAuth2 popup to challenge a user trying to login to a self hosted Web App builder app (i.e. downloaded from WAB Developer edition and hosted on my own web server) with a secured web map OR secured layer.&amp;nbsp; The only authentication challenge I get is&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/211207_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/211391_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've followed the instructions in &lt;A href="https://community.esri.com/thread/121212" target="_blank"&gt;What's the proper configuration for proxy.config and config.json for a self-hosted Web AppBuilder for ArcGIS Web Applica…&lt;/A&gt; but it doesn't work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone successfully been able to replicate this workflow?&amp;nbsp; I want my users to be able to go to the application (without having to go through my Portal - just a direct link to the URL), and login using an identity provider (as opposed to built in Portal credentials). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I've done:&lt;/P&gt;&lt;P&gt;1. Created a web map in Portal for ArcGIS 10.4 (which is federated with my server)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Created a web app (based on my web map) in web app builder dev edition, downloaded the code, and placed it on my own web server. Lets say its &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmywebserver%2Fmyapp" target="_blank"&gt;https://mywebserver/myapp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3.&amp;nbsp; Registered &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmywebserver%2Fmyapp" target="_blank"&gt;https://mywebserver/myapp&lt;/A&gt;&lt;SPAN&gt; as an application in Portal for ArcGIS, and set the redirect URIs to be &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmywebserver" target="_blank"&gt;https://mywebserver&lt;/A&gt;&lt;SPAN&gt; and the URI for my portal (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmyportalsite" target="_blank"&gt;https://myportalsite&lt;/A&gt;&lt;SPAN&gt;).&amp;nbsp; This generated an appID and appSecret.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;4. Following instructions in Alex Mahrou's post, I have modified my config.json items as such:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt;"portalUrl": "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmyportalsite" target="_blank"&gt;https://myportalsite&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;
&amp;nbsp; "appId": "myappid",
"isWebTier": true,
&amp;nbsp; "httpProxy": {
&amp;nbsp;&amp;nbsp;&amp;nbsp; "useProxy": true,
&amp;nbsp;&amp;nbsp;&amp;nbsp; "alwaysUseProxy": false,
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "url": "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmywebserver%2Fproxy%2Fproxy.ashx" target="_blank"&gt;https://mywebserver/proxy/proxy.ashx&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "rules": [{"urlPrefix":"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmyportalsite" target="_blank"&gt;https://myportalsite&lt;/A&gt;&lt;SPAN&gt;","proxyUrl":"/proxy/proxy.ashx"}]&lt;/SPAN&gt;
&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;5. Also following instructions in Alex Mahrou's post, I have modified my proxy.config as such:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;serverUrls&amp;gt;
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;serverUrl url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices.arcgisonline.com" target="_blank"&gt;http://services.arcgisonline.com&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; matchAll="true"/&amp;gt;
&lt;SPAN&gt;&amp;nbsp; &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%2Fmywebserver" target="_blank"&gt;https://mywebserver&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; matchAll="true"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /&amp;gt;
&lt;SPAN&gt;&amp;nbsp; &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%2Fmyportalsite%2F" target="_blank"&gt;https://myportalsite/&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; clientId="myappid"
&amp;nbsp;&amp;nbsp;&amp;nbsp; clientSecret="myappsecret"
&lt;SPAN&gt;&amp;nbsp; oauth2Endpoint="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmyportalsite%2Fsharing%2Foauth2%2F" target="_blank"&gt;https://myportalsite/sharing/oauth2/&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; rateLimit="600"
&amp;nbsp;&amp;nbsp;&amp;nbsp; rateLimitPeriod="60"
&amp;nbsp;&amp;nbsp;&amp;nbsp; matchAll="true"&amp;gt;
&amp;lt;/serverUrl&amp;gt;
&amp;lt;/serverUrls&amp;gt;&lt;/PRE&gt;&lt;P&gt;7. Secured my web map to only be accessible to a specific group&lt;/P&gt;&lt;P&gt;8. Tried to log into app.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am only presented with the basic sign in challenge instead of the Oauth2 challenge.&amp;nbsp; The same behavior happens if I secure the registered web app in Portal, or secure one of the layers in my web map.&amp;nbsp; Can anyone here give me any assistance?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 23:33:57 GMT</pubDate>
    <dc:creator>Jay_Gregory</dc:creator>
    <dc:date>2021-12-11T23:33:57Z</dc:date>
    <item>
      <title>Proper configuration for proxy.config / config.json for self hosted Web Appbuilder to show OAuth2 Popup</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/proper-configuration-for-proxy-config-config-json/m-p/544646#M14441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;The security workflow for desired authentication workflow seems convoluted, so I'm hoping I can find some clarity here. &lt;/P&gt;&lt;P&gt;I can't seem to get an OAuth2 popup to challenge a user trying to login to a self hosted Web App builder app (i.e. downloaded from WAB Developer edition and hosted on my own web server) with a secured web map OR secured layer.&amp;nbsp; The only authentication challenge I get is&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/211207_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/211391_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've followed the instructions in &lt;A href="https://community.esri.com/thread/121212" target="_blank"&gt;What's the proper configuration for proxy.config and config.json for a self-hosted Web AppBuilder for ArcGIS Web Applica…&lt;/A&gt; but it doesn't work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone successfully been able to replicate this workflow?&amp;nbsp; I want my users to be able to go to the application (without having to go through my Portal - just a direct link to the URL), and login using an identity provider (as opposed to built in Portal credentials). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I've done:&lt;/P&gt;&lt;P&gt;1. Created a web map in Portal for ArcGIS 10.4 (which is federated with my server)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Created a web app (based on my web map) in web app builder dev edition, downloaded the code, and placed it on my own web server. Lets say its &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmywebserver%2Fmyapp" target="_blank"&gt;https://mywebserver/myapp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3.&amp;nbsp; Registered &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmywebserver%2Fmyapp" target="_blank"&gt;https://mywebserver/myapp&lt;/A&gt;&lt;SPAN&gt; as an application in Portal for ArcGIS, and set the redirect URIs to be &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmywebserver" target="_blank"&gt;https://mywebserver&lt;/A&gt;&lt;SPAN&gt; and the URI for my portal (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmyportalsite" target="_blank"&gt;https://myportalsite&lt;/A&gt;&lt;SPAN&gt;).&amp;nbsp; This generated an appID and appSecret.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;4. Following instructions in Alex Mahrou's post, I have modified my config.json items as such:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt;"portalUrl": "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmyportalsite" target="_blank"&gt;https://myportalsite&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;
&amp;nbsp; "appId": "myappid",
"isWebTier": true,
&amp;nbsp; "httpProxy": {
&amp;nbsp;&amp;nbsp;&amp;nbsp; "useProxy": true,
&amp;nbsp;&amp;nbsp;&amp;nbsp; "alwaysUseProxy": false,
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "url": "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmywebserver%2Fproxy%2Fproxy.ashx" target="_blank"&gt;https://mywebserver/proxy/proxy.ashx&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "rules": [{"urlPrefix":"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmyportalsite" target="_blank"&gt;https://myportalsite&lt;/A&gt;&lt;SPAN&gt;","proxyUrl":"/proxy/proxy.ashx"}]&lt;/SPAN&gt;
&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;5. Also following instructions in Alex Mahrou's post, I have modified my proxy.config as such:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;serverUrls&amp;gt;
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;serverUrl url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices.arcgisonline.com" target="_blank"&gt;http://services.arcgisonline.com&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; matchAll="true"/&amp;gt;
&lt;SPAN&gt;&amp;nbsp; &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%2Fmywebserver" target="_blank"&gt;https://mywebserver&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; matchAll="true"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /&amp;gt;
&lt;SPAN&gt;&amp;nbsp; &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%2Fmyportalsite%2F" target="_blank"&gt;https://myportalsite/&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; clientId="myappid"
&amp;nbsp;&amp;nbsp;&amp;nbsp; clientSecret="myappsecret"
&lt;SPAN&gt;&amp;nbsp; oauth2Endpoint="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmyportalsite%2Fsharing%2Foauth2%2F" target="_blank"&gt;https://myportalsite/sharing/oauth2/&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; rateLimit="600"
&amp;nbsp;&amp;nbsp;&amp;nbsp; rateLimitPeriod="60"
&amp;nbsp;&amp;nbsp;&amp;nbsp; matchAll="true"&amp;gt;
&amp;lt;/serverUrl&amp;gt;
&amp;lt;/serverUrls&amp;gt;&lt;/PRE&gt;&lt;P&gt;7. Secured my web map to only be accessible to a specific group&lt;/P&gt;&lt;P&gt;8. Tried to log into app.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am only presented with the basic sign in challenge instead of the Oauth2 challenge.&amp;nbsp; The same behavior happens if I secure the registered web app in Portal, or secure one of the layers in my web map.&amp;nbsp; Can anyone here give me any assistance?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:33:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/proper-configuration-for-proxy-config-config-json/m-p/544646#M14441</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2021-12-11T23:33:57Z</dc:date>
    </item>
  </channel>
</rss>

