@@ -502,6 +502,8 @@ For installation information, see the [Node-oracledb Installation Instructions][
502502 - 16.10.5 [Database Call Timeouts](#dbcalltimeouts)
503503 - 16.11 [Connecting to Oracle Real Application Clusters (RAC)](#connectionrac)
504504 - 16.12 [Connecting to Oracle Cloud Autonomous Databases](#connectionadb)
505+ - 16.12.1 [TLS Connections to Oracle Cloud Autonomous Databases](#connectionadbtls)
506+ - 16.12.2 [Mutual TLS Connections to Oracle Cloud Autonomous Databases](#connectionadbmtls)
505507 - 16.13 [Connecting to Sharded Databases](#sharding)
50650817. [SQL Execution](#sqlexecution)
507509 - 17.1 [SELECT Statements](#select)
@@ -11864,11 +11866,52 @@ Oracle Database][178].
1186411866
1186511867### <a name="connectionadb"></a> 16.12 Connecting to Oracle Cloud Autonomous Databases
1186611868
11867- To enable connection to Oracle Autonomous Database in Oracle Cloud, a wallet
11868- needs be downloaded from the cloud, and node-oracledb needs to be configured to
11869- use it. The wallet gives mutual TLS which provides enhanced security for
11870- authentication and encryption. A database username and password is still
11871- required for your application connections.
11869+ To enable connection to Oracle Autonomous Database (ADB) in Oracle Cloud, you
11870+ can use TLS (aka "1-way" TLS) or mutual TLS (mTLS) connections.
11871+
11872+ #### <a name="connectionadbtls"></a> 16.12.1 TLS Connections to Oracle Cloud Autonomous Database
11873+
11874+ Node-oracledb does not need any additional configuration to use TLS connections
11875+ to ADB. However you must use Oracle Client libraries versions 19.14 (or
11876+ later), or 21.5 (or later).
11877+
11878+ Configure ADB through the cloud console settings 'Allow secure access from
11879+ specified IPs and VCNs' to allow connections from your Node.js host. In your
11880+ applications use the correct TLS connection string (available in the cloud
11881+ console). The connection strings for TLS and mTLS are different.
11882+
11883+ For example:
11884+
11885+ ```javascript
11886+ const cs = `(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)
11887+ (host=abc.oraclecloud.com))(connect_data=(service_name=xyz.adb.oraclecloud.com))
11888+ (security=(ssl_server_dn_match=yes)))`;
11889+
11890+ connection = await oracledb.getConnection({
11891+ user: "scott",
11892+ password: mypw, // mypw contains the scott schema password
11893+ connectString: cs
11894+ });
11895+ ```
11896+
11897+ A database username and password is required for your application connections.
11898+ If you need to create a new database schema so you do not login as the
11899+ privileged ADMIN user, refer to the relevant Oracle Cloud documentation, for
11900+ example see [Create Database Users][161] in the Oracle Autonomous Transaction
11901+ Processing Dedicated Deployments manual.
11902+
11903+ If you have downloaded the 'wallet' zip used for mTLS file, then remove the
11904+ `sqlnet.ora` file, or comment out its `WALLET_LOCATION` line, or set a valid
11905+ directory name for `WALLET_LOCATION` (see the mTLS discussion below).
11906+ Otherwise an incorrect path can cause a connection error when the file is
11907+ parsed.
11908+
11909+ #### <a name="connectionadbmtls"></a> 16.12.2 Mutal TLS connections to Oracle Cloud Autonomous Database
11910+
11911+ For Mutal TLS (mTLS) connections to ADB, a wallet needs be downloaded from the
11912+ cloud console, and node-oracledb needs to be configured to use it. Mutual TLS
11913+ provides enhanced security for authentication and encryption. A database
11914+ username and password is still required for your application connections.
1187211915
1187311916##### Install the Wallet and Network Configuration Files
1187411917
0 commit comments