fix: resolve permissions by scene deployment - #285
Conversation
|
Coordinated scene-integrity hardening set:
Please review merge and deployment ordering across this set before rollout. |
Coverage Report for CI Build 30961753734Coverage decreased (-0.2%) to 85.13%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
decentraland-bot
left a comment
There was a problem hiding this comment.
Thanks for tightening Comms Gatekeeper around scene deployment identity. I found one blocking fail-open case in the world ban path plus a couple of rollout/API follow-ups.
Findings:
- P1 — World ban checks can fail open for active scenes whose entity metadata lacks
worldConfiguration.src/adapters/worlds.ts:fetchWorldSceneByEntityId()requiresmetadata.worldConfiguration.name/dclNameto match the world before it checks the scoped/world/:world/scenesresult. The type still marksworldConfigurationoptional. For/get-scene-adapter,sceneBans.isUserBanned()is called with onlysceneIdfor worlds; if metadata is missing/legacy, place resolution throws andcomms-scene-handler.tscatches non-ForbiddenErrorerrors and allows the user to join. Please either treat the scoped world scene list as authoritative whenworldConfigurationis absent, or make the metadata requirement a hard rollout prerequisite with tests showing banned users cannot bypass via legacy/missing metadata. - P2 — Presenter routes still derive world rooms directly from auth
sceneId. This PR resolves world-name-as-sceneIdin stream-link and comms-scene paths, butget/promote/demote presenterhandlers still build world room IDs fromsceneIdwithout the(world, parcel)resolution. Consider extracting a shared Cast room resolver so all Cast endpoints use the same scene identity. - P2 — Streamer identity validation rejects preview/synthetic room IDs containing
:. The validation regex forstream:*presenter identities only allows one non-colon segment afterstream:, while preview room/place IDs can contain colons. Consider validating by bounded trailing UUID instead of splitting on a single segment.
Security review: no secrets, SQL injection, or missing auth found in the changed paths. The P1 above is the main security-relevant issue because it can bypass scene bans during rollout/legacy metadata cases.
Consumer/API impact: the watcher/stream/cast behavior is external-facing; please keep rollout notes aligned with clients that may still send world-name sceneId metadata.
CI: GitHub reports title convention, build validations, tests, and image build checks passing. Coveralls reports a small coverage decrease with no regressions.
Reviewed by Jarvis 🤖 · Requested by Lautaro Petaccio (<@U025WCHLMN3>) via Slack
|
Addressed the latest review in 204b72e:\n- legacy scenes without metadata resolve only through the scoped world scene index; explicit world mismatch and malformed parcel metadata still reject\n- Cast presenter and stream-link routes share authoritative world+parcel scene resolution\n- streamer presenter identities accept bounded colon-containing room IDs with a trailing UUID\n- added unit/integration coverage; the full pre-push suite passes (89 suites, 1177 tests; 2 skipped). |
Summary
Verification