-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#[database] implementation for mongodb ssl support #1115
Comments
In general, most
For instance, we could support the following in [global.databases.mongo]
url = "mongodb://localhost:27017"
ssl = { ca_file="...", verify_peer = true }
[global.databases.pg]
url = "postgres://"
tls = { mode="prefer", backend="openssl" } I think it's inevitable that these additional options will all be database-specific. It's also worth noting that the set of supported database crates and versions may change depending on how things go with #1065. |
I have a same problematic situation with postgres, as my database provider requires a ssl connection. My api works on my non-ssl test database, but I can't put the api in production :-( Here is what I can see in database.rs:
Waiting for the todo to be done ;-) |
And for anyone needing to work around this issue, that is "the 0.3 way" to do databases as described in the old version of the guide, which is still largely applicable for this purpose: https://rocket.rs/v0.3/guide/state/#databases. |
I've written a code for postgresql / managed state / SSL: |
|
Feature Request
Why i believe this feature is necessary
Using mongodb servers that is not in your local network like for example mongo atlas servers only use ssl connections. I have used the #[database] implementation for mongodb and it works really well while running it on my machine while coding, but for me to be able to go to staging or production with this i will have to use state management instead as the current #[database] implementation doesn't allow for ssl connections
The text was updated successfully, but these errors were encountered: