Hi,

as far as I know, the WMS standard does not say anything about layer
groups, so not including them in the capabilities document could probably
not be considered a bug in itself. But layer groups are included in the
capabilities document by default (with *.*.r=*). By this logic, shouldn't
they be also included in the case where:

*.*.r=ADMIN
<workspace>.<layergroup>.r=*

Not including the layer groups in this case is inconsistent with default
behaviour. It also makes it impossible to publish public layer groups via
WMS, without running server-side code to modify the capabilities document
before returning it. I don't believe this is actually how it's meant to
work, but of course I could be wrong. I would like to know if it would be
unreasonable to create a new issue on the tracker for this, or what would
be the best way to proceed?

Best regards,
Mikael Vaaltola

On Tue, 2 Apr 2019 at 01:24, Humphries, Graham (StateGrowth) <
graham.humphr...@stategrowth.tas.gov.au> wrote:

> I think you would need to check the OGC standard. I would think there is
> no requirement to have layer groups in the capabilities document, so it is
> the intention not to include layer groups.
>
>
>
> You could write your own I guess.
>
>
>
> Cheers,
>
> Graham
>
>
>
> *From:* Mikael Vaaltola [mailto:mik...@gispo.fi]
> *Sent:* Monday, 1 April 2019 11:23 PM
> *To:* Humphries, Graham (StateGrowth) <
> graham.humphr...@stategrowth.tas.gov.au>
> *Cc:* geoserver-users@lists.sourceforge.net
> *Subject:* Re: [Geoserver-users] Layer groups not appearing in WMS
> GetCapabilities
>
>
>
> Thank you Graham for your reply,
>
>
>
> your advice is correct, the REST API does indeed show the layer groups for
> unauthenticated users. However, I would also like to have these layer
> groups included in the capabilities document, so WMS clients that don't use
> the REST service (e.g. QGIS) could see them. I'm wondering if hiding the
> layer groups from the capabilities document in this case is intended
> behaviour or possibly a bug. Any advice would be much appreciated!
>
>
>
> Best regards,
>
> Mikael
>
>
>
> On Mon, 1 Apr 2019 at 00:27, Humphries, Graham (StateGrowth) <
> graham.humphr...@stategrowth.tas.gov.au> wrote:
>
> You can get the layer groups from the REST service.
>
> EG: https://<host>/geoserver/rest/workspaces/ssg/layergroups.json
>
>
>
> Cheers,
>
> Graham H
>
>
>
> *From:* Mikael Vaaltola [mailto:mik...@gispo.fi]
> *Sent:* Saturday, 30 March 2019 1:38 AM
> *To:* geoserver-users@lists.sourceforge.net
> *Subject:* [Geoserver-users] Layer groups not appearing in WMS
> GetCapabilities
>
>
>
> Hello everyone,
>
>
>
> I'm having issues with GeoServer layer security and layer groups. I would
> like to have a global rule to prevent unauthenticated users access, and
> then manually designate layers, layer groups and workspaces that
> unauthenticated users can read. My problem is that layer groups are not
> returned in the GetCapabilities request for unauthenticated users despite
> giving read access.
>
>
>
> I tested this with GS 2.15.0 on W10 using the Windows installer and
> default data. I created a "tasmania_group" layer group inside the topp
> workspace. The layer group mode is single and the layer group contains only
> the topp:tasmania_roads layer with the CRS and bounds properly set. I have
> the following rules in layers.properties:
>
>
>
> *.*.r=ROLE_AUTHENTICATED,GROUP_ADMIN,ADMIN # prevent unauthenticated users
> from reading anything
>
> *.*.w=GROUP_ADMIN,ADMIN
>
> topp.*.*r=* # allow everyone to read the topp workspace
>
> tasmania.r=* # allow everyone to read the global layer group tasmania that
> comes in default datadirectory
>
> topp.tasmania_group.r=* # allow everyone to read the layer group I created
>
> mode=HIDE # hide layers user does not have read access to
>
>
>
> WMS GetCapabilities request returns all layers in topp workspace for
> unauthenticated users, and all layers for authenticated users. However, the
> layer groups are not included in the GetCapabilities response for
> unauthenticated users. Unauthenticated users can still do GetMap requests
> for tasmania and topp:tasmania_group layer groups without issues.
>
>
>
> How could I get the layer groups to appear in GetCapabilities response for
> unauthenticated users? Using CHALLENGE mode is unfortunately not a suitable
> option for my use case. I have a feeling I'm missing something, but I
> couldn't find an answer in the documentation. Thank you in advance for any
> help and suggestions.
>
>
>
> Best regards,
>
> Mikael Vaaltola
>
> Gispo Oy
>
>
> ------------------------------
>
>
> CONFIDENTIALITY NOTICE AND DISCLAIMER
> The information in this transmission may be confidential and/or protected
> by legal professional privilege, and is intended only for the person or
> persons to whom it is addressed. If you are not such a person, you are
> warned that any disclosure, copying or dissemination of the information is
> unauthorised. If you have received the transmission in error, please
> immediately contact this office by telephone, fax or email, to inform us of
> the error and to enable arrangements to be made for the destruction of the
> transmission, or its return at our cost. No liability is accepted for any
> unauthorised use of the information contained in this transmission.
>
>
> ------------------------------
>
> CONFIDENTIALITY NOTICE AND DISCLAIMER
> The information in this transmission may be confidential and/or protected
> by legal professional privilege, and is intended only for the person or
> persons to whom it is addressed. If you are not such a person, you are
> warned that any disclosure, copying or dissemination of the information is
> unauthorised. If you have received the transmission in error, please
> immediately contact this office by telephone, fax or email, to inform us of
> the error and to enable arrangements to be made for the destruction of the
> transmission, or its return at our cost. No liability is accepted for any
> unauthorised use of the information contained in this transmission.
>
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to