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

Error when attempting to create locations and mapsets #266

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

Error when attempting to create locations and mapsets #266

veroandreo opened this issue Oct 18, 2021 · 7 comments
Labels
bug Something isn't working documentation related to all kinds of docs (API docs, website, ...)

Comments

@veroandreo
Copy link

Hi,

I try to create a new location and mapset as this is currently needed to create STRDS (#264). However, both using actinia endpoints and ace, I get errors like:

echo '{
  "epsg": "4326"
}' > /tmp/pc_location_epsg4326.json

curl ${AUTH} -H "Content-Type: application/json" -X POST "${actinia}/api/v1/locations/latlong_TEST" -d @/tmp/pc_location_epsg4326.json
{"message": "The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required."}

and

ace create_location="vero 4326"
Trying to create location vero
{'message': 'The server could not verify that you are authorized to access the '
            'URL requested. You either supplied the wrong credentials (e.g. a '
            "bad password), or your browser doesn't understand how to supply "
            'the credentials required.'}

ace location=latlong_wgs84 create_mapset=vero
Trying to create mapset vero
{'message': 'The server could not verify that you are authorized to access the '
            'URL requested. You either supplied the wrong credentials (e.g. a '
            "bad password), or your browser doesn't understand how to supply "
            'the credentials required.'}

Is this a permission problem? Is it possible for a user to create a location and mapset? I exported my credentials as env vars and they are fine.

@griembauer
Copy link
Contributor

Hi @veroandreo, only admins can create new mapsets and locations, see also here. Which actinia instance are you using here? If you are using your credentials on actinia.mundialis.de (role: user), then this error is currently intended. However if you are running a local actinia instance that you try to access as admin, then there seems to be an issue.

@veroandreo
Copy link
Author

Hi @griembauer, I see. I'm using actinia.mundialis.de, username: veroandreo. But I do not know what permissions/resources I have or not (#265). What is the role:user allowed to do?

Are there any plans to create different user levels then? Or users with the role:user must request admins to create location and mapsets and install grass addons (https://github.com/mundialis/ace/issues/6) for them?

@griembauer
Copy link
Contributor

You can see what endpoints you are allowed to access as user from https://actinia.mundialis.de/api/v1/swagger.json --> go to paths --> description or nicely formatted from here. Concerning the allowed GRASS modules per user, this is yet a feature to come (#265).

Different user levels are not envisioned, however you are right that the role user currently has very limited permissions and flexibility. We will try to work on this.

@anikaweinmann anikaweinmann added the bug Something isn't working label Oct 26, 2021
@anikaweinmann
Copy link
Member

A user gets the error:

curl -L -u 'demouser:xxx' -X POST "https://actinia.mundialis.de/api/v1/locations/nc_spm_08/mapsets/test_mapset_17"

{"message": "The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required."}

The tutorial list permissions of the different roles (https://actinia.mundialis.de/tutorial/actinia_concepts.html#user-user-roles-and-user-groups). According to this the user should be allowed to create a new mapset.

In future, it is planned that the user is also allowed to create a new location: https://github.com/mundialis/actinia-stac-plugin/wiki/3-Read#in-which-location-will-be-calculated.

@mmacata mmacata added the documentation related to all kinds of docs (API docs, website, ...) label Nov 11, 2021
@mmacata
Copy link
Member

mmacata commented Nov 11, 2021

Waiting for implementation of comment above

@anikaweinmann
Copy link
Member

Will be changed in actinia_core version > 4.2.0

@juleshaas
Copy link
Member

The user is now allowed to create and delete own mapsets and locations via the respective endpoints. The actinia core version must be > 4.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation related to all kinds of docs (API docs, website, ...)
Projects
None yet
Development

No branches or pull requests

5 participants