Select to view content in your preferred language

App Authentication with secure service

4561
12
06-07-2011 03:53 PM
SpencerLace
Occasional Contributor
Hi - I'm using the ArcGIS for iOS App (not the API) to connect to our server hosting a mobile web map, which has some secure services.  The "everyone" services appear in the app just fine.  The secure services do prompt the user for authentication, and I enter the proper credentials (that work on the rest endpoint in a browser) but it continuously prompts for username and password.  If I cancel it prompts for the next secure service.  Eventually, I see the map with unsecured service(s) and the Info view shows the entire list of services in the mobile map.  But I don't actually get the data of course.  What could be wrong with my security configuration? I'm using ArcGIs Server 10 SP1 and iOS APP 1.8.5
Thanks,
0 Kudos
12 Replies
AaronBarkhurst
Emerging Contributor
Spencer,

Were you ever able to figure this problem out? I am having the same issue and can't seem to find a solution. Is it possible that something needs to be added to the JSON text regarding username and password when adding the map in yourserver/ArcGIS/mobile?
0 Kudos
NimeshJarecha
Esri Regular Contributor
Spencer,

Please provide following information, which will help diagnose the problem.

1. Are you using ArcGIS Server for .NET or Java?
2. What type of security is configured? Token or HTTP Based?
3. If token, what is the Token URL protocol? HTTPS or HTTP? You can check information by http://<host>/arcgis/rest/info
4. Is your server has SSL setup? Means, services starts with HTTPS or HTTP?

Regards,
Nimesh

Hi - I'm using the ArcGIS for iOS App (not the API) to connect to our server hosting a mobile web map, which has some secure services.  The "everyone" services appear in the app just fine.  The secure services do prompt the user for authentication, and I enter the proper credentials (that work on the rest endpoint in a browser) but it continuously prompts for username and password.  If I cancel it prompts for the next secure service.  Eventually, I see the map with unsecured service(s) and the Info view shows the entire list of services in the mobile map.  But I don't actually get the data of course.  What could be wrong with my security configuration? I'm using ArcGIs Server 10 SP1 and iOS APP 1.8.5
Thanks,
0 Kudos
PaulLohr
Frequent Contributor
Not the same problem, but having a problem with secured services. This is with Server v10 with service pack 2 applied and the patch for REST security. ArcGIS for iOS is version 1.8.5 (the app, not the API).

The service is secured using tokens (SQL Server Express). The map opens through the ArcGIS Servers section of ArcGIS for iOS. The basemap layer loads, then the app switches to a view that asks for the credentials. I provide the credentials, the app hangs for a little while, then switches back to the map but never displays the secured service. Tried zooming in and out to get the secured service to load, but it never does.

I would really like to use secured services in this manner. If I can be of any help, contact me at pml at johnsoneng.com.

Thanks for any help,
Paul Lohr
0 Kudos
NimeshJarecha
Esri Regular Contributor
Paul,

Please post the web map JSON (by hiding some information) so I can have a look at it and help you. Are you able to access the same service in Safari browser of the same device?

Regards,
Nimesh
0 Kudos
PaulLohr
Frequent Contributor
Thanks for asking, Nimesh. Sorry I am late to respond.

{
  "operationalLayers": [ {
  "url": "http://domain.com/ArcGIS/rest/services/folderName/serviceName/MapServer",
  "visibility": true,
  "opacity": 1,
  "mode": 1,
  "title": "JEI WQ Locations"
  }],
  "baseMap": {
    "baseMapLayers": [{
      "opacity": 1,
      "visibility": true,
      "url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"     
    }],
    "title": "JEI Water Quality Map"
  },
  "widgets": null,
  "version": "1.1"
}
0 Kudos
NimeshJarecha
Esri Regular Contributor
No probs, Paul!

Are you seeing the problem with latest app (v2.0.1)?

You've mentioned that token based security is configured on sever. In browser, go to "http://<host>/arcgis/rest/info" with valid server name and provide information returned by server.

Regards,
Nimesh
0 Kudos
PaulLohr
Frequent Contributor
Thanks for your quick response, Nimesh.
Server Information

Current Version: 10.02

SOAP URL: http://FTMSGIS2/arcgis/services

Secure SOAP URL: https://FTMSGIS2:443/arcgis/services

Authentication Information: 
Is Token Based Security : True
Token Service Url : https://gis2.johnsoneng.com/ArcGIS/tokens
Supported Interfaces:   REST 
0 Kudos
NimeshJarecha
Esri Regular Contributor
Thanks for the info...so your rest URL is http://FTMSGIS2/arcgis/rest/services and token URL is https://gis2.johnsoneng.com/ArcGIS/tokens. Is token service setup on different server?

I would suggest making them either both HTTPS based or disable requireSSL (HTTPS) from token URL.

Let me know if it works after that.

Regards,
Nimesh
0 Kudos
PaulLohr
Frequent Contributor
Both the rest URL and token URL are on the same machine. I found that I needed the change the internal server name in rest.config to use the external domain name. I did that and enabled https on the services. Still, I am not able to access the map. I changed the services back to not requiring https since this did not work.

Here is the information from the REST info page:

SOAP URL: http://gis2.johnsoneng.com/arcgis/services

Secure SOAP URL: https://gis2.johnsoneng.com:443/arcgis/services

Authentication Information: 
Is Token Based Security : True
Token Service Url : https://gis2.johnsoneng.com/ArcGIS/tokens
Supported Interfaces:   REST 
0 Kudos