Closed albertlockett closed 7 months ago
You probably need to connect with TLS.
You probably need to connect with TLS.
@sfackler Will the way I've connected not use TLS?
I'm using sslmode=prefer
in my config and I pass NoTls
to connect
which is what we're supposed to pass w/ sslmode=prefer
?
let (client, conn) = cnx.connect(NoTls)
https://docs.rs/tokio-postgres/latest/tokio_postgres/tls/struct.NoTls.html
pub struct NoTls;
A MakeTlsConnect and TlsConnect implementation which simply returns an error. This can be used when sslmode is none or prefer.
Like the name implies and documentation states, NoTls
will not use TLS. You need to use an actual TLS implementation like postgres-openssl.
Like the name implies and documentation states,
NoTls
will not use TLS. You need to use an actual TLS implementation like postgres-openssl.
Is using TLS without supplying the root cert supported? Sorry, I guess it wasn't clear from the docs how to do that
https://docs.rs/postgres-native-tls/latest/postgres_native_tls/
Trying to connect with RDS IAM Auth:
This fails with error:
The same connection configuration does work as an arg to psql cli -- so I'm thinking it's some issue with how the tokio_postgres library is connecting: