-
-
Notifications
You must be signed in to change notification settings - Fork 89
Documenting the overriding of PostgreSQLs Session Role with Secret in QFC #673
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
base: master
Are you sure you want to change the base?
Documenting the overriding of PostgreSQLs Session Role with Secret in QFC #673
Conversation
gounux
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @SeqLaz 🦾 !
I guess that the screenshot needs to be changed, also I'm wondering if we should detail more the Session ROLE QGIS part, e.g. maybe with a use case ?
Co-authored-by: Guilhem Allaman <40383801+gounux@users.noreply.github.com>
gounux
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @SeqLaz, here is another review round,
Some things are to be clarified IMO, before getting this merged,
And thank you for this updated + QGIS screenshots !
| GRANT user_mielena TO qfield_service; | ||
| ``` | ||
|
|
||
| **QGIS Configuration:** In the QGIS Connection setup, you connect as `qfield_service`, but in the "Session role" field, you enter `user_mielena`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that the idea here could be to keep a generic role in the QGIS PostGIS connection - so maybe a role like admin, qfield_admin or anything more relevant, describing a pg role that has let's say "a lot of grants / powers". Then, the Session Role overriding would happen in the QFieldCloud workers, making use of this QFC_PG_EFFECTIVE_USER Secret.
So I'd maybe not advise to put a Session ROLE in the QGIS connection, since that would be more to happen in QFieldCloud Secrets.
But this is the use case I have in mind, OFC QFC users are free to play with this feature and set a Session ROLE in the QGIS connection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally agree, so I restructured and added a complete example and made some rephrasing. please have a look. 🥷
| In QGIS, the **Session ROLE** setting allows you to separate **authentication** (logging in) from **authorization** (permissions and identity). | ||
| This utilizes the PostgreSQL `SET ROLE` command. | ||
|
|
||
| ! | ||
|
|
||
| **Use Case: Simplified User Management & Auditing** | ||
|
|
||
| Imagine in the organization with field workers. Managing many unique passwords and updating them in QFieldCloud Secrets is inefficient. Instead, you can use a **Proxy Authentication** approach: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before assessing this, I'd ask for @lukasgraf's thoughts here, our senior auth* expert :)
No description provided.