Skip to content

PostgREST API Setup #2913

Answered by laurenceisla
mchatrvd asked this question in Q&A
Aug 21, 2023 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Hi, I'm assuming you're using a single PostgREST instance for one database and manage your users with roles using JWT as specified in the docs. Then:

  1. Yes, by doing a GRANT role TO authenticator; for each role.
  2. Yes, but not exactly using https://jwt.io . You'll need a more robust JWT generator like Auth0. And the JWT secret is not the DB password, it should be a 32 character value specified in the jwt-secret configuration parameter.
  3. Yes, that is correct.
  4. Yes, but again, it does not use the DB Password, only the JWT secret. What PostgREST does is connect to the database using the user and password specified in db-uri, which we refer as "authenticator". This authenticator (suggested to have…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mchatrvd
Comment options

@laurenceisla
Comment options

Answer selected by wolfgangwalther
@mchatrvd
Comment options

@laurenceisla
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants