-
Notifications
You must be signed in to change notification settings - Fork 3
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
Trouble accessing MongoDB through Java #10
Comments
Did a bit more digging myself and looks like there is maybe a second self-signed cert created for Mongo. If I instead add the cert at /u01/ords/self-signed.crt, everything works. Would it be possible to get this exposted through a jks truststore? |
Hi @arssycro Yeah, we generate a self signed cert for ORDS. A quick workaround is to update the client's truststore Linux
JDK truststoreFor JDK truststore update, you can use keytool Linux example:
MacOS example:
did you already do this ? Meanwhile, we will plan to add self.signed.cert to the wallet's truststore.jks |
We can do that, but it runs into some problems using it for automation. Getting it into the truststore.jks provides a simpler mechanism for us to use System properties to ensure our tests can access the DB. |
Hi @arssycro , Run the following podman command before copying the wallet. This will add to truststore.jks podman exec -it adb-free keytool -import -trustcacerts -file /u01/ords/self-signed.crt -keystore /u01/app/oracle/wallets/tls_wallet/truststore.jks This command will prompt for wallet password used during container startup. We will fix this issue in the upcoming release. |
This is fixed in the latest released image version
|
Can this be closed? |
Trying to use this image to POC using Autonomous JSON DB and running into some issues trying to get the Mongodb libraries working.
Using a connection string like "mongodb://[user]:[password]@localhost:27017/[user]?authMechanism=PLAIN&authSource=$external&ssl=true&retryWrites=false&loadBalanced=true" which is exactly what's in the log when the image opens. Using this string, I'm able to connect through something like MongoDB Compass immediately, but I'm having trouble in Java/Kotlin.
If I do not add to the cacerts, I get "unable to find valid certification path to requested target" when trying to get a count of records. If I do add to the caccerts, I get "Bad signature length: got 512 but was expecting 256".
Any suggestions or ideas on what I might be missing?
The text was updated successfully, but these errors were encountered: