10000 fix: grant pgsodium functions to service_role by soedirgo · Pull Request #443 · supabase/postgres · GitHub
[go: up one dir, main page]

Skip to content

fix: grant pgsodium functions to service_role #443

8000
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

Merged
merged 4 commits into from
Dec 15, 2022

Conversation

soedirgo
Copy link
Member

Using supautils's extension custom scripts. The script will be run on create extension pgsodium.

Using supautils's extension custom scripts. The script will be run on
`create extension pgsodium`.
@soedirgo soedirgo force-pushed the fix/pgsodium-function-grants branch 2 times, most recently from 1ff1f66 to c01fc87 Compare December 15, 2022 09:50
-- Name: key_encrypt_secret(); Type: FUNCTION; Schema: pgsodium; Owner: -
--

CREATE FUNCTION pgsodium.key_encrypt_secret() RETURNS trigger
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The schema test has been failing for a while, so I guess this just reflects the latest pgsodium version.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soedirgo soedirgo force-pushed the fix/pgsodium-function-grants branch from c01fc87 to a59aded Compare December 15, 2022 09:54
-- Name: decrypted_key; Type: VIEW; Schema: pgsodium; Owner: -
--

CREATE VIEW pgsodium.decrypted_key AS
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michelp do you know why this got dropped now? If I recreate pgsodium it gets dumped again.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I got it - this was fixed in pgsodium 3.1.1 but now this issue is back, so we need to revert the migration.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I'll hold off on reverting it until Michel's done with the pgsodium fixes)

@soedirgo soedirgo marked this pull request as ready for review December 15, 2022 10:46
@soedirgo soedirgo requested review from a team as code owners December 15, 2022 10:46
@pcnc
Copy link
Member
pcnc commented Dec 15, 2022

Looks good to me
@soedirgo is this ready to merge and test on staging, or are we waiting on feedback from Michel beforehand?

@soedirgo
Copy link
Member Author

I guess we can merge and test this on staging and ask him later - one less thing to fix at once

@pcnc pcnc merged commit ded929f into develop Dec 15, 2022
@pcnc pcnc deleted the fix/pgsodium-function-grants branch December 15, 2022 13:54
damonrand pushed a commit to cepro/postgres that referenced this pull request Jun 15, 2025
* fix: grant pgsodium functions to service_role

Using supautils's extension custom scripts. The script will be run on
`create extension pgsodium`.

* test: service_role can execute certain pgsodium functions

* chore: update schema.sql

* chore: bump postgres version

Co-authored-by: Paul Cioanca <paul.cioanca@supabase.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0