ConfigurationProviders

This property enables one or more centralized configuration providers.

Declaration

// C#
public static string ConfigurationProviders { get; set; }

Property Type

System.String

Exception

Remarks

This property allows applications to enforce restrictions on which providers can be used.

Table 36 ConfigurationProviders Values

Value Description
All Enables all configuration providers. This is the default value.
None Disables all configuration providers
AwsS3 Enables Amazon Web Services (AWS) Simple Storage Service (S3) configuration provider
AwsSecretsManager Enables AWS Secrets Manager configuration provider
Azure Enables Azure App configuration provider
AzureVault Enables Azure Vault Configuration provider
GcpStorage Enables Google Cloud Platform (GCP) Cloud Storage configuration provider
GcpSecretManager Enables GCP Secret Manager configuration provider
OCIObject Enables Oracle Cloud Infrastructure (OCI) configuration provider
OCIVault Enables OCI Vault configuration provider
File Enable local file provider

The values are case-insensitive.

These values must be set prior to opening a connection with a centralized configuration provider. They cannot be modified after a connection is opened. The values are not verified until a URL is used upon the connection open.

Any combination of configuration providers can be enabled.

OracleConfiguration.ConfigurationProviders = "File, OCIObject";

Optionally, the list of providers can be enclosed in parentheses. For example, the following code sample enables Azure App configuration provider and OCI Configuration provider.

OracleConfiguration.ConfigurationProviders = "(Azure, OCIObject)";

Duplicate values are ignored, such as (Azure, OCIObject, Azure), and do not create an exception.

Using None in a list with other providers throws an exception, such as (All, None) or (None, OCIVault).

Setting the value to empty parentheses () will be the same as using None. However, using an empty string is invalid, and will result in an error when the value is verified.

Using All in a list with other providers enables all providers, such as (File, Azure, All).

For JSON-based providers, the providers used within the JSON config must also be enabled. For example, if the file provider uses an OCI Vault URL to store the password, both File and OCIVault must be enabled.

This setting can also be used in sqlnet.ora or .NET configuration file. The precedence order, from highest to lowest, is:

  1. OracleConfiguration.ConfigurationParameters

  2. .NET Config

  3. sqlnet.ora

Alternatively, instead of using a string value, use the OracleConfigurationProvider enumeration and bitwise the enums to enable multiple providers. Only OracleConfiguration ConfigurationProviders property allows this. Sqlnet.ora CONFIGURATION_PROVIDERS and .NET configuration file ConfigurationProviders do not support using this enumeration. They only support string values. Here is a code sample using ConfigurationProviders to enable the Azure App Configuration, OCI Object, and Azure Vault providers.

OracleConfiguration.ConfigurationProviders = OracleConfigurationProvider.Azure |
OracleConfigurationProvider.OCIObject | OracleConfigurationProvider.AzureVault;
  <div class="infoboxnote" markdown="1">



  **See Also:**



  - "[Oracle.DataAccess.Client and Oracle.ManagedDataAccess.Client Namespaces](intro003.html#GUID-2A5A5F0B-E6C9-45AF-9477-FBD55F7FCDC5)"



  - [OracleConfiguration Class](OracleConfigurationClass.html#GUID-F1F71D03-CBB8-4173-A883-0878DA84D11A)



  - [OracleConfiguration Members](OracleConfigurationMembers.html#GUID-1E7847C9-8B76-4F9A-A0BD-6579C13562AF)



  </div>