cumberland-river-compact / icreek

iCreek vNext
https://cumberland-river-compact.github.io/icreek/
MIT License
0 stars 0 forks source link

Secure and Limit Requests to ArcGIS Online #12

Open robert-claypool opened 5 years ago

robert-claypool commented 5 years ago

Problem

If we use an ArcGIS Online hosted feature service for streams, then we can either make it public or keep it private.

Hosting this data as public has a certain risk: no matter how the data is used (by iCreek, by some other app, or by any user on arcgis.com), that usage will be charged to our ArcGIS Online account. There are thousands of water related layers on arcgis.com, so unless we advertise or promote our particular layer, I doubt anyone will use it outside of iCreek, but there is no guarantee.

Solution

A hosted feature service can be used privately (securely) if we also use a proxy to handle logins. In this setup, iCreek would request streams from our proxy, the proxy would use a named login to get a token, then the proxy would request the streams and send them to iCreek. As far as iCreek is concerned, the proxy becomes our feature service. Since login credentials are hidden by the proxy, the proxy becomes a secure gate-keeper to our private feature service. This stops any random person or app from using iCreek streams except though iCreek itself. It also gives us an easy place to rate limit the flow of data; the proxy can, for example, limit requests to ArcGIS Online at a rate of 1000 per minute - thereby protecting our account from overuse which would otherwise eat up too many Esri service credits.

Unfortunately, Esri won't host the proxy for us (they do have a proxy service, but it only works with premium services like routing, not with hosted feature layers), so we'd have to choose a host like Microsoft Azure or Amazon AWS to run our proxy code. Hosting a proxy won't be expensive (probably pennies per month if we go "serverless"!), but still the proxy is one more thing to maintain and the hosting account is one more thing to setup, secure, and have attached to a credit card.

As you can see, proxies are a pain to setup and I'm not sure if we need one. Will we run into issues with a public hosted feature service? I don't know. The proxy would protect us from abuse and overuse of our streams data, but probably the data won't be abused or overused even if it is public.

This issue is to document our options and have a place for discussion.

robert-claypool commented 5 years ago

@JedGrubbs, I have published all iCreek streams (healthy, unhealthy, and unassessed) at https://25.maps.arcgis.com/home/item.html?id=9f2e3de95f38483b8ec22077cbba13f0

The description and metadata are intentionally empty to discourage use because also this feature layer is public.

My account has 2,500 service credits - more than I'll ever need - so iCreek streams can live in this account while we develop the app. As we near deployment and a public announcement of the new site, we can revisit this issue and decide if a proxy is needed and where the streams layer should live permanently.

JedGrubbs commented 5 years ago

Great! Should I be able to see the streams via the link? Tried to click through and it's asking me for GIZbiz login credentials. - Jed

On Fri, Jul 20, 2018 at 9:16 AM, Robert Claypool notifications@github.com wrote:

@JedGrubbs https://github.com/JedGrubbs, I have published all iCreek streams (healthy, unhealthy, and unassessed) at https://25.maps.arcgis.com/home/item.html?id= 9f2e3de95f38483b8ec22077cbba13f0

The description and metadata are intentionally empty to discourage use because also this feature layer is public.

My account has 2,500 service credits - more than I'll ever need - so iCreek streams can live in this account while we develop the app. As we near deployment and a public announcement of the new site, we can revisit this issue and decide if a proxy is needed and where the streams layer should live permanently.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cumberland-river-compact/icreek/issues/12#issuecomment-406613932, or mute the thread https://github.com/notifications/unsubscribe-auth/Ak-UdkQ14wn2SF6znypW5w_7C_rk187yks5uIeY2gaJpZM4VYGHN .

--

JED GRUBBS | Program Manager

CUMBERLAND RIVER COMPACT2 Victory Avenue Suite 300 https://maps.google.com/?q=2+Victory+Avenue+Suite+300%0D+Nashville,+TN+37213&entry=gmail&source=g Nashville, TN 37213 https://maps.google.com/?q=2+Victory+Avenue+Suite+300%0D+Nashville,+TN+37213&entry=gmail&source=g O: 615.837.1151 <(615)%20837-1151>

www.CumberlandRiverCompact.org http://www.cumberlandrivercompact.org/ Facebook https://www.facebook.com/CumberlandRiverCompact/?hc_ref=ARQ9r-1W4xHVn5nwbIOviOl5Ut5FTM5hWuHiUMpOqPuAF38x93OtzJzvHKxeFse1BVk&fref=nf | Twitter https://twitter.com/The_Compact

robert-claypool commented 5 years ago

Please try again. They are public now!

Also see https://cumberland-river-compact.github.io/icreek/ (work in progress)

JedGrubbs commented 5 years ago

Cool. Thanks Robert.

On Sat, Jul 21, 2018 at 2:28 PM, Robert Claypool notifications@github.com wrote:

Please try again. They are public now!

Also see https://cumberland-river-compact.github.io/icreek/ (work in progress)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cumberland-river-compact/icreek/issues/12#issuecomment-406818525, or mute the thread https://github.com/notifications/unsubscribe-auth/Ak-UdloHhzpxnvm9YYRzmSDW0aRYZdycks5uI4D0gaJpZM4VYGHN .

--

JED GRUBBS | Program Manager

CUMBERLAND RIVER COMPACT2 Victory Avenue Suite 300 https://maps.google.com/?q=2+Victory+Avenue+Suite+300%0D+Nashville,+TN+37213&entry=gmail&source=g Nashville, TN 37213 https://maps.google.com/?q=2+Victory+Avenue+Suite+300%0D+Nashville,+TN+37213&entry=gmail&source=g O: 615.837.1151 <(615)%20837-1151>

www.CumberlandRiverCompact.org http://www.cumberlandrivercompact.org/ Facebook https://www.facebook.com/CumberlandRiverCompact/?hc_ref=ARQ9r-1W4xHVn5nwbIOviOl5Ut5FTM5hWuHiUMpOqPuAF38x93OtzJzvHKxeFse1BVk&fref=nf | Twitter https://twitter.com/The_Compact