Setting a password for db-anon-role #3840
-
ProblemI am using neondb as my database, but they don't allow to create a role without a password, https://neon.tech/docs/manage/roles#create-a-role, is there any way that we can set password for the db-anon-role ? SolutionOptional config value to set the password for db-anon-role. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It doesn't matter whether the anon role has a password set or not - PostgREST doesn't log in with this role at all. Instead, what matters is: The authenticator role, the role with which PostgREST connects, needs to be allowed to SET ROLE into the anon role. That means you need to That being said: You should probably only create the authenticator role via neon's UI. You will also have access to your database with some kind of superuser role, with which you should be able to create other roles, too, right? Then create the anon role like that. See https://neon.tech/docs/manage/roles#manage-roles-with-sql. |
Beta Was this translation helpful? Give feedback.
It doesn't matter whether the anon role has a password set or not - PostgREST doesn't log in with this role at all.
Instead, what matters is: The authenticator role, the role with which PostgREST connects, needs to be allowed to SET ROLE into the anon role. That means you need to
GRANT anon TO authenticator
. It doesn't matter whether the anon role has a password for that or not.That being said: You should probably only create the authenticator role via neon's UI. You will also have access to your database with some kind of superuser role, with which you should be able to create other roles, too, right? Then create the anon role like that. See https://neon.tech/docs/manage/roles#manage-ro…