koopjs / koop-provider-agol

ArcGIS Online provider for Koop (public services only).
Other
12 stars 10 forks source link

Cutting API access to some fields #70

Closed mapmeld closed 8 years ago

mapmeld commented 9 years ago

Hey and sawadekab from Thailand,

I recommended to someone that we could use Koop as the public gateway for a government agency's internal ArcGIS Server. Is there a feature built into Koop, where the agency could restrict what fields are available through the public API? Or would this take some custom coding?

As an example, if a FeatureService has NameAttribute and SecretAttribute, we want NameAttribute to be returned and used in queries (WHERE NameAttribute = 'Thailand'), but SecretAttribute would never be returned or query-able, even if an API requests it.

jgravois commented 9 years ago

sawadekab to you @mapmeld!

i'm not positive, but i'd expect that the other maintainers of koop would agree that it falls outside the scope of the project to try and have it accomplish what you're asking for.

in essence koop is middleware that translates data that is already publicly available and makes it queryable and downloadable as both .geojson, and geoservices json as well as downloadable in other flat file interchanges formats (like .shp, and .csv).

the koop-agol provider in particular expects/returns both resources that are actually hosted in ArcGIS Online and ArcGIS Server resources that have been registered as items in ArcGIS Online, so it would take some significant refactoring to:

a) architect a solution in which your instance of koop is the only thing that can traverse the firewall to get to an internal ArcGIS Server which exposes additional fields b) configure the middleware to understand how to make its requests directly to ArcGIS Server.

This is just an unsolicited suggestion, but you might suggest that the agency in question use ArcGIS for Organizations (which comes free with the purchase of ArcGIS Desktop) and script uploading datasets which have already been scrubbed of sensitive fields.

All that being said, if you decide you'd like to dive into the source, all the @koopjs/dev s are happy to chat about the code.

dmfenton commented 9 years ago

Hi @mapmeld The best thing for you to do is just publish a service that has specific fields that are hidden. It's actually pretty easy to do from the layer properties when you are working in ArcMap

dmfenton commented 9 years ago

Also, have you considered using ArcGIS Open Data instead of trying to set up Koop on your own? We run Koop in the background so you can get access to all the different output types without having to run your own infrastructure.