Hi,

Did I understand right that what you want to achieve is to disable the KML 
outputformat for WMS? Have you considered to restrict the allowed MIME types 
https://docs.geoserver.org/latest/en/user/services/wms/webadmin.html#restricting-mime-types-for-getmap-and-getfeatureinfo-requests

-Jukka Rahkonen-

Lähettäjä: Carsten Klein <c.kl...@datagis.com>
Lähetetty: lauantai 1. heinäkuuta 2023 16.27
Vastaanottaja: Andrea Aime <andrea.a...@geosolutionsgroup.com>; Jody Garnett 
<jody.garn...@gmail.com>
Kopio: geoserver-users@lists.sourceforge.net
Aihe: Re: [Geoserver-users] Remove Layer Preview from Login Page (SOLVED)


Hi Andrea, hi Jody,

actually, the solution to the anonymous Layer Preview problem is quite simple 
and relays on GeoServer's built in Security capabilities only. Under Security 
-> Authentication, adding a new HTML Filter Chain "webPreview" for path (ANT 
pattern) "/web/wicket/bookmarkable/org.geoserver.web.demo.MapPreviewPage" is 
the first step. I also checked "Allow creation of an HTTP session for storing 
the authentication token" (don't know whether it's really required). Finally, 
I've added Chain filters "rememberme" and "form" in that order.

Obviously, that new filter chain must be positioned before the "web" filter 
chain (which ist for path "/web/**" and allows for anonymous access).

With that chain in place, clicking on the Layer Preview link while not being 
authenticated, just forwards you to the FORM login page 
org.geoserver.web.GeoServerLoginPage. Layer Preview is no longer accessible 
anonymously... :-)

I did the same for pages for Demos -> Demo requests and Demo -> WCS request 
builder.

As mentioned before, several German companies I know about are facing the same 
problem. Maybe it's worth to mention that procedure in the docs somewhere under 
"Running in a production environment".

Regards,
Carsten
_______________________________________________
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

Reply via email to