@@ -32,6 +32,7 @@ limitations under the License.
32
32
- 3.2 [ Oracledb Properties] ( #oracledbproperties )
33
33
- [ connectionClass] ( #propdbconclass )
34
34
- [ isAutoCommit] ( #propdbisautocommit )
35
+ - [ isExternalAuth] ( #propdbisexternalauth )
35
36
- [ maxRows] ( #propdbmaxrows )
36
37
- [ outFormat] ( #propdboutformat )
37
38
- [ poolIncrement] ( #propdbpoolincrement )
@@ -279,10 +280,24 @@ If this property is *true*, then the transaction in the current
279
280
connection is automatically committed at the the end of statement
280
281
execution.
281
282
282
- The default value is false.
283
+ The default value is * false* .
283
284
284
285
This property may be overridden in an ` execute() ` call.
285
286
287
+ <a name =" propdbisexternalauth " ></a >
288
+ ```
289
+ Boolean isExternalAuth
290
+ ```
291
+
292
+ If this property is * true* then connections are established using
293
+ external authentication. See [ External Authentication] ( #extauth ) for
294
+ more information.
295
+
296
+ The default value is * false* .
297
+
298
+ The ` user ` and ` password ` properties for connecting or creating a pool
299
+ should not be set when ` isExternalAuth ` is * true* .
300
+
286
301
<a name =" propdbmaxrows " ></a >
287
302
```
288
303
Number maxRows
@@ -438,18 +453,6 @@ ignored.
438
453
439
454
The properties of the ` poolAttrs ` object are described below.
440
455
441
- ```
442
- String connectString
443
- ```
444
-
445
- The Oracle database instance to connect to. The string can be an Easy
446
- Connect string, or a Connect Name from a ` tnsnames.ora ` file, or the
447
- name of a local Oracle database instance. See
448
- [ Connection Strings] ( #connectionstrings ) for examples.
449
-
450
- If ` connectString ` is not specified, the empty string "" is used which
451
- indicates to connect to the local, default database.
452
-
453
456
```
454
457
String user
455
458
```
@@ -466,6 +469,28 @@ String password
466
469
The password of the database user. A password is also necessary if a
467
470
proxy user is specified.
468
471
472
+ ```
473
+ String connectString
474
+ ```
475
+
476
+ The Oracle database instance to connect to. The string can be an Easy
477
+ Connect string, or a Connect Name from a ` tnsnames.ora ` file, or the
478
+ name of a local Oracle database instance. See
479
+ [ Connection Strings] ( #connectionstrings ) for examples.
480
+
481
+ ```
482
+ Boolean isExternalAuth
483
+ ```
484
+
485
+ If this optional property is * true* then the pool's connections will
486
+ be established using [ External Authentication] ( #extauth ) .
487
+
488
+ This property overrides the * Oracledb*
489
+ [ ` isExternalAuth ` ] ( #propdbisexternalauth ) property.
490
+
491
+ The ` user ` and ` password ` properties should not be set when
492
+ ` isExternalAuth ` is * true* .
493
+
469
494
```
470
495
Number stmtCacheSize
471
496
```
@@ -568,18 +593,6 @@ are ignored.
568
593
569
594
The properties of the ` connAttrs ` object are described below.
570
595
571
- ```
572
- String connectString
573
- ```
574
-
575
- The Oracle database instance to connect to. The string can be an Easy Connect string, or a
576
- Connect Name from a ` tnsnames.ora ` file, or the name of a local
577
- Oracle database instance. See
578
- [ Connection Strings] ( #connectionstrings ) for examples.
579
-
580
- If ` connectString ` is not specified, the empty string "" is used which
581
- indicates to connect to the local, default database.
582
-
583
596
```
584
597
String user
585
598
```
@@ -596,6 +609,28 @@ String password
596
609
The password of the database user. A password is also necessary if a
597
610
proxy user is specified.
598
611
612
+ ```
613
+ String connectString
614
+ ```
615
+
616
+ The Oracle database instance to connect to. The string can be an Easy Connect string, or a
617
+ Connect Name from a ` tnsnames.ora ` file, or the name of a local
618
+ Oracle database instance. See
619
+ [ Connection Strings] ( #connectionstrings ) for examples.
620
+
621
+ ```
622
+ Boolean isExternalAuth
623
+ ```
624
+
625
+ If this optional property is * true* then the connection will be
626
+ established using [ External Authentication] ( #extauth ) .
627
+
628
+ This optional property overrides the * Oracledb*
629
+ [ ` isExternalAuth ` ] ( #propdbisexternalauth ) property.
630
+
631
+ The ` user ` and ` password ` properties should not be set when
632
+ ` isExternalAuth ` is * true* .
633
+
599
634
```
600
635
Number stmtCacheSize
601
636
```
@@ -1161,6 +1196,9 @@ If a Connect Name from a `tnsnames.ora` file is used, set the
1161
1196
is read. Alternatively make sure the name is in
1162
1197
` $ORACLE_HOME/network/admin/tnsnames.ora ` or ` /etc/tnsnames.ora ` .
1163
1198
1199
+ If ` connectString ` is not specified, the empty string "" is used which
1200
+ indicates to connect to the local, default database.
1201
+
1164
1202
### <a name =" drcp " ></a > 6.2 Database Resident Connection Pooling
1165
1203
1166
1204
[ Database Resident Connection Pooling] ( http://docs.oracle.com/database/121/ADFNS/adfns_perf_scale.htm#ADFNS228 )
@@ -1206,6 +1244,43 @@ This paper also gives more detail on configuring DRCP.
1206
1244
1207
1245
### <a name =" extauth " ></a > 6.3 External Authentication
1208
1246
1247
+ Instead of specifying a user and password at connection, Oracle
1248
+ Database allows applications to use an external password store (such
1249
+ as
1250
+ [ Oracle Wallet] ( http://docs.oracle.com/database/121/DBIMI/to_dbimi10236_d209.htm#DBIMI10236 ) ),
1251
+ the [ Secure Socket Layer] ( http://docs.oracle.com/database/121/DBSEG/asossl.htm#DBSEG070 )
1252
+ (SSL), or the
1253
+ [ operating system] ( http://docs.oracle.com/database/121/DBSEG/authentication.htm#DBSEG30035 )
1254
+ to validate user access. This mode of authentication is called
1255
+ * external authentication* . One of the benefits is that database
1256
+ credentials do not need to be hard coded in the application.
1257
+
1258
+ To use external authentication, set the * Oracledb*
1259
+ [ ` isExternalAuth ` ] ( propdbextauth ) property to * true* . Once this is
1260
+ set, any subsequent connections obtained using the * Oracledb*
1261
+ [ ` getConnection() ` ] ( #getconnectiondb ) or * Pool*
1262
+ [ ` getConnection() ` ] ( #getconnectionpool ) calls will use external
1263
+ authentication. Setting this property does not affect the operation
1264
+ of existing connections or pools.
1265
+
1266
+ When ` isExternalAuth ` is * true* , the ` user ` and ` password ` properties
1267
+ should not be set, or should be empty strings.
1268
+
1269
+ The ` isExternalAuth ` property can be overridden in the ` connAttrs ` or
1270
+ ` poolAttrs ` parameters of the * Oracledb*
1271
+ [ ` getConnection() ` ] ( #getconnectiondb ) or [ ` createPool() ` ] ( #createpool )
1272
+ calls, respectively. Overriding ` isExternalAuth ` is not possible for
1273
+ a * Pool* ` getConnection() ` call. The connections from a * Pool* object
1274
+ are always obtained in the manner in which the pool was initially
1275
+ created.
1276
+
1277
+ For pools created with external authentication, the number of
1278
+ connections initially created is zero even if a non-zero value is
1279
+ specified for the [ ` poolMin ` ] ( #propdbpoolmin ) . However, once the
1280
+ number of open connections exceeds ` poolMin ` and connections are idle
1281
+ for more than the [ ` poolTimeout ` ] ( #propdbpooltimeout ) seconds, then
1282
+ the number of open connections does not fall below ` poolMin ` .
1283
+
1209
1284
## <a name =" sqlexecution " ></a > 7. SQL Execution
1210
1285
1211
1286
A SQL or PL/SQL statement may be executed using the * Connection*
@@ -1307,7 +1382,7 @@ Query result type mappings for Oracle Database types to JavaScript types are:
1307
1382
Node-oracledb uses the
1308
1383
[ Oracle OCI statement cache] ( https://docs.oracle.com/database/121/LNOCI/oci09adv.htm#i471377 )
1309
1384
which manages a cache of statements for each session. In the database
1310
- server, statement caching lets cursors be used without reparsing the
1385
+ server, statement caching lets cursors be used without re-parsing the
1311
1386
statement. This eliminates repetitive statement parsing and reduces
1312
1387
meta data transfer costs between the driver and the database. This
1313
1388
improve performance and scalability.
0 commit comments