-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authkey is currently not sent for WMS GetLegendGraphic requests #10727
Comments
Initial Investigation: |
@rowheat02 |
@MV88 I tried to add authKey if it matches the authRule, But found that specific legend(alberi_pubblici) is still failing but due to a different reason: Case 1: Without Authkey as param in image URL- (status 200) No response Case 2: With Authkey as param in image URL - ( status 200) With response but with dimensions 2*1 which is when a legend is unavailable from GeoServer. (validation code here) It's creating confusion if the issue is in Geoserver. @tdipisa Do we have another authenticated layer from Geoserver to test? Here is the draft PR adding authKey in SecureImage #10765 |
It would be better if you can add the request as curl in the post as well and the exported map in json |
@rowheat02 there is no confusion here. The reason is simply that after #10684 the following legend options are used for GS:
Where hideEmptyRules effectively hide legend rules not visible in the map viewport. You have to zoom to the layer to be able to see its features in map and so also the legend. Simply try this request with a authkey and you will see the legend appearing as expected:
|
Description
Not sure it is a regression or a new bug, but it seems the authkey is not sent with MWS GetLegendGraphic requests.
How to reproduce
Expected Result
The authkey param is sent as query parameter in WMSGetLegendGraphic requests performed by MS
Current Result
The authkey is not included
Browser info
(use this site: https://www.whatsmybrowser.org/ for non expert users)Other useful information
this is due to this if which is not true and there fore the authkey is not added. we should add this SLD when the requests comes from GetLegendGraphich
8b44c0e#diff-c8a7cdc28e2e637335975a5a48e6aafc95c21dd42f99d30d3714e2d4423f77a1R625
we can add an if clause here for authkey that adds it if the method is authkey
https://github.com/geosolutions-it/MapStore2/blob/master/web/client/components/misc/SecureImage.jsx#L34
DO NOT alter code for addAuthenticationToSLD, but prefer to use addAuthenticationParameter in SecureImage
The text was updated successfully, but these errors were encountered: