8.3.2.6 Step 5: Use a Connect Identifier Containing OCI Object Storage Values

Use the Oracle Cloud Infrastructure (OCI) Object Storage server name, key path, and authentication parameters in a database client connection identifier.

Syntax:
config-ociobject://objectstorage-server-name/n/{namespaceName}/b/{bucketName}/o/{objectName}/[c/{networkServiceName}]?[option1=value1&option2=value2...]

The syntax details are:

Syntax Element Description

config-ociobject:// objectstorage-server-name

Server name of your OCI Object Storage. This is the URL Path (URI) value given on the Object Details page in the OCI console.

Specify this value without the https:// prefix.

n/{namespaceName}

OCI Object Storage namespace where you have stored the JSON file.

b/{bucketName}

OCI Object Storage bucket name where you have stored the JSON file.

o/{objectName}

JSON file to look up and resolve a network service name.

c/{networkServiceName}

Network service name if the JSON file contains two or more network service names.

option=value

Both the authentication method and corresponding authentication parameters to access your Centralized Configuration Provider.

Authentication method:

Use the AUTHENTICATION parameter to set one of the following authentication methods:

  • For OCI API Key: AUTHENTICATION=OCI_DEFAULT

    Note: This is the default setting, which means that the OCI API Key authentication method is implied by default and you do not need to explicitly specify the AUTHENTICATION parameter. In this case, you can omit this setting.

  • For OCI Instance Principal: AUTHENTICATION=OCI_INSTANCE_PRINCIPAL

  • For OCI Resource Principal: AUTHENTICATION=OCI_RESOURCE_PRINCIPAL

For detailed information on these authentication methods, see AUTHENTICATION.

Authentication parameters:

Set authentication parameters corresponding to your chosen authentication method:

  • If using the default OCI API Key authentication method, then set authentication parameters such as OCI_TENANCY, OCI_USER, OCI_FINGERPRINT, or OCI_KEY_FILE. See Authentication Parameters for OCI Object Storage.

  • If using the OCI Instance Principal or the OCI Resource Principal authentication method, then you do not need to set any authentication parameter.

Examples:

Let us look at some examples on how to specify a connect identifier string with different values:

  • Database credentials specified in the string:
    sqlplus dbuser/@"config-ociobject://objectstorage.us-region-1.example.com/n/myappnamespace/b/dbclientapps/o/sales.json?oci_tenancy=ocid1.tenancy.oc1..aaabbb1234aaabbb&oci_user=ocid1.user.oc1..ababab12121212&oci_fingerprint=a1:bc:a1:1a:12:a1:a2:b1:b2:1b&oci_key_file=//app/mykey.pem"
  • Database credentials stored in OCI Vault:

    The vault reference is configured in the sales.json file:
    sqlplus /@"config-ociobject://objectstorage.us-region-1.example.com/n/myappnamespace/b/dbclientapps/o/sales.json?oci_tenancy=ocid1.tenancy.oc1..aaabbb1234aaabbb&oci_user=ocid1.user.oc1..ababab12121212&oci_fingerprint=a1:bc:a1:1a:12:a1:a2:b1:b2:1b&oci_key_file=//app/mykey.pem"
  • Network service name specified in the JSON file:

    A network service name is given (as c/hr) to indicate a specific name among many network service names in the multi.json file:
    sqlplus dbuser/@"config-ociobject://objectstorage.us-region-1.example.com/n/myappnamespace/b/dbclientapps/o/multi.json/c/hr?oci_tenancy=ocid1.tenancy.oc1..aaabbb1234aaabbb&oci_user=ocid1.user.oc1..ababab12121212&oci_fingerprint=a1:bc:a1:1a:12:a1:a2:b1:b2:1b&oci_key_file=//app/mykey.pem"
  • With the default OCI API Key authentication:

    Here, the AUTHENTICATION=OCI_DEFAULT setting is omitted. Authentication method for the default flow is implicit, so only the API key-related values are specified using the OCI_TENANCY, OCI_USER, OCI_FINGERPRINT, and OCI_KEY_FILE authentication parameters.

    sqlplus dbuser/@"config-ociobject://objectstorage.us-region-1.example.com/n/myappnamespace/b/dbclientapps/o/sales.json?oci_tenancy=ocid1.tenancy.oc1..aaabbb1234aaabbb&oci_user=ocid1.user.oc1..ababab12121212&oci_fingerprint=a1:bc:a1:1a:12:a1:a2:b1:b2:1b&oci_key_file=//app/mykey.pem"
  • With the OCI Instance Principal authentication:
    sqlplus dbuser/@"config-ociobject://objectstorage.us-region-1.example.com/n/myappnamespace/b/dbclientapps/o/multi.json/c/sales?authentication=oci_instance_principal"
  • With the OCI Resource Principal authentication:
    sqlplus dbuser/@"config-ociobject://objectstorage.us-region-1.example.com/n/myappnamespace/b/dbclientapps/o/multi.json/c/sales?authentication=oci_resource_principal"