Sitemap
Ruvindi Dilsara Dheerasinghe

Ruvindi Dilsara Dheerasinghe

How to Connect WSO2 API Manager with Oracle Autonomous Database

3 min readNov 7, 2025

--

Integrating WSO2 API Manager (APIM) with Oracle Autonomous Database (ADB) on Oracle Cloud Infrastructure (OCI) enables secure and scalable API-driven data access. This guide walks you through the complete setup process from configuring your Autonomous DB wallet to adding the required Oracle libraries in APIM.

Press enter or click to view image in full size

Step 1: Access Your Oracle Autonomous Database

Navigate to your Oracle Cloud Console:

  1. Go to OCI Console → Oracle AI Database → Autonomous AI Databases
  2. Select Your Database.
  3. Select Database Connection.
  4. You’ll find the option to download the connection wallet.
Press enter or click to view image in full size
Step 1
Press enter or click to view image in full size
Step 3

Step 2: Download the Wallet

Click “Download Wallet”, and when prompted for the wallet type, choose “Instance Wallet”.
This wallet contains the credentials and SSL certificates needed to establish a secure connection between APIM and Oracle ADB.

Press enter or click to view image in full size

Step 3: Extract the Wallet Files

Once downloaded, unzip the wallet file. All the contents should be in one directory.

For example:

Wallet_Test/
├── cwallet.sso
├── ewallet.p12
├── keystore.jks
├── ojdbc.properties
├── sqlnet.ora
├── tnsnames.ora
└── truststore.jks

Step 4: Set the $TNS_ADMIN Environment Variable

Set the $TNS_ADMIN environment variable to point to the extracted wallet directory.
This tells Oracle drivers where to find the configuration and SSL details.

export TNS_ADMIN=/home/user/Wallet_Test

Step 5: Add Required Oracle JAR Files to APIM

You may need to add the following Oracle libraries (JAR files) into the APIM repository/components/lib directory to connect with the Oracle Autonomous Database using the downloaded Wallet files.

  • Oracle JDBC Driver that supports your database version
  • oraclepki.jar
  • ons-19.20.0.0.jar
  • osdt_cert.jar
  • osdt_core.jar

Step 6: Update the deployment.toml Configuration

Now, configure WSO2 API Manager to connect to the Oracle Autonomous Database by updating the deployment.toml file located in: <APIM_HOME>/repository/conf/

Get Ruvindi Dilsara Dheerasinghe’s stories in your inbox

Join Medium for free to get updates from this writer.

Configure the databases similar to the below:
Note that the wallet is associated with the jdbc url for secure connection.

url = "jdbc:oracle:thin:@<TNS_NAME>?TNS_ADMIN=<path-to-wallet>/Wallet_test"

Eg:

[database.apim_db]
type = "oracle"
url = "jdbc:oracle:thin:@testdb_high?TNS_ADMIN=<path-to-wallet>/Wallet_test"
username = "ADMIN"
password = "TEST-1-test99"
driver = "oracle.jdbc.driver.OracleDriver"
validationQuery = "SELECT 1 FROM DUAL"

Note:

  • Update the url and TNS_ADMIN path to match your environment and wallet directory.
  • You can select TNS_NAME either from the tnsnames.ora file inside the Wallet Files or from the Database Connection section of the Autonomous Database from the OCI.
  • Replace the username and password with your actual database credentials.

Step 7: Start WSO2 API Manager

After adding all the JARs, start the WSO2 API Manager to apply the changes.

sh <APIM_HOME>/bin/api-manager.sh

Now the APIM should be able to establish a connection with your Oracle Autonomous Database successfully!!!

Conclusion

That’s it! You’ve successfully configured WSO2 API Manager to connect with Oracle Autonomous Database using a secure wallet-based connection.
This setup ensures a robust, SSL-secured, and production-grade connection for your APIs to interact with Oracle’s Autonomous DB seamlessly.

Pro Tip:

If you face connection issues, verify:

  • $TNS_ADMIN is correctly pointing to the wallet folder.
  • The tnsnames.ora file matches your database alias.
  • All required Oracle JARs are available in the correct directories.

--

--