-
-
Notifications
You must be signed in to change notification settings - Fork 170
fix: grant Vault privs to service_role #1539
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: develop
Are you sure you want to change the base?
Conversation
ansible/files/postgresql_extension_custom_scripts/supabase_vault/after-create.sql
Show resolved
Hide resolved
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.
We need more tests as explained above.
If it helps, I had a moment and created some proposed tests that I think cover this PR, as a PR to this one here The tests are found in #1540 Feel free to reject that if it doesn't do what you need/you are implementing your own |
@supabase/postgres tests added, please +1. Aiming to release this early next week |
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.
Tests need changing as mentioned on #1540 (comment)
9bdefbc
to
aacdfb4
Compare
@@ -52,8 +58,9 @@ ORDER BY object_name, grantee, privilege_type; | |||
vault | secrets | supabase_admin | TRUNCATE | |||
vault | secrets | supabase_admin | UPDATE | |||
vault | update_secret | postgres | EXECUTE | |||
vault | update_secret | service_role | EXECUTE |
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.
Effects of the changes now can be clearly visualized.
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.
PR was rebased on top of #1544, test now look good.
The chore: bump versions
commit didn't make the rebase as some other commit already used the same versions on https://github.com/supabase/postgres/blob/develop/ansible/vars.yml#L11-L14.
I think in this case we just need to advance those versions one more than https://github.com/supabase/postgres/blob/develop/ansible/vars.yml#L11 ..unless this PR has not been tested in local infra for relevant scenarios. If not, we should add a suffix to the version and test, then remove that and merge. |
Did that, although not sure if correct. |
version bump looks correct, but also we need to make sure we have tested these changed before we merge into develop. If you're not able to do so, either myself or @soedirgo can for the short term. |
service_role used to be able to manage secrets in Vault <=0.2.8 because it had privileges to pgsodium functions; we do the grants for Vault functions instead