Property AuthorizationProvider
AuthorizationProvider
Gets or sets the authorization provider.
Declaration
public IAuthorizationProvider AuthorizationProvider { get; set; }
Property Value
Type | Description |
---|---|
IAuthorizationProvider | The authorization provider. The default depends on the value of ServiceType as described in the remarks section. |
Remarks
The type of the authorization depends on the ServiceType that you are using. In particular:
- For Oracle NoSQL Cloud Service, set this property to an instance of IAMAuthorizationProvider.
- For on-premise Oracle NoSQL Database in secure mode, set this property to an instance of KVStoreAuthorizationProvider.
- For the Cloud Simulator or non-secure on-premise NoSQL Database, there is no authorization and this property should not be set.
If this property is not set, the driver will use default authorization provider depending on the value of ServiceType:
- For Cloud, the driver will use an instance of IAMAuthorizationProvider with default parameters. This instance will obtain credentials stored in the default OCI configuration file with the default profile. See IAuthorizationProvider for more information.
- For CloudSim no authorization is required.
- For KVStore, the driver will assume non-secure kvstore and thus no authorization required. For the secure kvstore there is no default and you must provide the authorization provider.
When using JSON configuration file, you can specify an instance of IAMAuthorizationProvider or KVStoreAuthorizationProvider by specifying a JSON object that includes the following fields:
- Set the field AuthorizationType to either IAM or KVStore respectively (the value is case-insensitive).
- Set any other fields describing properties of IAMAuthorizationProvider or KVStoreAuthorizationProvider.
Examples
Specifying AuthorizationProvider in JSON configuration.{
"Region": "US_ASHBURN_1",
...
"AuthorizationProvider": {
"AuthorizationType": "IAM",
"Credentials": {
"TenantId": "ocid1.tenancy.oc...................",
"UserId": "ocid1.user.oc.....................",
...
}
}
...
}