Skip to content

Add a native OCI Object Storage backend - #35

Merged
frostbyte73 merged 2 commits into
mainfrom
feat/oci-native-backend
Sep 24, 2026
Merged

frostbyte73 merged 2 commits into
mainfrom
feat/oci-native-backend

Conversation

@frostbyte73

Copy link
Copy Markdown
Member

OCI is reachable today only through s3.go as an S3-compatible endpoint,
which signs with SigV4 against a static Customer Secret Key and cannot
use an OKE workload principal. The native API can, so add a backend that
speaks it directly.

Credentials come from workload identity, explicit API-key fields, or the
SDK's default chain, in that order. The flag defaults to off, so nothing
changes for existing consumers. GeneratePresignedUrl maps onto a
pre-authenticated request, which differs from an S3 presigned URL in ways
the method documents.

OCI is reachable today only through s3.go as an S3-compatible endpoint,
which signs with SigV4 against a static Customer Secret Key and cannot
use an OKE workload principal. The native API can, so add a backend that
speaks it directly.

Credentials come from workload identity, explicit API-key fields, or the
SDK's default chain, in that order. The flag defaults to off, so nothing
changes for existing consumers. GeneratePresignedUrl maps onto a
pre-authenticated request, which differs from an S3 presigned URL in ways
the method documents.
Comment thread config/config.go
PrivateKey string `yaml:"private_key,omitempty"` // PEM contents, not a path
PrivateKeyPassphrase string `yaml:"private_key_passphrase,omitempty"`

UseWorkloadIdentity bool `yaml:"use_workload_identity,omitempty"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth dropping a comment here or elsewhere to remind people that using workload identity requires env vars such as OCI_RESOURCE_PRINCIPAL_VERSION and OCI_RESOURCE_PRINCIPAL_REGION. It's a pretty unintuitive design decision that has bitten me before.

The OCI SDK reads OCI_RESOURCE_PRINCIPAL_VERSION and
OCI_RESOURCE_PRINCIPAL_REGION from the environment when resolving a
workload identity principal, and fails construction if either is unset.
Nothing in the config surface hints at that, so setting the flag alone
looks sufficient and isn't.
@frostbyte73
frostbyte73 merged commit 4c13854 into main Sep 24, 2026
4 checks passed
@frostbyte73
frostbyte73 deleted the feat/oci-native-backend branch September 24, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants