Open xscoops opened 4 months ago
The issue is likely that the underlying tokio_postrgess
implementation is refusing the connection, since it doesn't trust the tls certificate provided by the database. To fix this, you need to either use unencrypted communication, or add the certificate to the list of trusted certificates. The workaround works by creating a custom tls config, with the added trusted cert, but you might also be able to add the cert to the OS's list of trusted certs.
In many cases, encrypting the connection to the database isn't needed, since the database is (due to the network structure) inaccessible from anywhere except the application server.
What's missing?
I would like to use rocket_db_pool with feature diesel_postgres with sslmode=require in the connection url. Unfortunately I get the following error message:
I have seen the following message on the diesel-async repo but I have no idea how to integrate the example with my Rocket application:
Any help would be greatly appreciated
Ideal Solution
No response
Why can't this be implemented outside of Rocket?
I believe Rocket should have support for secure database built in
Are there workarounds usable today?
There is a diesel-async workaround is described here: https://github.com/weiznich/diesel_async/blob/main/examples/postgres/pooled-with-rustls/src/main.rs
Alternative Solutions
No response
Additional Context
No response
System Checks