Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are users allowed to install GRASS addons in actinia? #13

Closed
veroandreo opened this issue Oct 18, 2021 · 3 comments
Closed

Are users allowed to install GRASS addons in actinia? #13

veroandreo opened this issue Oct 18, 2021 · 3 comments

Comments

@veroandreo
Copy link

Among other addons, I'd like to install v.strds.stats to be able to easily query a STRDS with a vector of polygons. However, using ace (I didn't find an actinia endpoint), I get:

ace location="latlong_wgs84" grass_command="g.extension -l"
https://actinia.mundialis.de//api/v1/locations/latlong_wgs84/processing_async_export
{'version': '1', 'list': [{'module': 'g.extension', 'id': 'g.extension_1804289383', 'flags': 'l', 'inputs': [{'param': 'operation', 'value': 'add'}, {'param': 'prefix', 'value': '$GRASS_ADDON_BASE'}]}]}
veroandreo
Resource status accepted
Polling: https://actinia.mundialis.de/api/v1/resources/veroandreo/resource_id-4d5944b4-2258-4c51-9f0e-c6c6504774ce
Resource poll status: error
AsyncProcessError:  Module or executable <g.extension> is not supported
--------------------------------------------------------------------------
{"accept_datetime":"2021-10-18 12:48:15.280245","accept_timestamp":1634561295.2802432,"api_info":{"endpoint":"asyncephemeralexportresource","method":"POST","path":"/api/v1/locations/latlong_wgs84/processing_async_export","request_url":"http://actinia.mundialis.de/api/v1/locations/latlong_wgs84/processing_async_export"},"datetime":"2021-10-18 12:48:15.487385","exception":{"message":"AsyncProcessError:  Module or executable <g.extension> is not supported","traceback":["  File \"/usr/lib/python3.8/site-packages/actinia_core/rest/ephemeral_processing.py\", line 1747, in run\n    self._execute()\n","  File \"/usr/lib/python3.8/site-packages/actinia_core/rest/ephemeral_processing_with_export.py\", line 604, in _execute\n    EphemeralProcessing._execute(self)\n","  File \"/usr/lib/python3.8/site-packages/actinia_core/rest/ephemeral_processing.py\", line 1541, in _execute\n    process_list = self._create_temporary_grass_environment_and_process_list(\n","  File \"/usr/lib/python3.8/site-packages/actinia_core/rest/ephemeral_processing.py\", line 1627, in _create_temporary_grass_environment_and_process_list\n    process_list = self._validate_process_chain(\n","  File \"/usr/lib/python3.8/site-packages/actinia_core/rest/ephemeral_processing.py\", line 693, in _validate_process_chain\n    raise AsyncProcessError(\n"],"type":"<class 'actinia_core.core.common.exceptions.AsyncProcessError'>"},"http_code":400,"message":"AsyncProcessError:  Module or executable <g.extension> is not supported","process_chain_list":[{"list":[{"flags":"l","id":"g.extension_1804289383","inputs":[{"param":"operation","value":"add"},{"param":"prefix","value":"$GRASS_ADDON_BASE"}],"module":"g.extension"}],"version":"1"}],"process_log":[],"progress":{"num_of_steps":0,"step":0},"resource_id":"resource_id-4d5944b4-2258-4c51-9f0e-c6c6504774ce","status":"error","time_delta":0.20717811584472656,"timestamp":1634561295.4873397,"urls":{"resources":[],"status":"https://actinia.mundialis.de/api/v1/resources/veroandreo/resource_id-4d5944b4-2258-4c51-9f0e-c6c6504774ce"},"user_id":"veroandreo"}

Is this a user permission problem?

If g.extension was allowed it might make it possible to send addon-like python scripts to actinia which IMHO is easier and more flexible than creating the json processing chains (I have no knowledge about security though).

@anikaweinmann
Copy link
Member

User are not allowed to install own addons. This will not be changed for security reasons.

In the module plugin we want to add an endpoint to install official GRASS GIS addons for a user.

@juleshaas
Copy link
Member

The endpoint is created in #26. Tests still need to be done in separate PR.

@anikaweinmann
Copy link
Member

Tests will be created in #27.

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

No branches or pull requests

3 participants