-
Hi there, I'm trying to deploy a PostgREST application to Google Cloud Platform using CloudSQL. I've set up the database by importing literally everything from a
Everything works perfectly in local Docker using the same image, but this happens on GCP, so I'm guessing it must be some PostgreSQL setup issue or some config difference in CloudSQL, but I'm at a loss - would really appreciate any pointers! In case it helps:
Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi, looks like it's missing a permission for the grant web_anon to authenticator; |
Beta Was this translation helpful? Give feedback.
-
Hi @laurenceisla, thanks very much for getting back to me! Unfortunately that was already set, running it just now made no difference: => grant web_anon to authenticator;
NOTICE: role "authenticator" is already a member of role "web_anon"
GRANT ROLE I'm very much not a PostgREST wizard, but I think missing that would stop it working elsewhere, and as I did a full postgres dump from a fully-(PostgREST-)working system and loaded it onto this one, my gut feeling is it must be something to do with the Cloud SQL setup. I've tried loading the same I also tried creating a minimal repro today, I made a completely fresh Cloud SQL for PostgreSQL database, ran all the auth steps in the Get it running section from the docs, and pointed a fresh PostgREST instance at it, and it gave me exactly the same error message, I wonder if it's anything to do with how I set up users/schemas/db on Cloud SQL? Is there anything I can run in Cheers! |
Beta Was this translation helpful? Give feedback.
-
Okaaaay - I found this comment on SO which suggested granting |
Beta Was this translation helpful? Give feedback.
Okaaaay - I found this comment on SO which suggested granting
web_anon
to the account I'm using to auth. I tried that and it worked - but is it a terrible idea security-wise? Feels like it!