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

fix authenticating layers against qGIS auth config #4794

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

cfsgarcia
Copy link
Contributor

@cfsgarcia cfsgarcia commented Sep 26, 2024

Fix to authente layers against qGIS auth config when applying a filter in lizmap web client 3.8.1

Ticket : #4470

Funded by sponsored development

@github-actions github-actions bot added this to the 3.9.0 milestone Sep 26, 2024
@cfsgarcia
Copy link
Contributor Author

cfsgarcia commented Sep 26, 2024

A PR is also needed in the below Jelix library:
lizmap-web-client-3.8.1/lizmap/vendor/jelix/jelix/lib/jelix/plugins/db/pgsql/pgsql.dbconnection.php
(see ticket #4470)

Not sure where to find the embedded jelix libraries in github though.

@rldhont
Copy link
Collaborator

rldhont commented Sep 26, 2024

@cfsgarcia you don't need to update jelix part. You have to update

public function getDatasourceProfile($timeout = 30, $setSearchPathFromLayer = true)
to provide the profile based on authcfg.

Copy link
Collaborator

@rldhont rldhont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update qgisVectorLayer::getDatasourceProfile method to use authcfg if provided.

@cfsgarcia
Copy link
Contributor Author

Got you, I've amended qgisVectorLayer::getDatasourceProfile

@Gustry
Copy link
Member

Gustry commented Sep 26, 2024

Thanks for the contribution.
I suggest you to copy/paste the lint output, form the failing test.

@Gustry
Copy link
Member

Gustry commented Sep 27, 2024

@cfsgarcia I have pushed the right commit on your branch ;-)
To make it easier for you

Later, I suggest you to run it locally. I did make php-cs-fixer-apply-docker
We can squash your PR from GitHub

@Gustry Gustry requested a review from rldhont September 30, 2024 10:05
@rldhont
Copy link
Collaborator

rldhont commented Sep 30, 2024

@cfsgarcia It's ok for me.

Before merging, I'd like to know if you are aware that the use of authcfg will works for lizmap but that the qgis-auth.db file for QGIS Server has to contain the authcfg difinition ?

@Gustry
Copy link
Member

Gustry commented Sep 30, 2024

It was explained in #4470, QGIS Server needs to be aware of the authcfg.

@rldhont
Copy link
Collaborator

rldhont commented Sep 30, 2024

Thanks @Gustry

@rldhont rldhont added the run end2end If the PR must run end2end tests or not label Sep 30, 2024
@rldhont
Copy link
Collaborator

rldhont commented Sep 30, 2024

@cfsgarcia can you add some unit tests in tests/units/edition/qgisVectorLayerDatasourceTest.php about authcfg parsing ?

@Gustry Gustry added the sponsored development This development has been funded label Oct 8, 2024
@Gustry Gustry modified the milestones: 3.9.0, 3.10.0 Oct 15, 2024
Copy link

The Lizmap project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 2 months and is being automatically marked as "stale".
If there is no further activity on this pull request, it will be closed in two weeks.

@github-actions github-actions bot added stale This ticket might be closed soon and removed stale This ticket might be closed soon labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release_3_8 backport release_3_9 bug run end2end If the PR must run end2end tests or not sponsored development This development has been funded
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants