Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

Conversation

@sgbalogh
Copy link
Member

@sgbalogh sgbalogh commented Jan 27, 2026

Config option to disable SSL certificate verification.

Name inspired by the corresponding git config override: https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpsslVerify

@sgbalogh sgbalogh marked this pull request as ready for review January 27, 2026 00:50
@sgbalogh sgbalogh requested a review from a team as a code owner January 27, 2026 00:50
@greptile-apps
Copy link

greptile-apps bot commented Jan 27, 2026

Greptile Overview

Greptile Summary

This PR adds an S2_SSL_NO_VERIFY configuration option to disable SSL certificate verification, following the naming convention from git's http.sslVerify config.

  • Added ssl_no_verify: Option<bool> field to CliConfig struct
  • Added SslNoVerify variant to ConfigKey enum for config management
  • Implemented get/set/unset operations for the new config key with proper boolean parsing
  • Integrated with SDK by calling with_insecure_skip_cert_verification(true) when enabled
  • Added security warning via tracing::warn! when SSL verification is disabled
  • Bumped s2-sdk to version 0.23.1 which provides the with_insecure_skip_cert_verification method

The implementation is consistent with existing config options and includes appropriate security warnings. The feature can be configured via config file or S2_SSL_NO_VERIFY environment variable.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The implementation follows established patterns in the codebase, includes appropriate security warnings, and the scope is limited to adding a configuration option without modifying existing behavior
  • No files require special attention

Important Files Changed

Filename Overview
Cargo.toml Bumped s2-sdk from 0.23.0 to 0.23.1 to enable SSL certificate verification control
src/config.rs Added ssl_no_verify config option with proper integration into config management (get/set/unset) and SDK configuration with security warning

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI
    participant ConfigLoader
    participant CliConfig
    participant SDKConfig
    participant S2SDK

    User->>CLI: Run s2 command
    CLI->>ConfigLoader: load_cli_config()
    ConfigLoader->>ConfigLoader: Load config.toml
    ConfigLoader->>ConfigLoader: Load S2_SSL_NO_VERIFY env var
    ConfigLoader->>CliConfig: Deserialize config with ssl_no_verify
    CliConfig-->>CLI: Return CliConfig
    
    CLI->>SDKConfig: sdk_config(config)
    SDKConfig->>SDKConfig: Check config.ssl_no_verify
    alt ssl_no_verify == Some(true)
        SDKConfig->>SDKConfig: tracing::warn("SSL verification disabled")
        SDKConfig->>S2SDK: with_insecure_skip_cert_verification(true)
    end
    SDKConfig-->>CLI: Return S2Config
    
    CLI->>S2SDK: Execute API call with config
    S2SDK-->>User: API response (without cert verification if enabled)
Loading

shikhar pushed a commit to s2-streamstore/s2-sdk-rust that referenced this pull request Jan 27, 2026
... for the env var to disable SSL verification during tests.

Renamed to match s2-streamstore/s2-cli#210
@sgbalogh sgbalogh merged commit 1c62c3a into main Jan 27, 2026
7 checks passed
@sgbalogh sgbalogh deleted the ssl-insecure branch January 27, 2026 00:58
@github-actions github-actions bot mentioned this pull request Jan 27, 2026
shikhar pushed a commit that referenced this pull request Jan 27, 2026
## 🤖 New release

* `s2-cli`: 0.25.1 -> 0.25.2

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

## [0.25.2] - 2026-01-27

### Bug Fixes

- Add `S2_SSL_NO_VERIFY` config
([#210](#210))

### Miscellaneous Tasks

- Release cmd
- Automate releases with release-plz
- Add dependabot for weekly dependency updates
([#208](#208))
- Consolidate release workflows
([#211](#211))

<!-- generated by git-cliff -->
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant