feat(cli): add bootstrap-cross-signing subcommand #4
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!4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "kitty/sync-wedge-resilience-fixes"
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?
Bridge users created via
matrix-bridge setup(or any login flow thatjust calls
matrix_auth().login_username()) end up with device-levelcrypto but no cross-signing identity published on the homeserver.
Symptom from a peer client: Element X shows "user verification
unavailable" when trying to verify any of this user's devices, because
there's no master key to anchor a verification chain against.
Without cross-signing, Element X (and any other matrix-rust-sdk client
that requires it) refuses to forward Megolm session keys to the bridge's
device on
m.room_key_request. So even withautomatic-room-key-forwardingenabled on both ends, historic UTDs stayUTD because trusted peers refuse to share.
This subcommand calls
Encryption::bootstrap_cross_signing()on theexisting session, handles the standard UIA round-trip (first call
returns a UiaaResponse describing the required auth flow; we prompt
for the password and retry with
AuthData::Password(...)). Output:After running this once per bot user, Element X (or another verifying
client) can do the standard emoji/QR device-verification flow against
the bridge's device, which cross-signs that device against the user's
master key. Peers that trust the user identity then accept Megolm key
forwarding requests from that device.
One-time setup. Idempotent on the homeserver side: subsequent calls
either no-op (matrix-sdk skips if keys already exist) or fail safely
without altering published state.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com