Dear devs,
In the last days I’ve started thinking to a REST API for GRASS.
I think would be nice to offer some of the GRASS functionalities through a web service.
I would like to detailed the whole REST API using the YAML format following the Swagger specifications/services, but before start the real work I would like to receive feedback on the idea…
I’ve tried to synthesize the concept in README let me know if you have comments and ideas, please feel free to open new issues or pull requests.
I see a major issue that is that: GRASS is using unix permissions to define the rules on who can access on what.
To preserve this part, the REST service must be executed as super-user in order to be able to execute a module as the owner of a specific mapset and all the user of the platform must be also user of the system.
The other option that I see is to execute the service as a normal user of the system who is the owner of all the gisbase, locations and mapsets, and the permission are checked before the execution of each module. The permission check must be implemented in a new layer on top of GRASS. With this solution the user of the platform are different from the user and group of the system.
Any ideas that you want to share?
Best regards
Pietro
On 24/05/17 13:18, Pietro wrote:
Dear devs,
In the last days I've started thinking to a REST API
<https://en.wikipedia.org/wiki/Representational_state_transfer> for GRASS.
I think would be nice to offer some of the GRASS functionalities through
a web service.
I would like to detailed the whole REST API using the YAML
<http://www.yaml.org/> format following the Swagger <http://swagger.io>
specifications/services, but before start the real work I would like to
receive feedback on the idea...
- first of all: is build a REST API for GRASS a stupid idea? should we
use/promote just the WPS?
Well, what is your argument agains WPS ? Why do you think a REST API is necessary / useful ?
AFAIK, there is no OGC standard for GIS REST services. There is one for WPS.
Moritz
2017-05-24 14:18 GMT+03:00 Pietro <peter.zamb@gmail.com>:
Dear devs,
Any ideas that you want to share?
GRASS GIS code has never been developed with security in mind. I would
not suggest to run it in a non-trustable environment.
Māris.
Best regards
Pietro
I assume that both are equally dangerous. My opinion is that GRASS GIS
should not be exposed to any non trustable users, as various smaller
and larger bugs are too common. Unless, of course, it runs inside a
throw-away VM.
2017-05-25 10:33 GMT+03:00 Pietro <peter.zamb@gmail.com>:
Dear Māris,
On Wed, May 24, 2017 at 8:52 PM, Maris Nartiss <maris.gis@gmail.com> wrote:
GRASS GIS code has never been developed with security in mind. I would
not suggest to run it in a non-trustable environment.
Do you think that expose some GRASS modules through a REST API can be more
dangerous than exposing the same modules through a WPS service? Why?
Pietro
Seen this: https://bitbucket.org/huhabla/open-graas?
Cheers
Stefan
________________________________________
Von: grass-dev [grass-dev-bounces@lists.osgeo.org] im Auftrag von Maris Nartiss [maris.gis@gmail.com]
Gesendet: Donnerstag, 25. Mai 2017 09:42
An: Pietro
Cc: GRASS developers list
Betreff: Re: [GRASS-dev] Implement a REST API for GRASS
I assume that both are equally dangerous. My opinion is that GRASS GIS
should not be exposed to any non trustable users, as various smaller
and larger bugs are too common. Unless, of course, it runs inside a
throw-away VM.
2017-05-25 10:33 GMT+03:00 Pietro <peter.zamb@gmail.com>:
Dear Māris,
On Wed, May 24, 2017 at 8:52 PM, Maris Nartiss <maris.gis@gmail.com> wrote:
GRASS GIS code has never been developed with security in mind. I would
not suggest to run it in a non-trustable environment.
Do you think that expose some GRASS modules through a REST API can be more
dangerous than exposing the same modules through a WPS service? Why?
Pietro
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev
2017-05-25 10:24 GMT+02:00 Blumentrath, Stefan <Stefan.Blumentrath@nina.no>:
Seen this: https://bitbucket.org/huhabla/open-graas?
Sorry, that shouldn't be public available. Please ignore this implementation.
Cheers
Sören
Cheers
Stefan
________________________________________
Von: grass-dev [grass-dev-bounces@lists.osgeo.org] im Auftrag von Maris Nartiss [maris.gis@gmail.com]
Gesendet: Donnerstag, 25. Mai 2017 09:42
An: Pietro
Cc: GRASS developers list
Betreff: Re: [GRASS-dev] Implement a REST API for GRASS
I assume that both are equally dangerous. My opinion is that GRASS GIS
should not be exposed to any non trustable users, as various smaller
and larger bugs are too common. Unless, of course, it runs inside a
throw-away VM.
2017-05-25 10:33 GMT+03:00 Pietro <peter.zamb@gmail.com>:
Dear Māris,
On Wed, May 24, 2017 at 8:52 PM, Maris Nartiss <maris.gis@gmail.com> wrote:
GRASS GIS code has never been developed with security in mind. I would
not suggest to run it in a non-trustable environment.
Do you think that expose some GRASS modules through a REST API can be more
dangerous than exposing the same modules through a WPS service? Why?
Pietro
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev
It is no about implementation but the concept itself. As soon as there
will be an easy way how to provide GRASS GIS processing as a service,
somebody will run it without understanding all security ramifications
of allowing any input into GRASS. Securing GRASS code would be nice,
but so far we are short on high level developers who could do it.
I'm not voting against anyone making easy to run GRASS via WPS or
REST, I just want to be sure that lack security against various remote
threats is kept in mind.
Māris.
2017-05-25 11:24 GMT+03:00 Blumentrath, Stefan <Stefan.Blumentrath@nina.no>:
Seen this: https://bitbucket.org/huhabla/open-graas?
Cheers
Stefan
________________________________________
Von: grass-dev [grass-dev-bounces@lists.osgeo.org] im Auftrag von Maris Nartiss [maris.gis@gmail.com]
Gesendet: Donnerstag, 25. Mai 2017 09:42
An: Pietro
Cc: GRASS developers list
Betreff: Re: [GRASS-dev] Implement a REST API for GRASS
I assume that both are equally dangerous. My opinion is that GRASS GIS
should not be exposed to any non trustable users, as various smaller
and larger bugs are too common. Unless, of course, it runs inside a
throw-away VM.
2017-05-25 10:33 GMT+03:00 Pietro <peter.zamb@gmail.com>:
Dear Māris,
On Wed, May 24, 2017 at 8:52 PM, Maris Nartiss <maris.gis@gmail.com> wrote:
GRASS GIS code has never been developed with security in mind. I would
not suggest to run it in a non-trustable environment.
Do you think that expose some GRASS modules through a REST API can be more
dangerous than exposing the same modules through a WPS service? Why?
Pietro
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev
2017-05-26 8:27 GMT+02:00 Maris Nartiss <maris.gis@gmail.com>:
It is no about implementation but the concept itself. As soon as there
will be an easy way how to provide GRASS GIS processing as a service,
somebody will run it without understanding all security ramifications
of allowing any input into GRASS. Securing GRASS code would be nice,
but so far we are short on high level developers who could do it.
I'm not voting against anyone making easy to run GRASS via WPS or
REST, I just want to be sure that lack security against various remote
threats is kept in mind.
This is true for all REST API's or WPS
that expose a legacy software functionality as internet service.
To reduce security risks you have to be in control of
the input (parameter, files, database) to the legacy software
and provide access only to trusted people via authentication.
Best regards
Sören
Māris.
2017-05-25 11:24 GMT+03:00 Blumentrath, Stefan <Stefan.Blumentrath@nina.no>:
Seen this: https://bitbucket.org/huhabla/open-graas?
Cheers
Stefan
________________________________________
Von: grass-dev [grass-dev-bounces@lists.osgeo.org] im Auftrag von Maris Nartiss [maris.gis@gmail.com]
Gesendet: Donnerstag, 25. Mai 2017 09:42
An: Pietro
Cc: GRASS developers list
Betreff: Re: [GRASS-dev] Implement a REST API for GRASS
I assume that both are equally dangerous. My opinion is that GRASS GIS
should not be exposed to any non trustable users, as various smaller
and larger bugs are too common. Unless, of course, it runs inside a
throw-away VM.
2017-05-25 10:33 GMT+03:00 Pietro <peter.zamb@gmail.com>:
Dear Māris,
On Wed, May 24, 2017 at 8:52 PM, Maris Nartiss <maris.gis@gmail.com> wrote:
GRASS GIS code has never been developed with security in mind. I would
not suggest to run it in a non-trustable environment.
Do you think that expose some GRASS modules through a REST API can be more
dangerous than exposing the same modules through a WPS service? Why?
Pietro
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev