Skip to content

Commit 11b7d95

Browse files
committed
tmp
1 parent dcb3fb7 commit 11b7d95

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

nix/ext/001-new-vault.patch

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ index 80209a1..0000000
1212
-.cache
1313
-test*
1414
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
15-
index 77209b9..64cf218 100644
15+
index 77209b9..2a88809 100644
1616
--- a/.github/workflows/test.yml
1717
+++ b/.github/workflows/test.yml
1818
@@ -1,12 +1,24 @@
@@ -31,7 +31,7 @@ index 77209b9..64cf218 100644
3131
runs-on: ubuntu-latest
3232
+ strategy:
3333
+ matrix:
34-
+ pg-version: ['13', '14', '15', '16', '17']
34+
+ pg-version: ['13', '14', '15', '16']
3535
+
3636
steps:
3737
- - uses: actions/checkout@v2
@@ -923,7 +923,7 @@ index 4ecd1de..0000000
923923
-docker exec -it $DB_HOST psql -U "$SU" $@
924924
diff --git a/shell.nix b/shell.nix
925925
new file mode 100644
926-
index 0000000..e21cb68
926+
index 0000000..758d40d
927927
--- /dev/null
928928
+++ b/shell.nix
929929
@@ -0,0 +1,36 @@
@@ -947,7 +947,7 @@ index 0000000..e21cb68
947947
+ postgresql_14
948948
+ postgresql_15
949949
+ postgresql_16
950-
+ ourPg.postgresql_17
950+
+ # ourPg.postgresql_17
951951
+ ];
952952
+ pgWithExt = { pg }: pg.withPackages (p: [
953953
+ (callPackage ./nix/pgsodium.nix { postgresql = pg; })
@@ -965,7 +965,7 @@ index 0000000..e21cb68
965965
+}
966966
diff --git a/sql/supabase_vault--0.2.8--0.3.0.sql b/sql/supabase_vault--0.2.8--0.3.0.sql
967967
new file mode 100644
968-
index 0000000..f120f5f
968+
index 0000000..df6565a
969969
--- /dev/null
970970
+++ b/sql/supabase_vault--0.2.8--0.3.0.sql
971971
@@ -0,0 +1,135 @@
@@ -1003,7 +1003,7 @@ index 0000000..f120f5f
10031003
+ secret = encode(
10041004
+ vault._crypto_aead_det_encrypt(
10051005
+ message := convert_to(decrypted_secret, 'utf8'),
1006-
+ additional := convert_to(s.id || s.description || (s.created_at at time zone 'utc') || (s.updated_at at time zone 'utc'), 'utf8'),
1006+
+ additional := convert_to(s.id::text, 'utf8'),
10071007
+ key_id := 0,
10081008
+ context := 'pgsodium'::bytea,
10091009
+ nonce := s.nonce
@@ -1024,7 +1024,7 @@ index 0000000..f120f5f
10241024
+ convert_from(
10251025
+ vault._crypto_aead_det_decrypt(
10261026
+ message := decode(s.secret, 'base64'::text),
1027-
+ additional := convert_to(s.id || s.description || s.created_at at time zone 'utc' || s.updated_at at time zone 'utc', 'utf8'),
1027+
+ additional := convert_to(s.id::text, 'utf8'),
10281028
+ key_id := 0,
10291029
+ context := 'pgsodium'::bytea,
10301030
+ nonce := s.nonce
@@ -1063,7 +1063,7 @@ index 0000000..f120f5f
10631063
+ UPDATE vault.secrets s
10641064
+ SET secret = encode(vault._crypto_aead_det_encrypt(
10651065
+ message := convert_to(rec.secret, 'utf8'),
1066-
+ additional := convert_to(s.id || s.description || s.created_at at time zone 'utc' || s.updated_at at time zone 'utc', 'utf8'),
1066+
+ additional := convert_to(s.id::text, 'utf8'),
10671067
+ key_id := 0,
10681068
+ context := 'pgsodium'::bytea,
10691069
+ nonce := rec.nonce
@@ -1093,7 +1093,7 @@ index 0000000..f120f5f
10931093
+ secret = CASE WHEN new_secret IS NULL THEN s.secret
10941094
+ ELSE encode(vault._crypto_aead_det_encrypt(
10951095
+ message := convert_to(new_secret, 'utf8'),
1096-
+ additional := convert_to(s.id || coalesce(new_description, s.description) || (s.created_at at time zone 'utc') || (now() at time zone 'utc'), 'utf8'),
1096+
+ additional := convert_to(s.id::text, 'utf8'),
10971097
+ key_id := 0,
10981098
+ context := 'pgsodium'::bytea,
10991099
+ nonce := s.nonce
@@ -1118,7 +1118,7 @@ index ee40004..8973fe0 100644
11181118

11191119
diff --git a/sql/supabase_vault--0.3.0.sql b/sql/supabase_vault--0.3.0.sql
11201120
new file mode 100644
1121-
index 0000000..125168f
1121+
index 0000000..af6abe2
11221122
--- /dev/null
11231123
+++ b/sql/supabase_vault--0.3.0.sql
11241124
@@ -0,0 +1,123 @@
@@ -1161,7 +1161,7 @@ index 0000000..125168f
11611161
+ convert_from(
11621162
+ vault._crypto_aead_det_decrypt(
11631163
+ message := decode(s.secret, 'base64'::text),
1164-
+ additional := convert_to(s.id || s.description || s.created_at at time zone 'utc' || s.updated_at at time zone 'utc', 'utf8'),
1164+
+ additional := convert_to(s.id::text, 'utf8'),
11651165
+ key_id := 0,
11661166
+ context := 'pgsodium'::bytea,
11671167
+ nonce := s.nonce
@@ -1202,7 +1202,7 @@ index 0000000..125168f
12021202
+ UPDATE vault.secrets s
12031203
+ SET secret = encode(vault._crypto_aead_det_encrypt(
12041204
+ message := convert_to(rec.secret, 'utf8'),
1205-
+ additional := convert_to(s.id || s.description || s.created_at at time zone 'utc' || s.updated_at at time zone 'utc', 'utf8'),
1205+
+ additional := convert_to(s.id::text, 'utf8'),
12061206
+ key_id := 0,
12071207
+ context := 'pgsodium'::bytea,
12081208
+ nonce := rec.nonce
@@ -1232,7 +1232,7 @@ index 0000000..125168f
12321232
+ secret = CASE WHEN new_secret IS NULL THEN s.secret
12331233
+ ELSE encode(vault._crypto_aead_det_encrypt(
12341234
+ message := convert_to(new_secret, 'utf8'),
1235-
+ additional := convert_to(s.id || coalesce(new_description, s.description) || (s.created_at at time zone 'utc') || (now() at time zone 'utc'), 'utf8'),
1235+
+ additional := convert_to(s.id::text, 'utf8'),
12361236
+ key_id := 0,
12371237
+ context := 'pgsodium'::bytea,
12381238
+ nonce := s.nonce

0 commit comments

Comments
 (0)