Closed lorentzlasson closed 9 months ago
I ran the docker compose, and after adding some logging code, I found the server is configured to use SASL
/ SCRAM-SHA-256
(#10), which is the default authentication method.
Unfortunately, we only support clear-text password for now. SASL requires cryptographic functions and effects that are currently not available in the Roc ecosystem. We'll definitely add support for it and TLS in the future, but I'm currently dedicating my free time to compiler work so it'll have to wait a bit 😄
In the meantime, if you're only experimenting or not exposing your database to the public. You can set the following to switch the method to clear-text:
POSTGRES_HOST_AUTH_METHOD: password
Thanks for providing the docker setup and checking out roc-pg!
Aha, sorry though clear text was the default :facepalm: Thanks for the help! Works as intended when configuring POSTGRES_HOST_AUTH_METHOD: password
:star:
I'm trying to run this example https://github.com/agu-z/roc-pg/blob/main/examples/query.roc, but using a password in clear text instead like so
with this postgres setup in docker compose
but I get
I can connect to it using
psql postgres://postgres:foo@localhost/postgres
And if I switch the compose config to
POSTGRES_HOST_AUTH_METHOD: trust
I can connect fromquery.roc