| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(collab): allow hosted app origins (#2011) * fix(collab): allow hosted app origins The production web and studio hosts were missing from the relay defaults, causing session creation to fail with HTTP 403. Keep both relay implementations aligned and cover the hosted origins with a regression test. * fix(collab): allow deployment preview origins PR previews run on the project-owned Cloudflare Pages hostname and opengeos.org, so the production relay must accept those origins too. Keep custom operator allowlists authoritative and reject look-alike preview domains. * Address CodeRabbit review feedback - Document every default collaboration origin category so the operator note matches the relay policy. * Address review feedback - Remove blanket trust for the shared opengeos.org preview origin. - Restrict Cloudflare previews to one label, HTTPS, and the default port. - Make custom ALLOWED_ORIGINS settings authoritative over local defaults. - Cover nested, custom-port, shared-host, and configured-origin cases. - Document the exact default preview-origin policy and exclusions. | 2 个月前 | |
implement collaboration upgrade proposals (#1856) * implement collaboration upgrade proposals (invite roles, identity, durable overrides, moderation, layer locks) #1681 * style: auto-format (ruff + oxfmt) [pre-commit.ci] * fix: address review fixes * style: auto-format (ruff + oxfmt) [pre-commit.ci] * fixes * style: auto-format (ruff + oxfmt) [pre-commit.ci] * fix(collab): update rate-limit cleanup, proxy IP handling, and collab docs * style: auto-format (ruff + oxfmt) [pre-commit.ci] * fix(collab): defer invite consumption until after join authorization checks succeed * fix(collab): enforce provider string type safety, guard host invites, and clean up setParticipantOverride * style: auto-format (ruff + oxfmt) [pre-commit.ci] * Address Claude review feedback - Verify `identityToken` cryptographically instead of trusting self-reported JSON. New `verifyIdentityToken`/`signIdentityToken` in `@geolibre/collab-core` check an HMAC-SHA256 signature over the token's payload segment, so a client can no longer mint an account, impersonate a user, evade an identity-keyed block, or wear the roster's verified badge. - Make identity opt-in per deployment via `COLLAB_IDENTITY_SECRET` (Worker secret / env var). With no secret configured every token verifies to null and all joiners are anonymous, rather than the relay accepting whatever it is told. - Stop `requireIdentity` from stranding a host's own session: without an issuer, `POST /sessions` answers 400 and `set-session-config` answers the new `identity-unavailable` error, and the relay reports `identitySupported` on `/health` and in every `welcome` so the Collaborate dialog hides the "require a signed-in account" option entirely instead of offering a gate no guest could pass. - Chain per-peer frame handling in the Node relay, since identity verification made `handleMessage` async and `ws` delivers frames without waiting — a `snapshot` sent right behind a `join` would otherwise overtake it. - Document that `block-participant` is durable only for identity- and invite-based joins: an anonymous guest gets a fresh `clientId` per join and can rejoin by reconnecting. `docs/collaboration.md` no longer claims it bans a participant from rejoining, and `getParticipantKey` says so at the source. - Add `tests/collab-identity.test.ts` (signature, tampering, expiry, malformed input, unconfigured relay) and two relay tests covering a self-asserted token and one signed with the wrong secret. * Address Claude review feedback - Correct the docs' "durable across reconnect" claim for `set-participant-mode`. A persisted per-participant override is keyed the same way a block is, so it survives a reconnect only for identity- and invite-based joins; an anonymous guest gets a fresh `clientId`, a fresh participant key, and reverts to the session default. `getParticipantKey` now names the override alongside the block in the same caveat. * feat(collab): add proactive layer locking UI feedback and host controls * style: auto-format (ruff + oxfmt) [pre-commit.ci] --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Qiusheng Wu <giswqs@gmail.com> | 2 个月前 |