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

Add missing authentication system support to QGIS Server and master password setting #21592

Closed
qgib opened this issue Oct 8, 2015 · 2 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
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Oct 8, 2015

Author Name: Larry Shaffer (Larry Shaffer)
Original Redmine Issue: 13550
Affected QGIS version: master
Redmine category:authentication_system
Assignee: Larry Shaffer


QGIS Server is missing authentication system support (add it), also when launching there is no means of defining the authentication system master password.

Approach to a fix for master password setting:

Add support for passing the master password as an environment variable to a password file, like is done with Postgres and other setups. For example, an env var like QGIS_AUTH_PASSWORD_PATH could be set to a filepath. In QgsAuthManager::instance()->init() the variable could be read, password loaded, then the variable unset in the env. This would also make a great way to allow using Desktop without having to enter your master password every session.

Similarly, the master password could be in an OS's keychain or keyring and be auto-input in the background on launch if that user's OS key cache is unlocked. See "Matthias's suggestion for that":#1838 (comment).

Currently, the master password auto-set can be set via Python, or by way of a custom C++ plugin, on launch setups using a call to QgsAuthManager::instance()->setMasterPassword( "mypassword", true ). However, I think many of the Python bindings should be blocked for the initial release. So, setting an env variable to a password file path seems like a good start, especially for QGIS Server.

Note: for Server, you can already use QGIS_AUTH_DB_DIR_PATH to set the path to a qgis-auth.db dir on the server.

@qgib
Copy link
Contributor Author

qgib commented Oct 8, 2015

Author Name: Larry Shaffer (Larry Shaffer)


  • subject was changed from QGIS Server can not auto-set authentication system master password to Add missing authentication system support to QGIS Server and master password setting

@qgib
Copy link
Contributor Author

qgib commented Oct 12, 2015

Author Name: Larry Shaffer (Larry Shaffer)


Fixed in changeset "0164b09d6d4c52b8c58d9bcf86dc4c3b96ab271a".


  • status_id was changed from Open to Closed

@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 labels May 25, 2019
@qgib qgib added this to the Version 2.12 milestone May 25, 2019
@qgib qgib closed this as completed 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
Projects
None yet
Development

No branches or pull requests

1 participant