OCI Object Storage

Configuration for the OCI Object Storage Binary Store component

The OCI Object Storage Binary Store stores each file as an object in the configured bucket. The component is alpha.

Component format

The following example authenticates using an OCI configuration file:

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: oci-files
spec:
  type: binarystore.oci.objectstorage
  version: v1
  metadata:
  - name: configFileAuthentication
    value: "true"
  - name: configFilePath
    value: "/home/app/.oci/config"
  - name: configFileProfile
    value: "DEFAULT"
  - name: bucketName
    value: "binary-files"
  - name: compartmentOCID
    value: "<COMPARTMENT_OCID>"
  - name: namespace
    value: "<OBJECT_STORAGE_NAMESPACE>"

The configuration file must be available at the specified path inside the sidecar’s environment. Protect credentials in the file using your deployment’s secret-management practices.

Authentication

The component supports three authentication methods:

  • API key: provide region, userOCID, fingerPrint, privateKey, and tenancyOCID.
  • Instance principal: set instancePrincipalAuthentication to "true" and grant the compute instance’s dynamic group the required Object Storage permissions.
  • Configuration file: set configFileAuthentication to "true" and provide configFilePath. Optionally select a profile with configFileProfile.

Only configure one authentication method for a component. For details, see the OCI documentation for instance principals and SDK configuration files.

Spec metadata fields

FieldRequiredDetailsExample
bucketNameYName of the OCI Object Storage bucket."binary-files"
compartmentOCIDYOCID of the compartment containing the bucket."ocid1.compartment.oc1..example"
namespaceNOCI Object Storage namespace. If omitted, the component resolves it from the tenancy."my-namespace"
prefixNPrefix prepended to each file name. If configured, it must not start with /."uploads"
partSizeNMultipart upload part size, specified as a byte count or byte-size string. Defaults to 16Mi; must be between 10 MiB and 50 GiB. OCI limits uploads to 10,000 parts; larger parts can increase the maximum upload size (up to 10 TiB) but use more memory per in-flight upload."64Mi"
regionY for API key authenticationOCI region where the bucket is located."us-ashburn-1"
userOCIDY for API key authenticationOCID of the OCI user."ocid1.user.oc1..example"
fingerPrintY for API key authenticationFingerprint of the API key."xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
privateKeyY for API key authenticationPrivate key for API authentication. Treat this value as a secret."<PRIVATE_KEY>"
tenancyOCIDY for API key authenticationOCID of the tenancy."ocid1.tenancy.oc1..example"
instancePrincipalAuthenticationY when using instance principalSet to "true" to use instance principal authentication. Defaults to "false"."true"
configFileAuthenticationY when using a configuration fileSet to "true" to use configuration file authentication. Defaults to "false"."true"
configFilePathY when using a configuration fileAbsolute path to the OCI configuration file."/home/app/.oci/config"
configFileProfileNOptional profile name in the configuration file. The metadata default is empty; use "DEFAULT" to select that profile explicitly."DEFAULT"

Size values can be provided as a string containing the number of bytes (for example, "16777216") or as a size with a unit such as "16Mi".