-
Notifications
You must be signed in to change notification settings - Fork 42
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
micronaut-jpa-reactive ssl connect cockroachdb error #985
Comments
Doesn't look like it is possible to configure
so this needs to be done manually somehow, just not sure where would be the execution point to add cert path. |
@jiliapp Potential workaround for this (since can't configure
Custom factory replacing default one so we can set PemTrustOptions. Can extend if needed for other non configurable options
and then application.yml would look like this
This is just the idea, you can rearrange your config classes and config paths for other needs. |
Thank you for your reply. I do not know if your code would be called upon starting the application. Because the crash stacktrace upon starting the application is caused by "at io.micronaut.configuration.vertx.pg.client.PgDriverFactory.build(PgDriverFactory.java:67)" My temporary workaround is to copy the code of PgDriverFactory.java to my own project directory and then add certificate related configurations. Here is my change of the code Translated:
TrustOptionsSSL.kt
This is a very basic solution in my project that uses the default location of the generated root.crt certificate. Other related issues are not addressed such as:
To properly configure SSL for my Micronaut PostgreSQL connection, I would also need to address:
The current code only loads the root.crt certificate from a hardcoded absolute file path. It does not address the full scope of configuration options needed for a production-ready SSL connection. |
Yes, that's basically similar. Custom factory I proposed replaces default factory (you should probably use
|
Expected Behavior
Micronaut 3.9.2 + jpa + reactive +vert.x +cockroachdb
GET error Trust options must be specified under verify-full or verify-ca sslmode
throw exception code:
how can id config trustOptions ?look like this ? trust-options/pem-trust-options
i hava the root ca file: certs/ca.crt
Actual Behaviour
No response
Steps To Reproduce
No response
Environment Information
windows
jdk17
Example Application
https://github.com/jiliapp/micronaut-jpa-reactive-cockroachdb-demo
Version
3.9.2
The text was updated successfully, but these errors were encountered: