Skip to content
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

Open
1 task done
tdipisa opened this issue Dec 13, 2024 · 2 comments
Open
1 task done

Authkey is currently not sent for WMS GetLegendGraphic requests #10727

tdipisa opened this issue Dec 13, 2024 · 2 comments
Assignees
Milestone

Comments

@tdipisa
Copy link
Member

tdipisa commented Dec 13, 2024

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

  • Open the legend of a layer as authenticated user

Expected Result

The authkey param is sent as query parameter in WMSGetLegendGraphic requests performed by MS

Current Result

The authkey is not included
Image

  • Not browser related
Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users)
Browser Affected Version
Internet Explorer
Edge
Chrome
Firefox
Safari

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

@tdipisa tdipisa added the bug label Dec 13, 2024
@tdipisa tdipisa added this to the 2025.01.00 milestone Dec 13, 2024
@tdipisa tdipisa assigned tdipisa and mahmoudadel54 and unassigned tdipisa Dec 13, 2024
@tdipisa tdipisa assigned rowheat02 and unassigned mahmoudadel54 Jan 16, 2025
@rowheat02
Copy link
Contributor

Initial Investigation:
I have noticed a discrepancy between the dev and local(master).
Testing on: https://dev-mapstore.geosolutionsgroup.com/mapstore/#/context/demo_context/46500
Layer- alberi_pubblici
On dev, able to expand for the legend as its layer is not failing
On local(master) (logged in as the same user) - not able to expand as it is layer is already failing.
authKey is missing on local for GetMap also
Dev:

Image Local: Image

@tdipisa @MV88 Am I missing something on the config level?

@MV88
Copy link
Contributor

MV88 commented Jan 17, 2025

@rowheat02
yes, you need to apply authentication rules that are stored in an external datadir for dev

https://github.com/geosolutions-it/mapstore-datadir/blob/DEV/configs/localConfig.json.patch#L107-L110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants