[Geoserver-devel] Restrict WMS formats

Hi all

A customer of mine has to implement the INSPIRE directive and wants to disallow all formats except image formats. (jpg,png,… is allowed, SVG is not allowed)

I have a mandate to work on this feature, the question is if there is any interest to integrate this feature into GeoServer core code. I can remember some discussions about this topic in the past.

If there is no interest. I would continue with a servlet filter. (Quite a hack , but it should work).

If there is an interest, I would continue with a GSIP. I am thinking about a

wms.properties

file to store the configuration.

Opinions ?

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

Is there any reason not to include this in the normal configuration for WMS service?
We already store a list of supported projections for example. copy how that was done.

Please don’t use a wms.properties file as that would dodge our configuration system and prevent saving that setting for those using JDBC configuration.

Jody Garnett

On 12 November 2013 at 6:10:01 pm, Christian Mueller (christian.mueller@anonymised.com) wrote:

Hi all

A customer of mine has to implement the INSPIRE directive and wants to disallow all formats except image formats. (jpg,png,… is allowed, SVG is not allowed)

I have a mandate to work on this feature, the question is if there is any interest to integrate this feature into GeoServer core code. I can remember some discussions about this topic in the past.

If there is no interest. I would continue with a servlet filter. (Quite a hack , but it should work).

If there is an interest, I would continue with a GSIP. I am thinking about a

wms.properties

file to store the configuration.

Opinions ?

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH


November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

No, there is no reason, I did not get the idea.

I will have a look at it if other developers appreciate the idea.

Cheers
Christian

···

On Tue, Nov 12, 2013 at 8:52 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

Is there any reason not to include this in the normal configuration for WMS service?
We already store a list of supported projections for example. copy how that was done.

Please don’t use a wms.properties file as that would dodge our configuration system and prevent saving that setting for those using JDBC configuration.

Jody Garnett

On 12 November 2013 at 6:10:01 pm, Christian Mueller (christian.mueller@anonymised.com…) wrote:

Hi all

A customer of mine has to implement the INSPIRE directive and wants to disallow all formats except image formats. (jpg,png,… is allowed, SVG is not allowed)

I have a mandate to work on this feature, the question is if there is any interest to integrate this feature into GeoServer core code. I can remember some discussions about this topic in the past.

If there is no interest. I would continue with a servlet filter. (Quite a hack , but it should work).

If there is an interest, I would continue with a GSIP. I am thinking about a

wms.properties

file to store the configuration.

Opinions ?

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH


November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

I think this would be something useful to have in the config for the WMS.

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

On Tue, Nov 12, 2013 at 9:23 AM, Christian Mueller
<christian.mueller@anonymised.com> wrote:

No, there is no reason, I did not get the idea.

I will have a look at it if other developers appreciate the idea.

Cheers
Christian

On Tue, Nov 12, 2013 at 8:52 AM, Jody Garnett <jody.garnett@anonymised.com>
wrote:

Is there any reason not to include this in the normal configuration for
WMS service?
We already store a list of supported projections for example. copy how
that was done.

Please don't use a wms.properties file as that would dodge our
configuration system and prevent saving that setting for those using JDBC
configuration.
--
Jody Garnett

On 12 November 2013 at 6:10:01 pm, Christian Mueller
(christian.mueller@anonymised.com) wrote:

Hi all

A customer of mine has to implement the INSPIRE directive and wants to
disallow all formats except image formats. (jpg,png,... is allowed, SVG is
not allowed)

I have a mandate to work on this feature, the question is if there is any
interest to integrate this feature into GeoServer core code. I can remember
some discussions about this topic in the past.

If there is no interest. I would continue with a servlet filter. (Quite a
hack , but it should work).

If there is an interest, I would continue with a GSIP. I am thinking about
a

wms.properties

file to store the configuration.

Opinions ?

--
DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models.
Explore
techniques for threading, error checking, porting, and tuning. Get the
most
from the latest Intel processors and coprocessors. See abstracts and
register

http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--
DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and
register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

On Tue, Nov 12, 2013 at 8:08 AM, Christian Mueller <
christian.mueller@anonymised.com> wrote:

Hi all

A customer of mine has to implement the INSPIRE directive and wants to
disallow all formats except image formats. (jpg,png,... is allowed, SVG is
not allowed)

I have a mandate to work on this feature, the question is if there is any
interest to integrate this feature into GeoServer core code. I can remember
some discussions about this topic in the past.

If there is no interest. I would continue with a servlet filter. (Quite a
hack , but it should work).

If there is an interest, I would continue with a GSIP. I am thinking about
a wms.properties file to store the configuration.

Hi,
this feature has been desired for a long while,
http://jira.codehaus.org/browse/GEOS-822 (ok, the ticket is more generic,
not restricted
to WMS).

I concur with Jody, please to try keep the configuration in the WFSInfo
object.
About the implementation, I can see two possible paths:
* Use, as suggested in GEOS-822, a extension filter to disable certain
output format implementations.
  The upside of this is simplicity of configuration, there are less classes
than output formats.
  The drawback of this approach is that some output formats implement
multiple mime types, e.g., PNG and PNG8
* Use a custom dispatcher callback and control the output format parameter
directly, the advantage is that you
   can control with detail what is enabled, the disadvantage is that might
end up having the user disable aliases
  of particular formats, for example, to turn off png output one has to
disable both PNG and image/png

In all cases some GUI having checkboxes would be recommended, only the code
knows the full list of supported format
names, and I'm afraid some are only known inside the class, but not
advertised, you might have to work a bit on that too
(or make the list be a whitelist)
For example, kml works with both "application/vnd.google-earth.kml+xml" and
"application/vnd.google-earth.kml xml" because
browsers tend to escape + and make it a space...

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------