Skip to content

feat(integrations): add OCI Object Storage - #7413

Open
BillLeoutsakosvl346 wants to merge 5 commits into
stagingfrom
investigate/oci-object-storage-integration
Open

feat(integrations): add OCI Object Storage#7413
BillLeoutsakosvl346 wants to merge 5 commits into
stagingfrom
investigate/oci-object-storage-integration

Conversation

@BillLeoutsakosvl346

@BillLeoutsakosvl346 BillLeoutsakosvl346 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a customer-connected OCI Object Storage block backed by Oracle's S3 Compatibility API and the existing AWS S3 SDK dependency.

  • Adds six v1 operations: list buckets, list objects, upload, download, inspect metadata, and delete.
  • Adds bespoke oci-object-storage-service-account credentials for Customer Secret Key access, storing encrypted access key, secret key, namespace, and region values.
  • Keeps the Oracle-compatible client provider-local, constructs only fixed public OC1 endpoints, forces path-style addressing, disables redirects, and does not modify the existing S3 integration.
  • Adds authorized bucket/object selectors, seven templates, six skills, generated docs/catalog/API/CLI metadata, and reuse of the existing Oracle oval mark.
  • Enforces a 100 MiB transfer limit, authorization before referenced-file reads, download preflight plus streaming bounds, sanitized provider errors, and strict provider binding.

OCI setup and permissions

Customers need an OCI Customer Secret Key, Object Storage namespace, and supported commercial OC1 region. The minimum intended IAM permissions are:

  • BUCKET_INSPECT
  • OBJECT_INSPECT
  • OBJECT_READ
  • OBJECT_CREATE / OBJECT_OVERWRITE
  • OBJECT_DELETE

Oracle references: S3 Compatibility API, Customer Secret Keys, and Object Storage IAM policies.

Validation

Passed after reconciling with the latest origin/staging:

  • App type checking, formatting, and lint checks
  • All 14 changed Vitest files / 195 tests after consolidating OCI v2 coverage into the shared credential route suite
  • Tool metadata, registry, request, parameter, client, and fork-boundary checks
  • Credential contract and API contract checks
  • Selector manifest and integration availability checks
  • Canvas sentence, icon, integration catalog, deployment config, docs, OpenAPI, and CLI generation checks
  • Generated OpenAPI validation: 7 specifications, 213 operations, 216 contracts; 3 test files / 146 tests
  • Canvas validation: 5,552 sentences across 344 blocks
  • Independent integration validation completed with no unresolved critical issues or warnings

git diff --check reports only the docs generator's existing output style in the new generated MDX file: one JSX trailing space and its terminal blank line. The docs generator consistency check passes.

Live smoke status

Not run: no disposable OCI tenant, bucket, and Customer Secret Key were available. This PR is being opened at the request of the author without claiming live OCI validation. A maintainer with a disposable OCI setup should run ListBuckets → ListObjects → PutObject → HeadObject → GetObject/byte-compare → DeleteObject → verify absence before treating the integration as production-verified.

Deferred from v1

Bucket administration, copy, multipart upload, pre-authenticated requests, versioning, and triggers are intentionally deferred. Zero-byte canonical file downloads remain subject to the shared FileToolProcessor behavior rather than adding a provider-specific bypass.

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Sep 2, 2026 9:13pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds an OCI Object Storage integration backed by Oracle’s S3 Compatibility API, including customer-managed credentials and six workflow operations.

  • Registers the OCI block, tools, selectors, catalog metadata, generated API metadata, documentation, and icon mappings.
  • Adds credential creation and rotation with encrypted Customer Secret Key storage and provider validation.
  • Implements bounded bucket listing, uploads, preflighted downloads, metadata inspection, deletion, fixed public endpoints, and sanitized provider errors.
  • Adds focused tests for credential contracts, request serialization, authorization, transfer limits, selectors, and operation outputs.

Confidence Score: 5/5

The PR appears safe to merge based on the reviewed changes, with no concrete blocking or independently actionable non-blocking issue established.

The integration keeps credential resolution server-controlled, validates and encrypts provider-specific secrets, confines requests to fixed OCI endpoints, bounds transfer paths, and aligns its block, tools, selectors, contracts, and generated metadata.

Important Files Changed

Filename Overview
apps/sim/lib/internal/oci-object-storage/client.ts Adds the fixed-endpoint S3-compatible client, OCI response normalization, bounded bucket listings, retry configuration, and client cleanup.
apps/sim/lib/internal/oci-object-storage/operations.ts Implements the six provider operations with file authorization, transfer limits, download preflight, streaming bounds, and normalized outputs.
apps/sim/lib/credentials/oci-object-storage-service-account.ts Adds OCI credential normalization, live verification, encrypted-secret parsing, strict provider binding, and display identity handling.
apps/sim/lib/credentials/orchestration/index.ts Extends credential rotation orchestration to rebuild and atomically replace OCI service-account secrets.
apps/sim/blocks/blocks/oci_object_storage.ts Defines the OCI workflow block, six operations, selectors, parameter mapping, outputs, templates, and skills.
apps/sim/lib/selectors/server/providers/oci-object-storage.ts Adds authorized bucket and object selectors backed by the provider-local OCI client.
apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal/connect-service-account-modal.tsx Adds the OCI Customer Secret Key connection and reconnection form with required-field validation and secret-safe error handling.

Sequence Diagram

sequenceDiagram
  participant User as Workflow user
  participant Exec as Tool execution boundary
  participant Cred as Credential service
  participant OCI as OCI S3-compatible endpoint
  participant Files as Sim file storage

  User->>Exec: Invoke OCI operation with credential reference
  Exec->>Cred: Resolve authorized encrypted credential
  Cred-->>Exec: Access key, secret, namespace, region
  Exec->>OCI: Signed S3-compatible request
  alt Upload from Sim file
    Exec->>Files: Authorize and read bounded file
    Files-->>Exec: File bytes and content type
    Exec->>OCI: PutObject
  else Download object
    Exec->>OCI: HeadObject preflight
    OCI-->>Exec: Size and metadata
    Exec->>OCI: GetObject
    OCI-->>Exec: Bounded object stream
    Exec-->>User: Canonical file output and metadata
  else List, inspect, or delete
    OCI-->>Exec: Normalized operation result
  end
Loading

Reviews (1): Last reviewed commit: "feat(integrations): add OCI Object Stora..." | Re-trigger Greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 issues found across 64 files

Confidence score: 4/5

  • apps/sim/lib/internal/oci-object-storage/execute-tool.ts logs terminal provider or credential failures at warn, which can hide actionable OCI operation failures at normal log thresholds; log these failures at error.
  • apps/sim/lib/internal/oci-object-storage/operations.test.ts does not track _attempts, so the upload test could pass despite unintended retries and fail to catch extra writes; record the attempt count and assert it is 1.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/lib/internal/oci-object-storage/operations.test.ts">

<violation number="1" location="apps/sim/lib/internal/oci-object-storage/operations.test.ts:33">
P2: The upload test cannot detect a regression from one write attempt to three retries because this mock ignores `_attempts`. Record the attempt count and assert `1` for the upload path.</violation>
</file>

<file name="apps/sim/lib/internal/oci-object-storage/execute-tool.ts">

<violation number="1" location="apps/sim/lib/internal/oci-object-storage/execute-tool.ts:95">
P2: Every provider or credential failure caught here stops the operation but is logged at `warn`, hiding actionable failures at normal log thresholds. Log terminal OCI operation failures at `error`.

(Based on your team's feedback about operational log severity.)</violation>
</file>

Re-trigger cubic

Comment thread apps/sim/lib/internal/oci-object-storage/operations.test.ts Outdated
Comment thread apps/sim/lib/credentials/orchestration/index.test.ts
Comment thread apps/sim/lib/internal/oci-object-storage/errors.ts Outdated
Comment thread apps/sim/lib/credentials/oci-object-storage-service-account.test.ts
} catch (error) {
request.signal?.throwIfAborted()
const normalized = normalizeOciObjectStorageError(error)
logger.warn('OCI Object Storage operation failed', {

@cubic-dev-ai cubic-dev-ai Bot Sep 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Every provider or credential failure caught here stops the operation but is logged at warn, hiding actionable failures at normal log thresholds. Log terminal OCI operation failures at error.

(Based on your team's feedback about operational log severity.)

View Feedback

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/sim/lib/internal/oci-object-storage/execute-tool.ts, line 95:

<comment>Every provider or credential failure caught here stops the operation but is logged at `warn`, hiding actionable failures at normal log thresholds. Log terminal OCI operation failures at `error`.

(Based on your team's feedback about operational log severity.) </comment>

<file context>
@@ -0,0 +1,105 @@
+  } catch (error) {
+    request.signal?.throwIfAborted()
+    const normalized = normalizeOciObjectStorageError(error)
+    logger.warn('OCI Object Storage operation failed', {
+      requestId: request.requestId,
+      toolId: request.toolId,
</file context>
Fix with cubic

Comment thread apps/sim/lib/internal/oci-object-storage/execute-tool.ts Outdated
Comment thread apps/sim/lib/internal/oci-object-storage/schema.ts Outdated
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

Addressed the Cubic review in dc1ab88756:

  1. Headless inline uploads: inline-content uploads now work without a user ID. Referenced-file uploads still require an authorized actor, prefer the delegated subject user when present, return 401 without one, and do not read the file first.
  2. Null-safe provider errors: null and undefined rejections now normalize to sanitized 500 responses instead of throwing during error normalization.
  3. Cleared reconnect descriptions: reconnect sends description: null when the field is cleared; create continues to use undefined when the description is omitted.
  4. Blank maxKeys: null, empty, and whitespace-only values normalize to the documented default of 100 before coercion.
  5. Retry assertions: operation tests now verify three attempts for representative reads and one attempt for uploads and deletes.
  6. Custom-label rotation coverage: the test now asserts a successful result, encrypted-secret persistence, and that no display-name update occurs.
  7. Connection validation coverage: the provider test now asserts validation sends a ListBucketsCommand.
  8. Logging severity: normalized upstream/5xx failures log at error; expected 4xx authentication, permission, validation, size, and not-found failures remain at warn. This keeps actionable server failures prominent without treating normal user-caused responses as application errors.

Validation after the changes:

  • All 14 changed Vitest files: 195 tests passed
  • App type-check passed
  • Formatting and lint checks passed
  • All 45 repository audits passed
  • git diff --check passed for this fix commit

Live OCI smoke testing remains unavailable because no disposable OCI tenant, bucket, or Customer Secret Key is available; the PR does not claim live verification.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic please re-review the latest commit.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic please re-review the latest commit.

@BillLeoutsakosvl346 Incremental reviews are turned off for this repository. Comment @cubic review to run a full review.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic review

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

…ject-storage-integration

# Conflicts:
#	apps/sim/tools/generated/tool-metadata.ts
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

Final head is now dc11784a05, including the latest origin/staging reconciliation. The only conflict was generated tool metadata; it was resolved by running the repository generator. The 195 tests, type-check, format, lint, all 45 audits, and diff checks were rerun successfully on the reconciled tree.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic review

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 64 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant