-
Notifications
You must be signed in to change notification settings - Fork 27
[DPE-8318] Predefined roles docs #1107
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: 16/edge
Are you sure you want to change the base?
Conversation
Signed-off-by: Marcelo Henrique Neppel <[email protected]>
Signed-off-by: Marcelo Henrique Neppel <[email protected]>
Signed-off-by: Marcelo Henrique Neppel <[email protected]>
Signed-off-by: Marcelo Henrique Neppel <[email protected]>
taurus-forever
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.
LGTM, can you please add description about the proper way of escalating the privileges?
| test123=> SELECT * FROM pg_roles WHERE rolname LIKE 'charmed_test_%'; | ||
| rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolconnlimit | rolpassword | rolvaliduntil | rolbypassrls | rolconfig | oid | ||
| --------------------+----------+------------+---------------+-------------+-------------+----------------+--------------+-------------+---------------+--------------+-----------+------- | ||
| charmed_test_owner | f | t | f | f | f | f | -1 | ******** | | f | | 16396 |
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.
What happens when I request database databases, re: charmed_databases_owner in line 61?
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.
The charm will throw an error. I'm currently working on fixing that. Thanks for catching this.
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.
Fixed on canonical/postgresql-single-kernel-library#18 (there are two follow-up PRs in the operators repositories).
Signed-off-by: Marcelo Henrique Neppel <[email protected]>
a-velasco
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.
Thank you @marceloneppel!
Signed-off-by: Marcelo Henrique Neppel <[email protected]>
Apologies, Alex! I missed your request about escalation. I updated the PR on e2a92e4 with that. Could you review it again, @taurus-forever and @a-velasco? Thanks! |
docs/explanation/roles.md
Outdated
| Regular relation users can temporarily escalate their privileges to other predefined roles using PostgreSQL's role-switching features. There are two approaches: | ||
|
|
||
| - SET ROLE / RESET ROLE (standard, built-in) | ||
| - The `set_user` |
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.
Maybe The set_user/reset_user` to mimic line above.
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.
Updated on 02e634a.
Signed-off-by: Marcelo Henrique Neppel <[email protected]>
Signed-off-by: Marcelo Henrique Neppel <[email protected]>
|
@marceloneppel feel free to merge this on Friday if Mohamed has no chance to review it. |
Issue
There is no documentation for the new predefined roles.
Solution
Document those roles, as it was done for the PG 16 VM charm (canonical/postgresql-operator#1054).
Update the users' documentation to reflect the new roles structure (removing the
adminextra user role, which exists only for the PG 14 charm).Also, fix the
toctreefromdocs/explanation/index.mdbased on the approach suggested on https://github.com/canonical/postgresql-operator/pull/1084/files/3359f0ab7338cee122a4e3215ec4f1ac350a9b4a#r2259899679 and fix some Juju anchors.Checklist