Skip to content

feat: add pg_rsa#2116

Open
barrownicholas wants to merge 8 commits intosupabase:developfrom
barrownicholas:develop
Open

feat: add pg_rsa#2116
barrownicholas wants to merge 8 commits intosupabase:developfrom
barrownicholas:develop

Conversation

@barrownicholas
Copy link
Copy Markdown

@barrownicholas barrownicholas commented Apr 18, 2026

What kind of change does this PR introduce?

Adds small pg_rsa extension that I made (designed to implement rsa signing and verifying in postgres function).

What is the current behavior?

Currently, there is no way to sign in RSA directly in a postgres function.

What is the new behavior?

Adds RSA-functions: see https://github.com/barrownicholas/pg_rsa#functions

Additional context

Currently, I am trying to connect to Google APIs using a service account and a self-signed JWT, using a PEM private key. Google only supports RSA256. Unfortunately for me, there are no out-of-the-box solutions for RSA-signing in Postgres... until now! See https://github.com/barrownicholas/pg_rsa#functions.

@barrownicholas barrownicholas requested review from a team as code owners April 18, 2026 22:42
@barrownicholas barrownicholas changed the title chore: test build feat: add pg_rsa Apr 18, 2026
@barrownicholas
Copy link
Copy Markdown
Author

Confirming that this passed on my end:

  • nix build (nix build .#psql_17.exts.pg_rsa) succeeded
  • docker image built successfully:
docker build -f Dockerfile-15 -t supabase-postgres:15 . 
docker run --rm -d --name pg_rsa_test -e POSTGRES_PASSWORD=postgres supabase-postgres:15
docker exec -it pg_rsa_test psql -U supabase_admin -d postgres -c "CREATE EXTENSION pg_rsa;"
docker exec -it pg_rsa_test psql -U supabase_admin -d postgres -c "SELECT pg_rsa_test();" # built-in test suite
 pg_rsa_test 
-------------
 t
(1 row)

@barrownicholas
Copy link
Copy Markdown
Author

(note to self: after pr approved, need to add to: https://github.com/supabase/supabase/blob/master/packages/shared-data/extensions.json)

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.

1 participant