4

I'm running geoserver 2.8.0 in tomcat7 on Ubuntu 14.04.

Could anybody help me with the security configuration? I want to serve WMS and WFS from a specific workspace using authorization based on a authkey in the URL - GET request.

I have tried to follow these instructions: http://docs.geoserver.org/stable/en/user/community/authkey/index.html

So far I tried:

  • create new Group Service: sh_group (jdbc), add new User: sh1 (role: READ)
  • create Data Security rule for new workspace, access mode read for role: READ
  • add new Authentication Filter: sh_authfilter (authkey), using group service sh_group
  • add sh_authfilter to default Filter Chain as first selected filter (above basic and anonymous)
  • create new Authentication Provider: sh_authprovider and add this to selected Provider Chain (top)

The synchonisation of authkeys is working and I see a UUID for the user sh1. I can login to the web admin interface as user sh1, however I cannot access a WMS or WFS using the authkey variable in the GET request. Can you tell me above all procedure?

1 Answer 1

2

You may need to create and exception rule only applicable to getMap requests. look at this reference link: http://docs.geoserver.org/stable/en/user/services/wms/reference.html https://github.com/geoserver/geoserver/commit/a5985f42bd9ebe985310ae83252b4cb32e45fb1b

2
  • Thanks, but I still have no idea what to do. Does the fact that I run geoserver inside tomcat7 make a difference? And the jvm version, does that have to be jre8 (using openjdk7 atm). Commented May 16, 2016 at 9:23
  • 1
    Excellent - I worked it out. Had to change the url to: .../geoserver/scotland_data/wms?request=GetMap&service=WMS&authkey=XXXXXXXXXXXXXXXXXXXXXXXXXXX&version=1.1.1&layers=scotland_data:pub_communitycouncils&styles=&srs=EPSG:27700&bbox=0513.16443043435,526464.9268837326,482425.4722358609,1232643.830088544&width=400&height=330&format=image/png And the authkey now works. (without 'request=GetMap' in the url it doesn't work..). Commented May 16, 2016 at 10:15

Your Answer

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

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