24. Extending node-oracledb

Added in version 6.8.

You can extend the functionalities of node-oracledb by using plugins. The plugins provided by node-oracledb are listed in this section.

24.1. Cloud Native Authentication Plugins

Added in version 6.8.

Node-oracledb provides pre-supplied plugins for cloud native authentication which are listed in this section. These plugins enable token generation using the Software Development Kit (SDK) of the respective token-authentication method.

The cloud native authentication token plugin implementation is available in the plugins/token directory of the node-oracledb package.

To load these node-oracledb plugins in your application, use require('oracledb/plugins/token/<name of plugin>'), for example:

require('oracledb/plugins/token/extensionOci');

24.1.1. Oracle Cloud Infrastructure (OCI) Cloud Native Authentication Plugin

Node-oracledb’s extensionOci plugin enables token generation using OCI Software Development Kit (SDK) when authenticating with IAM token-based authentication.

The extensionOci plugin is available as part of the plugins/token directory in the node-oracledb package. This plugin requires the minimum Node.js version supported by OCI SDK.

Adding this plugin to your code defines and registers a built-in hook function that generates IAM tokens. This function is internally invoked when the tokenAuthConfigOci property is specified in the oracledb.getConnection() or oracledb.createPool().

See Cloud Native Authentication with the extensionOci Plugin for more information.

24.1.2. Azure Cloud Native Authentication Plugin

Node-oracledb’s extensionAzure plugin enables token generation using Azure Software Development Kit (SDK) when authenticating with OAuth 2.0 token-based authentication.

The extensionAzure plugin implementation is available as part of the plugins/token directory in the node-oracledb package. This plugin requires the minimum Node.js version supported by Azure SDK.

Adding this plugin to your code defines and registers a built-in hook function that generates OAuth 2.0 tokens. This function is internally invoked when the tokenAuthConfigAzure property is specified in the oracledb.getConnection() or oracledb.createPool().

See Cloud Native Authentication with the extensionAzure Plugin for more information.

24.2. Centralized Configuration Provider Plugins

Added in version 6.9.

Node-oracledb provides pre-supplied plugins for centralized configuration providers which are listed in this section. These plugins provide access to database connection credentials and application configuration information stored in a centralized configuration provider.

The centralized configuration provider plugin implementation is available in the plugins/configProviders directory of the node-oracledb package.

To load these node-oracledb plugins in your application, use require('oracledb/plugins/configProviders/<name of plugin>'), for example:

require('oracledb/plugins/configProviders/ociobject');

24.2.1. OCI Object Storage Centralized Configuration Provider Plugin

Added in version 6.9.

ociobject is a plugin that can be loaded in your application to provide access to configuration information stored in Oracle Cloud Infrastructure (OCI) Object Storage.

This plugin is implemented as a centralized configuration provider hook function to handle connection strings which have the prefix config-ociobject, see OCI Object Storage connection strings.

To load the ociobject plugin in your application, use:

require('oracledb/plugins/configProviders/ociobject');

See Using an OCI Object Storage Centralized Configuration Provider for more information.

24.2.2. OCI Vault Centralized Configuration Provider Plugin

Added in version 6.9.

ocivault is a plugin that can be loaded in your application to provide access to configuration information stored in Oracle Cloud Infrastructure (OCI) Vault.

This plugin is implemented as a centralized configuration provider hook function to handle connection strings which have the prefix config-ocivault, see OCI Vault connection strings.

To load the ocivault plugin in your application, use:

require('oracledb/plugins/configProviders/ocivault');

See Using an OCI Vault Centralized Configuration Provider for more information.

24.2.3. Microsoft Azure App Centralized Configuration Provider Plugin

Added in version 6.9.

azure is a plugin that can be loaded in your application to provide access to configuration information stored in Azure App Configuration.

This plugin is implemented as a centralized configuration provider hook function to handle connection strings which have the prefix config-azure, see Azure App Configuration connection strings.

To load the azure plugin in your application, use:

require('oracledb/plugins/configProviders/azure');

See Using an Azure App Centralized Configuration Provider for more information.

24.2.4. Microsoft Azure Key Vault Centralized Configuration Provider Plugin

Added in version 6.9.

azurevault is a plugin that can be loaded in your application to provide access to configuration information stored in Azure Key Vault.

This plugin is implemented as a centralized configuration provider hook function to handle connection strings which have the prefix config-azurevault, see Azure Key Vault connection strings.

To load the azurevault plugin in your application, use:

require('oracledb/plugins/configProviders/azurevault');

See Using an Azure Key Vault Centralized Configuration Provider for more information.

24.2.5. Amazon Simple Storage Service (S3) Centralized Configuration Provider Plugin

Added in version 7.0.

awss3 is a plugin that can be loaded in your application to provide access to configuration information stored in AWS S3.

This plugin is implemented as a centralized configuration provider hook function to handle connection strings which have the prefix config-awss3, see Amazon S3 connection strings.

To load the awss3 plugin in your application, use:

require('oracledb/plugins/configProviders/awss3');

See Using an Amazon Web Service (AWS) Simple Storage Service (S3) Centralized Configuration Provider for more information.

24.2.6. AWS Secrets Manager Centralized Configuration Provider Plugin

Added in version 7.0.

awssecretsmanager is a plugin that can be loaded in your application to provide access to configuration information stored in AWS Secrets Manager.

This plugin is implemented as a centralized configuration provider hook function to handle connection strings which have the prefix config-awssecretsmanager, see AWS Secrets Manager connection strings.

To load the awssecretsmanager plugin in your application, use:

require('oracledb/plugins/configProviders/awssecretsmanager');

See Using an AWS Secrets Manager Centralized Configuration Provider for more information.