Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Secure webmap fix #109

Merged
merged 1 commit into from
Apr 29, 2014
Merged

Secure webmap fix #109

merged 1 commit into from
Apr 29, 2014

Conversation

phpmaps
Copy link

@phpmaps phpmaps commented Apr 15, 2014

No description provided.

@jgravois
Copy link
Contributor

doug, let me know if you need a hand rebasing/squashing all the commits in this pull request.

@phpmaps
Copy link
Author

phpmaps commented Apr 15, 2014

Yes. Do you know the code to simply rebase a branch….

@jgravois
Copy link
Contributor

@bsvensson
Copy link
Member

This seems to assume all server 403's are related to secure webmaps - is that correct?

@phpmaps
Copy link
Author

phpmaps commented Apr 15, 2014

If the request results in a 403 the proxy then tries to authenticate using the credentials in the config. Once authentication succeeds the token goes into session and the get token request does not happen again for some time.

@phpmaps
Copy link
Author

phpmaps commented Apr 15, 2014

@bsvensson sorry my clean up attempts are making things worse.

@esoekianto
Copy link
Contributor

@phpmaps I tested your changes (pretty much in phpmaps@8055268), it works with simple secured webmap, 65d4290afa4a48438eee7eb5d02487d4

But still trouble with this, 405e2b31e8484a5da4b2819349b3c147, (original webmap from gist with demographics), it got thru the arcgis secured webmap auth, but challenge when trying to open demographics layer.

@phpmaps
Copy link
Author

phpmaps commented Apr 16, 2014

@esoekianto I worked with @jgravois to squash each push to make the pull request cleaner but still having Git trouble. Before tackling the Demographic service I want to work with you guys on getting this pull request merged.

@esoekianto
Copy link
Contributor

@phpmaps stop by my desk, I will show what work for me to do this git feature branch workflow

@kellyhutchins
Copy link
Member

@phpmaps testing this update and still having issues with accessing secure web maps. Here are the messages I'm seeing in the log:

04-16-14 20:11:29 | GET detected
04-16-14 20:11:29 | Authorization failed : {"error":{"code":403,"messageCode":"GWM_0003","message":"You do not have permissions to access this resource or perform this operation.","details":[]}}
04-16-14 20:11:29 | Retry attempt 1 of 3
04-16-14 20:11:29 | Resource using ArcGIS Server security
04-16-14 20:11:30 | Unable to get token endpoint
04-16-14 20:11:30 | Authorization failed : {"error":{"code":403,"messageCode":"GWM_0003","message":"You do not have permissions to access this resource or perform this operation.","details":[]}}
04-16-14 20:11:30 | Retry attempt 2 of 3
04-16-14 20:11:30 | Resource using ArcGIS Server security
04-16-14 20:11:30 | Unable to get token endpoint
04-16-14 20:11:30 | Authorization failed : {"error":{"code":403,"messageCode":"GWM_0003","message":"You do not have permissions to access this resource or perform this operation.","details":[]}}
04-16-14 20:11:30 | Retry attempt 3 of 3
04-16-14 20:11:30 | Resource using ArcGIS Server security
04-16-14 20:11:30 | Unable to get token endpoint
04-16-14 20:11:30 | Removing session value
04-16-14 20:11:30 | Authorization failed : {"error":{"code":403,"messageCode":"GWM_0003","message":"You do not have permissions to access this resource or perform this operation.","details":[]}}
04-16-14 20:11:30 | Proxy complete

@phpmaps
Copy link
Author

phpmaps commented Apr 16, 2014

@kellyhutchins - Is there a map to share? I am aware of the Demographic Service. This fix is targeting Web Maps secured (with Basemaps and Operational layers) within an ArcGIS Organization. Is this like your web map setup?

@kellyhutchins
Copy link
Member

@phpmaps yes that is how my map is setup. @esoekianto found that this problem occurs if there is no rest or sharing in the url in the config. If I add this it works but this shouldn't be a requirement.

@kellyhutchins
Copy link
Member

@phpmaps I merged the fix that @esoekianto made to better handle config urls without rest in the url. Once I did that everything works.

Can you work with @esoekianto or @jgravois to streamline this pull request?

@jgravois
Copy link
Contributor

we conquered GIT!!!!

Fixes gzip issue, curl errors go to client

Retry 403 errors from Web Maps

Curl errors go to client, Fixes 53

Fixes gzip issue, curl errors go to client

Retry 403 errors from Web Maps

Added curlError method
@phpmaps
Copy link
Author

phpmaps commented Apr 17, 2014

Yes much better now and easier to see the changes thanks to @jgravois

@esoekianto
Copy link
Contributor

@phpmaps I tested the changes to fix secure web map (simple one), it works and ready to be merged. but I noticed that there is another fix for different issue (curl error) in the same commit that I could not verify. if someone else could verify the curl error fix, we can merge this.

@phpmaps
Copy link
Author

phpmaps commented Apr 17, 2014

@esoekianto - One way to verify this would be to put a URL into your config file which you know will result in a 404 error.

Then do something like this with the proxy:

http://localhost/proxy.php?http://www.esriz.com

The expected behavior is that the proxy will push the curl error to the client, not just write it to the proxy log file like in previous versions.

@kellyhutchins
Copy link
Member

@phpmaps I'm going to close this pull request due to the issues we talked about. Can you resubmit separate pull requests for the two issues (curl errors & secure web maps).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants