Release v0.6.0 - Music Assistant wizard and automatic listener connections
Validate and generate manual release / package (push) Waiting to run
Validate and generate manual release / package (push) Waiting to run
This commit is contained in:
1 parent
5319177c58
commit
eb9536f903
26 files changed
+1553
-764
No files matched your search
+71
-119
@@ -1,133 +1,85 @@
|
||||
# Security — standalone module and optional host fallback
|
||||
# Adaptive Music security — 0.6.0
|
||||
|
||||
The module installs through the normal Foundry manifest/ZIP mechanism. No runtime
|
||||
Docker/VM/LXC, sandbox host, third-party Foundry module, core modification, service
|
||||
installer or public MA endpoint is required or created. The optional companion is
|
||||
retained as experimental source/branch, not a mandatory backend. Co-located host
|
||||
placement/routing/manual service setup is a proposal requiring separate approval.
|
||||
## Private GM connection
|
||||
|
||||
## Trust boundaries
|
||||
MA endpoint, access token, receiver private identity, pairing records and provider
|
||||
configuration stay in the GM tab's closure memory. They are never registered as
|
||||
Foundry settings, saved to document flags/localStorage, sent in module sockets,
|
||||
embedded in URLs, logged or shipped. Closing/reloading requires private re-entry.
|
||||
The user supplies a local identity backup; development/private copies belong under
|
||||
ignored `.local/` (directory 0700, regular secret files 0600). No private configuration
|
||||
or deployment files are included in releases. No credential was used in this work.
|
||||
|
||||
Only an elected single active GM may initiate GM-local MA access. The GM explicitly
|
||||
supplies a memory-only private profile; that GM/browser user can inspect its token,
|
||||
identity and private data. JavaScript private fields are not a secret store against
|
||||
the browser owner, debugger, compromised same-origin code or server administrator.
|
||||
No contrary claim is made. Trust all code served into the GM origin. A player never
|
||||
receives the GM's MA token/profile, SDK private key, upstream URL or queue payload.
|
||||
GM browser users, debuggers and code executing in that origin can inspect the GM's
|
||||
secrets. Trust Foundry and every enabled module. This architecture cannot hide tokens
|
||||
from the GM, same-origin compromise or the host administrator. Players receive only
|
||||
scoped encrypted audio invitations, never an MA credential, endpoint or SDK identity.
|
||||
Use a restricted MA account scoped to the dedicated target and authorized music
|
||||
providers; application-side filtering is defense in depth, not an account restriction.
|
||||
|
||||
Profiles/tokens are not persisted in Foundry settings, flags, localStorage, sockets,
|
||||
logs, release files or URLs. Operator private backups belong outside the module's
|
||||
public files; existing development secrets stay under ignored `.local/` (0700,
|
||||
regular owner-matching files 0600, symlinks refused). Catalog references are opaque
|
||||
HMAC identifiers, stable only with retained operator key/namespace. Configured native
|
||||
ownership and scene/world references are public world data, never MA credentials.
|
||||
MA 2.10.6's inspected WebSocket handler logs received raw frames at VERBOSE, including
|
||||
authentication. Before token-bearing connections the GM must confirm raw-frame
|
||||
logging is disabled. The wizard cannot verify or redact remote logs and does not
|
||||
change logging configuration. No live WebSocket token test was performed here.
|
||||
|
||||
GM control uses the official private MA `/ws` API, with fixed command allowlists,
|
||||
correlated bounded responses and discarded unsolicited events, behind the preserved
|
||||
MA target/media/provider checks. The MA account's role still grants broader writes;
|
||||
filtering is defense in depth, not the sole boundary. No endpoint selector, queue
|
||||
transfer, grouping, unrestricted HTTP/WS/Sendspin proxy or household discovery is
|
||||
available to players. No new identity is registered: supplied X25519 SDK identity
|
||||
must match the already verified DEV target before connecting; reconnecting an existing
|
||||
known unavailable target never relaxes mutation guards. SDK auth is first-message,
|
||||
not a token URL. Only original synthetic test sequences may be enabled for playback.
|
||||
## Transport and authorization
|
||||
|
||||
A precise upstream logging limitation: MA 2.10.6's WebSocket handler logs raw frames
|
||||
at VERBOSE, including auth payloads. No live token WebSocket test was attempted and
|
||||
no upstream log configuration was read/changed. The GM profile requires explicit
|
||||
`webSocketAuthLogSafe` operator review of disabled raw-frame logging before use.
|
||||
The module's own logs omit credentials; it cannot redact MA's logs without changing
|
||||
that upstream behavior. Do not assume default logging or ignore this gate.
|
||||
Use trusted HTTPS for remote Foundry and trusted HTTPS/WSS for private GM-to-MA
|
||||
access. HTTPS → HTTP/ws is rejected, including loopback downgrade. Plain remote
|
||||
Foundry HTTP is rejected for GM MA access. CORS exceptions, encrypted Sendspin payloads
|
||||
and browser local-network permissions do not replace TLS, CSP or Origin policy.
|
||||
Never disable mixed-content protection, certificate validation, Web security or MA
|
||||
authentication. No public/unrestricted MA HTTP/WS/Sendspin proxy is provided.
|
||||
|
||||
## Browser network/security policy
|
||||
Private imported X25519 identity determines one existing receiver ID. Exact name,
|
||||
Sendspin provider, enabled/available state, standalone topology and own active queue
|
||||
are rechecked before each write. There is no household discovery/select list, queue
|
||||
transfer, speaker grouping, global stop or automatic receiver registration. Setup
|
||||
reads can inspect that known target while unavailable during handover; mutation
|
||||
guards are not relaxed. Catalog playback requires explicit GM opt-in and uses only
|
||||
registered static playlist media from approved music providers.
|
||||
|
||||
Private network access from an HTTPS Foundry page still needs permitted routing,
|
||||
trusted TLS/WSS, CSP and server/browser Origin/local-network policies. Sendspin Noise
|
||||
does not waive mixed-content restrictions. Current module policy refuses HTTPS ->
|
||||
non-loopback HTTP/ws MA; modern per-browser local-network exceptions are not a
|
||||
portable supported deployment. HTTP `/api` CORS is also insufficient in the inspected
|
||||
pin; GM control instead uses the public authenticated WebSocket API, not a CORS
|
||||
bypass proxy. No private API is exposed publicly to fix browser access.
|
||||
Automatic listeners use public ephemeral P-256 keys in User flags and private keys
|
||||
in memory. User document permissions, enforced by Foundry's server, bind public keys
|
||||
to accounts. Server/admin/GM and own-browser trust remain necessary. No MA secrets
|
||||
or listener capabilities are stored in those flags. A fixed encrypted invitation
|
||||
bootstrap authenticates both document keys, binds world/epochs/recipient and limits
|
||||
size/concurrent decrypts/replay. Only one active GM and active non-GM participants
|
||||
are eligible. Server User permission enforcement is a real-Foundry acceptance gate,
|
||||
not proven by fixtures. Do not use this scheme with a modified server that permits
|
||||
players to edit another account's User flags or GM role.
|
||||
|
||||
No public third-party STUN/TURN is silently used. Default ICE servers are empty;
|
||||
relay configuration is explicit and TURN credentials must be short-lived. Browser
|
||||
users necessarily see their own relay credentials and decrypted peer signaling.
|
||||
Direct P2P can reveal network addresses to the authorized peer; relay-only mode can
|
||||
reduce that exposure if an approved relay already exists. It cannot guarantee WAN
|
||||
connectivity without appropriate infrastructure. No service/container is provisioned.
|
||||
Capabilities are individual and expire after at most 30 minutes. SDP/ICE is protected
|
||||
by the existing AES-GCM SignalCodec with session/peer/sequence/direction binding.
|
||||
No raw continuous audio, token, upstream URL or queue data goes over module sockets.
|
||||
Audio uses DTLS-SRTP. No microphone/video/control data channel. Role loss, disconnect,
|
||||
revocation and expiry tear down peers. A recipient can forward its own capability
|
||||
or record received audio; browser code cannot prevent that. Authorized direct peers
|
||||
may learn each other's network addresses. Relay-only mode reduces direct candidate
|
||||
exposure when a suitable existing TURN service is configured.
|
||||
|
||||
## Signaling and players
|
||||
No silent public STUN/TURN. TURN credentials must expire within an hour; expired
|
||||
credentials require renewed operator configuration. No service is provisioned.
|
||||
Foundry socket flooding remains an availability concern even though bounded queues,
|
||||
strict envelopes and decrypt limits prevent unbounded application work.
|
||||
|
||||
Ordinary Foundry module sockets carry only bounded encrypted SDP/control envelopes,
|
||||
never continuous PCM/audio chunks, MA commands, media URLs, tokens or invitation
|
||||
secrets. Claimed sender IDs/GM flags are not trusted as authentication. The GM issues
|
||||
a unique expiring 256-bit per-listener capability out of band over a private
|
||||
authenticated channel. Possession authorizes that one peer, not a proven login.
|
||||
A recipient can share its own capability/record received audio; this cannot be
|
||||
prevented by browser JavaScript. Do not distribute a controller/MA secret as an invite.
|
||||
## Authority, recovery and distribution
|
||||
|
||||
AES-GCM covers SDP/ICE/DTLS fingerprints with session/peer/direction/sequence binding,
|
||||
nonce/expiry, strict fields/types/size limits and asynchronous replay rechecks. A
|
||||
listener may negotiate one recvonly audio m-line; video, outbound listener audio and
|
||||
RTC data/control channels are rejected. Keys are per listener, so one recipient
|
||||
cannot forge another listener's authorized exchange. Invalid broadcast frames are
|
||||
dropped; world-server/socket flooding is still a server-side availability concern,
|
||||
not solved by client encryption. Explicit peer/expiry/restart bounds limit our work.
|
||||
Transitions remain serialized and generation checked with signed, campaign/session/
|
||||
fence-scoped snapshots. Uncertain writes latch closed. Browser Web Locks and a
|
||||
single active GM are not a server-side distributed fence. Crashes/offline browsers
|
||||
cannot guarantee MA restore; no automatic split-brain handover or durable recovery.
|
||||
Native fallback cannot silently resolve an uncertain active remote queue. Effects
|
||||
and AmbientSound remain unowned. No production service/network version is changed.
|
||||
|
||||
Media uses browser DTLS-SRTP WebRTC audio tracks. No microphone is requested. GM
|
||||
revocation stops new media, but cannot erase audio already delivered or force a
|
||||
malicious recipient to discard buffered/recorded content. Real Foundry identity,
|
||||
packet validation, WAN/NAT and browsers still need live acceptance.
|
||||
The optional companion source and manual test transports remain advanced development
|
||||
features. No additional service/container is mandatory or installed. Production routes,
|
||||
logging changes or credential use require separate explicit authorization.
|
||||
|
||||
## Authority, failure and original state
|
||||
|
||||
Target identity/provider, own active queue, standalone topology and current authority
|
||||
are rechecked immediately before each mutation. Snapshot and prepared data remain
|
||||
scoped, generation-checked and serialized. Signed snapshots preserve ordered duplicates,
|
||||
index/offset/state/repeat for static unshuffled supported queues; expiry, foreign,
|
||||
tampered or future state denies. Ambiguous remote writes latch closed with no blind
|
||||
retry. Unsupported shuffle/dynamic/autoplay/overlay/ended/speed states fail closed.
|
||||
Only the campaign-owned target is eligible; volume/mute state is read before SDK
|
||||
handover instead of assuming maximum output. Native effects/AmbientSound stay unowned.
|
||||
|
||||
The optional companion retains its process-local fenced lease checks. GM-local control
|
||||
has one-GM checks and a same-origin Web Lock, **not a distributed MA server fence**.
|
||||
It cannot protect against a malicious/stale independent GM with MA credentials.
|
||||
Multiple-GM automation/hard fencing remains a readiness blocker. No automatic GM
|
||||
handover, queue ownership transfer or speaker grouping exists. Foundry disconnect
|
||||
stops forwarding and future writes; an offline/crashed GM cannot guarantee restoration.
|
||||
Native fallback never skips reconciliation of an uncertain active MA target.
|
||||
|
||||
Existing bounded live harnesses still capture original state and report restoration
|
||||
success/failure explicitly. No new playback mutation or Sendspin pairing was attempted
|
||||
in this revision; the read-only check observed an empty idle dedicated queue. The browser measurement
|
||||
used original synthetic PCM, not real MA or licensed-service content. Existing
|
||||
synthetic ingestion failure and identity/TLS/logging gates remain. Crossfade,
|
||||
simultaneous layers, durable recovery and deployment security are not claimed complete.
|
||||
|
||||
## Release and supply-chain safeguards
|
||||
|
||||
The release builder runs offline, uses no Git credential/remote API and never contacts
|
||||
the planned Gitea server. It validates public HTTPS URL shape, stable manifest and
|
||||
versioned ZIP consistency, module ID/author/v14 compatibility, no false `verified`
|
||||
claim, no mandatory systems/modules, import closure, notices, SDK hash and privacy
|
||||
patterns. It rejects private/symlinked package files. Exact private token/endpoint/target
|
||||
scans of history and artifacts supplement these guardrails; they are not a
|
||||
comprehensive secret scanner or proof of uncontacted server availability.
|
||||
|
||||
Official SDK 5.0.0 and noble dependencies are pinned/audited and bundled locally;
|
||||
there is no runtime CDN or installer. Full Apache/MIT texts accompany releases.
|
||||
Optional Opus fallback imports are explicitly disabled in the PCM-only SDK build;
|
||||
libopus/speex/opus-encdec binaries are not distributed. WebRTC's browser codec is not
|
||||
bundled by this project. Install hooks were disabled. Developer-only Playwright/
|
||||
esbuild tools and local Chromium are not shipped or a runtime dependency.
|
||||
|
||||
CI workflows use pinned action commits on an existing shell runner, build artifacts
|
||||
for manual publication, and install no services or infrastructure. No Git host was
|
||||
accessed/authenticated/created/pushed on the user's behalf. Public release files
|
||||
contain no private MA addresses/credentials/deployment data. A source archive is not
|
||||
an installable Foundry ZIP; documentation distinguishes both.
|
||||
|
||||
Peer signaling also bounds each peer to four queued control frames and 64 received
|
||||
control attempts per invitation, limiting asynchronous decrypt/SDP backlog. Socket
|
||||
flooding of the Foundry server remains a server/operator availability concern.
|
||||
Release generation is offline and checks browser import closure, manifests, SDK hash,
|
||||
notices/licenses, deterministic packaging and private-file patterns. Included source
|
||||
archive represents this revision, including uncommitted edits; metadata names the base
|
||||
Git revision and source archive digest. These checks supplement, rather than replace,
|
||||
secret review. Official SDK 5.0.0, noble dependencies and notices remain pinned; no
|
||||
new dependencies, runtime CDN, upstream install hooks or telemetry. PCM-only vendor
|
||||
build omits optional Opus fallback binaries. No Git server was contacted or published to.
|
||||
Reference in new issue
Block a user