Reputation: 11
How to connect to Oracle database which is enabled with mTLS?
I tried using rust oracle crate but wasn't successful. Please suggest/help on this. The idea is to connect to oracle DB and extract some data but since it is mtls enabled, I'm not able to establish connection.
Upvotes: 1
Views: 50
Reputation: 10506
I assume this is a question about connecting to Oracle Autonomous Database using rust-oracle.
Follow the general techniques for other Oracle 'thick' mode drivers that utilize Oracle Client libraries, for example see the 'Thick mode' sections of the python-oracledb documentation.
Make sure to download the correct mTLS wallet from the Oracle ADB cloud console
Unzip the wallet file. You just need three files:
You then have two options:
With either option, you would then just run your app using one of the connection aliases in the tnsnames.ora file (along with your database username and password):
let conn = Connection::connect("scott", "tiger", "mydb_high")?;
Upvotes: 0