From 72ba4eead00aa2021bd66e624e6901d23ee7007f Mon Sep 17 00:00:00 2001 From: Jens Nylander Date: Sat, 17 Oct 2026 12:25:27 +0200 Subject: [PATCH] release 0.2.0 A security release: tenant isolation on every path-tenant handler, the platform:admin scope, globally unique SMTP usernames, the fail-closed bootstrap gate, and seven RUSTSEC advisories closed. Three of those break an existing deployment and the changelog marks each one, the object store swap included - an upgrade keeps the old minio_data volume while Sentio talks to an empty store. cargo update took every compatible bump; all 61 direct dependencies were already on their latest major line. Gate 7/7 with 752 tests, e2e 19/19. --- CHANGELOG.md | 81 ++++++++++++++++++++++++++++++++++++++++++ Cargo.lock | 42 +++++++++++----------- Cargo.toml | 2 +- README.md | 2 +- THIRD-PARTY-NOTICES.md | 6 ++-- docs/openapi.json | 2 +- 6 files changed, 108 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d38cba2..5dc492e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,87 @@ reaches 1.0. ## [Unreleased] +## [0.2.0] - 2026-10-17 + +A security release. Three of its changes are breaking for an existing +deployment and are marked below. + +### Security +- Cross-tenant isolation on every `/v1/tenants/{id}/...` handler. The path + tenant is client-controlled and was taken at face value, so an admin key for + one tenant could read, change or delete another tenant's API keys, SMTP + credentials, inbound routes, IP pool assignments and the tenant row itself. + Handlers now go through `ensure_tenant_match`, which answers 404 rather than + 403 so another tenant's resources do not announce their existence, and the + repository methods take the tenant and filter on it, so a guessed UUID is no + longer enough on its own. +- `platform:admin`, a named scope for reach across tenants. `*` deliberately + does not cover it and a session cannot grant it unless it holds it, so a + tenant minting itself a wildcard key is not a way out of its tenant. + **BREAKING**: `POST /v1/tenants` now requires it, and `GET /v1/tenants` + returns only your own tenant without it. Migration `005` grants it to the + wildcard keys of the system tenant, which are the ones that already had the + reach, so an operator key carries across untouched. +- **BREAKING**: `smtp_credentials.username` is globally unique (migration + `003`). SMTP AUTH resolves a credential by username alone - an + unauthenticated connection carries no tenant, and that lookup is what + establishes one - so two tenants both naming a credential "agent" handed + whichever row the database returned first one tenant's privileges to the + other. The migration prefixes cross-tenant duplicates with their tenant id; + those usernames stop authenticating until the SMTP client is updated. +- The server refuses to start while the publicly-known bootstrap API key is + active, and also when it cannot prove the key is inactive, so a database + outage cannot quietly defeat the check. `SENTIO_ALLOW_BOOTSTRAP_KEY=1` is the + recovery hatch, and the compose stack sets it because the two cannot both + hold on a first run. +- Dropped the legacy rustls 0.21 stack that `aws-sdk-s3` pulled in alongside + the modern one (RUSTSEC-2026-0346, -0349, no fix on that line) by taking the + SDK with `default-features = false`. HTTPS still comes from rustls 0.23. +- Dropped `mail-auth`'s default `report` feature and the three zip advisories + with it (RUSTSEC-2026-0367, -0368, -0369). It is DMARC aggregate report + parsing; Sentio verifies DKIM, SPF, DMARC and ARC and never extracts an + archive. +- A username conflict answers 409 instead of 500. + +### Changed +- **BREAKING**: the compose stack's object store is SeaweedFS rather than + MinIO. MinIO's community edition was archived and its images withdrawn from + both Docker Hub and quay.io, so `docker compose up -d` could no longer pull + them. `weed mini` is master, volume server, filer and S3 gateway in one + process, which also retires the `mc` one-shot that created the bucket - + `ensure_bucket()` had always done that itself. Upgrading keeps the old + `minio_data` volume while Sentio talks to an empty store, so copy anything + you need out of it first; new installs are unaffected. Production can still + point `[storage]` at any S3-compatible endpoint, MinIO included. +- Every dependency moved to its latest compatible version, utoipa 6 and + utoipa-scalar 0.4 among them. Each pinned image in the compose stack is on + its current release: NATS 2.15, rspamd 4.2.2, mailpit v1.31.6, SeaweedFS + 4.48. rspamd and mailpit were tracking `latest`, so the stack you got + depended on the day you pulled it; a pin is reproducible and is something + dependabot can raise a pull request against. + +### Fixed +- Delivery could park indefinitely. `TlsConnector::connect` has no timeout of + its own, so a remote that stalled after acknowledging `220 STARTTLS` held the + delivery future and leaked a per-domain pool permit; the STARTTLS upgrade, + each MX attempt and the whole handler now have timeouts, and an exhausted + handler returns `RetryAfter` so JetStream redelivers instead of losing the + task. The MTA-STS client gained timeouts for the same reason. +- A 5xx without an enhanced code was read as a bad address, so a + Spamhaus-worded 550 or a "poor reputation" 554 flagged the recipient for + permanent suppression over a problem at our end. `classify_bounce` now reads + DNSBL, reputation and policy wording as a block. +- A suppressed recipient produced no `message_events` row and no webhook, and + left the message `queued` for ever. Suppressions go through `record_outcome` + now, and a message whose every recipient is suppressed becomes `Dropped`. +- The docs claimed Jev moves the spam score. It computes a delta and nothing + applies it; labelling depends on a route setting `llm_classify`, not on a + score band. + +### Removed +- The GitHub Actions CI workflow. `./scripts/check.sh` and + `./scripts/e2e/run-e2e.sh` are the gate, run before a tag goes up. + ## [0.1.6] - 2026-09-21 ### Added diff --git a/Cargo.lock b/Cargo.lock index 6e7fc8f..ed65563 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2506,9 +2506,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.190" +version = "0.2.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" [[package]] name = "libm" @@ -3820,9 +3820,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.29" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +checksum = "9cb23c424d8ee841bb4d813677ca237e2a610067d594fec130f87d6093495ab5" dependencies = [ "windows-sys 0.61.2", ] @@ -3921,7 +3921,7 @@ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "sentio-abuse" -version = "0.1.6" +version = "0.2.0" dependencies = [ "chrono", "hickory-resolver", @@ -3937,7 +3937,7 @@ dependencies = [ [[package]] name = "sentio-api" -version = "0.1.6" +version = "0.2.0" dependencies = [ "argon2", "axum", @@ -3985,7 +3985,7 @@ dependencies = [ [[package]] name = "sentio-auth" -version = "0.1.6" +version = "0.2.0" dependencies = [ "base64 0.23.1", "chrono", @@ -4004,7 +4004,7 @@ dependencies = [ [[package]] name = "sentio-core" -version = "0.1.6" +version = "0.2.0" dependencies = [ "bytes", "chrono", @@ -4024,7 +4024,7 @@ dependencies = [ [[package]] name = "sentio-llm" -version = "0.1.6" +version = "0.2.0" dependencies = [ "reqwest", "sentio-core", @@ -4038,7 +4038,7 @@ dependencies = [ [[package]] name = "sentio-mcp" -version = "0.1.6" +version = "0.2.0" dependencies = [ "reqwest", "rmcp", @@ -4055,7 +4055,7 @@ dependencies = [ [[package]] name = "sentio-observe" -version = "0.1.6" +version = "0.2.0" dependencies = [ "metrics", "metrics-exporter-prometheus", @@ -4068,7 +4068,7 @@ dependencies = [ [[package]] name = "sentio-queue" -version = "0.1.6" +version = "0.2.0" dependencies = [ "async-nats", "bytes", @@ -4087,7 +4087,7 @@ dependencies = [ [[package]] name = "sentio-smtp" -version = "0.1.6" +version = "0.2.0" dependencies = [ "chrono", "clap", @@ -4113,7 +4113,7 @@ dependencies = [ [[package]] name = "sentio-smtp-client" -version = "0.1.6" +version = "0.2.0" dependencies = [ "base64 0.23.1", "bytes", @@ -4152,7 +4152,7 @@ dependencies = [ [[package]] name = "sentio-smtp-server" -version = "0.1.6" +version = "0.2.0" dependencies = [ "argon2", "base64 0.23.1", @@ -4193,7 +4193,7 @@ dependencies = [ [[package]] name = "sentio-spam" -version = "0.1.6" +version = "0.2.0" dependencies = [ "regex", "reqwest", @@ -4210,7 +4210,7 @@ dependencies = [ [[package]] name = "sentio-storage" -version = "0.1.6" +version = "0.2.0" dependencies = [ "aws-config", "aws-credential-types", @@ -4233,7 +4233,7 @@ dependencies = [ [[package]] name = "sentio-store" -version = "0.1.6" +version = "0.2.0" dependencies = [ "base64 0.23.1", "chrono", @@ -4254,7 +4254,7 @@ dependencies = [ [[package]] name = "sentio-webhooks" -version = "0.1.6" +version = "0.2.0" dependencies = [ "axum", "chrono", @@ -5280,9 +5280,9 @@ checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" [[package]] name = "unicode-normalization" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" +checksum = "75cd3fb03d5288b3ba9a1ee103ac7e9cbb59f0b03d64f8ddfcc04dd42758a85d" dependencies = [ "tinyvec", ] diff --git a/Cargo.toml b/Cargo.toml index f824f40..03e4411 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ members = [ resolver = "2" [workspace.package] -version = "0.1.6" +version = "0.2.0" edition = "2021" authors = ["Truespar Team"] license = "MIT OR Apache-2.0" diff --git a/README.md b/README.md index f9a500a..91801d6 100644 --- a/README.md +++ b/README.md @@ -514,7 +514,7 @@ Every release ships `sentio-mcp` as its own archive for Linux x86_64, Linux aarch64 and Windows x86_64, so an MCP client host needs no Rust toolchain: ```bash -VERSION=0.1.6 # or whatever the latest release tag is +VERSION=0.2.0 # or whatever the latest release tag is curl -LO "https://github.com/truespar/sentio/releases/download/v${VERSION}/sentio-mcp-${VERSION}-x86_64-unknown-linux-gnu.tar.gz" tar -xzf sentio-mcp-*.tar.gz ``` diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md index 929923b..14de467 100644 --- a/THIRD-PARTY-NOTICES.md +++ b/THIRD-PARTY-NOTICES.md @@ -7831,7 +7831,7 @@ limitations under the License. ## Apache License 2.0 -Used by `arc-swap 1.9.2`, `async-lock 3.4.2`, `atomic-waker 1.1.2`, `base64 0.22.1`, `base64 0.23.1`, `bitflags 2.13.2`, `bytes-utils 0.1.4`, `cfg-if 1.0.5`, `critical-section 1.2.0`, `crossbeam-channel 0.5.17`, `crossbeam-epoch 0.9.21`, `crossbeam-queue 0.3.14`, `crossbeam-utils 0.8.23`, `curve25519-dalek-derive 0.1.1`, `displaydoc 0.2.7`, `either 1.19.0`, `equivalent 1.0.3`, `errno 0.3.14`, `event-listener-strategy 0.5.4`, `event-listener 5.4.2`, `evmap 11.0.0`, `fastrand 2.5.0`, `flate2 1.1.10`, `fnv 1.0.7`, `form_urlencoded 1.2.2`, `futures-timer 3.0.4`, `gethostname 1.1.0`, `group 0.13.0`, `hashbrown 0.14.5`, `hashbrown 0.16.1`, `hashbrown 0.17.1`, `hashify 0.2.9`, `heck 0.5.0`, `httparse 1.10.1`, `hyper-rustls 0.27.10`, `idna 1.1.0`, `idna_adapter 1.2.2`, `indexmap 2.14.2`, `lazy_static 1.5.1`, `left-right 0.11.8`, `linux-raw-sys 0.12.1`, `lock_api 0.4.14`, `log 0.4.34`, `mail-auth 0.13.3`, `mail-builder 1.0.0`, `mail-parser 0.11.9`, `mime 0.3.17`, `num-bigint-dig 0.8.6`, `num-bigint 0.5.1`, `num-integer 0.1.47`, `num-iter 0.1.46`, `num-traits 0.2.19`, `once_cell 1.21.4`, `openssl-probe 0.2.1`, `parking 2.2.1`, `parking_lot 0.12.5`, `parking_lot_core 0.9.12`, `percent-encoding 2.3.2`, `regex-automata 0.4.18`, `regex-lite 0.1.9`, `regex-syntax 0.8.11`, `regex 1.13.1`, `ring 0.17.14`, `rustix 1.1.5`, `rustls-native-certs 0.8.5`, `rustls-pemfile 2.2.0`, `rustls 0.23.46`, `scopeguard 1.2.0`, `signal-hook-registry 1.4.8`, `similar 3.2.0`, `smallvec 1.16.3`, `socket2 0.6.5`, `stable_deref_trait 1.2.1`, `thread_local 1.1.10`, `unicase 2.10.0`, `unicode-bidi 0.3.18`, `unicode-normalization 0.1.25`, `unicode-properties 0.1.4`, `url 2.5.8`, `uuid 1.28.0`, `xmlparser 0.13.6` +Used by `arc-swap 1.9.2`, `async-lock 3.4.2`, `atomic-waker 1.1.2`, `base64 0.22.1`, `base64 0.23.1`, `bitflags 2.13.2`, `bytes-utils 0.1.4`, `cfg-if 1.0.5`, `critical-section 1.2.0`, `crossbeam-channel 0.5.17`, `crossbeam-epoch 0.9.21`, `crossbeam-queue 0.3.14`, `crossbeam-utils 0.8.23`, `curve25519-dalek-derive 0.1.1`, `displaydoc 0.2.7`, `either 1.19.0`, `equivalent 1.0.3`, `errno 0.3.14`, `event-listener-strategy 0.5.4`, `event-listener 5.4.2`, `evmap 11.0.0`, `fastrand 2.5.0`, `flate2 1.1.10`, `fnv 1.0.7`, `form_urlencoded 1.2.2`, `futures-timer 3.0.4`, `gethostname 1.1.0`, `group 0.13.0`, `hashbrown 0.14.5`, `hashbrown 0.16.1`, `hashbrown 0.17.1`, `hashify 0.2.9`, `heck 0.5.0`, `httparse 1.10.1`, `hyper-rustls 0.27.10`, `idna 1.1.0`, `idna_adapter 1.2.2`, `indexmap 2.14.2`, `lazy_static 1.5.1`, `left-right 0.11.8`, `linux-raw-sys 0.12.1`, `lock_api 0.4.14`, `log 0.4.34`, `mail-auth 0.13.3`, `mail-builder 1.0.0`, `mail-parser 0.11.9`, `mime 0.3.17`, `num-bigint-dig 0.8.6`, `num-bigint 0.5.1`, `num-integer 0.1.47`, `num-iter 0.1.46`, `num-traits 0.2.19`, `once_cell 1.21.4`, `openssl-probe 0.2.1`, `parking 2.2.1`, `parking_lot 0.12.5`, `parking_lot_core 0.9.12`, `percent-encoding 2.3.2`, `regex-automata 0.4.18`, `regex-lite 0.1.9`, `regex-syntax 0.8.11`, `regex 1.13.1`, `ring 0.17.14`, `rustix 1.1.5`, `rustls-native-certs 0.8.5`, `rustls-pemfile 2.2.0`, `rustls 0.23.46`, `scopeguard 1.2.0`, `signal-hook-registry 1.4.8`, `similar 3.2.0`, `smallvec 1.16.3`, `socket2 0.6.5`, `stable_deref_trait 1.2.1`, `thread_local 1.1.10`, `unicase 2.10.0`, `unicode-bidi 0.3.18`, `unicode-normalization 0.1.26`, `unicode-properties 0.1.4`, `url 2.5.8`, `uuid 1.28.0`, `xmlparser 0.13.6` ``` Apache License @@ -10325,7 +10325,7 @@ limitations under the License. ## Apache License 2.0 -Used by `allocator-api2 0.2.21`, `async-nats 0.50.0`, `async-trait 0.1.92`, `aws-config 1.12.0`, `aws-credential-types 1.3.0`, `aws-lc-sys 0.46.0`, `aws-runtime 1.10.0`, `aws-sigv4 1.6.0`, `aws-smithy-async 1.3.0`, `aws-smithy-checksums 0.65.0`, `aws-smithy-eventstream 0.61.4`, `aws-smithy-http-client 1.5.0`, `aws-smithy-http 0.64.1`, `aws-smithy-json 0.63.1`, `aws-smithy-observability 0.3.0`, `aws-smithy-query 0.62.1`, `aws-smithy-runtime-api-macros 1.1.0`, `aws-smithy-runtime-api 1.19.0`, `aws-smithy-runtime 1.16.0`, `aws-smithy-schema 0.2.1`, `aws-smithy-types 1.8.1`, `aws-smithy-xml 0.62.1`, `aws-types 1.6.0`, `dyn-clone 1.0.20`, `ident_case 1.0.1`, `itoa 1.0.18`, `libc 0.2.190`, `metrics-exporter-prometheus 0.18.3`, `miniz_oxide 0.9.1`, `num-conv 0.2.2`, `pastey 0.2.3`, `pin-project-internal 1.1.13`, `pin-project-lite 0.2.17`, `pin-project 1.1.13`, `portable-atomic 1.15.0`, `proc-macro2 1.0.107`, `quote 1.0.47`, `rand 0.10.3`, `rand 0.8.8`, `rand 0.9.5`, `rand_chacha 0.9.0`, `rand_xoshiro 0.7.0`, `ref-cast-impl 1.0.27`, `ref-cast 1.0.27`, `rmcp-macros 3.5.1`, `rmcp 3.5.1`, `rustversion 1.0.23`, `ryu 1.0.23`, `serde 1.0.229`, `serde_core 1.0.229`, `serde_derive 1.0.229`, `serde_derive_internals 0.30.0`, `serde_json 1.0.154`, `serde_nanos 0.1.4`, `serde_path_to_error 0.1.20`, `serde_repr 0.1.21`, `serde_urlencoded 0.7.1`, `simdutf8 0.1.5`, `sqlx-core 0.9.0`, `sqlx-macros-core 0.9.0`, `sqlx-macros 0.9.0`, `sqlx-postgres 0.9.0`, `syn 2.0.119`, `syn 3.0.9`, `sync_wrapper 1.0.2`, `tagptr 0.2.0`, `thiserror-impl 2.0.21`, `thiserror 2.0.21`, `time-core 0.1.9`, `time 0.3.55`, `unicode-ident 1.0.27`, `utf8parse 0.2.2`, `whoami 2.1.3` +Used by `allocator-api2 0.2.21`, `async-nats 0.50.0`, `async-trait 0.1.92`, `aws-config 1.12.0`, `aws-credential-types 1.3.0`, `aws-lc-sys 0.46.0`, `aws-runtime 1.10.0`, `aws-sigv4 1.6.0`, `aws-smithy-async 1.3.0`, `aws-smithy-checksums 0.65.0`, `aws-smithy-eventstream 0.61.4`, `aws-smithy-http-client 1.5.0`, `aws-smithy-http 0.64.1`, `aws-smithy-json 0.63.1`, `aws-smithy-observability 0.3.0`, `aws-smithy-query 0.62.1`, `aws-smithy-runtime-api-macros 1.1.0`, `aws-smithy-runtime-api 1.19.0`, `aws-smithy-runtime 1.16.0`, `aws-smithy-schema 0.2.1`, `aws-smithy-types 1.8.1`, `aws-smithy-xml 0.62.1`, `aws-types 1.6.0`, `dyn-clone 1.0.20`, `ident_case 1.0.1`, `itoa 1.0.18`, `libc 0.2.191`, `metrics-exporter-prometheus 0.18.3`, `miniz_oxide 0.9.1`, `num-conv 0.2.2`, `pastey 0.2.3`, `pin-project-internal 1.1.13`, `pin-project-lite 0.2.17`, `pin-project 1.1.13`, `portable-atomic 1.15.0`, `proc-macro2 1.0.107`, `quote 1.0.47`, `rand 0.10.3`, `rand 0.8.8`, `rand 0.9.5`, `rand_chacha 0.9.0`, `rand_xoshiro 0.7.0`, `ref-cast-impl 1.0.27`, `ref-cast 1.0.27`, `rmcp-macros 3.5.1`, `rmcp 3.5.1`, `rustversion 1.0.23`, `ryu 1.0.23`, `serde 1.0.229`, `serde_core 1.0.229`, `serde_derive 1.0.229`, `serde_derive_internals 0.30.0`, `serde_json 1.0.154`, `serde_nanos 0.1.4`, `serde_path_to_error 0.1.20`, `serde_repr 0.1.21`, `serde_urlencoded 0.7.1`, `simdutf8 0.1.5`, `sqlx-core 0.9.0`, `sqlx-macros-core 0.9.0`, `sqlx-macros 0.9.0`, `sqlx-postgres 0.9.0`, `syn 2.0.119`, `syn 3.0.9`, `sync_wrapper 1.0.2`, `tagptr 0.2.0`, `thiserror-impl 2.0.21`, `thiserror 2.0.21`, `time-core 0.1.9`, `time 0.3.55`, `unicode-ident 1.0.27`, `utf8parse 0.2.2`, `whoami 2.1.3` ``` Apache License @@ -13127,7 +13127,7 @@ THE SOFTWARE. ## Unicode License v3 -Used by `unicode-ident 1.0.27` +Used by `unicode-ident 1.0.27`, `unicode-normalization 0.1.26` ``` UNICODE LICENSE V3 diff --git a/docs/openapi.json b/docs/openapi.json index 9e634ce..265a42f 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -10,7 +10,7 @@ "name": "MIT OR Apache-2.0", "identifier": "MIT OR Apache-2.0" }, - "version": "0.1.6" + "version": "0.2.0" }, "paths": { "/health/live": {