Hi Dimitrios,
I don't believe GeoServer itself has the tools for this (GeoFence maybe?).

However, you can do this fairly easily with Apache and the httpd.conf file by 
blocking a user-agent. If you google around for "apache block user agent" or 
similar you'll find various examples which should get you what you want. I.e.
https://serverfault.com/questions/499327/how-can-i-block-a-user-agent-from-all-sites-on-my-server
Blocking by referer may also be feasible depending on your site structure, but 
user-agent is likely the way you want to go. You can also see the user-agent in 
the apache logs.

It should be relatively sustainable as long as you use regular 
expressions/wildcards in place of version numbers to account for ever 
increasing client versions. Being completely decoupled from GeoServer it 
doesn't matter when you upgrade GeoServer, and the GeoServer endpoints are 
unlikely to change.

Important note:
Clients can (and do!) lie about both the http referer, and their user agent. So 
this is fine for casual denial-of-access, but not for anything that requires 
real security (except as a single level in a multi-layered approach).

Note2:
Esri being Esri don't actually use the http referer correctly. If memory 
serves, ArcMap referers take the form http://esri.com/some-unique-id rather 
than the source of the request - chalk another one up to ignoring standards. 
It's either that or the user agent string, but it definitely abuses one of them.

Cheers,
Jonathan


---- On Mon, 27 Mar 2017 12:12:48 +0100 
dimmihel<[email protected]> wrote ---- 

Hi community, 
 
Is there any sustainable way that I can restrict WFS and WMS services to 
specific clients? 
 
For example I would like to use one Geoserver to serve only Desktop GIS 
clients (e.g. QGIS, FME, ArcGIS and so on) and another one to serve only 
browser / scripts requests. 
 
I noticed that I can do some filtering using our web server (i.e. apache2) 
and the HTTP referer from the 'combined' apache2 logs but is this 
sustainable in a production environment or will it cause a lot of problems? 
 
Thanks 
 
Regards, 
D. 
 
 
 
-- 
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/geoserver-for-desktop-GIS-clients-only-tp5314410.html
 
Sent from the GeoServer - User mailing list archive at Nabble.com. 
 
------------------------------------------------------------------------------ 
Check out the vibrant tech community on one of the world's most 
engaging tech sites, Slashdot.org! http://sdm.link/slashdot 
_______________________________________________ 
Geoserver-users mailing list 
[email protected] 
https://lists.sourceforge.net/lists/listinfo/geoserver-users 





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to