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

Authentication manager behaves weird #25283

Closed
qgib opened this issue Nov 2, 2017 · 14 comments
Closed

Authentication manager behaves weird #25283

qgib opened this issue Nov 2, 2017 · 14 comments
Labels
Authentication Related to the QGIS Authentication subsystem or user/password handling Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Regression Something which used to work, but doesn't anymore

Comments

@qgib
Copy link
Contributor

qgib commented Nov 2, 2017

Author Name: Andreas Neumann (@andreasneumann)
Original Redmine Issue: 17386
Affected QGIS version: master
Redmine category:authentication_system
Assignee: Alessandro Pasotti


Issue Nr 1: Already at QGIS startup I get two warnings:

WARNING: QGIS authentication Auth query exec() FAILED
WARNING: QGIS authentication Auth query exec() FAILED


Issue Nr 2: Subsequent issue for already existing connections (Postgis): if I click on the "Edit" button of an existing connection, I get error messages:

Configuration 'up539g3' not in database

At the same time a KDE error message pops up: QGIS authentication Auth query exec() FAILED

See first screenshot attached.


Issue Nr 3:
if I want to add a new authentication configuration, QGIS asks me for my master password and I get the following error messages:

Master password has been successfully written to your Wallet/KeyRing
Auth db query exec() FAILED
Master password: FAILED to access database

subsequently I can't add a new configuration and QGIS keeps asking for my master password.


@qgib
Copy link
Contributor Author

qgib commented Nov 2, 2017

Author Name: Andreas Neumann (@andreasneumann)


maybe linked to #25282

@qgib
Copy link
Contributor Author

qgib commented Nov 2, 2017

Author Name: Andreas Neumann (@andreasneumann)


If I open the qgis-auth.db file in QGIS and have a look in the table auth_configs there is an entry with the correct ID that QGIS complains it cannot find:

wkt_geom rowid id name uri type version config
NULL 1 up539g3 svc@postgis_zg Basic 2 24d0922e5fadb48fb585d0a5e57660359b80a1fc2e0c09b9b859c9fc9c14445bb7b24640c5274d39b5996c1e11f9e81df547797836484fcf6273a8ccbc4a39aa

So obviously there is some problem that QGIS can't access my qgis-auth.db file correctly.

@qgib
Copy link
Contributor Author

qgib commented Nov 2, 2017

Author Name: Andreas Neumann (@andreasneumann)


If I run the Python code

QgsApplication.authManager().authenticationDatabasePath()

the result is

'/home/an/.local/share/QGIS/QGIS3/profiles/default/qgis-auth.db'

Which seems correct. The file exists and can be opened in QGIS.

@qgib
Copy link
Contributor Author

qgib commented Nov 2, 2017

Author Name: Andreas Neumann (@andreasneumann)


When opening a new QGIS profile, authentication manager works fine.

Perhaps this is a migration issue with an old qgis-auth.db from older QGIS 3 profiles?

@qgib
Copy link
Contributor Author

qgib commented Nov 6, 2017

Author Name: Alessandro Pasotti (@elpaso)


@andreas, there is really a lot of things going on here and I need more information to track this down:

  • are there any previous configurations in the settings?
  • are the QGIS settings migrated from previous?

A possible cause:

  • you have an auth cfg in a WMS settings on qgis2
  • the migration routine will copy that WMS to the new settings, with its auth cfg
  • the migration routine does NOT copy the qgis-auth.db (that would be a separate, AFAIK unreported bug)
  • when you try to open the WMS, the auth config is searched in the (new, empty) auth DB without success

Does it make sense to you? All error messages from QGIS make sense: what it sais is that a given auth cfg is not in the DB (because it wasn't migrated).

If all that makes sense: please close this bug and file a new one for migrating (just copying) the auth DB from a pre-existing QGIS2 installation to the new QGIS3 default profile on first run.

@qgib
Copy link
Contributor Author

qgib commented Nov 6, 2017

Author Name: Alessandro Pasotti (@elpaso)


I filed #25300 myself

@qgib
Copy link
Contributor Author

qgib commented Nov 8, 2017

Author Name: Alessandro Pasotti (@elpaso)


  • status_id was changed from Open to Closed
  • resolution was changed from to not reproducable

@qgib
Copy link
Contributor Author

qgib commented Nov 30, 2017

Author Name: Patrick Dunford (@enzedrailmaps)


This message comes up randomly at startup.


  • 11782 was configured as Screenshot_2017-11-30_17-54-26.png

@qgib
Copy link
Contributor Author

qgib commented Nov 30, 2017

Author Name: Harrissou Santanna (@DelazJ)


This message comes up randomly at startup.

"It's also shown when you :

  • open e.g. the Create a New WMS Connection (you can replace WMS by any of the other db/protocol providers, except Oracle as far i could say)
  • click the + button in the Authentication tab of the Settings --> Options dialog

Note that I don't use the authentication feature. And I'm on Windows here, 2a960c5."

This is what I was about to send until I read some comments above and create a new profile user. The QGIS instance that opens does not suffer this bug afaics, no message pops up. Could you try a new profile?

@qgib
Copy link
Contributor Author

qgib commented Nov 30, 2017

Author Name: Richard Duivenvoorde (@rduivenvoorde)


Confirmed here:

Authentication Manager: Auth db query exec() FAILED

Authentication Manager : Query exec() van database voor authenticatie MISLUKT

I see both in master in my local QGIS (Debian self compiled in home network environment) and in a work environment (behind proxy) with a OSGeo4W64 nightly of today.

Just browsing some data and it will pop up...


  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Nov 30, 2017

Author Name: Andreas Neumann (@andreasneumann)


In my setup, this message also pops up, when I open the "Options" dialogue in the "Settings" menu, regardless of which tab is active.

@qgib
Copy link
Contributor Author

qgib commented Nov 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from not reproducable to

@qgib
Copy link
Contributor Author

qgib commented Dec 18, 2017

Author Name: Harrissou Santanna (@DelazJ)


Andreas Neumann wrote:

In my setup, this message also pops up, when I open the "Options" dialogue in the "Settings" menu, regardless of which tab is active.

Was not my case before but with b59bd94 I also get the message when I open the Options dialog (on Windows) and only with the "default" profile

@qgib
Copy link
Contributor Author

qgib commented Jan 10, 2018

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)


  • regression was changed from 0 to 1
  • status_id was changed from Reopened to Closed
  • resolution was changed from to fixed/implemented

@qgib qgib closed this as completed Jan 10, 2018
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Authentication Related to the QGIS Authentication subsystem or user/password handling Regression Something which used to work, but doesn't anymore labels May 25, 2019
This was referenced May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Authentication Related to the QGIS Authentication subsystem or user/password handling Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

1 participant