[Geoserver-devel] [Geoserver-users] Restrict WMS Output formats

I'm up to implement this. Question is what would be preferable, a new
list property in WMSInfo for the blacklisted mime types, or just use the
WMSInfo's metadata map?

Being something that goes in "core" wms I'd say the correct thing to do
is to roll over a new property. Opinions?

Cheers,
Gabriel

On Wed, 2011-06-01 at 16:09 -0300, Gabriel Roldán wrote:

JIRA created: <http://jira.codehaus.org/browse/GEOS-4592&gt;

Cheers,
Gabriel
On Wed, 2011-06-01 at 20:59 +0200, Andrea Aime wrote:
> On Wed, Jun 1, 2011 at 7:58 PM, Chris Holmes <cholmes@anonymised.com> wrote:
> > Weirdly I don't think there is a way to do that. Seems like a common enough
> > request, but I can't personally remember anyone else asking for it. I can't
> > even think of a clean hack to accomplish it, though maybe some else can (or
> > knows a way to disable it properly).
>
> We have the machinery to disable an extension in the code (we have a "extension
> filter" concept), but it's not exposed in any way through the
> configuration of UI.
> One would have to write a extension filter that black lists some output format
> based on configuration, the longer part would be, I guess, updating
> the configuration
> to hold a list of formats not to be exposed and writing the GUI for
> it, the filter
> itself should be trivial to write.
>
> Cheers
> Andrea
>
>

--
Gabriel Roldan
groldan@anonymised.com
Expert service straight from the developers

On Thu, Jun 2, 2011 at 5:32 AM, Gabriel Roldán <groldan@anonymised.com> wrote:

I'm up to implement this. Question is what would be preferable, a new
list property in WMSInfo for the blacklisted mime types, or just use the
WMSInfo's metadata map?

Being something that goes in "core" wms I'd say the correct thing to do
is to roll over a new property. Opinions?

I would go core if you implement it only on trunk, metadata if you want
to backport it to 2.1.x too.

For time and elevation support I'm adding 8 new properties, all in the
metadata exactly because I want to backport it to 2.1.x, where, _I believe_,
changes in the config and xml serialization structure are not welcomed.
I may be wrong.

Cheers
Andrea

--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

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

On Thu, 2011-06-02 at 09:15 +0200, Andrea Aime wrote:

On Thu, Jun 2, 2011 at 5:32 AM, Gabriel Roldán <groldan@anonymised.com> wrote:
> I'm up to implement this. Question is what would be preferable, a new
> list property in WMSInfo for the blacklisted mime types, or just use the
> WMSInfo's metadata map?
>
> Being something that goes in "core" wms I'd say the correct thing to do
> is to roll over a new property. Opinions?

I would go core if you implement it only on trunk, metadata if you want
to backport it to 2.1.x too.

For time and elevation support I'm adding 8 new properties, all in the
metadata exactly because I want to backport it to 2.1.x, where, _I believe_,
changes in the config and xml serialization structure are not welcomed.
I may be wrong.

hum... just thinking about it... if it's core I'd rather prefer them to
be in core and keep metadata for "contributed" content, like geosearch
indexed property and the like.
Off the top of my head I can't think of a reason why de/serialization
would fail, but if you're afraid of breaking something in core, do you
think it'd be a viable solution for 2.1.x to add the properties to the
interfaces but make them delegate to the metadata map in 2.1.x and
proper fields in trunk?
Though that'd be problematic when upgrading a data dir from 2.1.x to
2.2.x, at least the loader takes care of the upgrade...
Also, if you stick to metadata then you plan to never bring those
time/elevation properties to the core interfaces?

Just thinking out loud, but yeah, I guess I'd prefer your core
properties being in core too.

Cheers,
Gabriel

Cheers
Andrea

--
Gabriel Roldan
groldan@anonymised.com
Expert service straight from the developers

On Thu, Jun 2, 2011 at 3:50 PM, Gabriel Roldán <groldan@anonymised.com> wrote:

On Thu, 2011-06-02 at 09:15 +0200, Andrea Aime wrote:

On Thu, Jun 2, 2011 at 5:32 AM, Gabriel Roldán <groldan@anonymised.com> wrote:
> I'm up to implement this. Question is what would be preferable, a new
> list property in WMSInfo for the blacklisted mime types, or just use the
> WMSInfo's metadata map?
>
> Being something that goes in "core" wms I'd say the correct thing to do
> is to roll over a new property. Opinions?

I would go core if you implement it only on trunk, metadata if you want
to backport it to 2.1.x too.

For time and elevation support I'm adding 8 new properties, all in the
metadata exactly because I want to backport it to 2.1.x, where, _I believe_,
changes in the config and xml serialization structure are not welcomed.
I may be wrong.

hum... just thinking about it... if it's core I'd rather prefer them to
be in core and keep metadata for "contributed" content, like geosearch
indexed property and the like.
Off the top of my head I can't think of a reason why de/serialization
would fail, but if you're afraid of breaking something in core, do you
think it'd be a viable solution for 2.1.x to add the properties to the
interfaces but make them delegate to the metadata map in 2.1.x and
proper fields in trunk?
Though that'd be problematic when upgrading a data dir from 2.1.x to
2.2.x, at least the loader takes care of the upgrade...
Also, if you stick to metadata then you plan to never bring those
time/elevation properties to the core interfaces?

Just thinking out loud, but yeah, I guess I'd prefer your core
properties being in core too.

The rationale here is that people often go back and forth between
versions in the stable series, they see something they want in
version x.y.n+1, upgrade, find there is a regression in something
that matters, boom, they cannot downgrade because GS won't
start up anymore, as XStream finds elements that cannot be mapped
to any object property.

We already get a number of complaints about that going from
x.y to x.y+1 (same reason, people that want to go forward and go back)
but at the very least at that point they are upgrading to something
that is meant to be functionally different.

x.y.n+1 is supposed to be a patch release instead, we tend to mix
new functionality, but at the very least such functionality should
not introduce significant configuration changes.

Now, the point would be moot if it was possible to configure XStream
to ignore those new extra tags. Which is something I tried to do in the
past, and failed, the patch worked but had very bad side effects
(can't remember which ones unfortunately, it has been quite some
time ago)

Cheers
Andrea

--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

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

On Thu, Jun 2, 2011 at 4:12 PM, Andrea Aime
<andrea.aime@anonymised.com> wrote:

Now, the point would be moot if it was possible to configure XStream
to ignore those new extra tags. Which is something I tried to do in the
past, and failed, the patch worked but had very bad side effects
(can't remember which ones unfortunately, it has been quite some
time ago)

Searched again and found these:
http://pvoss.wordpress.com/2009/01/08/xstream/
http://jira.codehaus.org/browse/XSTR-30

Maybe they could work? I guess we could try, the potential issue is that
our xstream stuff is already heavily customized, finger crossed that the
patch does not badly interact with it.

But there would be no salvation for 2.1.0, it's already out

Cheers
Andrea

--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

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

Hi all, sorry to chime in late on this one.

My general opinion is that I don’t think it is a great idea to change serialization format mid stable stream, for the reasons Andrea stated. So I agree there. That said I also agree that this restriction is quite limiting when it comes to backporting features. So for this case in particular, i agree with Andrea that on trunk I would say implement it as a addition to the core config (changing the serialization format) but on 2.1.x keep all the config in metadata. I understand that this makes it hard to maintain the work on two branches… but I think that is a better alternative than deal with the mess that would result from changing the serialization format on the stable series.

That said moving forward I agree what we really need is a way to coax xstream into being more lenient when it sees. The solution in the blog post should work well for us although we have the restconfig case to consider. I don’t think we should use it in that case since the xml is usually being supplied by the user… and more likely to contain regular syntax errors. We don’t want to lose the error reporting capabilities in that case.

Also if we do adopt this fix we really need to stress that users should never modify the xml config files manually… since when do they do make a typo or something it will go unrecognized. So I think we need to add a setLax flag to XStreamPersister and only set it when we read the catalog and config from disk, and leave the default behaviour as it is now.

2c.

On Thu, Jun 2, 2011 at 8:24 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, Jun 2, 2011 at 4:12 PM, Andrea Aime
<andrea.aime@anonymised.com> wrote:

Now, the point would be moot if it was possible to configure XStream
to ignore those new extra tags. Which is something I tried to do in the
past, and failed, the patch worked but had very bad side effects
(can’t remember which ones unfortunately, it has been quite some
time ago)

Searched again and found these:
http://pvoss.wordpress.com/2009/01/08-/xstream/
http://jira.codehaus.org/browse/XSTR-30

Maybe they could work? I guess we could try, the potential issue is that
our xstream stuff is already heavily customized, finger crossed that the
patch does not badly interact with it.

But there would be no salvation for 2.1.0, it’s already out

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf



Simplify data backup and recovery for your virtual environment with vRanger.
Installation’s a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It’s vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.