Hi Jody
The format restrictions work on the service level, look at the <GetMap> and
<GetFeatureInfo> elements in the WMS capabilities document. The <Format>
Elements are children of the service elements.
I think it is not possible to put the XML construct mentioned above inside
a <Layer> element.
Christian
On Fri, May 30, 2014 at 10:18 PM, Jody Garnett <[email protected]>
wrote:
> Question, are you doing config inheritance on this?
>
> Like can a white list from the root WMS layer, or a layer group be
> combined with the list for a specific layer? Or do we need to setup each
> layer one at a time.
>
> Jody
>
>
> On Friday, May 30, 2014, Christian Mueller <
> [email protected]> wrote:
>
>> Hi all
>>
>> A customer of mine wants to sponsor WMS GetMap output format restrictions
>> and I want to start this work during the weekend.
>>
>> The theme is not a new one, I found some mail threads
>>
>>
>> http://osgeo-org.1560.x6.nabble.com/WMS-output-format-restrictions-td3796402.html
>>
>> http://sourceforge.net/p/geoserver/mailman/geoserver-users/thread/[email protected]/
>>
>> There is also an issue about the topic
>>
>> http://jira.codehaus.org/browse/GEOS-4592
>>
>>
>> My investigations so far
>>
>> 1) GEOS-4592 proposes a black listing of formats. I would prefer a white
>> listing of mime types. Implementations
>> of org.geoserver.wms.GetMapOutputFormat are injected by Spring and as
>> consequence, output formats can be added by extensions.
>>
>> 2) I would like to store the white list in org.geoserver.wms.WMSInfo like
>> the "Limited SRS list". An empty white list means all formats are allowed
>> (this is the default).
>>
>> 3) I think I can find all supported mime types by retrieving all
>> implementations of GetMapOutputFormat form the Spring context and
>> collecting the result of the method getMimeType(). On the WMSAdminPage I
>> would implement a CheckBox "Allowed mime types". The default value of this
>> CheckBox is unchecked. If checked, I want dynamically add a list of check
>> boxes representing each mime type .
>>
>> 4) If the white list is not empty, the WMS capabilities document contains
>> only allowed format names, retrieved by
>> GetMapOutputFormat.getOutputFormatNames().
>>
>> 5) A nice place to check the mime type would
>> be org.geoserver.wms.GetMap.getDelegate(). If the mime type of the producer
>> is not in the white list, I would throw a ServiceException. The problem I
>> have is how to get WSInfo object (global or workspace specific). Any Hints ?
>>
>> 6) Is it enough to open a JIRA issue or should I write a GSIP on github.
>>
>>
>> Thanks in advance for comments, advises and hints.
>>
>> Cheers
>> Christian
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> DI Christian Mueller MSc (GIS), MSc (IT-Security)
>> OSS Open Source Solutions GmbH
>>
>>
>
> --
> Jody Garnett
>
>
--
DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel