CrunchyData / pg_featureserv

Lightweight RESTful Geospatial Feature Server for PostGIS in Go
Apache License 2.0
453 stars 89 forks source link

Questions about security features and table relationships #168

Open samtux opened 3 months ago

samtux commented 3 months ago

I have some questions regarding the support of some functionality of the published web services.

dr-jts commented 3 months ago
  • Is it possible to relate a geographic layer to an attribute table and support query filters?

This should be possible via a view.

  • Is it possible to add authentication security or query authorization on a published web services?

The only security that pg_featureserv currently supports is via the access grants on the service user ID. This is by design, to reduce code complexity and separate concerns. If some more elaborate scheme is required it could be done via a security proxy in front of pg_featureserv.

samtux commented 3 months ago

Thank you for your prompt response. For the first case, if it is a relationship of weather stations with temperature and humidity records every 10 minutes, it can be quite a big view to handle. Have you thought of another strategy to handle this kind of data?

dr-jts commented 3 months ago

if it is a relationship of weather stations with temperature and humidity records every 10 minutes, it can be quite a big view to handle. Have you thought of another strategy to handle this kind of data?

From a purely pg_featureserv standpoint, the solution is simple: refine the queries so that the amount of data returned is smaller (e.g. by using a filter with time intervals).

If the need is to access all or a large part of the dataset, then perhaps exploring something like GeoParquet would be more appropriate.

If the issue is visualizing a large number of spatial features, then pg_tileserv might be more effective for this. But it sounds like your dataset has relatively few spatial locations, but a large number of observations at each location.