On 24 June 2016 at 06:53, Nuno Oliveira <[email protected]>
wrote:

> The provided GetLegend URL will not work and there is no way to use style
> 'topp:simple_roads' when performing a virtual service request in
> the context of 'tiger' workspace:
>
>
> http://localhost:8080/geoserver/tiger/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&STYLES=topp:simple_ro
>
> ads&LAYERS=tiger_roads&SRS=EPSG%3A4326&WIDTH=476&HEIGHT=768&BBOX=-74.00768280029297%2C40.71910858154297%2C
> -73.92597198486328%2C40.85094451904297
>
> this request will fail saying that style 'topp:simple' is unknown.
>
> What should be the correct behavior of this ? In my opinion style
> 'topp:simple_roads' should not have been listed in the virtual service
> GetCapabilities result.
>

I agree, if it does not work it should not be listed. We then get the
corner case of the default style (as Andrea pointed out) or if none of the
configured styles are available in that workspace.

The global workspace styles directory is a bit odd, I can never quite sort
out:
- if all the global styles are supposed to be "present" in all workspace
(and each workspace has a chance to add or override additional styles)
- or if styles can be referenced from anywhere with the right prefix
(leading us into this trouble you are finding where styles are referenced
that should not be visible from a neighbouring workspace)

I expect that the codebase is very lax (to preserve backwards compatibility
when virtual services were introduced). I would like to gradually steer the
project towards better fences between workspaces (in case a user does not
have permission to see over the fence the styles could reveal something
about the data being published there).

When chatting about this with Andrea he raised a corner case ... what to do
> if 'topp:simple_roads' is the default style and we are making a
> query without any style in the context of 'tiger' workspace virtual
> service ?
>
> If the default style of layer doesn't belong to the virtual service
> workspace the layer should not be listed in the virtual service
> GetCapabilities result ? Or internally we apply some kind of default style.
>

We have our ultimate backup style - geometry - that should work with any
and all content. That would probably be preferable to not listing the layer.
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to