I'm using GeoServer 2.22.2. and now I can access the static files under data_dir/www/.for example: http://publicip:8080/geoserver/www/index.html.but I don't want all those files exposed to the role unauthenticated.

Does anyone know how to apply security policies to this directory and block ROLE_ANONYMOUS request to the static files in the data_dir/www/?

1 Answer 1


This is just a guess, but try the following:

  • Go To the authentication menu item
  • Create a new filter chain, similar to the "default" one, but remove anonymous access and set the path for it to "/www/**"
  • Save it, and then move it so that it occurs before the default chain

At this point anonymous access to anything under "www" should be disallowed.

  • i have just tried as your suggestion,it's still not working. (the data access rule is bundled with workplace by default,thus i added a workplace named www with url localhost:8080/geoserver/www).maybe the workplace is just for layers&stores, the statics files is not what it serves
    – calmQ36
    Mar 7 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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