qwc-services / qwc-db-auth

QWC authentication service based on local user DB
MIT License
0 stars 13 forks source link

GetLegendGraphic and GetFeatureInfo requests on restricted WMS layers does not work from external software #29

Open danceb opened 4 months ago

danceb commented 4 months ago

Showing the legend and getting feature infos of restricted WMS layers works within the map viewer, as a user is logged in and the restrictions are verified there.

But this doesn't work if the legend and feature info is requested from external software like QGIS. Here only the GetMapRequest works properly. AS QGIS is trying to get the legend I am getting the error Loaded legend image is broken and while trying to get the feature info I am getting the error Map "xyz" does not exist or is not permitted.

I am posting this here, but I think this is related to many services, which are included in this process: qwc-ogc-service for GetFeatureInfo requests and direct getLegendGraphic requests, of course the qwc-legend-service and all the auth-services.

Is it possible to include the authorization on this requests as well?

Thanks!

manisandro commented 4 months ago

Indeed this is missing in qwc-feature-info-service and qwc-legend-service. This could be implemented analogously to https://github.com/qwc-services/qwc-ogc-service/blob/master/src/server.py#L52