-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
[Bug]: Filtering not working in Lizmap when layer authenticated against a qGIS auth config stored in qgis-auth.db #4470
Comments
Please follow the bug template with the step in the Lizmap plugin You will hit many issues with the QGIS Auth DB, as LWC is expecting to make SQL requests straight on the database ... (without using QGIS Server, which only QGIS Server can open the database with this authDB) |
If we set the instance login credentials to profiles.ini.php and then tweak pgsql.dbconnection.php to catch authcfg property and apply the login credentials accordingly, it works flawlessly. -> lizmap-web-client-3.7.8/lizmap/var/config/profiles.ini.php
-> lizmap-web-client-3.7.8/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php
-> lizmap-web-client-3.7.8/lizmap/modules/lizmap/classes/qgisVectorLayerDatasource.class.php
-> lizmap-web-client-3.7.8/lizmap/vendor/jelix/jelix/lib/jelix/plugins/db/pgsql/pgsql.dbconnection.php
|
Nice to know. Do you think you can provide a pull request ? |
@cfsgarcia agree, this should go into LMWC code. |
This issue is missing some feedbacks. 👻 |
For tickets closed for missing feedback, can it be used a different label other than "not planned"? It is not really what is going on: a ticket can be perfectly valid and just lacking feedback, "not planned" does not seems right, for both devs and users. |
I agree about "not planned", but IMHO, both options are not right according to me. The other option is "completed", which is not true as well. But I don't really care about what is the final status. Anyway, this ticket is still valid and a PR would be welcome. |
What is the bug? (in English)
It looks like when using an authentication config set up in qGIS to authenticate a layer against a Postgres instance, Lizmap won't be able to perform filtering actions through the web client.
As if Jelix was expecting to retrieve user/password stored within .qgs file.
In the lizmap errors.log, traces say Jelix failed connecting to Postgres basically:
failed: fe_sendauth: no password supplied
Steps to reproduce the issue
Create a qgis project:
-add a postis layer for which the authentication is 'Basic', passing on the postgres instance user/password.
-add the same postgis layer but this time the authentication is done against a predefined authentication config (Settings > Options > Authentication > Add new authentication config...)
Enable WFS capability for both layers
Lizmap plugin, in Layers enable Popup -> Automatic for both layers
Publish the project.
Configure qgis-auth.db on server side
QGIS_AUTH_DB_DIR_PATH="/home/qgis/qgisserverdb/"
QGIS_AUTH_PASSWORD_FILE="/home/qgis/qgisserverdb/master_pwd.txt"
In Lizmap web client, both layers are shown
Click a feature of the first layer to display the popup, click
Filter
button within the popup window > it does filter out ok.Click a feature of the second layer to display the popup, click
Filter
button within the popup window > a 500 (Internal jelix error) is thrown.Versions, safeguards, check summary etc
GIS server: QGIS FCGI server - QGIS version 3.34.6-Prizren
Web server: NGINX & PHP 8.2
Lizmap Web Client: 3.7.7
Plugins:
lizmap_server v2.9.1
wfsOutputExtension v1.8.0
atlasprint v3.3.2
Check Lizmap plugin
Operating system
Ubuntu 22.04.2 LTS
Browsers
Chrome
Browsers version
124.0.6367.208 (Official Build) (64-bit)
Relevant log output
The text was updated successfully, but these errors were encountered: