Problem fixed and was probably always working fine but messy testing causing the confusion.
Maybe theres a couple more seetings around login sessions etc... that I could play with but it turns out that I can access the WMS without the authkey if i'm logged into the GeoServer dashboard within the same browser, different tab. There must be a session setup that remembers my connection. If I use a different browser on the same IP I can't access the WMS endpoints, I get a 404 error. If I add the authkey UUID I can access the endpoints, so seems to be working. Will go searching through Geoserver for session settings but in essence all seems okay now. Paul ________________________________ From: Paul Lewis Sent: 14 February 2022 17:16 To: geoserver-users@lists.sourceforge.net <geoserver-users@lists.sourceforge.net> Subject: How to Use AuthKey Module Can't seem to get this, probably simple, authkey service to work on my WMS endpoints. I'm not sure what elements of these docs to follow (https://docs.geoserver.org/stable/en/user/community/authkey/) but they seem to suggest it all should work but it doesn't come across as a step by step easy set up guide. In principle all I want to do is include a token/UUID/authkey in all getmap or getfeature requests on a layer like the module suggest should be possible. For example the documentation is not clear to me on how to do this and whether I need to work through the 'Key provider using an external web service' section!! Anyway, I can't seem to find help online on what steps to take to get this working. This example (https://stackoverflow.com/questions/60627407/authenticate-request-using-authkey-in-geoserver#:~:text=In%20geoserver%20Security%20%3D%3E%20Authentication%20%3D,user%2Fgroup%20service%22%20button.) helps with some settings but I'm missing something obvious as its still not working. I got the module installed fine. I've created a role, with no particular settings. I've created a user, in User Properties I've assigned a key as authkey and value, not selected a group and selected the previous role. In Security->Authentication I added an Authentication filter using AuthKEY and have tried it set to 'Web Service' and 'User Property' and synchronised. In Security->Authentication->Filter Chains I edited 'default' to select the auth filter and remove the basic and anonymous filters from the 'Chain Filters'. Next I created a workspace, enabled 'Services' WFS, WMS, WCS and set security to readonly for the role created above. I then created a store in that workspace connected to a PostGIS DB. I then created/published a layer from 1 of the tables in that store (DB) and set security to readonly for the role created above. If I then go to the preview pane and select OpenLayers for that layer it all loads fine in a new tab and I can view the layer but there is no AuthKEY token included in the GetMap or GetFeature requests. I'm missing some, probably obvious, setup linkage but just can't see what so any advice would be helpful. Paul
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users