Skip to content

Commit d74c01d

Browse files
committed
Documentation and Test Updates for the latest fixes and enhancements
1 parent 8813602 commit d74c01d

File tree

5 files changed

+85
-24
lines changed

5 files changed

+85
-24
lines changed

doc/src/user_guide/connection_handling.rst

Lines changed: 55 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4082,9 +4082,9 @@ Centralized Configuration Providers enable you to centrally store and manage
40824082
the configuration information of your application in a single location on the
40834083
cloud. These providers allow you to separately store the configuration
40844084
information from the code of your application. The configuration information
4085-
that can be stored in these providers includes connect descriptors, and
4086-
database credentials such as user name and password. The database password can
4087-
be stored separately in a secure vault which is a service offered by these
4085+
stored in these providers include connect descriptor, wallet, and database
4086+
credential (user name and password) details. The database password and wallet
4087+
can be stored separately in a secure vault service offered by the cloud
40884088
providers. Also, you can store properties specific to node-oracledb in
40894089
centralized configuration providers.
40904090
@@ -4129,21 +4129,22 @@ include `Azure App Configuration <https://www.npmjs.com/package/@azure/app-
41294129
configuration>`__ and `Azure Identity <https://www.npmjs.com/package/@azure/
41304130
identity>`__. Optionally, you must install `Azure Key Vault <https://www.
41314131
npmjs.com/package/@azure/keyvault-secrets>`__ which is required only if a
4132-
password is stored in the vault. For installation instructions of these
4133-
libraries, see :ref:`azuremodules`.
4132+
password or wallet is stored in the vault. For installation instructions of
4133+
these libraries, see :ref:`azuremodules`.
41344134
41354135
Configuration information is stored as key-value pairs in Azure App
41364136
Configuration. You must add the connect descriptor as a key under a prefix
41374137
based on the requirements of your application. Optionally, you can add the
4138-
database user name, password, and node-oracledb specific properties as
4139-
keys. The database password can be stored securely as a secret using
4140-
`Azure Key Vault <https://learn.microsoft.com/en-us/azure/key-vault/general/
4141-
overview>`__. In Azure App Configuration, you can add the following keys under
4142-
a prefix:
4138+
database user name, password, wallet location and node-oracledb specific
4139+
properties as keys. The database password and wallet can be stored securely as
4140+
a secret using `Azure Key Vault <https://learn.microsoft.com/en-us/azure/
4141+
key-vault/general/overview>`__. In Azure App Configuration, you can add the
4142+
following keys under a prefix:
41434143
41444144
- <prefix>connect_descriptor (required)
41454145
- <prefix>user (optional)
41464146
- <prefix>password (optional)
4147+
- <prefix>wallet_location (optional) - only node-oracledb Thin mode
41474148
- <prefix>node-oracledb (optional)
41484149
41494150
The key ending with:
@@ -4153,6 +4154,9 @@ The key ending with:
41534154
- ``user`` stores the database user name as the value.
41544155
- ``password`` stores the reference to the Azure Key Vault and Secret as
41554156
the value.
4157+
- ``wallet_location`` stores the reference to the Azure Key Vault and Secret
4158+
that contains the wallet as the value. This can only be used in
4159+
node-oracledb Thin mode.
41564160
- ``node-oracledb`` stores the values of the node-oracledb specific
41574161
properties. The properties that can be stored in Azure App Configuration
41584162
include ``poolMin``, ``poolMax``, ``poolIncrement``, ``poolTimeout``,
@@ -4286,6 +4290,8 @@ are defined under the same prefix ``test/`` as an example.
42864290
- scott
42874291
* - test/password
42884292
- {"uri":"https://mykeyvault.vault.azure.net/secrets/passwordsalescrm"}
4293+
* - test/wallet_location
4294+
- {"uri":"https://mykeyvault.vault.azure.net/secrets/walletsalescrm"}
42894295
* - test/node-oracledb
42904296
- {"stmtCacheSize":30, "prefetchRows":2, "poolMin":2, "poolMax":10}
42914297
@@ -4331,6 +4337,10 @@ configuration information in this
43314337
- "scott"
43324338
* - ``password``
43334339
- "manager" (value of secret in URI - for demo purposes)
4340+
* - ``walletContent``
4341+
- <PEM wallet content> (value of secret in URI - for demo purposes)
4342+
4343+
This value can only be used in node-oracledb Thin mode.
43344344
* - ``stmtCacheSize``
43354345
- 30
43364346
* - ``prefetchRows``
@@ -4379,6 +4389,10 @@ sample configuration information in this
43794389
- "scott"
43804390
* - ``password``
43814391
- "manager" (value of secret in URI - for demo purposes)
4392+
* - ``walletContent``
4393+
- <PEM wallet content> (value of secret in URI - for demo purposes)
4394+
4395+
This value can only be used in node-oracledb Thin mode.
43824396
* - ``stmtCacheSize``
43834397
- 30
43844398
* - ``prefetchRows``
@@ -4397,6 +4411,9 @@ application will have the higher precedence.
43974411
If you are using Thin mode and have defined the node-oracledb specific
43984412
properties in both the application and in Azure App Configuration, then the
43994413
values defined in the configuration provider will have the higher precedence.
4414+
If you have defined the ``walletContent`` property in the application and the
4415+
``wallet_location`` key in Azure App Configuration, then the value defined in
4416+
the configuration provider will have the higher precedence.
44004417
44014418
If you are using Thick mode and have defined the node-oracledb properties in
44024419
an ``oraaccess.xml`` file, Azure App Configuration, and the application, then
@@ -4444,15 +4461,16 @@ instructions of these libraries, see :ref:`ocimodules`.
44444461
44454462
Configuration information is stored as a JSON file in OCI Object Storage. You
44464463
must add the connect descriptor in the JSON file. Optionally, you can add the
4447-
database user name, password, and node-oracledb specific properties in the
4448-
JSON file. The database password can also be stored securely as a secret using
4449-
`OCI Vault <https://docs.oracle.com/en-us/iaas/Content/KeyManagement/Tasks/
4450-
managingsecrets.htm>`__. In OCI Object Storage, you can add the following
4451-
sub-objects in the JSON file:
4464+
database user name, password, wallet location, and node-oracledb specific
4465+
properties in the JSON file. The database password and wallet can also be
4466+
stored securely as a secret using `OCI Vault <https://docs.oracle.com/en-us/
4467+
iaas/Content/KeyManagement/Tasks/managingsecrets.htm>`__. In OCI Object
4468+
Storage, you can add the following sub-objects in the JSON file:
44524469
44534470
- connect_descriptor (required)
44544471
- user (optional)
44554472
- password (optional)
4473+
- wallet_location (optional) - only node-oracledb Thin mode
44564474
- node-oracledb (optional)
44574475
44584476
Each sub-object is detailed below:
@@ -4462,6 +4480,9 @@ Each sub-object is detailed below:
44624480
- ``user`` is used to specify the database user name as the value.
44634481
- ``password`` is used to specify the reference to OCI Vault and secret as
44644482
the value.
4483+
- ``wallet_location`` is used to specify the reference to the OCI Vault and
4484+
secret that contains the wallet as the value. This can only be used in
4485+
node-oracledb Thin mode.
44654486
- ``node-oracledb`` is used to specify the values of the node-oracledb specific
44664487
properties. The properties that can be stored in OCI Object Storage include
44674488
``poolMin``, ``poolMax``, ``poolIncrement``, ``poolTimeout``,
@@ -4582,12 +4603,16 @@ file which is stored in OCI Object Storage::
45824603
"user": "scott",
45834604
"password": {
45844605
"type": "ocivault",
4585-
"value": "ocid1.vaultsecret.my-secret-id",
4606+
"value": "ocid1.vaultsecret.my-secret-id"
4607+
},
4608+
"wallet_location": {
4609+
"type": "ocivault",
4610+
"value": "ocid1.vaultwallet.my-wallet-id"
45864611
},
45874612
"node-oracledb": {
45884613
"stmtCacheSize": 30,
4589-
"prefetchRows": 2
4590-
"poolMin": 2
4614+
"prefetchRows": 2,
4615+
"poolMin": 2,
45914616
"poolMax": 10
45924617
}
45934618
}
@@ -4633,6 +4658,10 @@ connection properties will be the values that were defined in the
46334658
- "scott"
46344659
* - ``password``
46354660
- "manager" (value of secret in URI - for demo purposes)
4661+
* - ``walletContent``
4662+
- <PEM wallet content> (value of secret in URI - for demo purposes)
4663+
4664+
This value can only be used in node-oracledb Thin mode.
46364665
* - ``stmtCacheSize``
46374666
- 30
46384667
* - ``prefetchRows``
@@ -4680,6 +4709,10 @@ connection properties will be the values that were defined in the
46804709
- "scott"
46814710
* - ``password``
46824711
- "manager" (value of secret in URI - for demo purposes)
4712+
* - ``walletContent``
4713+
- <PEM wallet content> (value of secret in URI - for demo purposes)
4714+
4715+
This value can only be used in node-oracledb Thin mode.
46834716
* - ``stmtCacheSize``
46844717
- 30
46854718
* - ``prefetchRows``
@@ -4689,7 +4722,6 @@ connection properties will be the values that were defined in the
46894722
* - ``poolMax``
46904723
- 10
46914724
4692-
46934725
**Precedence of Properties**
46944726
46954727
If you have defined the values of ``user`` and ``password`` in both the
@@ -4698,7 +4730,10 @@ will have the higher precedence.
46984730
46994731
If you are using Thin mode and have defined the node-oracledb specific
47004732
properties in both the application and in OCI Object Storage, then the values
4701-
defined in the configuration provider will have the higher precedence.
4733+
defined in the configuration provider will have the higher precedence. If you
4734+
have defined the ``walletContent`` property in the application and the
4735+
``wallet_location`` key in Azure App Configuration, then the value defined in
4736+
the configuration provider will have the higher precedence.
47024737
47034738
If you are using Thick mode and have defined these node-oracledb properties in
47044739
an ``oraaccess.xml`` file, OCI Object Storage, and the application, then the order

test/binding.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ describe('4. binding.js', function() {
765765
async () => {
766766
await connection.execute(sql, {ROWID: 1});
767767
},
768-
//NJS-098: 1 positional bind values are required but 0 were provided
768+
//ORA-01745: invalid host/bind variable name
769769
/ORA-01745:/
770770
);
771771
});

test/connProps.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,14 @@ describe('193. connProps.js', function() {
176176
}); // 193.5
177177

178178
it('193.6 Oracle Database dbname associated with the connection', async () => {
179-
if (!oracledb.thin) this.skip(); // thick changes are pending.
179+
let query;
180+
if (!oracledb.thin) {
181+
// on thick mode for CDB based DB's, the CDB name is returned.
182+
query = `SELECT upper(NAME) FROM v$database`;
183+
} else {
184+
query = "SELECT GLOBAL_NAME FROM GLOBAL_NAME";
185+
}
180186
const conn = await oracledb.getConnection(dbConfig);
181-
const query = "SELECT GLOBAL_NAME FROM GLOBAL_NAME";
182187
const result = await conn.execute(query);
183188
assert.deepStrictEqual(result.rows[0][0], conn.dbName.toUpperCase());
184189
await conn.close();

test/list.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,26 @@ Overview of node-oracledb functional tests
208208
4.8.1 binding out in Object & Array formats
209209
4.8.2 BIND_IN
210210
4.8.3 BIND_INOUT
211+
4.9 different placeholders for bind name
212+
4.9.1 test case sensitivity of quoted bind names
213+
4.9.2 using a reserved keyword as a bind name
214+
4.9.3 not using a bind name in execute statement
215+
4.10 various quoted binds
216+
4.10.1 various quoted bind names
217+
4.11 PL/SQL block with null Binds
218+
4.11.1 executing a null with bind values
219+
4.12 binding in a cursor
220+
4.12.1 test binding in a cursor
221+
4.13 fetching supplemental and other characters
222+
4.13.1 bind and fetch supplemental characters
223+
4.13.2 bind and fetch Scandinavian/Nordic characters
224+
4.14 binding large number of in and out binds
225+
4.14.1 output binds in pl/sql (506ms)
226+
4.14.2 output binds using bindByPosition in sql with returning clause
227+
4.14.3 output binds using bindByName in sql with returning clause
228+
4.15 binding different data types for same sql
229+
4.15.1 change bindtypes using bindByPosition for queries
230+
4.15.2 change bindtypes using bindByName for queries
211231

212232
5. externalAuth.js
213233
5.1 tests that work both when DB has configured externalAuth and not configured

test/pool.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,8 @@ describe('2. pool.js', function() {
640640
};
641641
await assert.rejects(
642642
async () => await oracledb.createPool(config),
643-
/ORA-01017:|NJS-125:/
643+
/ORA-01017:|NJS-125:|ORA-12162:/
644+
// ORA-12162: TNS:net service name is incorrectly specified (23.3 Database Thin Mode)
644645
// ORA-01017: invalid username/password; logon denied
645646
// NJS-125: "connectString" cannot be empty or undefined. Bequeath connections are not supported in Thin mode
646647
);

0 commit comments

Comments
 (0)