Repository navigation
fix(deps): update aws-smithy-json to 0.62.7 and raise the minimum Rust version to 1.91.1 - #857
Conversation
hitesh96db
left a comment
There was a problem hiding this comment.
The lock change is right: only the six aws-smithy crates move, each to the lowest version the new requirements accept, and every --locked build (CI, images, npm) gets aws-smithy-json 0.62.7. Checked locally on 1.91.1: cargo check --locked --workspace --all-targets and the mongodb, sqlite+dev-mode and cassandra binary builds pass; extenddb-backup-store and extenddb-cache lib tests give 37 and 27 passed. All checks on this head are green.
The blocking issue is the inline comment on Cargo.toml line 119: a build without --locked at this head resolves to a graph that does not compile, and on main it compiles.
Other points:
-
Commit messages that would land on main. This repository squashes with the commit list as the message. f542035 says the release images "are unaffected" because the binary does not depend on
extenddb-backup-store. That is false at this head:extenddbdepends onextenddb-app, which depends onextenddb-backup-store(not optional,crates/app/Cargo.toml). Someone readinggit logfor this CVE would conclude the images were never exposed. The same commit says S3 and STS responses go throughaws-smithy-json; inaws-sdk-s31.122.0 andaws-sdk-ststhe only use isendpoint_lib/partition.rs. 619b25a says "two" loops and "three" cases where the tree has three and four. Please reword these commits or edit the squash message at merge. -
Release number.
docs/versioning.mdallows an MSRV raise only in a minor release, and the upgrade manual titles the next release v0.1.15. The PR notes the conflict but changes neither file, so nothing in the tree tells people building from source that they now need 1.91.1. An upgrade manual entry would fix that. -
No guard for the fix itself. With main's
Cargo.lockrestored (0.62.3),cargo test --locked -p extenddb-backup-store --libstill passes 37 of 37. The repository has nodeny.toml, no audit configuration, and no workflow runningcargo denyorcargo audit. Not required for this PR, but acargo deny check advisoriesjob would make a lock revert fail CI. -
Smaller wording points. "The server creates these clients" leaves out the
extenddb backupcommands, which open the same S3 store (crates/app/src/cmd_backup.rs). The 0.62.6 to 0.62.7 fix is confined toskip_inner; a[patch.crates-io]backport would have kept 1.88. Taking the MSRV raise instead is reasonable, but the body could say it was a choice.
Not checked: docker build of Dockerfile, Dockerfile.mongodb and Dockerfile.dev (neither amd64 nor arm64), live S3, IMDS or SSO credential loading, and a deeply nested document against 0.62.3 or 0.62.7.
| # rust-version (1.91.1). Their transitive aws-* and aws-smithy-* crates are | ||
| # held in Cargo.lock at versions that build on 1.91.1 (set with | ||
| # `cargo +1.91.1 update <crate>@<version> --precise <older>`). The resolver | ||
| # fallback in .cargo/config.toml keeps a plain `cargo update` from moving |
There was a problem hiding this comment.
Blocking: a fresh resolve at this head no longer compiles; on main it does.
Measured 2026-11-12 with rustc 1.91.1 on macOS arm64.
# PR head 4183d31a8, Cargo.lock removed
cargo +1.91.1 generate-lockfile
cargo +1.91.1 check --locked -p extenddb-backup-store
With rust-version = "1.91.1" the resolver fallback now admits aws-smithy-types 1.5.0, aws-smithy-http 0.63.6 and aws-smithy-eventstream 0.60.21, while aws-runtime =1.6.0, aws-config =1.8.13 and aws-sdk-s3 =1.122.0 stay pinned. The check then fails:
error[E0282]: type annotations needed
--> aws-runtime-1.6.0/src/auth/sigv4.rs:234:22
error: could not compile `aws-runtime` (lib) due to 1 previous error
The same two commands on main (511d6c7) resolve aws-smithy-types 1.4.3 and finish cleanly (with the vulnerable aws-smithy-json 0.62.3).
So cargo update, cargo generate-lockfile, and once the crates are published, cargo install extenddb without --locked, now produce a graph that does not build. The comment this PR edits here says the opposite: the fallback "keeps a plain cargo update from moving them past that". The resolver choice in ADR-0029 exists for exactly this path, and no CI job builds from a fresh lockfile, so nothing catches it.
Either move the aws-sdk pin set to versions that build with aws-smithy-types 1.5.x, or state that builds without --locked are unsupported and fix this comment, the one in .cargo/config.toml and the resolver comment at the top of this file. A CI job that runs cargo generate-lockfile && cargo check --locked on the minimum toolchain would keep it from coming back.
| version = "0.1.14" | ||
| edition = "2024" | ||
| rust-version = "1.88" | ||
| rust-version = "1.91.1" |
There was a problem hiding this comment.
Raising rust-version turns on clippy::duration_suboptimal_units across the workspace, not only in extenddb-cache. cargo +1.97.0 clippy --locked -p extenddb-engine --all-targets -- -W clippy::pedantic reports more than 100 of them at this head and 2 with rust-version = "1.88". CI only runs pedantic for extenddb-cache, so CI stays green, but CONTRIBUTING asks for a workspace pedantic run and the PR body does not mention the new warnings.
| # Prefer dependency versions whose declared rust-version fits the workspace | ||
| # rust-version (1.88, tested in CI), so `cargo update` on a newer toolchain | ||
| # does not pull in crates that no longer build on 1.88. Only applies when a | ||
| # rust-version (1.91.1, tested in CI), so `cargo update` on a newer toolchain |
There was a problem hiding this comment.
Same problem as the Cargo.toml comment at line 119: at this rust-version, cargo update does pull in crates that do not build together (aws-smithy-types 1.5.0 with aws-runtime 1.6.0). Also, 1.91.1 is hard-coded here and twice in Cargo.toml (lines 116 and 118) after the resolver comment was changed to name no number; these will drift the same way.
| strategy: | ||
| matrix: | ||
| toolchain: [stable, "1.88.0"] | ||
| toolchain: [stable, "1.91.1"] |
There was a problem hiding this comment.
Nothing ties this entry to [workspace.package] rust-version. With rust-version set back to "1.88" and the new lock, cargo +1.91.1 check --locked still passes, so this leg stays green. Only clippy notices, and only because this PR happens to add Duration::from_mins. A small check that this matrix entry equals rust-version would make the leg mean what it says.
| ## Version parsing | ||
|
|
||
| `rustc --version` prints `rustc 1.88.0 (abcdef0 2025-01-01)`. Extract the version field with `awk`: | ||
| `rustc --version` prints `rustc 1.91.1 (abcdef0 2025-01-01)`. Extract the version field with `awk`: |
There was a problem hiding this comment.
abcdef0 2025-01-01 is not a real 1.91.1 banner. rustc +1.91.1 --version prints rustc 1.91.1 (ed61e7d7e 2025-11-07).
Cargo.lock: aws-smithy-json moves from 0.62.3 to 0.62.7. Versions up to 0.62.6 recurse without a depth limit while skipping an unknown key, so a deeply nested document can exhaust the stack (CVE-2026-18140, GHSA-8ffr-xgwf-xj56). In this workspace only the AWS SDK clients behind extenddb-backup-store use the crate: aws-config, aws-sdk-s3, aws-sdk-sso, aws-sdk-ssooidc and aws-sdk-sts. aws-sdk-s3 and aws-sdk-sts use it only for the compiled-in endpoint partition table. aws-sdk-sso and aws-sdk-ssooidc also parse the SSO and SSO OIDC responses with it. aws-config parses the credentials it reads from IMDS, the container endpoint, a credential_process command and the SSO token cache. 0.62.7 requires aws-smithy-runtime-api 1.12.3 or newer, so the lock also moves aws-smithy-runtime-api from 1.11.3 to 1.12.3, aws-smithy-types from 1.4.3 to 1.4.9 and aws-smithy-async from 1.2.11 to 1.2.14, and adds aws-smithy-runtime-api-macros 1.0.0 and aws-smithy-schema 0.1.0. Each is the lowest version the new requirements accept. No other package moves, and each aws-smithy crate resolves to one version. The six crates declare rustc 1.91.1 as their minimum, above the workspace rust-version of 1.88, so a 1.88 toolchain refuses to build extenddb-backup-store with this lock. Since #672 the extenddb binary links extenddb-backup-store through extenddb-app, so the release images and npm binaries carry aws-smithy-json. Built from main they link 0.62.3. With this change they link 0.62.7.
aws-smithy-json 0.62.7, the first release with the fix for CVE-2026-18140, and the five aws-smithy crates it needs declare rustc 1.91.1 as their minimum. The workspace minimum was 1.88. Cargo.toml sets rust-version to 1.91.1. The comment on the aws-sdk pins now says that each pinned version declares a minimum at or below the workspace rust-version, and .cargo/config.toml names 1.91.1 for the resolver fallback. The comments next to the three compare-exchange loops that stand in for fetch_update now name 1.91.1: the replacement, try_update, is still unstable there. clippy reads the minimum from rust-version, and from 1.91 it asks for Duration::from_mins where a value is a whole number of minutes. The four cases are in extenddb-cache: the default TTL in swr.rs and three lines of tests.rs now use Duration::from_mins(1).
The workspace rust-version is 1.91.1, so the leg that checks the minimum moves from 1.88.0 to 1.91.1.
README.md, CONTRIBUTING.md, the getting started page, the quick start and install manuals and the backup design name 1.91.1, the workspace rust-version.
The four Dockerfiles build on rust:1.91.1-bookworm, pinned by digest. Cargo refuses to build a package on a compiler older than its rust-version, so the 1.88 build stage would fail on every image.
AGENTS.md and the setup references under .agents/skills name 1.91.1, the workspace rust-version.
Since #672 the server links the AWS SDK clients, so the four notices files list the aws-smithy crates. They listed the versions from before this branch's lock update. The files now list aws-smithy-json 0.62.7, aws-smithy-runtime-api 1.12.3, aws-smithy-types 1.4.9 and aws-smithy-async 1.2.14, and add aws-smithy-runtime-api-macros 1.0.0 and aws-smithy-schema 0.1.0. devtools/generate-software-license-notices for the postgres, mongodb and cassandra backends and devtools/generate-dev-license-notices wrote the files with cargo-about 0.9.0, the version CI pins. Each script passes with --check.
A backup test merged from main says that the replacement for fetch_update is not on Rust 1.88. The workspace minimum is now 1.91.1, so the comment names 1.91.1, as the two migration comments on this branch do.
The example Dockerfile in the deployment guide says to match rust-version in Cargo.toml, and builds on rust:1.95. rust-version is now 1.91.1, so the example builds on 1.91.1. The rust image tags without a suffix are the Debian trixie images, and the example's runtime stage is debian:bookworm-slim. A binary linked against glibc 2.41 on trixie can need symbols that glibc 2.36 on bookworm does not have. The example now builds on the bookworm image, as the four Dockerfiles do.
The comments on three compare-exchange loops say that the replacement for fetch_update does not exist on Rust 1.91.1, or is not on it. It exists there as an unstable API, behind the atomic_try_update feature, so the comments now say that it is unstable on 1.91.1.
The crates.io work on main added two statements of the minimum Rust version after this branch raised it to 1.91.1. The resolver comment in Cargo.toml now refers to the workspace rust-version and names no number. The install section of crates/bin/README.md names 1.91.1. ADR-0029 keeps 1.88. ADRs are not edited after acceptance (docs/adr/README.md), and this change keeps the decision that ADR-0029 records.
#923 on main gave panicking_refresh_does_not_leak_inflight_flag a TTL of Duration::from_secs(60). With rust-version at 1.91.1, the pedantic lint clippy::duration_suboptimal_units asks for Duration::from_mins(1) there, and cargo clippy --all-targets -- -D warnings fails on it.
Resolver 3 and the resolver fallback make a bare cargo update or an unlocked cargo install less likely to move the pinned aws-sdk graph. They do not prevent it. At rust-version 1.91.1 such a resolve raises aws-smithy-types to 1.5.0, which does not build with the pinned aws-runtime 1.6.0 (E0282 in aws-runtime's sigv4 module). The comments in Cargo.toml and .cargo/config.toml said the fallback stopped that. They also said the 1.91.1 leg of test.yml caught drift, but that leg builds with --locked and never resolves afresh. The comments now say that a build using the committed Cargo.lock gets the recorded versions. They add that the release images pass --locked, and that cargo install extenddb should pass it too.
…note The dependency-check note gave rustc 1.91.1 (abcdef0 2025-01-01) as the sample version line. That commit hash and date are not real. rustc 1.91.1 prints (ed61e7d7e 2025-11-07). Use that so the awk example matches what the toolchain prints.
4183d31 to
4177951
Compare
|
Thanks, good catch on the lockfile. Addressed at 4177951. Blocking (unlocked resolve): reproduced. A fresh resolve on 1.91.1 pulls aws-smithy-types 1.5.0 against the pinned aws-runtime 1.6.0 and fails to build. At 1.88 it holds 1.4.3. The three comments (the Cargo.toml top note, the aws-sdk pins comment, and .cargo/config.toml) no longer claim the fallback prevents that. They now say a build using the committed Cargo.lock gets the recorded versions, the release images pass --locked, and installing from source should pass --locked. Commit messages: I reworded the two that squash onto main. fix(deps) no longer calls the images unaffected. It says the binary links extenddb-backup-store through extenddb-app, so the images carry the crate. It also narrows the S3 and STS use to the endpoint partition table. build: now says three compare-exchange loops and four Duration::from_mins cases. The dependency-check note now uses the real 1.91.1 rustc banner. Left out of this security fix, tracked separately:
|
docs/getting-started.md keeps the MongoDB and Cassandra prerequisite lines from this branch and the Rust 1.91.1 minimum from main (#857).
The base merged main at 4c4c533, where #857 raises the minimum Rust version from 1.88 to 1.91.1. docs/getting-started.md: the base changed the Rust prerequisite line. This branch replaces the page with a pointer list. The merge keeps the pointer list and carries the new minimum into the prerequisites of docs/install-from-source.md. docs/manuals/04-quickstart-setup-guide.md, docs/manuals/08-install-linux.md, docs/manuals/09-install-macos.md: the base changed the Rust prerequisite line. This branch removes the three pages in favour of docs/install-from-source.md. The deletions stand.
Main at 4c4c533 (#857) updates aws-smithy-json to 0.62.7 and raises the minimum Rust version to 1.91.1. Cargo.lock merged without a conflict, and cargo metadata --locked accepts it. SOFTWARE-LICENSE-NOTICES.html, SOFTWARE-LICENSE-NOTICES-MONGODB.html, SOFTWARE-LICENSE-NOTICES-CASSANDRA.html and SOFTWARE-LICENSE-NOTICES-DEV.html: regenerated with cargo-about 0.9.0 for the merged Cargo.lock. Against main, each file changes as this branch changed it against 95425f5. The one exception is the Apache-2.0 crate count, which main raised by two.
What
Cargo.lockmovesaws-smithy-jsonfrom 0.62.3 to 0.62.7, the first version with the fix for Dependabot alert 19. The minimum Rust version of the workspace moves from 1.88 to 1.91.1, because 0.62.7 needs it.The lock
0.62.7 requires
aws-smithy-runtime-api1.12.3 or newer, so the lock also movesaws-smithy-runtime-apifrom 1.11.3 to 1.12.3,aws-smithy-typesfrom 1.4.3 to 1.4.9 andaws-smithy-asyncfrom 1.2.11 to 1.2.14. It addsaws-smithy-runtime-api-macros1.0.0 andaws-smithy-schema0.1.0. Each is the lowest version the new requirements accept. No other package moves. Eachaws-smithycrate resolves to one version.In this workspace only the AWS SDK clients behind
extenddb-backup-storeuseaws-smithy-json:aws-config,aws-sdk-s3,aws-sdk-sso,aws-sdk-ssooidcandaws-sdk-sts. The server creates these clients only when[backup.store]setskind = "s3". Each client parses these inputs with it:aws-sdk-s3andaws-sdk-sts: the endpoint partition table only. Each SDK has the table compiled in, unlessSMITHY_CLIENT_SDK_CUSTOM_PARTITIONnames a file. S3 and STS responses are XML.aws-sdk-ssoandaws-sdk-ssooidc: the partition table, and the responses of the SSO and SSO OIDC endpoints.aws-config: the credentials it reads from IMDS, the container credentials endpoint, acredential_processcommand and the SSO token cache file.No request to the ExtendDB server reaches
aws-smithy-json. Outside tests,crates/backup-store/src/s3.rsis the only file that names an AWS SDK crate, and the DynamoDB API, the admin API and the console parse requests withserde_json. The lock fortests/rustalready has 0.62.7.Since #672 the server links the AWS SDK clients, so the four license notices files list the
aws-smithycrates. They now list the new versions.The minimum Rust version
Four of the six crates declare rustc 1.91.1 as their minimum:
aws-smithy-json0.62.7,aws-smithy-runtime-api1.12.3,aws-smithy-types1.4.9 andaws-smithy-async1.2.14.aws-smithy-runtime-api-macros1.0.0 declares 1.91.0, andaws-smithy-schema0.1.0 declares 1.91. Every fixed version ofaws-smithy-jsondeclares 1.91.1 or higher: 0.62.7 declares 1.91.1, and 0.63.x and 0.65.x declare 1.94.1. The minimum version commits raise the workspace minimum to match:Cargo.tomlsetsrust-versionto 1.91.1. The comment on the aws-sdk pins now says that each pinned version declares a minimum at or below the workspacerust-version. The resolver comment refers to the workspacerust-versionand names no number.test.ymlruns on 1.91.1..cargo/config.tomlnames 1.91.1 for the resolver fallback.rust:1.91.1-bookworm, pinned by digest. Cargo refuses to build a package on a compiler older than itsrust-version, so the 1.88 build stage would fail on every image.README.md,CONTRIBUTING.md,AGENTS.md, the getting started page, the quick start and install manuals, the backup design and the setup references name 1.91.1. The install section ofcrates/bin/README.mdnames it too.rust:1.91.1-bookworm. It said to matchrust-versionand built onrust:1.95. Therusttags without a suffix are the Debian trixie images, and the example's runtime stage isdebian:bookworm-slim. The example now uses the bookworm image, as the four Dockerfiles do.try_update, the replacement forfetch_update, is still unstable.rust-version, and from 1.91 it asks forDuration::from_minswhere a value is a whole number of minutes. The lint is inclippy::pedantic, which onlyextenddb-cacheenables. The four cases are inextenddb-cache: the default TTL inswr.rsand three lines oftests.rsnow useDuration::from_mins(1). One of the three is in a test that fix(iam): delete what a principal or account owns with it #923 changed on main.The release images change compiler, from 1.88 to 1.91.1. Since #672 the
extenddbbinary depends onextenddb-backup-storethroughextenddb-app, so the images and npm binaries built from main linkaws-smithy-json0.62.3. With this change they link 0.62.7.Why
Dependabot alert 19 (high) covers CVE-2026-18140, GHSA-8ffr-xgwf-xj56. Versions of
aws-smithy-jsonup to 0.62.6 recurse without a depth limit while they skip an unknown key. A deeply nested document can exhaust the stack. The first version with the fix is 0.62.7.No issue. The alert is at https://github.com/ExtendDB/extenddb/security/dependabot/19.
Testing done
The lock commit, on stable (1.99.0):
cargo tree -i aws-smithy-json --locked: one version, 0.62.7, reached throughaws-config,aws-sdk-s3,aws-sdk-sso,aws-sdk-ssooidcandaws-sdk-sts.cargo check --locked --workspace: pass.cargo test --locked -p extenddb-backup-store --lib: 33 passed, 0 failed.cargo test --locked -p extenddb-backup-store --test conformance: the S3 tests skip withoutEXTENDDB_TEST_S3_ENDPOINT. The filesystem tests need a temporary directory whose ancestors belong to root or to the test user. The build host has no such directory, so CI runs them.The minimum version commits:
cargo +1.97.0 fmt --all -- --check: pass.cargo +1.91.1 check --locked --workspace --all-targets: pass.cargo +1.91.1 test --locked -p extenddb-backup-store --lib: 33 passed, 0 failed.cargo +1.88.0 check --locked -p extenddb: refused, "extenddb-server@0.1.14 requires rustc 1.91.1", as expected.cargo +1.97.0 clippy --locked --all-targets --features extenddb-storage-cassandra/test-hooks,extenddb-storage-mongodb/test-hooks -- -D warnings, the CI command with--lockedadded: pass after the threeDurationchanges. Before them it failed onclippy::duration_suboptimal_unitsinextenddb-cache.cargo +1.91.1 test --locked -p extenddb-cache --lib: 27 passed, 0 failed.After merging main at e681b8b:
aws-smithycrates above.cargo tree --locked -p extenddb -i aws-smithy-json -e normal: the binary reaches 0.62.7 throughextenddb-app,extenddb-backup-storeandaws-config.cargo +1.97.0 fmt --all -- --check: pass.clippy.yml, on 1.97.0 with--lockedand-D warnings: pass.cargo +1.91.1 check --locked --workspace --all-targets: pass.cargo +1.91.1 check --locked -p extenddb --no-default-features, once each with--features mongodb,--features sqlite,dev-modeand--features cassandra: pass, with no warnings. The 1.91.1 leg oftest.ymlbuilds the binary with its defaultpostgresfeature only.cargo +1.91.1 test --locked -p extenddb-backup-store --lib: 37 passed, 0 failed.cargo +1.91.1 test --locked -p extenddb-cache --lib: 27 passed, 0 failed.devtools/generate-software-license-notices --checkfor postgres, mongodb and cassandra, anddevtools/generate-dev-license-notices --check: pass after the regeneration.rust:1.91.1-bookwormdigest is the one Docker Hub serves for that tag today, and public.ecr.aws serves it.At the head, e2b8daa, on amd64:
cargo +1.97.0 fmt --all -- --check: pass.docker buildofDockerfile,Dockerfile.mongodbandDockerfile.dev: pass. Pull request CI builds onlyDockerfile.cassandra(smoke-cassandra-image.yml), and the release workflows build the other three. The postgres build installs cargo-auditable 0.7.7 on 1.91.1, and the other two builds reuse that layer. All three compileaws-smithy-json0.62.7.docker run --rm --read-only --network none <image> --versionfor each of the three images: printsextenddb 0.1.14, commite2b8daa09778and the build time. No arm64 build of these three images ran.After merging main at 511d6c7, at the head 4183d31:
aws-smithycrates above.cargo +1.97.0 tree --locked -p extenddb -i aws-smithy-json -e normal: one version, 0.62.7.cargo +1.97.0 fmt --all -- --check: pass.cargo +1.91.1 check --locked --workspace --all-targets: pass.clippy.yml, on 1.97.0 with--lockedand-D warnings: pass.Duration::from_minschange of 4183d31,cargo +1.97.0 clippy --locked -p extenddb-cache --all-targets -- -D warningsfails onclippy::duration_suboptimal_unitsatcrates/cache/src/tests.rs:671.cargo +1.91.1 test --locked -p extenddb-backup-store --lib: 37 passed, 0 failed.cargo +1.91.1 test --locked -p extenddb-cache --lib: 27 passed, 0 failed.devtools/generate-software-license-notices --checkfor postgres, mongodb and cassandra, anddevtools/generate-dev-license-notices --check: pass, with no regeneration.docker buildran at this head. Main changed no Dockerfile after e2b8daa.Checklist
cargo test --workspace)cargo fmt --check)cargo clippy -- -W clippy::pedantic)Storagetrait, auth model, on-diskformat, or public CLI surface, an RFC has been accepted or is linked
below. Otherwise, an ADR captures the decision (link below).
ADR / RFC: n/a
Breaking changes
Building ExtendDB from source needs Rust 1.91.1 or newer. An older toolchain stops with "requires rustc 1.91.1". Users of the published images and npm packages need no new toolchain, because CI builds them.
docs/versioning.mdlets a minor release raise the minimum Rust version, and the upgrade manual on main titles the next release v0.1.15. The release that carries this change therefore takes the number 0.2.0, or its release notes record the raise as an exception for a security fix.By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.