2

I am trying to access to a REST service by an anonymous user on GeoServer 2.9.4. I modified my resp.properties file to allow anonymous role free access to GET:

/**;GET=IS_AUTHENTICATED_ANONYMOUSLY

/**;POST,DELETE,PUT=ADMIN;

Once I did this, the service gives me 404 status instead 401, and browser mode gives me an empty result, for example for service /geoserver/rest/layers/layer_name, I get:

No such layer: layer_name

But for service: /geoserver/rest/styles everything works great.

What am I missing?

  • 1
    why would you do that? an anonymous user could now delete all your data. – Ian Turton Dec 29 '17 at 10:39
  • Hi, maybe I was not clear, but what I want is to open GET, to consult, no more. – Ludwig Rubio Dec 29 '17 at 15:38
  • 1
    REST is an administrative interface in GeoServer users should always authenticate to it - in fact that may be enforced by the code – Ian Turton Dec 29 '17 at 16:14
  • I think that's not true, that would take away usability. As you can find on documentation there is possible configuration to achieve this: Read only access to anonymous , even if I try to acces to service /geoserver/rest/styles it works, but is not the same for layer information in service like /geoserver/rest/layers – Ludwig Rubio Dec 29 '17 at 16:59
2

I achived a right configuration to use /rest/layers/layer_name as anonymous user. The problem was that there is another security seccion to configure called as "Data security" where I have to change the configuration from mode HIDE to mode CHALLENGE to allow access to layer's data.

1

I still can't see a reason to allow anonymous users access to the admin interface but if you must then please read the documentation.

You need to use /**;GET=IS_AUTHENTICATED_ANONYMOUSLY

  • thank you for your answer, I've already tried this configuration and it works but for some rest seccions like "rest/styles" but it doesn't work for "rest/layers" – Ludwig Rubio Dec 29 '17 at 18:13
  • please edit your question to give us all the information – Ian Turton Dec 30 '17 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.