fix(call-to-play): key actors by stable peer identity
Participant maps and creator authorization previously used display names, so two peers left at the default Commander name collapsed into one participant and could exercise each other's creator controls through the normal client. Carry a stable actor_id separately from actor_name. The peer overwrites actor_id on every local publish, and live event envelopes are accepted only when the known peer, source, and event actor match. The frontend keys participants and authorization by actor_id while retaining actor_name for display. This follows the trusted-LAN model and is not cryptographic authentication against a hostile peer. Test Plan: - `just fmt` -- passed - `just clippy` -- passed - `just test` -- passed - `just frontend-test` -- passed, 21 tests - `just build` -- passed - `just peer-cli-tests S48` -- passed - `git diff --cached --check` -- passed
This commit is contained in:
@@ -44,7 +44,8 @@ pub struct HelloAck {
|
||||
pub struct CallToPlayEvent {
|
||||
pub id: String,
|
||||
pub call_id: String,
|
||||
pub actor: String,
|
||||
pub actor_id: String,
|
||||
pub actor_name: String,
|
||||
pub at: i64,
|
||||
pub action: CallToPlayAction,
|
||||
}
|
||||
@@ -111,6 +112,7 @@ pub enum Request {
|
||||
delta: LibraryDelta,
|
||||
},
|
||||
CallToPlayEvents {
|
||||
peer_id: String,
|
||||
events: Vec<CallToPlayEvent>,
|
||||
},
|
||||
Goodbye {
|
||||
|
||||
Reference in New Issue
Block a user