Hi Ben
The mandate of my customer is to implement this feature for WMS on a
service level. Perhaps I can convince my customer to implement it at a
layer level, using the configuration of the service as a default.
At the moment, there is no plan for implementing restricted MIME types for
WFS. Would be nice to have but it is a matter of funding. (As always).
Sorry for the bad news
Cheers
Christian
On Tue, Jun 3, 2014 at 4:10 AM, Ben Caradoc-Davies <
[email protected]> wrote:
> [Sorry for the late response: long weekend in Western Australia]
>
> Christian,
>
> this functionality would be useful for WFS as well, and would be even
> better if it was defined per-layer. In particular, app-schema WFS feature
> types can only be returned in one GML subtype as their information model is
> defined in an application schema that uses a particular version of GML.
> Current behaviour is to return garbage if the client guesses the wrong
> type. WFS has an outputFormats list in the capabilities document for each
> feature type.
>
> Have you considered supporting a per-layer mime type whitelist, and
> expanding the implementation to WFS?
>
> Kind regards,
> Ben.
>
>
> On 30/05/14 20:51, Christian Mueller 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
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> 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
>>
>>
> --
> Ben Caradoc-Davies <[email protected]>
> Software Engineer
> CSIRO Earth Science and Resource Engineering
> Australian Resources Research Centre
>
--
DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel