feat: Make db-anon-role optional

Without db-anon-role, PostgREST will block any anonymous access without hitting the database.

Resolves #1689, Ref #1823
This commit is contained in:
Wolfgang Walther
2022-01-22 15:59:26 +01:00
parent 05b5ecd23b
commit c3ade07ad6
27 changed files with 90 additions and 50 deletions
-2
View File
@@ -1,5 +1,3 @@
db-anon-role = "required"
db-schema = "provided_through_alias"
max-rows = 1000
pre-request = "check_alias"
-2
View File
@@ -1,5 +1,3 @@
db-anon-role = "required"
db-channel-enabled = "1"
db-prepared-statements = "0"
jwt-secret-is-base64 = "2"
-2
View File
@@ -1,5 +1,3 @@
db-anon-role = "required"
db-channel-enabled = "true"
db-prepared-statements = "FALSE"
jwt-secret-is-base64 = "\"true\""
-1
View File
@@ -1,3 +1,2 @@
db-anon-role = "required"
# Not the default, but only works with PG* variables, which are not set
db-config = false
+1 -1
View File
@@ -1,4 +1,4 @@
db-anon-role = "required"
db-anon-role = ""
db-channel = "pgrst"
db-channel-enabled = true
db-extra-search-path = "public"
@@ -1,4 +1,4 @@
db-anon-role = "required"
db-anon-role = ""
db-channel = "pgrst"
db-channel-enabled = true
db-extra-search-path = "public"
@@ -1,4 +1,4 @@
db-anon-role = "required"
db-anon-role = ""
db-channel = "pgrst"
db-channel-enabled = true
db-extra-search-path = "public"
+1 -1
View File
@@ -1,4 +1,4 @@
db-anon-role = "required"
db-anon-role = ""
db-channel = "pgrst"
db-channel-enabled = true
db-extra-search-path = "public"
@@ -1,4 +1,4 @@
db-anon-role = "postgrest_test_anonymous"
db-anon-role = "other"
db-channel = "postgrest"
db-channel-enabled = false
db-extra-search-path = "public,extensions,other"
@@ -1,4 +1,4 @@
db-anon-role = "postgrest_test_anonymous"
db-anon-role = "anonymous"
db-channel = "postgrest"
db-channel-enabled = false
db-extra-search-path = "public,extensions,private"
+1 -1
View File
@@ -1,4 +1,4 @@
db-anon-role = "required"
db-anon-role = ""
db-channel = "pgrst"
db-channel-enabled = true
db-extra-search-path = "public"
-1
View File
@@ -1,5 +1,4 @@
# tests how config options fall back with invalid types
db-anon-role = "required"
# expects string
app.settings.test = false