Skip to content

[backend] Configure proxy on AWS SDK (#14703)#14733

Merged
richard-julien merged 2 commits intomasterfrom
issue/14703-aws-sdk-proxy
Mar 4, 2026
Merged

[backend] Configure proxy on AWS SDK (#14703)#14733
richard-julien merged 2 commits intomasterfrom
issue/14703-aws-sdk-proxy

Conversation

@xfournet
Copy link
Member

@xfournet xfournet commented Mar 3, 2026

Proposed changes

  • use aws-sdk-v3-proxy to configure AWS clients with proxies
  • activate only if aws:proxy_enabled / AWS__PROXY_ENABLED is set to true

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case (coverage and e2e)
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

@xfournet xfournet requested a review from Copilot March 3, 2026 12:18
@xfournet xfournet self-assigned this Mar 3, 2026
@xfournet xfournet added feature use for describing a new feature to develop filigran team use to identify PR from the Filigran team labels Mar 3, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds AWS SDK v3 proxy support to the GraphQL backend so AWS-backed integrations (S3/STS usage) can be routed through configured HTTP(S) proxies.

Changes:

  • Add aws-sdk-v3-proxy dependency.
  • Introduce src/utils/awsSdk.ts helper to apply proxy settings to AWS clients and STS role assumers.
  • Wire proxy-aware AWS setup into S3 file storage and OpenSearch AWS credential flow.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
opencti-platform/opencti-graphql/package.json Adds aws-sdk-v3-proxy dependency.
opencti-platform/opencti-graphql/yarn.lock Locks new dependency tree for aws-sdk-v3-proxy and related Smithy packages.
opencti-platform/opencti-graphql/src/utils/awsSdk.ts New utility to apply proxy configuration to AWS SDK clients / STS role assumer.
opencti-platform/opencti-graphql/src/database/raw-file-storage.ts Wraps S3 client initialization to apply proxy settings; uses proxy-aware role assumer.
opencti-platform/opencti-graphql/src/database/engine.ts Uses proxy-aware role assumer for OpenSearch AWS SigV4 credential resolution.

@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 48.14815% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.22%. Comparing base (820a5b0) to head (45219f5).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...encti-platform/opencti-graphql/src/utils/awsSdk.ts 45.45% 12 Missing ⚠️
...ti-platform/opencti-graphql/src/database/engine.ts 50.00% 1 Missing ⚠️
...m/opencti-graphql/src/database/raw-file-storage.ts 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14733      +/-   ##
==========================================
- Coverage   32.36%   32.22%   -0.14%     
==========================================
  Files        3107     3108       +1     
  Lines      211587   211607      +20     
  Branches    38362    38330      -32     
==========================================
- Hits        68472    68185     -287     
- Misses     143115   143422     +307     
Flag Coverage Δ
opencti-client-python 45.48% <ø> (ø)
opencti-front 2.82% <ø> (ø)
opencti-graphql 67.33% <48.14%> (-0.34%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 7 comments.

@xfournet xfournet force-pushed the issue/14703-aws-sdk-proxy branch from 38d2f36 to 193331c Compare March 3, 2026 18:48
@xfournet xfournet marked this pull request as ready for review March 3, 2026 18:50
@xfournet xfournet requested a review from Copilot March 3, 2026 18:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@xfournet xfournet force-pushed the issue/14703-aws-sdk-proxy branch 3 times, most recently from c2a7705 to 0870633 Compare March 4, 2026 19:51
@xfournet xfournet requested a review from Copilot March 4, 2026 19:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated no new comments.

@xfournet xfournet force-pushed the issue/14703-aws-sdk-proxy branch from 0870633 to 45219f5 Compare March 4, 2026 20:20
@richard-julien richard-julien merged commit d462af1 into master Mar 4, 2026
34 of 36 checks passed
@richard-julien richard-julien deleted the issue/14703-aws-sdk-proxy branch March 4, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature use for describing a new feature to develop filigran team use to identify PR from the Filigran team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AWS SDK proxy support

3 participants