Internal ONLY Web Map Sharing Issues

19831
91
Jump to solution
09-25-2015 08:36 AM
BrianO_keefe
Regular Contributor II

So we have a webmap that is INTERNAL ONLY. We have to build the 'ArcGIS' map side online, then using WAB build the web map, prop it up on our internal server, and now it's asking for AGOL sign on. This is supposed to be used by Field Crews?! They will 'never' have AGOL accounts... what is the proper workflow for a situation like this?

1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Brain,

  Here is a my steps for setting up the Proxy to bypass the login (they are a little different from that post).

1. Here is my proxy.config. Notice I am using username and password and not clientId and clientSecret:

EDIT: but I just tested with clientId and clientSecret and it works fine that way too.

<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
             mustMatch="true">
    <serverUrls>
        <serverUrl url="http://calhoun.maps.arcgis.com"
                   username="username"
                   password="password"
                   matchAll="true"/>
        <serverUrl url="http://services.arcgisonline.com"
                   matchAll="true"/>
        <serverUrl url="http://gis.calhouncounty.org"
                   matchAll="true"/>
        <serverUrl url="http://gislap183"
                   matchAll="true"/>
    </serverUrls>
</ProxyConfig>

2. My config.json is basically the same:

"httpProxy": {
    "useProxy": true,
    "alwaysUseProxy": false,
    "url": "/WAB/Proxy/proxy.ashx",
    "rules": [{
        "urlPrefix": "http://calhoun.maps.arcgis.com/",
        "proxyUrl": "/WAB/Proxy/proxy.ashx"
    }]
  }

3. My app registration is basically the same:

URL: http://gis.calhouncounty.org/ MY apps url (removed for obvious reasons)

API: JavaScript

App Type: browser

Purpose: Configurable

Redirect URI's: http://gis.calhouncounty.org

The big thing about step 3 is that the item is PUBLIC (the app item that you are registering). The webmap is still private and secured though.

View solution in original post

91 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Brain,

   If your webmap is not publicly shared on your Orgs AGOL account then you will always be prompted for login. You can get past this by setting up some public generic webmap (that is publicly accessible and unsecured) and then use the Local Layer widget to add your internal map services.

0 Kudos
BrianO_keefe
Regular Contributor II

Hmmmmmm

0 Kudos
BrianO_keefe
Regular Contributor II

I remember back with another web map I was able to configure a proxy with a username / password that bypassed AGOL logins. Is this no longer an option?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Brain,

  Sure that is also an option.

0 Kudos
BrianO_keefe
Regular Contributor II

I've been all over the WAB Proxy settings and can't make hide nor hair. There isn't an ASHX file anymore. Where would one add the username/password to a proxy?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Brain,

   Are you looking in the Proxy.js? Hopefully not. You would have to download and deploy the app to your web server and then setup your proxy service using the esri proxy resource from github here Esri/resource-proxy · GitHub and deploy it to your web server and in the proxy.config you setup the serverUrl and can specify the username and password. Then in your WAB App you open the config.json and httpProxy url:

"httpProxy": {

    "useProxy": true,

    "alwaysUseProxy": false,

    "url": "/WAB/Proxy/proxy.ashx",

    "rules": []

  }

BrianO_keefe
Regular Contributor II

So would I create a new proxy.ashx file for each app?

RobertScheitlin__GISP
MVP Esteemed Contributor

Nope, I have one for all my apps on my web server.

0 Kudos
BrianO_keefe
Regular Contributor II

I got it installed and running. Just tested it.

What I'm trying to figure out is, in my case where I have a webmap that is internal only... I have already propped up the webmap internally. But whenever it's accessed it asks for AGOL login credentials. I want that to stop... but I don't want those AGOL login credentials to fire for every webmap that we run (both internal and external) so is there some way to target THIS APP to use those credentials?

Used to, the proxy was inside the application directory structure... having the Proxy be a service running on the outside leaves me scratching my head as to how to access it via app.

Granted, MOST OF MY WEB MAPS will not even use it. But it's theoretically possible that one app would use one credentials and one app would use another. So I'm assuming I have to trigger this individual access through the proxy... but as I've never used a stand-alone proxy I'm a little confused and I'm not seeing anything on GITHub about it.

0 Kudos