2 ms·
This is basically how we do authentication in the Splitgraph DDN [0], which is kind of like a multi-tenant serverless Postgres. We implement the Postgres front
by chatmasta 4y ago
This is basically how we do authentication in the Splitgraph DDN [0], which is kind of like a multi-tenant serverless Postgres.
We implement the Postgres frontend with a forked version of PgBouncer, and we changed the authentication method such that when the user authenticates, we issue them a JWT which we store as a session variable. That session variable has the same security properties as a cookie in a web browser (the user can change/manipulate it, but if it's signed by us we can trust its claims).
That's the simple explanation that skips over the multi-tenant part. I don't want to derail from the thread - Neon is very cool, and we are actually experimenting with it right now, for storing the Seafowl [1] catalog [2] when deploying to "scale to zero" services like Google Cloud Run or AWS Lambda, which don't have persistent storage.
[0] https://www.splitgraph.com/connect/query https://www.splitgraph.com/connect/query
[1] https://seafowl.io https://seafowl.io
[2] https://seafowl.io/docs/learning/architecture https://seafowl.io/docs/learning/architecture