@@ -135,6 +135,7 @@ limitations under the License.
135
135
- 8.3.4 [ Connection Pool Pinging] ( #connpoolpinging )
136
136
- 8.4 [ Database Resident Connection Pooling (DRCP)] ( #drcp )
137
137
- 8.5 [ External Authentication] ( #extauth )
138
+ - 8.6 [ Securely Encrypting Network Traffic to Oracle Database] ( #securenetwork )
138
139
9 . [ SQL Execution] ( #sqlexecution )
139
140
- 9.1 [ SELECT Statements] ( #select )
140
141
- 9.1.1 [ Fetching Rows] ( #fetchingrows )
@@ -3130,6 +3131,75 @@ of open connections exceeds `poolMin` and connections are idle for
3130
3131
more than the [` poolTimeout` ](#propdbpooltimeout) seconds, then the
3131
3132
number of open connections does not fall below ` poolMin` .
3132
3133
3134
+ ### <a name="securenetwork"></a> 8.6 Securely Encrypting Network Traffic to Oracle Database
3135
+
3136
+ Data transferred between Oracle Database and the Oracle client
3137
+ libraries used by node-oracledb can be
3138
+ [encrypted](http://docs.oracle.com/database/122/DBSEG/configuring-network-data-encryption-and-integrity.htm#DBSEG020)
3139
+ so that unauthorized parties are not able to view plain text data as
3140
+ it passes over the network. The easiest configuration is Oracle's
3141
+ native network encryption. The standard SSL protocol can also be used
3142
+ if you have a PKI, but setup is necessarily more involved.
3143
+
3144
+ With native network encryption, the client and database server
3145
+ negotiate a key using Diffie-Hellman key exchange. There is
3146
+ protection against man-in-the-middle attacks.
3147
+
3148
+ Native network encryption can be configured by editing Oracle Net's
3149
+ ` sqlnet .ora ` configuration files, on either the database server
3150
+ and/or on each node-oracledb 'client'. Parameters control whether
3151
+ data integrity checking and encryption is required or just allowed,
3152
+ and which algorithms the client and server should consider for use.
3153
+
3154
+ As an example, to ensure all connections to the database are checked
3155
+ for integrity and are also encrypted, create or edit the Oracle
3156
+ Database ` $ORACLE_HOME / network/ admin/ sqlnet .ora ` file. Set the
3157
+ checksum negotiation to always validate a checksum and set the
3158
+ checksum type to your desired value. The network encryption settings
3159
+ can similarly be set. For example, to use the SHA512 checksum and
3160
+ AES256 encryption use:
3161
+
3162
+ ` ` `
3163
+ SQLNET .CRYPTO_CHECKSUM_SERVER = required
3164
+ SQLNET .CRYPTO_CHECKSUM_TYPES_SERVER = (SHA512 )
3165
+ SQLNET .ENCRYPTION_SERVER = required
3166
+ SQLNET .ENCRYPTION_TYPES_SERVER = (AES256 )
3167
+ ` ` `
3168
+
3169
+ If you definitely know that the database server enforces integrity and
3170
+ encryption, then you do not need to configure Node.js separately.
3171
+ However you can also, or alternatively, do so depending on your
3172
+ business needs. To do this, before starting each Node.js process, set
3173
+ the environment variable ` TNS_ADMIN ` to your application configuration
3174
+ directory and create the file ` $TNS_ADMIN / sqlnet .ora ` :
3175
+
3176
+ ` ` `
3177
+ SQLNET .CRYPTO_CHECKSUM_CLIENT = required
3178
+ SQLNET .CRYPTO_CHECKSUM_TYPES_CLIENT = (SHA512 )
3179
+ SQLNET .ENCRYPTION_CLIENT = required
3180
+ SQLNET .ENCRYPTION_TYPES_CLIENT = (AES256 )
3181
+ ` ` `
3182
+
3183
+ The client and server sides can negoiate the protocols used if the
3184
+ settings indicate more than one value is accepted.
3185
+
3186
+ Note these are example settings only. You must review your security
3187
+ requirements and read the documentation for your Oracle version. In
3188
+ particular review the available algorithms for security and
3189
+ performance.
3190
+
3191
+ The ` NETWORK_SERVICE_BANNER ` column of the database view
3192
+ [` V$SESSION_CONNECT_INFO ` ](https://docs.oracle.com/database/122/REFRN/V-SESSION_CONNECT_INFO.htm#REFRN30224)
3193
+ can be used to verify the encryption status of a connection.
3194
+
3195
+ For more information about Oracle Data Network Encryption and
3196
+ Integrity, and for information about configuring SSL network
3197
+ encryption, refer to the [Oracle Database Security
3198
+ Guide](http://docs.oracle.com/database/122/DBSEG/toc.htm). This
3199
+ manual also contains information about other important security
3200
+ features that Oracle Database provides, such Transparent Data
3201
+ Encryption of data-at-rest in the database.
3202
+
3133
3203
## <a name="sqlexecution"></a> 9. SQL Execution
3134
3204
3135
3205
A SQL or PL/SQL statement may be executed using the *Connection*
0 commit comments