Skip to content

feat: support disabling TLS verification for blob storage#2801

Open
bmorros94 wants to merge 2 commits into
TracecatHQ:mainfrom
bmorros94:feat/blob-storage-ssl-verify
Open

feat: support disabling TLS verification for blob storage#2801
bmorros94 wants to merge 2 commits into
TracecatHQ:mainfrom
bmorros94:feat/blob-storage-ssl-verify

Conversation

@bmorros94

@bmorros94 bmorros94 commented Jun 1, 2026

Copy link
Copy Markdown

Summary

Adds a TRACECAT__BLOB_STORAGE_SSL_VERIFY setting (default true) and threads it into both S3 client paths in get_storage_client(), so self-hosted, S3-compatible blob storage that terminates TLS with a self-signed or otherwise unverifiable certificate can be used.

Closes #2539.

Why

Self-hosted S3-compatible storage is sometimes served over an endpoint with a self-signed or absent TLS certificate. There was previously no way to disable certificate verification for the blob-storage client, so those deployments could not connect.

Changes

  • tracecat/config.py — new TRACECAT__BLOB_STORAGE_SSL_VERIFY (bool, default true), following the existing TRACECAT__BLOB_STORAGE_* convention.
  • tracecat/storage/blob.py — pass verify= to both session.client("s3", ...) calls (the custom-endpoint/MinIO path and the default AWS path).
  • .env.example — document the new variable.
  • tests/unit/test_storage_blob.py — update the two existing client tests for the new keyword argument, and add tests covering the disabled path on both branches.

Notes

  • Default is true, so existing behavior is unchanged.
  • I used TRACECAT__BLOB_STORAGE_SSL_VERIFY to match the existing TRACECAT__BLOB_STORAGE_* naming rather than the TRACECAT__S3_SSL_VERIFY suggested in the issue — happy to rename if you would prefer.

Summary by cubic

Adds a TLS verification toggle for blob storage via TRACECAT__BLOB_STORAGE_SSL_VERIFY (default true) and only overrides verification when disabled, so self-hosted S3/MinIO endpoints with self-signed certs can connect.

  • New Features
    • Pass verify= to both S3 client paths in get_storage_client() (custom endpoint and AWS).
    • Document TRACECAT__BLOB_STORAGE_SSL_VERIFY in .env.example; add tests for on/off.
    • Default behavior unchanged; set TRACECAT__BLOB_STORAGE_SSL_VERIFY=false to disable verification.

Written for commit a1b18f5. Summary will update on new commits.

Review in cubic

Adds TRACECAT__BLOB_STORAGE_SSL_VERIFY (default: true) and threads it into both S3 client paths in get_storage_client(), enabling self-hosted S3-compatible storage that terminates TLS with a self-signed or otherwise unverifiable certificate.

Closes TracecatHQ#2539
Copilot AI review requested due to automatic review settings June 1, 2026 20:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a configurable TLS verification flag for blob storage (S3/MinIO) clients, enabling self-hosted deployments with self-signed certificates to disable verification.

Changes:

  • New TRACECAT__BLOB_STORAGE_SSL_VERIFY config option (defaults to true)
  • Passes the verify argument to both MinIO and AWS S3 client paths in get_storage_client
  • Adds unit tests covering enabled/disabled states for both code paths

Reviewed changes

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

File Description
tracecat/config.py Defines the new SSL verify env-driven config flag.
tracecat/storage/blob.py Forwards the verify flag to the aioboto3 S3 client in both branches.
tests/unit/test_storage_blob.py Adds tests for SSL verify enabled/disabled on MinIO and S3 paths.
.env.example Documents the new env var with default true.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b8ad081fdf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tracecat/storage/blob.py Outdated
async with session.client(
"s3",
config=_STORAGE_CLIENT_CONFIG,
verify=config.TRACECAT__BLOB_STORAGE_SSL_VERIFY,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve AWS_CA_BUNDLE when TLS verification is enabled

When TRACECAT__BLOB_STORAGE_SSL_VERIFY is left at its default, this now passes verify=True explicitly instead of leaving botocore's verify argument as None. In botocore 1.40.61, Session.create_client only reads the configured ca_bundle/AWS_CA_BUNDLE when verify is None, so deployments that trust a private S3/MinIO CA via AWS_CA_BUNDLE will start failing TLS validation even though they did not opt out of verification. Please preserve the default None behavior and only pass False when verification is disabled, or otherwise thread through a bundle path.

Useful? React with 👍 / 👎.

@zeropath-ai

zeropath-ai Bot commented Jun 1, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to a1b18f5.

Security Overview
Detected Code Changes
Change Type Relevant files
Configuration changes ► .env.example
    Add TRACECAT__BLOB_STORAGE_SSL_VERIFY environment variable
► tracecat/config.py
    Define TRACECAT__BLOB_STORAGE_SSL_VERIFY configuration value
Enhancement ► tracecat/storage/blob.py
    Implement TRACECAT__BLOB_STORAGE_SSL_VERIFY logic for S3 client
► tests/unit/test_storage_blob.py
    Add tests for blob storage SSL verification

@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.

1 issue found across 4 files

Confidence score: 3/5

  • There is a concrete regression risk in tracecat/storage/blob.py: explicitly passing verify=True can bypass botocore’s CA bundle discovery (AWS_CA_BUNDLE / ca_bundle), which may break TLS validation in custom-cert environments.
  • Because this issue is medium severity (6/10) with high confidence (9/10) and is user-facing for affected deployments, this carries some merge risk rather than being a minor housekeeping concern.
  • This PR may still be mergeable with a follow-up, but it is safer to address the verify handling before release to avoid environment-specific connection failures.
  • Pay close attention to tracecat/storage/blob.py - verify=True may prevent botocore from honoring configured CA bundles.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread tracecat/storage/blob.py Outdated
Passing verify=True overrode botocore's default CA-bundle resolution
(AWS_CA_BUNDLE / the ca_bundle config). Pass verify=None in the default
case to preserve that discovery, and only force verify=False when
TRACECAT__BLOB_STORAGE_SSL_VERIFY is disabled. Tests updated to match.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a1b18f54f6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .env.example
TRACECAT__BLOB_STORAGE_MAX_ATTEMPTS=5
# Verify TLS certificates when connecting to blob storage (S3/MinIO).
# Set to false for self-hosted S3-compatible storage with self-signed/absent certs.
TRACECAT__BLOB_STORAGE_SSL_VERIFY=true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Pass the TLS toggle into Docker Compose services

When a self-hosted operator copies .env.example and sets this to false, the provided Compose deployments still won't pass it into the containers: the blob-storage environment blocks in docker-compose.yml enumerate the endpoint and bucket vars but omit this new key (e.g. lines 78-84, 156-162, 237-243, 306-312, and 428-434). Since Compose .env values are only used for interpolation unless listed in a service environment block, tracecat/config.py falls back to true and the new TLS-disabling option has no effect in the documented Docker Compose path. Please thread ${TRACECAT__BLOB_STORAGE_SSL_VERIFY:-true} through each service that talks to blob storage.

Useful? React with 👍 / 👎.

@frederick-baldo-ext frederick-baldo-ext left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sounds good

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.

Support s3 without ssl verification

3 participants