feat(cli): verify-own-devices — cross-sign sibling bridge devices #18
No reviewers
Labels
No labels
agent:felinus
agent:human
agent:maximus
priority:p0
priority:p1
priority:p2
priority:p3
status:blocked
status:needs-review
status:wip
type:chore
type:docs
type:feat
type:fix
type:perf
type:refactor
type:test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jmz/matrix-bridge!18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/own-device-cross-signing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adds a
verify-own-devices [--device-id ID]CLI subcommand that signs this user's own other devices with our self-signing key.Why
bootstrap-cross-signingonly signs the device it runs on, andtrust.rsdeliberately skips our own user (member.user_id() == user_id → continue). So sibling bridge devices — the same@claudius-maximusbot logged in from mba / rpi5 / nas — never receive a cross-signing signature. Peers then refuse to forward Megolm keys to them, and inbound stays[unable to decrypt]. This is the bridge-code gap maximus@nas handed back in jmz/pa#20 (Jun 11).How
Run from the device that holds the self-signing secret (currently the NAS):
sync_onceso the device list and cross-signing state are current.cross_signing_status()→ bail with guidance ifhas_self_signingis false.get_user_devices(own_user)→ for each unverified, non-current device (or just--device-id), callDevice::verify()which uploads a self-signing signature.Idempotent (already-verified devices are skipped); the selection logic is a pure
should_sign_device()with unit tests.Verification
cargo check --allto confirm it compiles against matrix-sdk 0.14. Every SDK method used (get_user_devices/.devices()/is_verified()/verify()/device_id()) is already exercised intrust.rs; the only new surface (cross_signing_status/CrossSigningStatus) is confirmed against docs.rs.cargo check --all, which does not compile the#[cfg(test)]module, so the unit tests are not executed in CI.mba-726dadit+rpi5once built.Operational note
The command supersedes any running bridge on the same store for its duration (single-instance invariant) — reconnect/restart the bridge MCP after running it.
This is the immediate unblock. The durable fix (SSSS recovery-key bootstrap so every bridge instance self-signs on startup) follows as a separate PR.
Refs jmz/pa#20