On 14 March 2014 11:06, Andrea Aime <andrea.a...@geo-solutions.it> wrote:

> On Fri, Mar 14, 2014 at 6:59 PM, Kevin Smith <ksm...@boundlessgeo.com>wrote:
>
>>
>> It appeared that AdvertisedCatalog assumes layer groups could have
>> sub-layergroups while LayerPreviewProvider assumes they only contain
>> layers.
>>
>
> Ah, the latter seems an oversight of when nested layer groups where
> implemented, it should work like AdvertisedCatalog instead.
>

Yeah, getting them to share an implementation would be a side benefit.

>
>
>> If it does need to recurse through nested groups, a CTE query should be
>> able to handle it, although not all DBs support that so there would have to
>> be a check for SQL dialect and a fall back to a post filter if CTE is not
>> supported.
>>
>
> Right. Alternatively, implement some sort of derived property that you
> have in the DB, and that is getting updated recursively when a nested
> attribute changes
>

Yes, although I'd prefer not to mess with the JDBCConfig schema if I don't
have to. I suppose it would have a performance benefit on reading over
computing it during the query.

>
> I cannot guarantee a security implementation can do all its work without
> doing post filtering (as noted above, it might have to drill down in the
> object structure to check some attribute in referenced entities). But we
> could have an interface that tells if you if post filtering is going to be
> needed, or not, and lets you optimize the first case.
>

Allowing the admin to specify that it's OK to reveal the existence of
secure layers would be a simple and comprehensive way to signal that the
filter isn't needed.  Even if we implemented partial pre-filtering, it
would still be useful to improve performance when pre-filtering is not
possible and metadata security is not required.  Its certainly a first step
we could add comparatively easily.  Maybe three options: Always Hide, Hide
if Prefilterable, Never Hide.  Hide gives metadata security, Hide if
Prefilterable gives the best performance, Never Hide may improve on Always
Hide for performance depending on the proportion of layers that would be
pre-filtered and is more consistent in behaviour than Hide if Prefilterable.

-- 

Kevin Smith

Junior Software Engineer | Boundless

ksm...@boundlessgeo.com

+1-778-785-7459

@boundlessgeo <https://twitter.com/boundlessgeo>
------------------------------------------------------------------------------
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/13534_NeoTech
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to