Commit Graph
4 Commits
Author SHA1 Message Date
BigBodyCobainandClaude Opus 5.5 591645992b Keep secure mail sessions working across backend restarts
A node that restarted lost the private half of the MLS key package in its
published bundle, so a welcome built from it could never be joined and the
sender's session stayed stuck with no way to reset it. Restarts also wiped
working sessions in two more ways. Fixes, each covered by a test:

- privacy-core: the saved DM state (v2) now carries every DM alias identity
  and its newest unused key packages (at most 16, unexpired), not only
  identities that already have a session. v1 state still loads. A new
  export call takes the identity list; older library builds fall back to the
  old export.
- The key package is saved as soon as it is created for the bundle.
- A session joined as the node's DM identity records that identity, so
  loading no longer drops it for lacking a per-contact identity.
- Re-reading mail already read (spent key) or mail from another group fails
  that message only; it no longer marks a restored session stale and wipes
  the conversation. A restored session that works is no longer suspect.
- A sender whose session is still unanswered checks the peer's bundle (at
  most every 5 minutes) and starts over if the key package changed; the
  peer rejoins from the welcome that rides along, keeping the new session
  only if it reads the message. Welcomes already joined are refused, so an
  old one replayed cannot roll a session back.
- /api/wormhole/dm/reset for a contact also drops its MLS session.

Verified with two fresh Docker nodes: mail sent after the receiver
restarted, a reply after the receiver restarted again, and mail after the
sender restarted all arrived readable on the original session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 08:11:42 -07:00
BigBodyCobainandCursor c45b91c06c Fix Docker OpenClaw HMAC persistence and privacy-core build warnings.
Persist OPENCLAW_HMAC_SECRET to data/openclaw.env so empty Docker env vars no longer block auth after UI bootstrap. Add verify_hmac.py, silence Rust warnings (#423), and document Docker signing (#424).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 20:38:44 -06:00
BigBodyCobain 28b3bd5ebf release: prepare v0.9.7 2026-05-01 22:56:50 -06:00
anoracleofra-code 39cc5d2e7c fix: compile privacy-core Rust library in Docker backend image
The MLS gate encryption system requires libprivacy_core.so — a Rust
shared library that was only compiled locally on the dev machine.
Docker users got "active gate identity is not mapped into the MLS
group" because the library was never built or included in the image.

Add a multi-stage Docker build:
- Stage 1: rust:1.87-slim-bookworm compiles privacy-core to .so
- Stage 2: copies libprivacy_core.so into the Python backend image
- Set PRIVACY_CORE_LIB env var so Python finds the library

Also track the privacy-core Rust source (Cargo.toml, Cargo.lock,
src/lib.rs) in git — they were previously untracked, which is why
the Docker build never had access to them.

Add root .dockerignore to exclude build caches and large directories
from the Docker build context.
2026-03-26 17:48:01 -06:00