Mapstore using GeoServer in Challenge mode

31 views
Skip to first unread message
Assigned to lorenzo...@geosolutionsgroup.com by me

facundo p

unread,
Jan 27, 2025, 1:18:58 PMJan 27
to mapstore-developers
Hello everyone,
I wanted to ask for your help regarding how to use a GeoServer configured with catalog mode set to Challenge as a data source in a MapStore instance. The idea in this case is that the layers are always visible in the GetCapabilities document regardless of the users role or login status, but GeoServer requests authentication when trying to use the data in said layers, to match to its security rules.

The idea in this case would be to enable MapStore to use the Digest authentication that other clients (like QGIS or the browser when accessing GeoServer directly) use when confronted with the 401 status code, in order to authenticate the user when they try to use the layers that are being shown in a Mapstore map. Right now, when adding a GeoServer configured like this as a data source in a map I can access the GetCapabilities doc freely and so can see the layers available in the catalog tool, but adding a layer and trying to view it doesn't trigger an authentication request and so all the data requests made are blocked because of the 401 error not being resolved.

This GeoServer is from a different organization, so while we do have an open channel of communication to be able to coordinate configuration elements, I can't freely administer said server. In the meantime I am using a Geoserver of my own to test how it has to be configured and then relay that information to them.
This also means that the regular, authkey based integration between GeoServer and Mapstore isn't an option in this case in my opinion, since both instances use different user services. This is why we're trying this approach to collaborate on controling the access users have to their data while using our maps.

I have configured digest authentication in that GeoServer, and im only missing how to use it in Mapstore at the moment. Looking at files like SecurityUtils.jsx i can see that this isn't one of the modes that are readily available in Mapstore to configure, so if you know how that could work (or if there's a different solution to this you think i should try) please let me know.

Thanks

Facundo Pedreira
Unidad de Información Geográfica
Intendencia de Montevideo

Lorenzo Natali

unread,
Feb 27, 2025, 4:11:18 AMFeb 27
to mapstore-developers
Hi,
actually MapStore integrated with GeoServer works with hide or mixed mode. This makes the catalog show only the list of layers the users have access to, depending on their role.
If a layer is saved in a map, but is not accessible to a user, it will show an error state.
Reply all
Reply to author
Forward
0 new messages