Skip to content

feat(rust-sdk): release Keeper Secrets Manager Rust SDK v17.2.0#993

Draft
stas-schaller wants to merge 8 commits intomasterfrom
release/sdk/rust/v17.2.0
Draft

feat(rust-sdk): release Keeper Secrets Manager Rust SDK v17.2.0#993
stas-schaller wants to merge 8 commits intomasterfrom
release/sdk/rust/v17.2.0

Conversation

@stas-schaller
Copy link
Copy Markdown
Contributor

Summary

Rust SDK v17.2.0 — bug fix release.

Bug Fixes

  • KSM-886: Fixed get_file_data() and get_thumbnail_data() failing with "builder error" when called from inside tokio::spawn_blocking. Root cause: reqwest::blocking::Client creates an internal tokio runtime on construction; building it inside an existing async context (e.g. KeeperDB Proxy in Docker) panics. Fix: build a single shared client in SecretsManager::new() and propagate it to KeeperFile objects. (#991)

  • KSM-812: Fixed get_folders() consuming the SecretsManager instance (self) instead of borrowing it (&mut self), forcing unnecessary clones. Now consistent with all other methods. Closes #950. (#992)

Internal / Housekeeping

  • KeeperFile::http_client and skip_ssl_verify fields narrowed from pub to pub(crate) — implementation details with no external use case
  • client_builder.build().ok()build().map_err(...)? in SecretsManager::new() — TLS init failures now surface at construction time
  • Extracted KeeperFile::resolve_http_client() helper to eliminate duplicated client-building fallback
  • Fixed pre-existing compile error in empty_config_test.rs (missing proxy_url argument in ClientOptions::new() calls)

Related Issues

maksimu and others added 8 commits April 11, 2026 09:56
Building a new reqwest::blocking::Client inside tokio::spawn_blocking
fails with "builder error" because reqwest's blocking module creates an
internal tokio runtime that conflicts with the existing one.

This affected get_file_data() and get_thumbnail_data() in KeeperFile,
which built a fresh HTTP client per call (dtos.rs:1155). The main API
calls in post_query() worked because they configured
danger_accept_invalid_certs which changed the TLS init path.

Fix:
- Build one reqwest::blocking::Client in SecretsManager::new() after
  SSL/proxy config is resolved
- Store it on the SecretsManager struct, propagate to KeeperFile
  instances (same pattern as proxy_url propagation)
- get_file_data() and get_thumbnail_data() reuse the pre-built client
  when available, fall back to building a new one for backward compat
- Add skip_ssl_verify field to KeeperFile (propagated from
  SecretsManager.verify_ssl_certs) for the fallback path

Precedent: OpenTelemetry Rust (issue #2400), TiKV rust-prometheus
(PR #343), reqwest docs all recommend building the blocking client
outside async runtimes. See: seanmonstar/reqwest#1017
…client

fix(rust-sdk): KSM-886 reuse HTTP client for file downloads
- pub(crate) on KeeperFile::http_client and skip_ssl_verify — both are
  internal propagation fields with no reason to be part of the public API
- client_builder.build().ok() → build().map_err(...)? in SecretsManager::new()
  so a TLS init failure surfaces at construction time instead of deferring
  to the first file download
- extract KeeperFile::resolve_http_client() helper to eliminate duplicated
  client-building fallback in get_file_data() and get_thumbnail_data()
get_folders() and its private fetch_and_decrypt_folders() both took self
by value, consuming the SecretsManager and preventing any subsequent call
on the same instance without cloning first. Changed both to &mut self to
match the rest of the API (get_secrets, create_secret, etc.).

Also fixes a pre-existing compile error in empty_config_test.rs where
ClientOptions::new() calls were missing the proxy_url argument after
it was added to the signature.
…self

fix(rust-sdk): KSM-812 get_folders() borrows instead of consuming SecretsManager
Both Rust SDK workflows (test + publish) updated:
- Add missing integration tests present in one workflow but absent from the
  other: caching_transmission_key_tests, download_file_by_title_tests,
  duplicate_uid_notation_test, empty_config_test (+ proxy_test in publish)
- Pin actions/checkout v3 → v6 (SHA), actions-rust-lang/setup-rust-toolchain
  → SHA, manifest-cyber/manifest-github-action → SHA,
  actions/upload-artifact v4 → SHA, rust-lang/crates-io-auth-action v1 → SHA
- Add persist-credentials: false to all checkout steps (zizmor artipacked)
- Suppress secrets-outside-env for MANIFEST_TOKEN (SBOM publish, low risk,
  job already gated by test-rust-sdk)

All layers pass actionlint and zizmor (offline); Layer 4 Docker auth is
a local Keeper org enforcement, not a workflow bug.
Add check-version job at the start of the publish pipeline that hits
crates.io API before any expensive work (tests, SBOM, cargo package).
Fails fast with a clear message if the version already exists, rather
than burning ~10min of CI then failing at the upload step.

test-rust-sdk now needs: check-version so the entire pipeline gates
on the version check.
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.

Rust SecretsManager::get_folders takes self as argument instead of &mut self

2 participants