mirror of
https://github.com/suitenumerique/meet.git
synced 2026-07-27 20:29:09 +00:00
Compare commits
80 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 70e021965a | |||
| deea80864a | |||
| 8fb4954c7d | |||
| b60193065c | |||
| 6410665c5d | |||
| b1be05dddb | |||
| ef8eda66d6 | |||
| 32ecc3836e | |||
| cddd9e3cd5 | |||
| 9abb560d3c | |||
| 0c21978ca4 | |||
| 7105c6bc70 | |||
| 267b39a975 | |||
| d7ce25b1b5 | |||
| 316008016c | |||
| 191adc0499 | |||
| 854792e2ef | |||
| 547e93b9f1 | |||
| d919cd8097 | |||
| 768b5d7680 | |||
| 5376d39111 | |||
| 58bc6398eb | |||
| 15133f9d6b | |||
| bea1f18ab8 | |||
| d5a614d2b5 | |||
| 108db2e3e5 | |||
| 73496406e8 | |||
| c5c96369c8 | |||
| e9f90e95b1 | |||
| f57fbf2d35 | |||
| 920f4558fc | |||
| 9df901b9d6 | |||
| c09c440631 | |||
| cd7ce77074 | |||
| 6d3c26419d | |||
| 9dbc38984e | |||
| 1bd5a294e4 | |||
| 4d98ed4977 | |||
| bf32c073c6 | |||
| 4f2c4bfaf9 | |||
| dacf705329 | |||
| 8296738347 | |||
| 04be495351 | |||
| 43185605eb | |||
| cf3fb208e2 | |||
| 4ca230eb12 | |||
| 4b5e0cb2a3 | |||
| 45f374610f | |||
| b419a2bfd2 | |||
| ee8d96bee7 | |||
| c65ff2d75d | |||
| ea1c90d8ca | |||
| 3e963e3e6d | |||
| 82769128a1 | |||
| 05f4ce6b2e | |||
| 508984ecfa | |||
| a05507f73d | |||
| a27def119c | |||
| fce94f38ce | |||
| 83bd9c5ce3 | |||
| bfbfade99a | |||
| 16daf7b8d3 | |||
| fcad79d662 | |||
| 2424ce17ec | |||
| 4715905334 | |||
| 7c05aedcfe | |||
| 7347fc7c86 | |||
| ada7d9a666 | |||
| 0cb3fb8e3c | |||
| dcb788b57b | |||
| 73bcb9d598 | |||
| f3e90c3999 | |||
| cb4ed3c9d7 | |||
| f8b0746e73 | |||
| d8ad7a743e | |||
| 0ba445895c | |||
| 3b719ab9ba | |||
| 8887e811d3 | |||
| cb9e994749 | |||
| 1841533d2c |
@@ -12,6 +12,9 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOCKER_USER: 1001:127
|
DOCKER_USER: 1001:127
|
||||||
DOCKER_CONTAINER_REGISTRY_HOSTNAME: docker.io
|
DOCKER_CONTAINER_REGISTRY_HOSTNAME: docker.io
|
||||||
@@ -20,6 +23,8 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-push-backend:
|
build-and-push-backend:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout repository
|
name: Checkout repository
|
||||||
@@ -43,12 +48,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||||
# -
|
-
|
||||||
# name: Run trivy scan
|
name: Run trivy scan
|
||||||
# uses: numerique-gouv/action-trivy-cache@main
|
uses: numerique-gouv/action-trivy-cache@main
|
||||||
# with:
|
with:
|
||||||
# docker-build-args: '--target backend-production -f Dockerfile'
|
docker-build-args: '--target backend-production -f Dockerfile'
|
||||||
# docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-backend:${{ github.sha }}'
|
docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-backend:${{ github.sha }}'
|
||||||
-
|
-
|
||||||
name: Build and push
|
name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
@@ -63,6 +68,8 @@ jobs:
|
|||||||
|
|
||||||
build-and-push-frontend-generic:
|
build-and-push-frontend-generic:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout repository
|
name: Checkout repository
|
||||||
@@ -86,12 +93,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||||
# -
|
-
|
||||||
# name: Run trivy scan
|
name: Run trivy scan
|
||||||
# uses: numerique-gouv/action-trivy-cache@main
|
uses: numerique-gouv/action-trivy-cache@main
|
||||||
# with:
|
with:
|
||||||
# docker-build-args: '-f src/frontend/Dockerfile --target frontend-production'
|
docker-build-args: '-f src/frontend/Dockerfile --target frontend-production'
|
||||||
# docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-frontend:${{ github.sha }}'
|
docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-frontend:${{ github.sha }}'
|
||||||
-
|
-
|
||||||
name: Build and push
|
name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
@@ -107,6 +114,8 @@ jobs:
|
|||||||
|
|
||||||
build-and-push-frontend-dinum:
|
build-and-push-frontend-dinum:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout repository
|
name: Checkout repository
|
||||||
@@ -130,12 +139,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||||
# -
|
-
|
||||||
# name: Run trivy scan
|
name: Run trivy scan
|
||||||
# uses: numerique-gouv/action-trivy-cache@main
|
uses: numerique-gouv/action-trivy-cache@main
|
||||||
# with:
|
with:
|
||||||
# docker-build-args: '-f docker/dinum-frontend/Dockerfile --target frontend-production'
|
docker-build-args: '-f docker/dinum-frontend/Dockerfile --target frontend-production'
|
||||||
# docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-frontend-dinum:${{ github.sha }}'
|
docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-frontend-dinum:${{ github.sha }}'
|
||||||
-
|
-
|
||||||
name: Build and push
|
name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
@@ -151,6 +160,8 @@ jobs:
|
|||||||
|
|
||||||
build-and-push-summary:
|
build-and-push-summary:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout repository
|
name: Checkout repository
|
||||||
@@ -174,13 +185,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||||
# -
|
-
|
||||||
# name: Run trivy scan
|
name: Run trivy scan
|
||||||
# uses: numerique-gouv/action-trivy-cache@main
|
uses: numerique-gouv/action-trivy-cache@main
|
||||||
# continue-on-error: true
|
continue-on-error: true
|
||||||
# with:
|
with:
|
||||||
# docker-build-args: '-f src/summary/Dockerfile --target production'
|
docker-build-args: '-f src/summary/Dockerfile --target production'
|
||||||
# docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-summary:${{ github.sha }}'
|
docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-summary:${{ github.sha }}'
|
||||||
docker-context: './src/summary'
|
docker-context: './src/summary'
|
||||||
-
|
-
|
||||||
name: Build and push
|
name: Build and push
|
||||||
@@ -197,6 +208,8 @@ jobs:
|
|||||||
|
|
||||||
build-and-push-agents:
|
build-and-push-agents:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout repository
|
name: Checkout repository
|
||||||
@@ -220,14 +233,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||||
# -
|
-
|
||||||
# name: Run trivy scan
|
name: Run trivy scan
|
||||||
# uses: numerique-gouv/action-trivy-cache@main
|
uses: numerique-gouv/action-trivy-cache@main
|
||||||
# continue-on-error: true
|
continue-on-error: true
|
||||||
# with:
|
with:
|
||||||
# docker-build-args: '-f src/agents/Dockerfile --target production'
|
docker-build-args: '-f src/agents/Dockerfile --target production'
|
||||||
# docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-agents:${{ github.sha }}'
|
docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-agents:${{ github.sha }}'
|
||||||
# docker-context: './src/agents'
|
docker-context: './src/agents'
|
||||||
-
|
-
|
||||||
name: Build and push
|
name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
@@ -242,6 +255,8 @@ jobs:
|
|||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
notify-argocd:
|
notify-argocd:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
needs:
|
needs:
|
||||||
- build-and-push-frontend-generic
|
- build-and-push-frontend-generic
|
||||||
- build-and-push-frontend-dinum
|
- build-and-push-frontend-dinum
|
||||||
|
|||||||
@@ -297,6 +297,46 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: uv run pytest -n 2
|
run: uv run pytest -n 2
|
||||||
|
|
||||||
|
test-summary:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: src/summary
|
||||||
|
|
||||||
|
env:
|
||||||
|
APP_API_TOKEN: "test-api-token"
|
||||||
|
AWS_STORAGE_BUCKET_NAME: "http://meet-media-storage"
|
||||||
|
AWS_S3_ENDPOINT_URL: "minio:9000"
|
||||||
|
AWS_S3_ACCESS_KEY_ID: "meet"
|
||||||
|
AWS_S3_SECRET_ACCESS_KEY: "password"
|
||||||
|
WHISPERX_BASE_URL: "https://configure-your-url.com"
|
||||||
|
WHISPERX_ASR_MODEL: "large-v2"
|
||||||
|
WHISPERX_API_KEY: "test-whisperx-secret"
|
||||||
|
WHISPERX_DEFAULT_LANGUAGE: "fr"
|
||||||
|
LLM_BASE_URL: "https://configure-your-url.com"
|
||||||
|
LLM_API_KEY: "test-llm-secret"
|
||||||
|
LLM_MODEL: "test-llm-model"
|
||||||
|
WEBHOOK_API_TOKEN: "test-webhook-secret"
|
||||||
|
WEBHOOK_URL: "https://configure-your-url.com"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Install Python
|
||||||
|
uses: actions/setup-python@v6
|
||||||
|
with:
|
||||||
|
python-version: "3.13"
|
||||||
|
cache: "pip"
|
||||||
|
|
||||||
|
- name: Install development dependencies
|
||||||
|
run: pip install --user .[dev]
|
||||||
|
|
||||||
|
- name: Run summary tests
|
||||||
|
run: ~/.local/bin/pytest
|
||||||
|
|
||||||
lint-front:
|
lint-front:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
+46
-2
@@ -8,30 +8,74 @@ and this project adheres to
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- ⬆️(dependencies) update python dependencies
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- 🔒️(backend) fix email disclosure in room invitation endpoint #1200
|
||||||
|
- 🐛(backend) fix regression in update-participant endpoint #1204
|
||||||
|
|
||||||
|
## [1.12.0] - 2026-03-24
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- ♻️(backend) configurable SESSION_ENGINE #1038 #1154
|
||||||
|
- ♿️(frontend) fix sidepanel accessibility aria-label #1182
|
||||||
|
- ♿️(frontend) fix more tools heading hierarchy #1181
|
||||||
|
- ♿️(fronted) improve button descriptions for More tools actions #1184
|
||||||
|
- 💄(spinner) enforce spinner height #1183
|
||||||
|
- 💄(custom-background) add upload indicator with preview #1183
|
||||||
|
- ♿️(backend) improve logo accessibility in recording email notification #1092
|
||||||
|
- ♿️(summary) improve accessibility of transcription download link #1187
|
||||||
|
- 💄(frontend) show OS-specific shortcut in participant tile hint #1193
|
||||||
|
- ⬆️(frontend) bump flatted from 3.3.1 to 3.4.2 in /src/frontend #1188
|
||||||
|
- ⬆️️️(frontend) bump undici from 6.23.0 to 6.24.1 in /src/frontend
|
||||||
|
- ⬆️️️(frontend) bump hono from 4.12.2 to 4.12.7 in /src/frontend
|
||||||
|
- ⬆️️️(frontend) bump dompurify from 3.3.1 to 3.3.2 in /src/frontend
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- 🐛(frontend) disable personal custom background while deleting #1183
|
||||||
|
- 🐛(frontend) auto-select new custom background when not logged in #1183
|
||||||
|
- 🐛(frontend) fix device selection not applying during conference #1156
|
||||||
|
|
||||||
|
## [1.11.0] - 2026-03-19
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- ✨(helm) support celery with our Django backend #1124
|
- ✨(helm) support celery with our Django backend #1124
|
||||||
- ✨(helm) support ingress for custom background image #1124
|
- ✨(helm) support ingress for custom background image #1124
|
||||||
- ✨(backend) add authenticated user rate throttling on request-entry #1129
|
- ✨(backend) add authenticated user rate throttling on request-entry #1129
|
||||||
- ✨(backend) expose `is_active` field for Application in Django admin #1133
|
- ✨(backend) expose `is_active` field for Application in Django admin #1133
|
||||||
|
- ✨(file-upload) disable by default & limit count by user #1141
|
||||||
|
- ✨(frontend) custom background #1067
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- ♿️(frontend) Caption text size setting for accessibility #1062
|
- ♿️(frontend) Caption text size setting for accessibility #1062
|
||||||
- ♿️(frontend) sync html lang attribute with i18n for screen readers #1111
|
- ♿️(frontend) sync html lang attribute with i18n for screen readers #1111
|
||||||
- ♿️(frontend) improve MoreLink a11y and UX on home page #1112
|
- ♿️(frontend) improve MoreLink a11y and UX on home page #1112
|
||||||
- ♿(frontend) improve chat toast a11y for screen readers #1109
|
- ♿️(frontend) improve chat toast a11y for screen readers #1109
|
||||||
- ♿(frontend) improve ui and aria labels for help article links #1108
|
- ♿️(frontend) improve ui and aria labels for help article links #1108
|
||||||
- 🌐(frontend) improve German translation #1125
|
- 🌐(frontend) improve German translation #1125
|
||||||
- 🔨(python-env) migrate meet main app to UV #1120
|
- 🔨(python-env) migrate meet main app to UV #1120
|
||||||
- ♻️(backend) align Application model field with `is_active` convention #1133
|
- ♻️(backend) align Application model field with `is_active` convention #1133
|
||||||
- 🔐(backend) avoids revealing the inactive status of an application #1135
|
- 🔐(backend) avoids revealing the inactive status of an application #1135
|
||||||
|
- ⚡️(helm) reduce initialDelaySeconds and add periods seconds #1139
|
||||||
|
- 🔒️(backend) avoid information exposure through exception messages #1144
|
||||||
|
- ⬆️(dependencies) update PyJWT to v2.12.0 [SECURITY] #1151
|
||||||
|
- 📌(agents) unpin OpenSSL and related dependencies #1167
|
||||||
|
- ♿️(frontend) add caption font and background color customization #1122
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- 🐛(frontend) fix hand icon and queue position alignment and position #1119
|
- 🐛(frontend) fix hand icon and queue position alignment and position #1119
|
||||||
- 🩹(backend) add page_size to pagination for room endpoints #1131
|
- 🩹(backend) add page_size to pagination for room endpoints #1131
|
||||||
- 🐛(backend) refactor lobby throttling to use participant id #1129
|
- 🐛(backend) refactor lobby throttling to use participant id #1129
|
||||||
|
- 🩹(backend) ignore non-recording uploads in storage webhook handler #1142
|
||||||
|
- 🐛(frontend) fix dimension mismatch in BackgroundCustomProcessor #1116
|
||||||
|
|
||||||
## [1.10.0] - 2026-03-05
|
## [1.10.0] - 2026-03-05
|
||||||
|
|
||||||
|
|||||||
@@ -191,6 +191,7 @@ lint-pylint: ## lint back-end python sources with pylint only on changed files f
|
|||||||
|
|
||||||
test: ## run project tests
|
test: ## run project tests
|
||||||
@$(MAKE) test-back-parallel
|
@$(MAKE) test-back-parallel
|
||||||
|
@$(MAKE) test-summary
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
|
|
||||||
test-back: ## run back-end tests
|
test-back: ## run back-end tests
|
||||||
@@ -203,6 +204,11 @@ test-back-parallel: ## run all back-end tests in parallel
|
|||||||
bin/pytest -n auto $${args:-${1}}
|
bin/pytest -n auto $${args:-${1}}
|
||||||
.PHONY: test-back-parallel
|
.PHONY: test-back-parallel
|
||||||
|
|
||||||
|
test-summary: ## run summary tests
|
||||||
|
@args="$(filter-out $@,$(MAKECMDGOALS))" && \
|
||||||
|
bin/pytest-summary $${args:-${1}}
|
||||||
|
.PHONY: test-summary
|
||||||
|
|
||||||
makemigrations: ## run django makemigrations for the Meet project.
|
makemigrations: ## run django makemigrations for the Meet project.
|
||||||
@echo "$(BOLD)Running makemigrations$(RESET)"
|
@echo "$(BOLD)Running makemigrations$(RESET)"
|
||||||
@$(COMPOSE) up -d postgresql
|
@$(COMPOSE) up -d postgresql
|
||||||
@@ -354,13 +360,13 @@ install-external-secrets: ## install the kubernetes secrets from Vaultwarden
|
|||||||
.PHONY: build-k8s-cluster
|
.PHONY: build-k8s-cluster
|
||||||
|
|
||||||
start-tilt: ## start the kubernetes cluster using kind
|
start-tilt: ## start the kubernetes cluster using kind
|
||||||
tilt up -f ./bin/Tiltfile
|
tilt up --namespace=meet -f ./bin/Tiltfile
|
||||||
.PHONY: build-k8s-cluster
|
.PHONY: build-k8s-cluster
|
||||||
|
|
||||||
start-tilt-keycloak: ## start the kubernetes cluster using kind, without Pro Connect for authentication, use keycloak
|
start-tilt-keycloak: ## start the kubernetes cluster using kind, without Pro Connect for authentication, use keycloak
|
||||||
DEV_ENV=dev-keycloak tilt up -f ./bin/Tiltfile
|
DEV_ENV=dev-keycloak tilt up --namespace=meet -f ./bin/Tiltfile
|
||||||
.PHONY: build-k8s-cluster
|
.PHONY: build-k8s-cluster
|
||||||
|
|
||||||
start-tilt-dinum: ## start the kubernetes cluster using kind, without Pro Connect for authentication, but with DINUM styles
|
start-tilt-dinum: ## start the kubernetes cluster using kind, without Pro Connect for authentication, but with DINUM styles
|
||||||
DEV_ENV=dev-dinum tilt up -f ./bin/Tiltfile
|
DEV_ENV=dev-dinum tilt up --namespace=meet -f ./bin/Tiltfile
|
||||||
.PHONY: build-k8s-cluster
|
.PHONY: build-k8s-cluster
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<img alt="meet logo" src="./docs/assets/banner-meet-fr.png" maxWidth="100%">
|
<img alt="meet logo" src="./docs/assets/banner-meet-fr.png" maxWidth="100%">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/suitenumerique/meet/stargazers/">
|
<a href="https://github.com/suitenumerique/meet/stargazers/">
|
||||||
<img src="https://img.shields.io/github/stars/suitenumerique/meet" alt="">
|
<img src="https://img.shields.io/github/stars/suitenumerique/meet" alt="">
|
||||||
@@ -12,11 +11,11 @@
|
|||||||
<img alt="GitHub closed issues" src="https://img.shields.io/github/issues-closed/suitenumerique/meet"/>
|
<img alt="GitHub closed issues" src="https://img.shields.io/github/issues-closed/suitenumerique/meet"/>
|
||||||
<a href="https://github.com/suitenumerique/meet/blob/main/LICENSE">
|
<a href="https://github.com/suitenumerique/meet/blob/main/LICENSE">
|
||||||
<img alt="GitHub closed issues" src="https://img.shields.io/github/license/suitenumerique/meet"/>
|
<img alt="GitHub closed issues" src="https://img.shields.io/github/license/suitenumerique/meet"/>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://livekit.io/">LiveKit</a> - <a href="https://matrix.to/#/#meet-official:matrix.org">Chat with us</a> - <a href="https://github.com/orgs/suitenumerique/projects/3/views/2">Roadmap</a> - <a href="https://github.com/suitenumerique/meet/blob/main/CHANGELOG.md">Changelog</a> - <a href="https://github.com/suitenumerique/meet/issues/new?assignees=&labels=bug&template=Bug_report.md">Bug reports</a>
|
<a href="https://livekit.io/">LiveKit</a> - <a href="https://matrix.to/#/#meet-official:matrix.org">Chat with us</a> - <a href="https://github.com/orgs/suitenumerique/projects/3/views/2">Roadmap</a> - <a href="https://github.com/suitenumerique/meet/blob/main/CHANGELOG.md">Changelog</a> - <a href="https://github.com/suitenumerique/meet/issues/new?assignees=&labels=bug&template=Bug_report.md">Bug reports</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@@ -28,25 +27,75 @@
|
|||||||
## La Suite Meet: Simple Video Conferencing
|
## La Suite Meet: Simple Video Conferencing
|
||||||
|
|
||||||
Powered by [LiveKit](https://livekit.io/), La Suite Meet offers Zoom-level performance with high-quality video and audio. No installation required—simply join calls directly from your browser. Check out LiveKit's impressive optimizations in their [blog post](https://blog.livekit.io/livekit-one-dot-zero/).
|
Powered by [LiveKit](https://livekit.io/), La Suite Meet offers Zoom-level performance with high-quality video and audio. No installation required—simply join calls directly from your browser. Check out LiveKit's impressive optimizations in their [blog post](https://blog.livekit.io/livekit-one-dot-zero/).
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- Optimized for stability in large meetings (+100 p.)
|
- Optimized for stability in large meetings (+100 p.)
|
||||||
- Support for multiple screen sharing streams
|
- Support for multiple screen sharing streams
|
||||||
- Non-persistent, secure chat
|
- Non-persistent, secure chat
|
||||||
- End-to-end encryption (coming soon)
|
- End-to-end encryption with hybrid key distribution
|
||||||
- Meeting recording
|
- Meeting recording
|
||||||
- Meeting transcription & Summary (currently in beta)
|
- Meeting transcription & Summary (currently in beta)
|
||||||
- Telephony integration
|
- Telephony integration
|
||||||
- Secure participation with robust authentication and access control
|
- Secure participation with robust authentication and access control
|
||||||
- Customizable frontend style
|
- Customizable frontend style
|
||||||
- LiveKit Advances features including :
|
- LiveKit Advances features including :
|
||||||
- speaker detection
|
- speaker detection
|
||||||
- simulcast
|
- simulcast
|
||||||
- end-to-end optimizations
|
- end-to-end optimizations
|
||||||
- selective subscription
|
- selective subscription
|
||||||
- SVC codecs (VP9, AV1)
|
- SVC codecs (VP9, AV1)
|
||||||
|
|
||||||
|
### End-to-end encryption
|
||||||
|
|
||||||
La Suite Meet is fully self-hostable and released under the MIT License, ensuring complete control and flexibility. It's simple to [get started](https://visio.numerique.gouv.fr/) or [request a demo](mailto:visio@numerique.gouv.fr).
|
La Suite Meet supports end-to-end encryption (E2EE) for meetings, ensuring that the media server (LiveKit SFU) cannot access audio/video content. Two encryption modes are available:
|
||||||
|
|
||||||
|
#### Basic encryption
|
||||||
|
|
||||||
|
- Passphrase-based — the encryption key is embedded in the meeting URL hash (`#passphrase`)
|
||||||
|
- Uses LiveKit's built-in Worker + `crypto.subtle` (AES-GCM) for frame encryption
|
||||||
|
- Sharing the meeting link shares the encryption key
|
||||||
|
- No account or onboarding required
|
||||||
|
- Security depends on keeping the link private
|
||||||
|
|
||||||
|
#### Advanced encryption
|
||||||
|
|
||||||
|
- Key managed by [La Suite Encryption](https://github.com/suitenumerique/encryption) — the symmetric key never leaves the vault iframe
|
||||||
|
- Uses XChaCha20-Poly1305 (libsodium) via the VaultClient iframe for frame encryption
|
||||||
|
- Key distribution uses `vaultClient.shareKeys()` (hybrid PKI with X25519 + post-quantum slot)
|
||||||
|
- All participants must complete encryption onboarding (key generation + backup) before joining
|
||||||
|
- Requires a Chromium-based browser (Chrome, Edge, Brave) — uses the Insertable Streams API
|
||||||
|
|
||||||
|
**Frame encryption (both modes):**
|
||||||
|
|
||||||
|
- Codec header bytes (VP8 payload descriptor) are preserved unencrypted — required for proper RTP packetization
|
||||||
|
- Only the media payload is encrypted, with a per-frame random nonce
|
||||||
|
- The server (LiveKit SFU) only forwards encrypted data it cannot read
|
||||||
|
|
||||||
|
**Trust levels (advanced mode):**
|
||||||
|
| Badge | Level | Description |
|
||||||
|
|-------|-------|-------------|
|
||||||
|
| 🟢 Green shield | Verified | User completed encryption onboarding (public key registered). Identity cryptographically verified. |
|
||||||
|
| 🔵 Blue shield | Authenticated | User signed in via ProConnect/OIDC. Identity server-verified. |
|
||||||
|
| 🟡 Orange warning | Anonymous | User not signed in. Self-declared name. Admin should verify identity before accepting. |
|
||||||
|
|
||||||
|
**Security guarantees:**
|
||||||
|
|
||||||
|
- Encrypted rooms enforce restricted access (lobby approval required)
|
||||||
|
- Trust information (`is_authenticated`, `email`) comes from server-signed JWT tokens — cannot be spoofed
|
||||||
|
- Recording and transcription are not available in encrypted rooms (server cannot decrypt media)
|
||||||
|
|
||||||
|
**Configuration:**
|
||||||
|
|
||||||
|
```env
|
||||||
|
ENCRYPTION_ENABLED=true
|
||||||
|
ENCRYPTION_VAULT_URL=https://data.encryption.example.fr
|
||||||
|
ENCRYPTION_INTERFACE_URL=https://encryption.example.fr
|
||||||
|
```
|
||||||
|
|
||||||
|
When the encryption service is deployed and configured, rooms can use advanced encryption. Without it, only basic (passphrase) encryption is available.
|
||||||
|
|
||||||
|
La Suite Meet is fully self-hostable and released under the MIT License, ensuring complete control and flexibility. It's simple to [get started](https://visio.numerique.gouv.fr/) or [request a demo](mailto:visio@numerique.gouv.fr).
|
||||||
|
|
||||||
We’re continuously adding new features to enhance your experience, with the latest updates coming soon!
|
We’re continuously adding new features to enhance your experience, with the latest updates coming soon!
|
||||||
|
|
||||||
@@ -63,7 +112,6 @@ On the 25th of January 2026, David Amiel, France’s Minister for Civil Service
|
|||||||
- [Philosophy](#philosophy)
|
- [Philosophy](#philosophy)
|
||||||
- [Open source](#open-source)
|
- [Open source](#open-source)
|
||||||
|
|
||||||
|
|
||||||
## Get started
|
## Get started
|
||||||
|
|
||||||
## Docs
|
## Docs
|
||||||
@@ -82,15 +130,15 @@ We use Kubernetes for our [production instance](https://visio.numerique.gouv.fr/
|
|||||||
> Some advanced features (ex: recording, transcription) lack detailed documentation. We're working hard to provide comprehensive guides soon.
|
> Some advanced features (ex: recording, transcription) lack detailed documentation. We're working hard to provide comprehensive guides soon.
|
||||||
|
|
||||||
#### Known instances
|
#### Known instances
|
||||||
|
|
||||||
We hope to see many more, here is an incomplete list of public La Suite Meet instances. Feel free to make a PR to add ones that are not listed below🙏
|
We hope to see many more, here is an incomplete list of public La Suite Meet instances. Feel free to make a PR to add ones that are not listed below🙏
|
||||||
|
|
||||||
| Url | Org | Access |
|
| Url | Org | Access |
|
||||||
|---------------------------------------------------------------| --- | ------- |
|
| ------------------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| [visio.numerique.gouv.fr](https://visio.numerique.gouv.fr/) | DINUM | French public agents working for the central administration and the extended public sphere. ProConnect is required to login in or sign up|
|
| [visio.numerique.gouv.fr](https://visio.numerique.gouv.fr/) | DINUM | French public agents working for the central administration and the extended public sphere. ProConnect is required to login in or sign up |
|
||||||
| [visio.suite.anct.gouv.fr](https://visio.suite.anct.gouv.fr/) | ANCT | French public agents working for the territorial administration and the extended public sphere. ProConnect is required to login in or sign up|
|
| [visio.suite.anct.gouv.fr](https://visio.suite.anct.gouv.fr/) | ANCT | French public agents working for the territorial administration and the extended public sphere. ProConnect is required to login in or sign up |
|
||||||
| [visio.lasuite.coop](https://visio.lasuite.coop/) | lasuite.coop | Free and open demo to all. Content and accounts are reset after one month |
|
| [visio.lasuite.coop](https://visio.lasuite.coop/) | lasuite.coop | Free and open demo to all. Content and accounts are reset after one month |
|
||||||
| [mosacloud.cloud](https://mosa.cloud/) | mosa.cloud | Demo instance of mosa.cloud, a dutch company providing services around La Suite apps. |
|
| [mosacloud.cloud](https://mosa.cloud/) | mosa.cloud | Demo instance of mosa.cloud, a dutch company providing services around La Suite apps. |
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
@@ -100,7 +148,6 @@ We <3 contributions of any kind, big and small:
|
|||||||
- Open a PR (see our instructions on [developing La Suite Meet locally](https://github.com/suitenumerique/meet/blob/main/docs/developping_locally.md))
|
- Open a PR (see our instructions on [developing La Suite Meet locally](https://github.com/suitenumerique/meet/blob/main/docs/developping_locally.md))
|
||||||
- Submit a [feature request](https://github.com/suitenumerique/meet/issues/new?assignees=&labels=enhancement&template=Feature_request.md) or [bug report](https://github.com/suitenumerique/meet/issues/new?assignees=&labels=bug&template=Bug_report.md)
|
- Submit a [feature request](https://github.com/suitenumerique/meet/issues/new?assignees=&labels=enhancement&template=Feature_request.md) or [bug report](https://github.com/suitenumerique/meet/issues/new?assignees=&labels=bug&template=Bug_report.md)
|
||||||
|
|
||||||
|
|
||||||
## Philosophy
|
## Philosophy
|
||||||
|
|
||||||
We’re relentlessly focused on building the best open-source video conferencing product—La Suite Meet. Growth comes from creating something people truly need, not just from chasing metrics.
|
We’re relentlessly focused on building the best open-source video conferencing product—La Suite Meet. Growth comes from creating something people truly need, not just from chasing metrics.
|
||||||
@@ -109,7 +156,6 @@ Our users come first. We’re committed to making La Suite Meet as accessible an
|
|||||||
|
|
||||||
Most of the heavy engineering is handled by the incredible LiveKit team, allowing us to focus on delivering a top-tier product. We follow extreme programming practices, favoring pair programming and quick, iterative releases. Challenge our tech and architecture—simplicity is always our top priority.
|
Most of the heavy engineering is handled by the incredible LiveKit team, allowing us to focus on delivering a top-tier product. We follow extreme programming practices, favoring pair programming and quick, iterative releases. Challenge our tech and architecture—simplicity is always our top priority.
|
||||||
|
|
||||||
|
|
||||||
## Open-source
|
## Open-source
|
||||||
|
|
||||||
Gov 🇫🇷 supports open source! This project is available under [MIT license](https://github.com/suitenumerique/meet/blob/0cc2a7b7b4f4821e2c4d9d790efa739622bb6601/LICENSE).
|
Gov 🇫🇷 supports open source! This project is available under [MIT license](https://github.com/suitenumerique/meet/blob/0cc2a7b7b4f4821e2c4d9d790efa739622bb6601/LICENSE).
|
||||||
@@ -121,14 +167,13 @@ To learn more, don't hesitate to [reach out](mailto:visio@numerique.gouv.fr).
|
|||||||
|
|
||||||
Come help us make La Suite Meet even better. We're growing fast and [would love some help](mailto:visio@numerique.gouv.fr).
|
Come help us make La Suite Meet even better. We're growing fast and [would love some help](mailto:visio@numerique.gouv.fr).
|
||||||
|
|
||||||
|
|
||||||
## Contributors 🧞
|
## Contributors 🧞
|
||||||
|
|
||||||
<a href="https://github.com/suitenumerique/meet/graphs/contributors">
|
<a href="https://github.com/suitenumerique/meet/graphs/contributors">
|
||||||
<img src="https://contrib.rocks/image?repo=suitenumerique/meet" />
|
<img src="https://contrib.rocks/image?repo=suitenumerique/meet" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
We're using the awesome [LiveKit](https://livekit.io/) implementation. We're also thankful to the teams behind [Django Rest Framework](https://www.django-rest-framework.org/), [Vite.js](https://vite.dev/), and [React Aria](https://github.com/adobe/react-spectrum) — Thanks for your amazing work!
|
We're using the awesome [LiveKit](https://livekit.io/) implementation. We're also thankful to the teams behind [Django Rest Framework](https://www.django-rest-framework.org/), [Vite.js](https://vite.dev/), and [React Aria](https://github.com/adobe/react-spectrum) — Thanks for your amazing work!
|
||||||
This project is tested with BrowserStack.
|
This project is tested with BrowserStack.
|
||||||
@@ -137,4 +182,3 @@ This project is tested with BrowserStack.
|
|||||||
|
|
||||||
Code in this repository is published under the MIT license by DINUM (Direction interministériel du numérique).
|
Code in this repository is published under the MIT license by DINUM (Direction interministériel du numérique).
|
||||||
Documentation (in the docs/) directory is released under the [Etalab-2.0 license](https://spdx.org/licenses/etalab-2.0.html).
|
Documentation (in the docs/) directory is released under the [Etalab-2.0 license](https://spdx.org/licenses/etalab-2.0.html).
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ k8s_resource('meet-celery-backend', resource_deps=['redis'])
|
|||||||
k8s_resource('meet-celery-summarize', resource_deps=['redis'])
|
k8s_resource('meet-celery-summarize', resource_deps=['redis'])
|
||||||
k8s_resource('meet-celery-transcribe', resource_deps=['redis'])
|
k8s_resource('meet-celery-transcribe', resource_deps=['redis'])
|
||||||
k8s_resource('meet-backend-migrate', resource_deps=['meet-backend'])
|
k8s_resource('meet-backend-migrate', resource_deps=['meet-backend'])
|
||||||
|
k8s_resource('livekit-livekit-server', resource_deps=['redis'])
|
||||||
k8s_resource('livekit-livekit-server-test-connection', resource_deps=['livekit-livekit-server'])
|
k8s_resource('livekit-livekit-server-test-connection', resource_deps=['livekit-livekit-server'])
|
||||||
k8s_resource('keycloak', resource_deps=['kc-postgresql'])
|
k8s_resource('keycloak', resource_deps=['kc-postgresql'])
|
||||||
k8s_resource('meet-backend-createsuperuser', resource_deps=['meet-backend-migrate'])
|
k8s_resource('meet-backend-createsuperuser', resource_deps=['meet-backend-migrate'])
|
||||||
|
|||||||
Executable
+7
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
source "$(dirname "${BASH_SOURCE[0]}")/_config.sh"
|
||||||
|
|
||||||
|
_dc_run \
|
||||||
|
app-summary-dev \
|
||||||
|
python -m pytest "$@"
|
||||||
+20
-3
@@ -60,7 +60,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"username": "user-e2e-chromium",
|
"username": "user-e2e-chromium",
|
||||||
"email": "user@chromium.e2e",
|
"email": "user.test@chromium.test",
|
||||||
"firstName": "E2E",
|
"firstName": "E2E",
|
||||||
"lastName": "Chromium",
|
"lastName": "Chromium",
|
||||||
"enabled": "true",
|
"enabled": "true",
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"username": "user-e2e-webkit",
|
"username": "user-e2e-webkit",
|
||||||
"email": "user@webkit.e2e",
|
"email": "user.test@webkit.test",
|
||||||
"firstName": "E2E",
|
"firstName": "E2E",
|
||||||
"lastName": "Webkit",
|
"lastName": "Webkit",
|
||||||
"enabled": "true",
|
"enabled": "true",
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"username": "user-e2e-firefox",
|
"username": "user-e2e-firefox",
|
||||||
"email": "user@firefox.e2e",
|
"email": "user.test@firefox.test",
|
||||||
"firstName": "E2E",
|
"firstName": "E2E",
|
||||||
"lastName": "Firefox",
|
"lastName": "Firefox",
|
||||||
"enabled": "true",
|
"enabled": "true",
|
||||||
@@ -845,6 +845,23 @@
|
|||||||
"offline_access",
|
"offline_access",
|
||||||
"microprofile-jwt"
|
"microprofile-jwt"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"clientId": "encryption",
|
||||||
|
"name": "Encryption Service",
|
||||||
|
"enabled": true,
|
||||||
|
"publicClient": true,
|
||||||
|
"standardFlowEnabled": true,
|
||||||
|
"directAccessGrantsEnabled": false,
|
||||||
|
"redirectUris": [
|
||||||
|
"http://encryption.localhost:7200/auth/callback"
|
||||||
|
],
|
||||||
|
"webOrigins": [
|
||||||
|
"http://encryption.localhost:7200",
|
||||||
|
"http://data.encryption.localhost:7200"
|
||||||
|
],
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"fullScopeAllowed": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"clientScopes": [
|
"clientScopes": [
|
||||||
|
|||||||
@@ -61,11 +61,10 @@ services:
|
|||||||
`docker compose up -d`
|
`docker compose up -d`
|
||||||
```
|
```
|
||||||
|
|
||||||
Your keycloak instance is now available on https://doc.yourdomain.tld
|
Your keycloak instance is now available on https://id.yourdomain.tld
|
||||||
|
|
||||||
> [!CAUTION]
|
> [!CAUTION]
|
||||||
> Version of the images are set to latest, you should pin it to the desired version to avoid unwanted upgrades when pulling latest image. You can find available versions on [Keycloak registry](https://quay.io/repository/keycloak/keycloak?tab=tags).
|
> Version of the images are set to latest, you should pin it to the desired version to avoid unwanted upgrades when pulling latest image. You can find available versions on [Keycloak registry](https://quay.io/repository/keycloak/keycloak?tab=tags).
|
||||||
```
|
|
||||||
|
|
||||||
## Creating an OIDC Client for Meet Application
|
## Creating an OIDC Client for Meet Application
|
||||||
|
|
||||||
@@ -76,7 +75,7 @@ Your keycloak instance is now available on https://doc.yourdomain.tld
|
|||||||
3. Enter the name of the realm - `meet`.
|
3. Enter the name of the realm - `meet`.
|
||||||
4. Click "Create".
|
4. Click "Create".
|
||||||
|
|
||||||
#### Step 2: Create a New Client
|
### Step 2: Create a New Client
|
||||||
|
|
||||||
1. Navigate to the "Clients" tab.
|
1. Navigate to the "Clients" tab.
|
||||||
2. Click on the "Create client" button.
|
2. Click on the "Create client" button.
|
||||||
@@ -86,7 +85,7 @@ Your keycloak instance is now available on https://doc.yourdomain.tld
|
|||||||
1. Set the "Web Origins" to the URL of your meet application - e.g. `https://meet.example.com`.
|
1. Set the "Web Origins" to the URL of your meet application - e.g. `https://meet.example.com`.
|
||||||
1. Click "Save".
|
1. Click "Save".
|
||||||
|
|
||||||
#### Step 3: Get Client Credentials
|
### Step 3: Get Client Credentials
|
||||||
|
|
||||||
1. Go to the "Credentials" tab.
|
1. Go to the "Credentials" tab.
|
||||||
2. Copy the client ID (`meet` in this example) and the client secret.
|
2. Copy the client ID (`meet` in this example) and the client secret.
|
||||||
|
|||||||
@@ -190,6 +190,7 @@ paths:
|
|||||||
'403':
|
'403':
|
||||||
$ref: '#/components/responses/ForbiddenError'
|
$ref: '#/components/responses/ForbiddenError'
|
||||||
|
|
||||||
|
/rooms/:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Rooms
|
- Rooms
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ paths:
|
|||||||
'403':
|
'403':
|
||||||
$ref: '#/components/responses/ForbiddenError'
|
$ref: '#/components/responses/ForbiddenError'
|
||||||
|
|
||||||
|
/rooms/:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Rooms
|
- Rooms
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ AWS_S3_DOMAIN_REPLACE=http://localhost:9000
|
|||||||
AWS_S3_ENDPOINT_URL=http://minio:9000
|
AWS_S3_ENDPOINT_URL=http://minio:9000
|
||||||
AWS_S3_ACCESS_KEY_ID=meet
|
AWS_S3_ACCESS_KEY_ID=meet
|
||||||
AWS_S3_SECRET_ACCESS_KEY=password
|
AWS_S3_SECRET_ACCESS_KEY=password
|
||||||
MEDIA_BASE_URL=http://localhost:8083
|
MEDIA_BASE_URL=http://localhost:3000
|
||||||
|
FILE_UPLOAD_ENABLED=True
|
||||||
|
|
||||||
# OIDC
|
# OIDC
|
||||||
OIDC_OP_JWKS_ENDPOINT=http://nginx:8083/realms/meet/protocol/openid-connect/certs
|
OIDC_OP_JWKS_ENDPOINT=http://nginx:8083/realms/meet/protocol/openid-connect/certs
|
||||||
|
|||||||
@@ -36,6 +36,12 @@
|
|||||||
"matchPackageNames": ["django"],
|
"matchPackageNames": ["django"],
|
||||||
"allowedVersions": "<6.0.0"
|
"allowedVersions": "<6.0.0"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"groupName": "allowed brevo versions",
|
||||||
|
"matchManagers": ["pep621"],
|
||||||
|
"matchPackageNames": ["brevo-python"],
|
||||||
|
"allowedVersions": "<3.0.0"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
"groupName": "ignored js dependencies",
|
"groupName": "ignored js dependencies",
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ FROM python:3.13-slim AS base
|
|||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
libglib2.0-0 \
|
libglib2.0-0 \
|
||||||
libgobject-2.0-0 \
|
libgobject-2.0-0 \
|
||||||
"openssl=3.5.4-1~deb13u2" \
|
|
||||||
"libssl3t64=3.5.4-1~deb13u2" \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
FROM base AS builder
|
FROM base AS builder
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "agents"
|
name = "agents"
|
||||||
version = "1.10.0"
|
version = "1.12.0"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"livekit-agents==1.3.10",
|
"livekit-agents==1.4.5",
|
||||||
"livekit-plugins-deepgram==1.3.10",
|
"livekit-plugins-deepgram==1.4.5",
|
||||||
"livekit-plugins-silero==1.3.10",
|
"livekit-plugins-silero==1.4.5",
|
||||||
"livekit-plugins-kyutai-lasuite==0.0.6",
|
"livekit-plugins-kyutai-lasuite==0.0.6",
|
||||||
"python-dotenv==1.2.1",
|
"python-dotenv==1.2.2",
|
||||||
"protobuf==6.33.5"
|
"protobuf==6.33.5"
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
dev = [
|
dev = [
|
||||||
"ruff==0.14.4",
|
"ruff==0.15.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
|||||||
@@ -43,6 +43,21 @@ def get_frontend_configuration(request):
|
|||||||
"expiration_days": settings.RECORDING_EXPIRATION_DAYS,
|
"expiration_days": settings.RECORDING_EXPIRATION_DAYS,
|
||||||
"max_duration": settings.RECORDING_MAX_DURATION,
|
"max_duration": settings.RECORDING_MAX_DURATION,
|
||||||
},
|
},
|
||||||
|
"background_image": {
|
||||||
|
"upload_is_enabled": settings.FILE_UPLOAD_ENABLED,
|
||||||
|
"max_count_by_user": settings.FILE_UPLOAD_RESTRICTIONS["background_image"][
|
||||||
|
"max_count_by_user"
|
||||||
|
],
|
||||||
|
"max_size": settings.FILE_UPLOAD_RESTRICTIONS["background_image"][
|
||||||
|
"max_size"
|
||||||
|
],
|
||||||
|
"allowed_extensions": settings.FILE_UPLOAD_RESTRICTIONS["background_image"][
|
||||||
|
"allowed_extensions"
|
||||||
|
],
|
||||||
|
"allowed_mimetypes": settings.FILE_UPLOAD_RESTRICTIONS["background_image"][
|
||||||
|
"allowed_mimetypes"
|
||||||
|
],
|
||||||
|
},
|
||||||
"telephony": {
|
"telephony": {
|
||||||
"enabled": settings.ROOM_TELEPHONY_ENABLED,
|
"enabled": settings.ROOM_TELEPHONY_ENABLED,
|
||||||
"phone_number": settings.ROOM_TELEPHONY_PHONE_NUMBER
|
"phone_number": settings.ROOM_TELEPHONY_PHONE_NUMBER
|
||||||
@@ -58,5 +73,11 @@ def get_frontend_configuration(request):
|
|||||||
"default_sources": settings.LIVEKIT_DEFAULT_SOURCES,
|
"default_sources": settings.LIVEKIT_DEFAULT_SOURCES,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
if settings.ENCRYPTION_ENABLED and settings.ENCRYPTION_VAULT_URL:
|
||||||
|
frontend_configuration["encryption"] = {
|
||||||
|
"enabled": True,
|
||||||
|
"vault_url": settings.ENCRYPTION_VAULT_URL,
|
||||||
|
"interface_url": settings.ENCRYPTION_INTERFACE_URL,
|
||||||
|
}
|
||||||
frontend_configuration.update(settings.FRONTEND_CONFIGURATION)
|
frontend_configuration.update(settings.FRONTEND_CONFIGURATION)
|
||||||
return Response(frontend_configuration)
|
return Response(frontend_configuration)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class FeatureFlag:
|
|||||||
"recording": "RECORDING_ENABLE",
|
"recording": "RECORDING_ENABLE",
|
||||||
"storage_event": "RECORDING_STORAGE_EVENT_ENABLE",
|
"storage_event": "RECORDING_STORAGE_EVENT_ENABLE",
|
||||||
"subtitle": "ROOM_SUBTITLE_ENABLED",
|
"subtitle": "ROOM_SUBTITLE_ENABLED",
|
||||||
|
"file_upload": "FILE_UPLOAD_ENABLED",
|
||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
"""Permission handlers for the Meet core app."""
|
"""Permission handlers for the Meet core app."""
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
|
|
||||||
from rest_framework import permissions
|
from rest_framework import permissions
|
||||||
@@ -116,6 +117,13 @@ class FilePermission(IsAuthenticated):
|
|||||||
Handling soft deletions specificities
|
Handling soft deletions specificities
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
def has_permission(self, request, view):
|
||||||
|
"""Allow access only to authenticated users."""
|
||||||
|
if not settings.FILE_UPLOAD_ENABLED:
|
||||||
|
raise Http404
|
||||||
|
|
||||||
|
return super().has_permission(request, view)
|
||||||
|
|
||||||
def has_object_permission(self, request, view, obj):
|
def has_object_permission(self, request, view, obj):
|
||||||
"""
|
"""
|
||||||
Return a 404 on deleted files or if the user is not the owner
|
Return a 404 on deleted files or if the user is not the owner
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ class UserSerializer(serializers.ModelSerializer):
|
|||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = models.User
|
model = models.User
|
||||||
fields = ["id", "email", "full_name", "short_name", "timezone", "language"]
|
fields = ["id", "sub", "email", "full_name", "short_name", "timezone", "language"]
|
||||||
read_only_fields = ["id", "email", "full_name", "short_name"]
|
read_only_fields = ["id", "sub", "email", "full_name", "short_name"]
|
||||||
|
|
||||||
|
|
||||||
class UserLightSerializer(serializers.ModelSerializer):
|
class UserLightSerializer(serializers.ModelSerializer):
|
||||||
@@ -74,6 +74,23 @@ class ResourceAccessSerializerMixin:
|
|||||||
raise PermissionDenied(
|
raise PermissionDenied(
|
||||||
"Only owners of a room can assign other users as owners."
|
"Only owners of a room can assign other users as owners."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# In advanced encrypted rooms, new accesses require an encrypted_symmetric_key
|
||||||
|
# so the new member can decrypt the room's streams. Without it, they'd have
|
||||||
|
# access but no key — which is useless and confusing.
|
||||||
|
# Future: a sharing UI (like Docs) could provide the key via vault shareKeys.
|
||||||
|
if not self.instance and "resource" in data:
|
||||||
|
resource = data["resource"]
|
||||||
|
if (
|
||||||
|
hasattr(resource, 'encryption_mode')
|
||||||
|
and resource.encryption_mode == models.EncryptionMode.ADVANCED
|
||||||
|
and not data.get("encrypted_symmetric_key")
|
||||||
|
):
|
||||||
|
raise serializers.ValidationError(
|
||||||
|
"Adding members to advanced encrypted rooms requires "
|
||||||
|
"an encrypted_symmetric_key for the new user."
|
||||||
|
)
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def validate_resource(self, resource):
|
def validate_resource(self, resource):
|
||||||
@@ -98,7 +115,7 @@ class ResourceAccessSerializer(
|
|||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = models.ResourceAccess
|
model = models.ResourceAccess
|
||||||
fields = ["id", "user", "resource", "role"]
|
fields = ["id", "user", "resource", "role", "encrypted_symmetric_key"]
|
||||||
read_only_fields = ["id"]
|
read_only_fields = ["id"]
|
||||||
|
|
||||||
def update(self, instance, validated_data):
|
def update(self, instance, validated_data):
|
||||||
@@ -128,9 +145,27 @@ class RoomSerializer(serializers.ModelSerializer):
|
|||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = models.Room
|
model = models.Room
|
||||||
fields = ["id", "name", "slug", "configuration", "access_level", "pin_code"]
|
fields = ["id", "name", "slug", "configuration", "access_level", "pin_code", "encryption_mode"]
|
||||||
read_only_fields = ["id", "slug", "pin_code"]
|
read_only_fields = ["id", "slug", "pin_code"]
|
||||||
|
|
||||||
|
def validate_access_level(self, value):
|
||||||
|
"""Encrypted rooms must stay restricted — prevent downgrading access level."""
|
||||||
|
instance = self.instance
|
||||||
|
if instance and instance.encryption_enabled and value != models.RoomAccessLevel.RESTRICTED:
|
||||||
|
raise serializers.ValidationError(
|
||||||
|
"Encrypted rooms require restricted access level to enforce lobby approval."
|
||||||
|
)
|
||||||
|
return value
|
||||||
|
|
||||||
|
def validate_encryption_mode(self, value):
|
||||||
|
"""Once encryption is enabled on a room, it cannot be disabled or downgraded."""
|
||||||
|
instance = self.instance
|
||||||
|
if instance and instance.encryption_enabled and value == models.EncryptionMode.NONE:
|
||||||
|
raise serializers.ValidationError(
|
||||||
|
"Encryption cannot be disabled once enabled on a room."
|
||||||
|
)
|
||||||
|
return value
|
||||||
|
|
||||||
def to_representation(self, instance):
|
def to_representation(self, instance):
|
||||||
"""
|
"""
|
||||||
Add users only for administrator users.
|
Add users only for administrator users.
|
||||||
@@ -172,18 +207,34 @@ class RoomSerializer(serializers.ModelSerializer):
|
|||||||
if should_access_room:
|
if should_access_room:
|
||||||
room_id = f"{instance.id!s}"
|
room_id = f"{instance.id!s}"
|
||||||
username = request.query_params.get("username", None)
|
username = request.query_params.get("username", None)
|
||||||
|
|
||||||
|
# In encrypted rooms, authenticated users must use their real name from
|
||||||
|
# the OIDC profile (ProConnect) — they cannot choose an arbitrary name.
|
||||||
|
if instance.encryption_enabled and request.user.is_authenticated:
|
||||||
|
username = request.user.full_name or request.user.email
|
||||||
|
|
||||||
output["livekit"] = utils.generate_livekit_config(
|
output["livekit"] = utils.generate_livekit_config(
|
||||||
room_id=room_id,
|
room_id=room_id,
|
||||||
user=request.user,
|
user=request.user,
|
||||||
username=username,
|
username=username,
|
||||||
configuration=configuration,
|
configuration=configuration,
|
||||||
is_admin_or_owner=is_admin_or_owner,
|
is_admin_or_owner=is_admin_or_owner,
|
||||||
|
encryption_mode=instance.encryption_mode,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
del output["pin_code"]
|
del output["pin_code"]
|
||||||
|
|
||||||
output["is_administrable"] = is_admin_or_owner
|
output["is_administrable"] = is_admin_or_owner
|
||||||
|
|
||||||
|
# Include the current user's encrypted symmetric key for advanced E2EE
|
||||||
|
if request.user.is_authenticated and instance.encryption_mode == models.EncryptionMode.ADVANCED:
|
||||||
|
try:
|
||||||
|
access = instance.accesses.get(user=request.user)
|
||||||
|
if access.encrypted_symmetric_key:
|
||||||
|
output["encrypted_symmetric_key"] = access.encrypted_symmetric_key
|
||||||
|
except models.ResourceAccess.DoesNotExist:
|
||||||
|
pass
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
||||||
@@ -265,7 +316,8 @@ class StartRecordingSerializer(BaseValidationOnlySerializer):
|
|||||||
class RequestEntrySerializer(BaseValidationOnlySerializer):
|
class RequestEntrySerializer(BaseValidationOnlySerializer):
|
||||||
"""Validate request entry data."""
|
"""Validate request entry data."""
|
||||||
|
|
||||||
username = serializers.CharField(required=True)
|
username = serializers.CharField(required=True, allow_blank=True)
|
||||||
|
ephemeral_public_key = serializers.CharField(required=False, allow_blank=True, default='')
|
||||||
|
|
||||||
|
|
||||||
class ParticipantEntrySerializer(BaseValidationOnlySerializer):
|
class ParticipantEntrySerializer(BaseValidationOnlySerializer):
|
||||||
@@ -273,6 +325,9 @@ class ParticipantEntrySerializer(BaseValidationOnlySerializer):
|
|||||||
|
|
||||||
participant_id = serializers.UUIDField(required=True)
|
participant_id = serializers.UUIDField(required=True)
|
||||||
allow_entry = serializers.BooleanField(required=True)
|
allow_entry = serializers.BooleanField(required=True)
|
||||||
|
encrypted_key = serializers.CharField(required=False, allow_blank=True, default='')
|
||||||
|
admin_ephemeral_public_key = serializers.CharField(required=False, allow_blank=True, default='')
|
||||||
|
encrypted_vault_key = serializers.CharField(required=False, allow_blank=True, default='')
|
||||||
|
|
||||||
|
|
||||||
class CreationCallbackSerializer(BaseValidationOnlySerializer):
|
class CreationCallbackSerializer(BaseValidationOnlySerializer):
|
||||||
@@ -303,6 +358,9 @@ class MuteParticipantSerializer(BaseParticipantsManagementSerializer):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
TrackSource = Literal["SCREEN_SHARE", "SCREEN_SHARE_AUDIO", "CAMERA", "MICROPHONE"]
|
||||||
|
|
||||||
|
|
||||||
class ParticipantPermission(BaseModel):
|
class ParticipantPermission(BaseModel):
|
||||||
"""Mirror the LiveKit ParticipantPermission protobuf.
|
"""Mirror the LiveKit ParticipantPermission protobuf.
|
||||||
|
|
||||||
@@ -313,9 +371,7 @@ class ParticipantPermission(BaseModel):
|
|||||||
can_subscribe: bool | None = None
|
can_subscribe: bool | None = None
|
||||||
can_publish: bool | None = None
|
can_publish: bool | None = None
|
||||||
can_publish_data: bool | None = None
|
can_publish_data: bool | None = None
|
||||||
can_publish_sources: list[int] = Field(
|
can_publish_sources: list[TrackSource] = Field(default_factory=list)
|
||||||
default_factory=list
|
|
||||||
) # TrackSource enum values
|
|
||||||
hidden: bool | None = None
|
hidden: bool | None = None
|
||||||
recorder: bool | None = None
|
recorder: bool | None = None
|
||||||
can_update_metadata: bool | None = None
|
can_update_metadata: bool | None = None
|
||||||
@@ -366,14 +422,6 @@ class UpdateParticipantSerializer(BaseParticipantsManagementSerializer):
|
|||||||
f"Setting the following participant permissions is not allowed: "
|
f"Setting the following participant permissions is not allowed: "
|
||||||
f"{', '.join(suspicious_fields)}."
|
f"{', '.join(suspicious_fields)}."
|
||||||
)
|
)
|
||||||
if permission.can_subscribe_metrics is not None:
|
|
||||||
raise serializers.ValidationError(
|
|
||||||
{
|
|
||||||
"permission": {
|
|
||||||
"can_subscribe_metrics": "This permission is not implemented."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
return permission
|
return permission
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
"""API endpoints"""
|
"""API endpoints"""
|
||||||
# pylint: disable=too-many-lines
|
# pylint: disable=too-many-lines
|
||||||
|
|
||||||
import re
|
|
||||||
import uuid
|
import uuid
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
from urllib.parse import unquote, urlparse
|
from urllib.parse import unquote, urlparse
|
||||||
@@ -12,6 +11,7 @@ from django.db.models import Q
|
|||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
from django.utils.text import slugify
|
from django.utils.text import slugify
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from django_filters import rest_framework as django_filters
|
from django_filters import rest_framework as django_filters
|
||||||
from rest_framework import (
|
from rest_framework import (
|
||||||
@@ -33,10 +33,12 @@ from rest_framework import (
|
|||||||
|
|
||||||
from core import enums, models, utils
|
from core import enums, models, utils
|
||||||
from core.api.filters import ListFileFilter
|
from core.api.filters import ListFileFilter
|
||||||
|
from core.enums import MEDIA_STORAGE_URL_PATTERN
|
||||||
from core.recording.enums import FileExtension
|
from core.recording.enums import FileExtension
|
||||||
from core.recording.event.authentication import StorageEventAuthentication
|
from core.recording.event.authentication import StorageEventAuthentication
|
||||||
from core.recording.event.exceptions import (
|
from core.recording.event.exceptions import (
|
||||||
InvalidBucketError,
|
InvalidBucketError,
|
||||||
|
InvalidFilepathError,
|
||||||
InvalidFileTypeError,
|
InvalidFileTypeError,
|
||||||
ParsingEventDataError,
|
ParsingEventDataError,
|
||||||
)
|
)
|
||||||
@@ -78,17 +80,6 @@ from .feature_flag import FeatureFlag
|
|||||||
logger = getLogger(__name__)
|
logger = getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
FILE_FOLDER = settings.FILE_UPLOAD_PATH
|
|
||||||
UUID_REGEX = (
|
|
||||||
r"[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
|
|
||||||
)
|
|
||||||
FILE_EXT_REGEX = r"[\d\w]+"
|
|
||||||
MEDIA_STORAGE_URL_PATTERN = re.compile(
|
|
||||||
f"{settings.MEDIA_URL:s}"
|
|
||||||
rf"(?P<key>{FILE_FOLDER:s}/(?P<pk>{UUID_REGEX:s})\.{FILE_EXT_REGEX:s})$"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class NestedGenericViewSet(viewsets.GenericViewSet):
|
class NestedGenericViewSet(viewsets.GenericViewSet):
|
||||||
"""
|
"""
|
||||||
A generic Viewset aims to be used in a nested route context.
|
A generic Viewset aims to be used in a nested route context.
|
||||||
@@ -290,11 +281,32 @@ class RoomViewSet(
|
|||||||
|
|
||||||
def perform_create(self, serializer):
|
def perform_create(self, serializer):
|
||||||
"""Set the current user as owner of the newly created room."""
|
"""Set the current user as owner of the newly created room."""
|
||||||
|
encryption_mode = serializer.validated_data.get("encryption_mode", models.EncryptionMode.NONE)
|
||||||
|
|
||||||
|
# Block encrypted room creation if encryption is not enabled on this instance
|
||||||
|
if encryption_mode != models.EncryptionMode.NONE and not settings.ENCRYPTION_ENABLED:
|
||||||
|
raise drf_exceptions.ValidationError(
|
||||||
|
{"encryption_mode": "Encryption is not enabled on this server."}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Advanced encryption requires the vault service to be configured
|
||||||
|
if encryption_mode == models.EncryptionMode.ADVANCED and not getattr(settings, 'ENCRYPTION_VAULT_URL', ''):
|
||||||
|
raise drf_exceptions.ValidationError(
|
||||||
|
{"encryption_mode": "Advanced encryption requires the encryption service to be configured."}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Encrypted rooms must use restricted access to enforce lobby approval
|
||||||
|
# before the encryption key is shared with participants.
|
||||||
|
if encryption_mode != models.EncryptionMode.NONE:
|
||||||
|
serializer.validated_data["access_level"] = models.RoomAccessLevel.RESTRICTED
|
||||||
|
|
||||||
room = serializer.save()
|
room = serializer.save()
|
||||||
|
encrypted_symmetric_key = self.request.data.get("encrypted_symmetric_key", "")
|
||||||
models.ResourceAccess.objects.create(
|
models.ResourceAccess.objects.create(
|
||||||
resource=room,
|
resource=room,
|
||||||
user=self.request.user,
|
user=self.request.user,
|
||||||
role=models.RoleChoices.OWNER,
|
role=models.RoleChoices.OWNER,
|
||||||
|
encrypted_symmetric_key=encrypted_symmetric_key,
|
||||||
)
|
)
|
||||||
|
|
||||||
if callback_id := self.request.data.get("callback_id"):
|
if callback_id := self.request.data.get("callback_id"):
|
||||||
@@ -323,6 +335,12 @@ class RoomViewSet(
|
|||||||
options = serializer.validated_data.get("options")
|
options = serializer.validated_data.get("options")
|
||||||
room = self.get_object()
|
room = self.get_object()
|
||||||
|
|
||||||
|
if room.encryption_enabled:
|
||||||
|
return drf_response.Response(
|
||||||
|
{"detail": "Recording is not available in encrypted rooms."},
|
||||||
|
status=drf_status.HTTP_403_FORBIDDEN,
|
||||||
|
)
|
||||||
|
|
||||||
# May raise exception if an active or initiated recording already exist for the room
|
# May raise exception if an active or initiated recording already exist for the room
|
||||||
recording = models.Recording.objects.create(
|
recording = models.Recording.objects.create(
|
||||||
room=room,
|
room=room,
|
||||||
@@ -405,12 +423,28 @@ class RoomViewSet(
|
|||||||
serializer.is_valid(raise_exception=True)
|
serializer.is_valid(raise_exception=True)
|
||||||
|
|
||||||
room = self.get_object()
|
room = self.get_object()
|
||||||
|
validated_data = serializer.validated_data
|
||||||
|
|
||||||
|
# Advanced encrypted rooms require authentication
|
||||||
|
if room.encryption_mode == models.EncryptionMode.ADVANCED and not request.user.is_authenticated:
|
||||||
|
return drf_response.Response(
|
||||||
|
{"detail": "This meeting requires authentication to join."},
|
||||||
|
status=drf_status.HTTP_403_FORBIDDEN,
|
||||||
|
)
|
||||||
|
|
||||||
|
# In encrypted rooms, authenticated users must use their real name
|
||||||
|
# from the OIDC profile — they cannot choose an arbitrary name.
|
||||||
|
if room.encryption_enabled and request.user.is_authenticated:
|
||||||
|
validated_data["username"] = (
|
||||||
|
request.user.full_name or request.user.email
|
||||||
|
)
|
||||||
|
|
||||||
lobby_service = LobbyService()
|
lobby_service = LobbyService()
|
||||||
|
|
||||||
participant, livekit = lobby_service.request_entry(
|
participant, livekit = lobby_service.request_entry(
|
||||||
room=room,
|
room=room,
|
||||||
request=request,
|
request=request,
|
||||||
**serializer.validated_data,
|
**validated_data,
|
||||||
)
|
)
|
||||||
response = drf_response.Response({**participant.to_dict(), "livekit": livekit})
|
response = drf_response.Response({**participant.to_dict(), "livekit": livekit})
|
||||||
lobby_service.prepare_response(response, participant.id)
|
lobby_service.prepare_response(response, participant.id)
|
||||||
@@ -446,6 +480,9 @@ class RoomViewSet(
|
|||||||
room_id=room.id,
|
room_id=room.id,
|
||||||
participant_id=str(serializer.validated_data.get("participant_id")),
|
participant_id=str(serializer.validated_data.get("participant_id")),
|
||||||
allow_entry=serializer.validated_data.get("allow_entry"),
|
allow_entry=serializer.validated_data.get("allow_entry"),
|
||||||
|
encrypted_key=serializer.validated_data.get("encrypted_key", ''),
|
||||||
|
admin_ephemeral_public_key=serializer.validated_data.get("admin_ephemeral_public_key", ''),
|
||||||
|
encrypted_vault_key=serializer.validated_data.get("encrypted_vault_key", ''),
|
||||||
)
|
)
|
||||||
return drf_response.Response({"message": "Participant was updated."})
|
return drf_response.Response({"message": "Participant was updated."})
|
||||||
|
|
||||||
@@ -473,6 +510,14 @@ class RoomViewSet(
|
|||||||
lobby_service = LobbyService()
|
lobby_service = LobbyService()
|
||||||
|
|
||||||
participants = lobby_service.list_waiting_participants(room.id)
|
participants = lobby_service.list_waiting_participants(room.id)
|
||||||
|
|
||||||
|
# Only expose email and ephemeral keys in encrypted rooms.
|
||||||
|
# Strip them otherwise to avoid leaking personal data.
|
||||||
|
if not room.encryption_enabled:
|
||||||
|
for p in participants:
|
||||||
|
p.pop("email", None)
|
||||||
|
p.pop("ephemeral_public_key", None)
|
||||||
|
|
||||||
return drf_response.Response({"participants": participants})
|
return drf_response.Response({"participants": participants})
|
||||||
|
|
||||||
@decorators.action(
|
@decorators.action(
|
||||||
@@ -497,9 +542,7 @@ class RoomViewSet(
|
|||||||
if status_code == drf_status.HTTP_500_INTERNAL_SERVER_ERROR:
|
if status_code == drf_status.HTTP_500_INTERNAL_SERVER_ERROR:
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
return drf_response.Response(
|
return drf_response.Response({"status": "error"}, status=status_code)
|
||||||
{"status": "error", "message": str(e)}, status=status_code
|
|
||||||
)
|
|
||||||
|
|
||||||
@decorators.action(
|
@decorators.action(
|
||||||
detail=False,
|
detail=False,
|
||||||
@@ -577,6 +620,12 @@ class RoomViewSet(
|
|||||||
|
|
||||||
room = self.get_object()
|
room = self.get_object()
|
||||||
|
|
||||||
|
if room.encryption_enabled:
|
||||||
|
return drf_response.Response(
|
||||||
|
{"error": "Transcription is not available in encrypted rooms."},
|
||||||
|
status=drf_status.HTTP_403_FORBIDDEN,
|
||||||
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
SubtitleService().start_subtitle(room)
|
SubtitleService().start_subtitle(room)
|
||||||
except SubtitleException:
|
except SubtitleException:
|
||||||
@@ -766,14 +815,19 @@ class RecordingViewSet(
|
|||||||
recording_id = parser.get_recording_id(request.data)
|
recording_id = parser.get_recording_id(request.data)
|
||||||
|
|
||||||
except ParsingEventDataError as e:
|
except ParsingEventDataError as e:
|
||||||
raise drf_exceptions.PermissionDenied(f"Invalid request data: {e}") from e
|
raise drf_exceptions.PermissionDenied("Invalid request data.") from e
|
||||||
|
|
||||||
except InvalidBucketError as e:
|
except InvalidBucketError as e:
|
||||||
raise drf_exceptions.PermissionDenied("Invalid bucket specified") from e
|
raise drf_exceptions.PermissionDenied("Invalid bucket specified.") from e
|
||||||
|
|
||||||
except InvalidFileTypeError as e:
|
except InvalidFilepathError:
|
||||||
return drf_response.Response(
|
return drf_response.Response(
|
||||||
{"message": f"Ignore this file type, {e}"},
|
{"message": "Notification ignored."},
|
||||||
|
)
|
||||||
|
|
||||||
|
except InvalidFileTypeError:
|
||||||
|
return drf_response.Response(
|
||||||
|
{"message": "Notification ignored."},
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -973,6 +1027,26 @@ class FileViewSet(
|
|||||||
|
|
||||||
def perform_create(self, serializer):
|
def perform_create(self, serializer):
|
||||||
"""Set the current user as creator of the newly created file."""
|
"""Set the current user as creator of the newly created file."""
|
||||||
|
|
||||||
|
if settings.FILE_UPLOAD_APPLY_RESTRICTIONS:
|
||||||
|
file_type = serializer.validated_data["type"]
|
||||||
|
config_for_file_type = settings.FILE_UPLOAD_RESTRICTIONS[file_type]
|
||||||
|
|
||||||
|
count = models.File.objects.filter(
|
||||||
|
creator=self.request.user,
|
||||||
|
deleted_at__isnull=True,
|
||||||
|
type=file_type,
|
||||||
|
).count()
|
||||||
|
|
||||||
|
if count >= config_for_file_type["max_count_by_user"]:
|
||||||
|
logger.info(
|
||||||
|
"create_item: user reached max files per user for type %s",
|
||||||
|
file_type,
|
||||||
|
)
|
||||||
|
raise serializers.PermissionDenied(
|
||||||
|
_("You have reached the maximum number of files for this type.")
|
||||||
|
)
|
||||||
|
|
||||||
serializer.save(creator=self.request.user)
|
serializer.save(creator=self.request.user)
|
||||||
|
|
||||||
def perform_destroy(self, instance):
|
def perform_destroy(self, instance):
|
||||||
@@ -980,6 +1054,7 @@ class FileViewSet(
|
|||||||
instance.soft_delete()
|
instance.soft_delete()
|
||||||
|
|
||||||
@decorators.action(detail=True, methods=["post"], url_path="upload-ended")
|
@decorators.action(detail=True, methods=["post"], url_path="upload-ended")
|
||||||
|
@FeatureFlag.require("file_upload")
|
||||||
def upload_ended(self, request, *args, **kwargs):
|
def upload_ended(self, request, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
Check the actual uploaded file and mark it as ready.
|
Check the actual uploaded file and mark it as ready.
|
||||||
@@ -1162,6 +1237,7 @@ class FileViewSet(
|
|||||||
return url_params, request.user.id, file
|
return url_params, request.user.id, file
|
||||||
|
|
||||||
@decorators.action(detail=False, methods=["get"], url_path="media-auth")
|
@decorators.action(detail=False, methods=["get"], url_path="media-auth")
|
||||||
|
@FeatureFlag.require("file_upload")
|
||||||
def media_auth(self, request, *args, **kwargs):
|
def media_auth(self, request, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
This view is used by an Nginx subrequest to control access to an file's
|
This view is used by an Nginx subrequest to control access to an file's
|
||||||
|
|||||||
@@ -14,9 +14,15 @@ FILE_EXT_REGEX = r"[a-zA-Z0-9]{1,10}"
|
|||||||
|
|
||||||
# pylint: disable=line-too-long
|
# pylint: disable=line-too-long
|
||||||
RECORDING_STORAGE_URL_PATTERN = re.compile(
|
RECORDING_STORAGE_URL_PATTERN = re.compile(
|
||||||
f"/media/{settings.RECORDING_OUTPUT_FOLDER}/(?P<recording_id>{UUID_REGEX:s}).(?P<extension>{FILE_EXT_REGEX:s})"
|
rf"{settings.MEDIA_URL:s}{settings.RECORDING_OUTPUT_FOLDER}/(?P<recording_id>{UUID_REGEX:s})\.(?P<extension>{FILE_EXT_REGEX:s})"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
MEDIA_STORAGE_URL_PATTERN = re.compile(
|
||||||
|
f"{settings.MEDIA_URL:s}"
|
||||||
|
rf"(?P<key>{settings.FILE_UPLOAD_PATH:s}/(?P<pk>{UUID_REGEX:s})\.{FILE_EXT_REGEX:s})$"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# Django sets `LANGUAGES` by default with all supported languages. We can use it for
|
# Django sets `LANGUAGES` by default with all supported languages. We can use it for
|
||||||
# the choice of languages which should not be limited to the few languages active in
|
# the choice of languages which should not be limited to the few languages active in
|
||||||
# the app.
|
# the app.
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("core", "0018_rename_active_application_is_active"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="room",
|
||||||
|
name="encryption_enabled",
|
||||||
|
field=models.BooleanField(
|
||||||
|
default=False,
|
||||||
|
help_text="Whether end-to-end encryption is enabled for this room.",
|
||||||
|
verbose_name="Encryption enabled",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
"""Replace encryption_enabled boolean with encryption_mode enum."""
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
def migrate_encryption_enabled_to_mode(apps, schema_editor):
|
||||||
|
"""Convert existing encryption_enabled=True rooms to encryption_mode='basic'."""
|
||||||
|
Room = apps.get_model("core", "Room")
|
||||||
|
Room.objects.filter(encryption_enabled=True).update(encryption_mode="basic")
|
||||||
|
|
||||||
|
|
||||||
|
def migrate_mode_to_encryption_enabled(apps, schema_editor):
|
||||||
|
"""Reverse: set encryption_enabled=True for any non-'none' encryption_mode."""
|
||||||
|
Room = apps.get_model("core", "Room")
|
||||||
|
Room.objects.exclude(encryption_mode="none").update(encryption_enabled=True)
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("core", "0019_room_encryption_enabled"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
# 1. Add the new encryption_mode field
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="room",
|
||||||
|
name="encryption_mode",
|
||||||
|
field=models.CharField(
|
||||||
|
choices=[
|
||||||
|
("none", "No encryption"),
|
||||||
|
("basic", "Basic encryption"),
|
||||||
|
("advanced", "Advanced encryption"),
|
||||||
|
],
|
||||||
|
default="none",
|
||||||
|
help_text="End-to-end encryption mode for this room.",
|
||||||
|
max_length=20,
|
||||||
|
verbose_name="Encryption mode",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
# 2. Migrate existing data
|
||||||
|
migrations.RunPython(
|
||||||
|
migrate_encryption_enabled_to_mode,
|
||||||
|
migrate_mode_to_encryption_enabled,
|
||||||
|
),
|
||||||
|
# 3. Remove the old boolean field
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name="room",
|
||||||
|
name="encryption_enabled",
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
"""Add encrypted_symmetric_key to ResourceAccess for advanced E2EE mode."""
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("core", "0020_room_encryption_mode"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="resourceaccess",
|
||||||
|
name="encrypted_symmetric_key",
|
||||||
|
field=models.TextField(
|
||||||
|
blank=True,
|
||||||
|
default="",
|
||||||
|
help_text="Vault-wrapped symmetric encryption key for advanced E2EE mode. Each user's copy is encrypted for their own vault public key.",
|
||||||
|
verbose_name="Encrypted symmetric key",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -98,6 +98,14 @@ class RoomAccessLevel(models.TextChoices):
|
|||||||
RESTRICTED = "restricted", _("Restricted Access")
|
RESTRICTED = "restricted", _("Restricted Access")
|
||||||
|
|
||||||
|
|
||||||
|
class EncryptionMode(models.TextChoices):
|
||||||
|
"""Encryption mode choices for rooms."""
|
||||||
|
|
||||||
|
NONE = "none", _("No encryption")
|
||||||
|
BASIC = "basic", _("Basic encryption")
|
||||||
|
ADVANCED = "advanced", _("Advanced encryption")
|
||||||
|
|
||||||
|
|
||||||
class BaseModel(models.Model):
|
class BaseModel(models.Model):
|
||||||
"""
|
"""
|
||||||
Serves as an abstract base model for other models, ensuring that records are validated
|
Serves as an abstract base model for other models, ensuring that records are validated
|
||||||
@@ -324,6 +332,15 @@ class ResourceAccess(BaseModel):
|
|||||||
role = models.CharField(
|
role = models.CharField(
|
||||||
max_length=20, choices=RoleChoices.choices, default=RoleChoices.MEMBER
|
max_length=20, choices=RoleChoices.choices, default=RoleChoices.MEMBER
|
||||||
)
|
)
|
||||||
|
encrypted_symmetric_key = models.TextField(
|
||||||
|
blank=True,
|
||||||
|
default='',
|
||||||
|
verbose_name=_("Encrypted symmetric key"),
|
||||||
|
help_text=_(
|
||||||
|
"Vault-wrapped symmetric encryption key for advanced E2EE mode. "
|
||||||
|
"Each user's copy is encrypted for their own vault public key."
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
db_table = "meet_resource_access"
|
db_table = "meet_resource_access"
|
||||||
@@ -388,6 +405,13 @@ class Room(Resource):
|
|||||||
choices=RoomAccessLevel.choices,
|
choices=RoomAccessLevel.choices,
|
||||||
default=settings.RESOURCE_DEFAULT_ACCESS_LEVEL,
|
default=settings.RESOURCE_DEFAULT_ACCESS_LEVEL,
|
||||||
)
|
)
|
||||||
|
encryption_mode = models.CharField(
|
||||||
|
max_length=20,
|
||||||
|
choices=EncryptionMode.choices,
|
||||||
|
default=EncryptionMode.NONE,
|
||||||
|
verbose_name=_("Encryption mode"),
|
||||||
|
help_text=_("End-to-end encryption mode for this room."),
|
||||||
|
)
|
||||||
configuration = models.JSONField(
|
configuration = models.JSONField(
|
||||||
blank=True,
|
blank=True,
|
||||||
default=dict,
|
default=dict,
|
||||||
@@ -442,6 +466,11 @@ class Room(Resource):
|
|||||||
"""Check if a room is public"""
|
"""Check if a room is public"""
|
||||||
return self.access_level == RoomAccessLevel.PUBLIC
|
return self.access_level == RoomAccessLevel.PUBLIC
|
||||||
|
|
||||||
|
@property
|
||||||
|
def encryption_enabled(self):
|
||||||
|
"""Check if any encryption mode is active."""
|
||||||
|
return self.encryption_mode != EncryptionMode.NONE
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def generate_unique_pin_code(length):
|
def generate_unique_pin_code(length):
|
||||||
"""Generate a unique n-digit PIN code"""
|
"""Generate a unique n-digit PIN code"""
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ from typing import Any, Dict, Optional, Protocol
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.utils.module_loading import import_string
|
from django.utils.module_loading import import_string
|
||||||
|
|
||||||
|
from core.enums import FILE_EXT_REGEX, UUID_REGEX
|
||||||
|
|
||||||
from .exceptions import (
|
from .exceptions import (
|
||||||
InvalidBucketError,
|
InvalidBucketError,
|
||||||
InvalidFilepathError,
|
InvalidFilepathError,
|
||||||
@@ -86,7 +88,7 @@ class MinioParser:
|
|||||||
|
|
||||||
# pylint: disable=line-too-long
|
# pylint: disable=line-too-long
|
||||||
self._filepath_regex = re.compile(
|
self._filepath_regex = re.compile(
|
||||||
r"(?P<url_encoded_folder_path>(?:[^%]+%2F)+)?(?P<recording_id>[0-9a-fA-F\-]{36})\.(?P<extension>[a-zA-Z0-9]+)"
|
rf"(?P<url_encoded_folder_path>(?:[^%]+%2F)+)?{settings.RECORDING_OUTPUT_FOLDER}%2F(?P<recording_id>{UUID_REGEX})\.(?P<extension>{FILE_EXT_REGEX})"
|
||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import smtplib
|
|||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.mail import send_mail
|
from django.core.mail import EmailMultiAlternatives
|
||||||
from django.template.loader import render_to_string
|
from django.template.loader import render_to_string
|
||||||
from django.utils.translation import get_language, override
|
from django.utils.translation import get_language, override
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
@@ -45,15 +45,18 @@ class InvitationService:
|
|||||||
)
|
)
|
||||||
) # Force translation
|
) # Force translation
|
||||||
|
|
||||||
|
email = EmailMultiAlternatives(
|
||||||
|
subject=subject,
|
||||||
|
body=msg_plain,
|
||||||
|
from_email=settings.EMAIL_FROM,
|
||||||
|
to=[],
|
||||||
|
bcc=emails,
|
||||||
|
)
|
||||||
|
|
||||||
|
email.attach_alternative(msg_html, "text/html")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
send_mail(
|
email.send()
|
||||||
subject,
|
|
||||||
msg_plain,
|
|
||||||
settings.EMAIL_FROM,
|
|
||||||
emails,
|
|
||||||
html_message=msg_html,
|
|
||||||
fail_silently=False,
|
|
||||||
)
|
|
||||||
except smtplib.SMTPException as e:
|
except smtplib.SMTPException as e:
|
||||||
logger.error("invitation to %s was not sent: %s", emails, e)
|
logger.error("invitations were not sent: %s", e)
|
||||||
raise InvitationError("Could not send invitation") from e
|
raise InvitationError("Could not send invitation") from e
|
||||||
|
|||||||
@@ -46,15 +46,36 @@ class LobbyParticipant:
|
|||||||
username: str
|
username: str
|
||||||
color: str
|
color: str
|
||||||
id: str
|
id: str
|
||||||
|
is_authenticated: bool = False
|
||||||
|
email: Optional[str] = None
|
||||||
|
suite_user_id: Optional[str] = None
|
||||||
|
ephemeral_public_key: str = ''
|
||||||
|
encrypted_key: str = ''
|
||||||
|
admin_ephemeral_public_key: str = ''
|
||||||
|
encrypted_vault_key: str = ''
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, str]:
|
def to_dict(self) -> Dict[str, str]:
|
||||||
"""Serialize the participant object to a dict representation."""
|
"""Serialize the participant object to a dict representation."""
|
||||||
return {
|
result = {
|
||||||
"status": self.status.value,
|
"status": self.status.value,
|
||||||
"username": self.username,
|
"username": self.username,
|
||||||
"id": self.id,
|
"id": self.id,
|
||||||
"color": self.color,
|
"color": self.color,
|
||||||
|
"is_authenticated": self.is_authenticated,
|
||||||
}
|
}
|
||||||
|
if self.email:
|
||||||
|
result["email"] = self.email
|
||||||
|
if self.suite_user_id:
|
||||||
|
result["suite_user_id"] = self.suite_user_id
|
||||||
|
if self.ephemeral_public_key:
|
||||||
|
result["ephemeral_public_key"] = self.ephemeral_public_key
|
||||||
|
if self.encrypted_key:
|
||||||
|
result["encrypted_key"] = self.encrypted_key
|
||||||
|
if self.admin_ephemeral_public_key:
|
||||||
|
result["admin_ephemeral_public_key"] = self.admin_ephemeral_public_key
|
||||||
|
if self.encrypted_vault_key:
|
||||||
|
result["encrypted_vault_key"] = self.encrypted_vault_key
|
||||||
|
return result
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls, data: dict) -> "LobbyParticipant":
|
def from_dict(cls, data: dict) -> "LobbyParticipant":
|
||||||
@@ -68,6 +89,13 @@ class LobbyParticipant:
|
|||||||
username=data["username"],
|
username=data["username"],
|
||||||
id=data["id"],
|
id=data["id"],
|
||||||
color=data["color"],
|
color=data["color"],
|
||||||
|
is_authenticated=data.get("is_authenticated", False),
|
||||||
|
email=data.get("email"),
|
||||||
|
suite_user_id=data.get("suite_user_id"),
|
||||||
|
ephemeral_public_key=data.get("ephemeral_public_key", ''),
|
||||||
|
encrypted_key=data.get("encrypted_key", ''),
|
||||||
|
admin_ephemeral_public_key=data.get("admin_ephemeral_public_key", ''),
|
||||||
|
encrypted_vault_key=data.get("encrypted_vault_key", ''),
|
||||||
)
|
)
|
||||||
except (KeyError, ValueError) as e:
|
except (KeyError, ValueError) as e:
|
||||||
logger.exception("Error creating Participant from dict:")
|
logger.exception("Error creating Participant from dict:")
|
||||||
@@ -99,7 +127,7 @@ class LobbyService:
|
|||||||
key=settings.LOBBY_COOKIE_NAME,
|
key=settings.LOBBY_COOKIE_NAME,
|
||||||
value=participant_id,
|
value=participant_id,
|
||||||
httponly=True,
|
httponly=True,
|
||||||
secure=True,
|
secure=not settings.DEBUG,
|
||||||
samesite="Lax",
|
samesite="Lax",
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -111,11 +139,16 @@ class LobbyService:
|
|||||||
1. The room is public (open to everyone)
|
1. The room is public (open to everyone)
|
||||||
2. The room has TRUSTED access level and the user is authenticated
|
2. The room has TRUSTED access level and the user is authenticated
|
||||||
|
|
||||||
|
Encrypted rooms never bypass the lobby — participants must go through
|
||||||
|
the lobby key exchange to receive the encryption key.
|
||||||
|
|
||||||
Note: Room access levels can change while participants are waiting in the lobby.
|
Note: Room access levels can change while participants are waiting in the lobby.
|
||||||
This function only checks the current state and should be called each time
|
This function only checks the current state and should be called each time
|
||||||
a participant requests entry to ensure consistent access control, even for
|
a participant requests entry to ensure consistent access control, even for
|
||||||
participants who have already begun waiting.
|
participants who have already begun waiting.
|
||||||
"""
|
"""
|
||||||
|
if hasattr(room, 'encryption_mode') and room.encryption_mode != 'none':
|
||||||
|
return False
|
||||||
return room.is_public or (
|
return room.is_public or (
|
||||||
room.access_level == models.RoomAccessLevel.TRUSTED
|
room.access_level == models.RoomAccessLevel.TRUSTED
|
||||||
and user.is_authenticated
|
and user.is_authenticated
|
||||||
@@ -126,6 +159,7 @@ class LobbyService:
|
|||||||
room,
|
room,
|
||||||
request,
|
request,
|
||||||
username: str,
|
username: str,
|
||||||
|
ephemeral_public_key: str = '',
|
||||||
) -> Tuple[LobbyParticipant, Optional[Dict]]:
|
) -> Tuple[LobbyParticipant, Optional[Dict]]:
|
||||||
"""Request entry to a room for a participant.
|
"""Request entry to a room for a participant.
|
||||||
|
|
||||||
@@ -164,19 +198,42 @@ class LobbyService:
|
|||||||
configuration=room.configuration,
|
configuration=room.configuration,
|
||||||
is_admin_or_owner=False,
|
is_admin_or_owner=False,
|
||||||
participant_id=participant_id,
|
participant_id=participant_id,
|
||||||
|
encryption_mode=room.encryption_mode,
|
||||||
)
|
)
|
||||||
return participant, livekit_config
|
return participant, livekit_config
|
||||||
|
|
||||||
livekit_config = None
|
livekit_config = None
|
||||||
|
|
||||||
if participant is None:
|
if participant is None:
|
||||||
participant = self.enter(room.id, participant_id, username)
|
participant = self.enter(
|
||||||
|
room.id, participant_id, username,
|
||||||
|
is_authenticated=request.user.is_authenticated,
|
||||||
|
email=getattr(request.user, 'email', None) if request.user.is_authenticated else None,
|
||||||
|
suite_user_id=str(request.user.sub) if request.user.is_authenticated else None,
|
||||||
|
ephemeral_public_key=ephemeral_public_key,
|
||||||
|
)
|
||||||
|
|
||||||
elif participant.status == LobbyParticipantStatus.WAITING:
|
elif participant.status == LobbyParticipantStatus.WAITING:
|
||||||
self.refresh_waiting_status(room.id, participant_id)
|
self.refresh_waiting_status(room.id, participant_id)
|
||||||
|
|
||||||
elif participant.status == LobbyParticipantStatus.ACCEPTED:
|
elif participant.status == LobbyParticipantStatus.ACCEPTED:
|
||||||
# wrongly named, contains access token to join a room
|
# If the joiner comes back with a different ephemeral key (e.g. browser
|
||||||
|
# closed and reopened), they can no longer decrypt the encrypted symmetric
|
||||||
|
# key. Reset them to WAITING so the admin re-accepts with the new key.
|
||||||
|
if (
|
||||||
|
ephemeral_public_key
|
||||||
|
and participant.ephemeral_public_key
|
||||||
|
and ephemeral_public_key != participant.ephemeral_public_key
|
||||||
|
):
|
||||||
|
participant = self.enter(
|
||||||
|
room.id, participant_id, username,
|
||||||
|
is_authenticated=request.user.is_authenticated,
|
||||||
|
email=getattr(request.user, 'email', None) if request.user.is_authenticated else None,
|
||||||
|
suite_user_id=str(request.user.sub) if request.user.is_authenticated else None,
|
||||||
|
ephemeral_public_key=ephemeral_public_key,
|
||||||
|
)
|
||||||
|
return participant, None
|
||||||
|
|
||||||
livekit_config = utils.generate_livekit_config(
|
livekit_config = utils.generate_livekit_config(
|
||||||
room_id=room_id,
|
room_id=room_id,
|
||||||
user=request.user,
|
user=request.user,
|
||||||
@@ -185,6 +242,7 @@ class LobbyService:
|
|||||||
configuration=room.configuration,
|
configuration=room.configuration,
|
||||||
is_admin_or_owner=False,
|
is_admin_or_owner=False,
|
||||||
participant_id=participant_id,
|
participant_id=participant_id,
|
||||||
|
encryption_mode=room.encryption_mode,
|
||||||
)
|
)
|
||||||
|
|
||||||
return participant, livekit_config
|
return participant, livekit_config
|
||||||
@@ -201,7 +259,11 @@ class LobbyService:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def enter(
|
def enter(
|
||||||
self, room_id: UUID, participant_id: str, username: str
|
self, room_id: UUID, participant_id: str, username: str,
|
||||||
|
is_authenticated: bool = False,
|
||||||
|
email: Optional[str] = None,
|
||||||
|
suite_user_id: Optional[str] = None,
|
||||||
|
ephemeral_public_key: str = '',
|
||||||
) -> LobbyParticipant:
|
) -> LobbyParticipant:
|
||||||
"""Add participant to waiting lobby.
|
"""Add participant to waiting lobby.
|
||||||
|
|
||||||
@@ -216,6 +278,10 @@ class LobbyService:
|
|||||||
username=username,
|
username=username,
|
||||||
id=participant_id,
|
id=participant_id,
|
||||||
color=color,
|
color=color,
|
||||||
|
is_authenticated=is_authenticated,
|
||||||
|
email=email,
|
||||||
|
suite_user_id=suite_user_id,
|
||||||
|
ephemeral_public_key=ephemeral_public_key,
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -284,6 +350,9 @@ class LobbyService:
|
|||||||
room_id: UUID,
|
room_id: UUID,
|
||||||
participant_id: str,
|
participant_id: str,
|
||||||
allow_entry: bool,
|
allow_entry: bool,
|
||||||
|
encrypted_key: str = '',
|
||||||
|
admin_ephemeral_public_key: str = '',
|
||||||
|
encrypted_vault_key: str = '',
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Handle decision on participant entry.
|
"""Handle decision on participant entry.
|
||||||
|
|
||||||
@@ -302,7 +371,13 @@ class LobbyService:
|
|||||||
"timeout": settings.LOBBY_DENIED_TIMEOUT,
|
"timeout": settings.LOBBY_DENIED_TIMEOUT,
|
||||||
}
|
}
|
||||||
|
|
||||||
self._update_participant_status(room_id, participant_id, **decision)
|
self._update_participant_status(
|
||||||
|
room_id, participant_id,
|
||||||
|
encrypted_key=encrypted_key,
|
||||||
|
admin_ephemeral_public_key=admin_ephemeral_public_key,
|
||||||
|
encrypted_vault_key=encrypted_vault_key,
|
||||||
|
**decision,
|
||||||
|
)
|
||||||
|
|
||||||
def _update_participant_status(
|
def _update_participant_status(
|
||||||
self,
|
self,
|
||||||
@@ -310,6 +385,9 @@ class LobbyService:
|
|||||||
participant_id: str,
|
participant_id: str,
|
||||||
status: LobbyParticipantStatus,
|
status: LobbyParticipantStatus,
|
||||||
timeout: int,
|
timeout: int,
|
||||||
|
encrypted_key: str = '',
|
||||||
|
admin_ephemeral_public_key: str = '',
|
||||||
|
encrypted_vault_key: str = '',
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Update participant status with appropriate timeout."""
|
"""Update participant status with appropriate timeout."""
|
||||||
|
|
||||||
@@ -330,6 +408,12 @@ class LobbyService:
|
|||||||
raise
|
raise
|
||||||
|
|
||||||
participant.status = status
|
participant.status = status
|
||||||
|
if encrypted_key:
|
||||||
|
participant.encrypted_key = encrypted_key
|
||||||
|
if admin_ephemeral_public_key:
|
||||||
|
participant.admin_ephemeral_public_key = admin_ephemeral_public_key
|
||||||
|
if encrypted_vault_key:
|
||||||
|
participant.encrypted_vault_key = encrypted_vault_key
|
||||||
cache.set(cache_key, participant.to_dict(), timeout=timeout)
|
cache.set(cache_key, participant.to_dict(), timeout=timeout)
|
||||||
|
|
||||||
def clear_room_cache(self, room_id: UUID) -> None:
|
def clear_room_cache(self, room_id: UUID) -> None:
|
||||||
|
|||||||
@@ -174,6 +174,26 @@ def test_api_files_create_file_authenticated_extension_case_insensitive():
|
|||||||
assert file.title == "file"
|
assert file.title == "file"
|
||||||
|
|
||||||
|
|
||||||
|
def test_api_files_create_file_disabled(settings):
|
||||||
|
"""
|
||||||
|
Creating a file is denied if file upload is disabled
|
||||||
|
"""
|
||||||
|
settings.FILE_UPLOAD_ENABLED = False
|
||||||
|
user = factories.UserFactory()
|
||||||
|
client = APIClient()
|
||||||
|
client.force_login(user)
|
||||||
|
response = client.post(
|
||||||
|
"/api/v1.0/files/",
|
||||||
|
{
|
||||||
|
"type": FileTypeChoices.BACKGROUND_IMAGE,
|
||||||
|
"filename": "file.JPG",
|
||||||
|
},
|
||||||
|
format="json",
|
||||||
|
)
|
||||||
|
assert response.status_code == 404
|
||||||
|
assert not File.objects.exists()
|
||||||
|
|
||||||
|
|
||||||
def test_api_files_create_file_authenticated_not_checking_extension(settings):
|
def test_api_files_create_file_authenticated_not_checking_extension(settings):
|
||||||
"""
|
"""
|
||||||
Creating a file with an extension not allowed should not fail when restrictions are disabled.
|
Creating a file with an extension not allowed should not fail when restrictions are disabled.
|
||||||
@@ -239,6 +259,48 @@ def test_api_files_create_file_authenticated_hidden_file_but_checking_extension_
|
|||||||
assert response.json() == {"filename": ["This file extension is not allowed."]}
|
assert response.json() == {"filename": ["This file extension is not allowed."]}
|
||||||
|
|
||||||
|
|
||||||
|
def test_api_files_create_file_too_many(
|
||||||
|
settings,
|
||||||
|
):
|
||||||
|
"""
|
||||||
|
Creating a file is forbidden if above user limit.
|
||||||
|
"""
|
||||||
|
settings.FILE_UPLOAD_APPLY_RESTRICTIONS = True
|
||||||
|
settings.FILE_UPLOAD_RESTRICTIONS = {
|
||||||
|
"background_image": {
|
||||||
|
**settings.FILE_UPLOAD_RESTRICTIONS["background_image"],
|
||||||
|
"max_count_by_user": 1,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
user = factories.UserFactory()
|
||||||
|
client = APIClient()
|
||||||
|
client.force_login(user)
|
||||||
|
response = client.post(
|
||||||
|
"/api/v1.0/files/",
|
||||||
|
{
|
||||||
|
"type": FileTypeChoices.BACKGROUND_IMAGE,
|
||||||
|
"filename": "1.png",
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
assert response.status_code == 201
|
||||||
|
|
||||||
|
response = client.post(
|
||||||
|
"/api/v1.0/files/",
|
||||||
|
{
|
||||||
|
"type": FileTypeChoices.BACKGROUND_IMAGE,
|
||||||
|
"filename": "2.png",
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
assert response.status_code == 403
|
||||||
|
assert response.json() == {
|
||||||
|
"detail": "You have reached the maximum number of files for this type."
|
||||||
|
}
|
||||||
|
assert File.objects.count() == 1
|
||||||
|
|
||||||
|
|
||||||
def test_api_files_create_force_id_success():
|
def test_api_files_create_force_id_success():
|
||||||
"""It should be possible to force the item ID when creating a item."""
|
"""It should be possible to force the item ID when creating a item."""
|
||||||
user = factories.UserFactory()
|
user = factories.UserFactory()
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ def valid_minio_event():
|
|||||||
"s3": {
|
"s3": {
|
||||||
"bucket": {"name": "test-bucket"},
|
"bucket": {"name": "test-bucket"},
|
||||||
"object": {
|
"object": {
|
||||||
"key": "recording%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
|
"key": "recordings%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
|
||||||
"contentType": "audio/ogg",
|
"contentType": "audio/ogg",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -51,7 +51,7 @@ def test_parse_valid_event(minio_parser, valid_minio_event):
|
|||||||
"""Test parsing a valid Minio event."""
|
"""Test parsing a valid Minio event."""
|
||||||
event = minio_parser.parse(valid_minio_event)
|
event = minio_parser.parse(valid_minio_event)
|
||||||
assert isinstance(event, StorageEvent)
|
assert isinstance(event, StorageEvent)
|
||||||
assert event.filepath == "recording%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg"
|
assert event.filepath == "recordings%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg"
|
||||||
assert event.filetype == "audio/ogg"
|
assert event.filetype == "audio/ogg"
|
||||||
assert event.bucket_name == "test-bucket"
|
assert event.bucket_name == "test-bucket"
|
||||||
assert event.metadata is None
|
assert event.metadata is None
|
||||||
@@ -130,11 +130,13 @@ def test_validate_invalid_filetype(minio_parser):
|
|||||||
"invalid_filepath",
|
"invalid_filepath",
|
||||||
[
|
[
|
||||||
"invalid_filepath", # totally invalid string
|
"invalid_filepath", # totally invalid string
|
||||||
"recording/46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
|
"recordings/46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
|
||||||
"recording/46d1a121-2426-484d-8fb3-09b5d886f7a8", # missing extension
|
"recordings/46d1a121-2426-484d-8fb3-09b5d886f7a8", # missing extension
|
||||||
"46d1a121-2426-484d-8fb3-09b5d886f7a8", # missing url_encoded_folder_path and extension
|
"46d1a121-2426-484d-8fb3-09b5d886f7a8", # missing url_encoded_folder_path and extension
|
||||||
"", # empty string
|
"", # empty string
|
||||||
"recording%2F46d1a1212426484d8fb309b5d886f7a8.ogg",
|
"46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg", # no folder at all
|
||||||
|
"uploads%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg", # wrong folder name
|
||||||
|
"folder%2Fuploads%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg", # nested but no recordings/
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_validate_invalid_filepath(invalid_filepath, minio_parser):
|
def test_validate_invalid_filepath(invalid_filepath, minio_parser):
|
||||||
@@ -152,7 +154,7 @@ def test_validate_invalid_filepath(invalid_filepath, minio_parser):
|
|||||||
def test_validate_valid_event(minio_parser):
|
def test_validate_valid_event(minio_parser):
|
||||||
"""Test validation with valid event data."""
|
"""Test validation with valid event data."""
|
||||||
event = StorageEvent(
|
event = StorageEvent(
|
||||||
filepath="recording%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
|
filepath="recordings%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
|
||||||
filetype="audio/ogg",
|
filetype="audio/ogg",
|
||||||
bucket_name="test-bucket",
|
bucket_name="test-bucket",
|
||||||
metadata=None,
|
metadata=None,
|
||||||
@@ -170,7 +172,7 @@ def test_get_recording_id_success(minio_parser, valid_minio_event):
|
|||||||
def test_validate_filepath_with_folder(minio_parser):
|
def test_validate_filepath_with_folder(minio_parser):
|
||||||
"""Test validation of filepath with folder structure."""
|
"""Test validation of filepath with folder structure."""
|
||||||
event = StorageEvent(
|
event = StorageEvent(
|
||||||
filepath="parent_folder%2Ffolder%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
|
filepath="parent_folder%2Frecordings%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
|
||||||
filetype="audio/ogg",
|
filetype="audio/ogg",
|
||||||
bucket_name="test-bucket",
|
bucket_name="test-bucket",
|
||||||
metadata=None,
|
metadata=None,
|
||||||
@@ -219,7 +221,7 @@ def test_validate_custom_filetypes():
|
|||||||
parser = MinioParser(bucket_name="test-bucket", allowed_filetypes={"audio/mp3"})
|
parser = MinioParser(bucket_name="test-bucket", allowed_filetypes={"audio/mp3"})
|
||||||
|
|
||||||
event = StorageEvent(
|
event = StorageEvent(
|
||||||
filepath="parent_folder%2Ffolder%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
|
filepath="parent_folder%2Frecordings%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
|
||||||
filetype="audio/mp3",
|
filetype="audio/mp3",
|
||||||
bucket_name="test-bucket",
|
bucket_name="test-bucket",
|
||||||
metadata=None,
|
metadata=None,
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ from ...factories import RecordingFactory
|
|||||||
from ...models import Recording, RecordingStatusChoices
|
from ...models import Recording, RecordingStatusChoices
|
||||||
from ...recording.event.exceptions import (
|
from ...recording.event.exceptions import (
|
||||||
InvalidBucketError,
|
InvalidBucketError,
|
||||||
|
InvalidFilepathError,
|
||||||
InvalidFileTypeError,
|
InvalidFileTypeError,
|
||||||
ParsingEventDataError,
|
ParsingEventDataError,
|
||||||
)
|
)
|
||||||
@@ -94,7 +95,7 @@ def test_save_recording_parsing_error(recording_settings, mock_get_parser, clien
|
|||||||
)
|
)
|
||||||
|
|
||||||
assert response.status_code == 403
|
assert response.status_code == 403
|
||||||
assert response.json() == {"detail": "Invalid request data: Error message"}
|
assert response.json() == {"detail": "Invalid request data."}
|
||||||
|
|
||||||
|
|
||||||
def test_save_recording_bucket_error(recording_settings, mock_get_parser, client):
|
def test_save_recording_bucket_error(recording_settings, mock_get_parser, client):
|
||||||
@@ -111,7 +112,7 @@ def test_save_recording_bucket_error(recording_settings, mock_get_parser, client
|
|||||||
)
|
)
|
||||||
|
|
||||||
assert response.status_code == 403
|
assert response.status_code == 403
|
||||||
assert response.json() == {"detail": "Invalid bucket specified"}
|
assert response.json() == {"detail": "Invalid bucket specified."}
|
||||||
|
|
||||||
|
|
||||||
def test_save_recording_filetype_error(recording_settings, mock_get_parser):
|
def test_save_recording_filetype_error(recording_settings, mock_get_parser):
|
||||||
@@ -132,7 +133,28 @@ def test_save_recording_filetype_error(recording_settings, mock_get_parser):
|
|||||||
)
|
)
|
||||||
|
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
assert response.json() == {"message": "Ignore this file type, unsupported '.json'"}
|
assert response.json() == {"message": "Notification ignored."}
|
||||||
|
|
||||||
|
|
||||||
|
def test_save_recording_filepath_error(recording_settings, mock_get_parser):
|
||||||
|
"""Test handling of unsupported filepath in recording event data."""
|
||||||
|
|
||||||
|
mock_parser = mock.Mock()
|
||||||
|
mock_parser.get_recording_id.side_effect = InvalidFilepathError(
|
||||||
|
"Invalid filepath structure: parent/folder/recording.jpeg"
|
||||||
|
)
|
||||||
|
mock_get_parser.return_value = mock_parser
|
||||||
|
|
||||||
|
client = APIClient()
|
||||||
|
|
||||||
|
response = client.post(
|
||||||
|
"/api/v1.0/recordings/storage-hook/",
|
||||||
|
{"recording_data": "valid-data"},
|
||||||
|
HTTP_AUTHORIZATION="Bearer testAuthToken",
|
||||||
|
)
|
||||||
|
|
||||||
|
assert response.status_code == 200
|
||||||
|
assert response.json() == {"message": "Notification ignored."}
|
||||||
|
|
||||||
|
|
||||||
def test_save_recording_unknown_recording(recording_settings, mock_get_parser, client):
|
def test_save_recording_unknown_recording(recording_settings, mock_get_parser, client):
|
||||||
|
|||||||
@@ -240,10 +240,9 @@ def test_api_rooms_invite_error(mock_invite_to_room):
|
|||||||
mock_invite_to_room.assert_called_once()
|
mock_invite_to_room.assert_called_once()
|
||||||
|
|
||||||
|
|
||||||
@mock.patch("core.services.invitation.send_mail")
|
@mock.patch("core.services.invitation.EmailMultiAlternatives")
|
||||||
def test_api_rooms_invite_success(mock_send_mail, settings):
|
def test_api_rooms_invite_success(mock_email_class, settings):
|
||||||
"""Test privileged users should successfully send invitation emails."""
|
"""Test privileged users should successfully send invitation emails."""
|
||||||
|
|
||||||
settings.EMAIL_BRAND_NAME = "ACME"
|
settings.EMAIL_BRAND_NAME = "ACME"
|
||||||
settings.EMAIL_LOGO_IMG = "https://acme.com/logo"
|
settings.EMAIL_LOGO_IMG = "https://acme.com/logo"
|
||||||
settings.EMAIL_APP_BASE_URL = "https://acme.com"
|
settings.EMAIL_APP_BASE_URL = "https://acme.com"
|
||||||
@@ -255,7 +254,6 @@ def test_api_rooms_invite_success(mock_send_mail, settings):
|
|||||||
user = UserFactory()
|
user = UserFactory()
|
||||||
|
|
||||||
room.accesses.create(user=user, role=random.choice(["administrator", "owner"]))
|
room.accesses.create(user=user, role=random.choice(["administrator", "owner"]))
|
||||||
|
|
||||||
client.force_login(user)
|
client.force_login(user)
|
||||||
|
|
||||||
data = {"emails": ["fabien@yopmail.com", "gerald@yopmail.com"]}
|
data = {"emails": ["fabien@yopmail.com", "gerald@yopmail.com"]}
|
||||||
@@ -269,26 +267,38 @@ def test_api_rooms_invite_success(mock_send_mail, settings):
|
|||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
assert response.json() == {"status": "success", "message": "invitations sent"}
|
assert response.json() == {"status": "success", "message": "invitations sent"}
|
||||||
|
|
||||||
mock_send_mail.assert_called_once()
|
mock_email_class.assert_called_once()
|
||||||
|
|
||||||
subject, body, sender, recipients = mock_send_mail.call_args[0]
|
# Check constructor arguments
|
||||||
|
call_kwargs = mock_email_class.call_args[1] # EmailMultiAlternatives(**kwargs)
|
||||||
|
|
||||||
assert (
|
assert call_kwargs["subject"] == (
|
||||||
subject == f"Video call in progress: {user.email} is waiting for you to connect"
|
f"Video call in progress: {user.email} is waiting for you to connect"
|
||||||
|
)
|
||||||
|
assert call_kwargs["from_email"] == "notifications@acme.com"
|
||||||
|
assert call_kwargs["to"] == []
|
||||||
|
assert sorted(call_kwargs["bcc"]) == sorted(
|
||||||
|
["fabien@yopmail.com", "gerald@yopmail.com"]
|
||||||
)
|
)
|
||||||
|
|
||||||
# Verify email contains expected content
|
# Check plain text body
|
||||||
|
plain_body = call_kwargs["body"]
|
||||||
required_content = [
|
required_content = [
|
||||||
"ACME", # Brand name
|
"ACME",
|
||||||
"https://acme.com/logo", # Logo URL
|
"https://acme.com/logo",
|
||||||
f"https://acme.com/{room.slug}", # Room url
|
f"https://acme.com/{room.slug}",
|
||||||
f"acme.com/{room.slug}", # Room link
|
f"acme.com/{room.slug}",
|
||||||
]
|
]
|
||||||
|
|
||||||
for content in required_content:
|
for content in required_content:
|
||||||
assert content in body
|
assert content in plain_body
|
||||||
|
|
||||||
assert sender == "notifications@acme.com"
|
# Check HTML alternative was attached
|
||||||
|
mock_instance = mock_email_class.return_value
|
||||||
|
mock_instance.attach_alternative.assert_called_once()
|
||||||
|
html_body, mimetype = mock_instance.attach_alternative.call_args[0]
|
||||||
|
assert mimetype == "text/html"
|
||||||
|
for content in required_content:
|
||||||
|
assert content in html_body
|
||||||
|
|
||||||
# Verify all owners received the email (order-independent comparison)
|
# Check send was called
|
||||||
assert sorted(recipients) == sorted(["fabien@yopmail.com", "gerald@yopmail.com"])
|
mock_instance.send.assert_called_once()
|
||||||
|
|||||||
@@ -130,10 +130,11 @@ def test_update_participant_success(mock_livekit_client):
|
|||||||
"can_publish": True,
|
"can_publish": True,
|
||||||
"can_publish_data": True,
|
"can_publish_data": True,
|
||||||
"can_publish_sources": [
|
"can_publish_sources": [
|
||||||
1,
|
"CAMERA",
|
||||||
2,
|
"MICROPHONE",
|
||||||
], # [TrackSource.CAMERA, TrackSource.MICROPHONE]
|
],
|
||||||
"can_update_metadata": True,
|
"can_update_metadata": True,
|
||||||
|
"can_subscribe_metrics": True,
|
||||||
},
|
},
|
||||||
"name": "John Doe",
|
"name": "John Doe",
|
||||||
}
|
}
|
||||||
@@ -155,8 +156,14 @@ def test_update_participant_success(mock_livekit_client):
|
|||||||
{"can_subscribe": True},
|
{"can_subscribe": True},
|
||||||
{"can_publish": True},
|
{"can_publish": True},
|
||||||
{"can_publish_data": True},
|
{"can_publish_data": True},
|
||||||
{"can_publish_sources": [1, 2]},
|
{
|
||||||
|
"can_publish_sources": [
|
||||||
|
"CAMERA",
|
||||||
|
"MICROPHONE",
|
||||||
|
]
|
||||||
|
},
|
||||||
{"can_update_metadata": True},
|
{"can_update_metadata": True},
|
||||||
|
{"can_subscribe_metrics": False},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_update_participant_permission_fields_are_optional(
|
def test_update_participant_permission_fields_are_optional(
|
||||||
@@ -264,35 +271,6 @@ def test_update_participant_suspicious_permission_multiple(mock_suspicious):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("value", (False, True))
|
|
||||||
def test_update_participant_unimplemented_can_subscribe_metrics(value):
|
|
||||||
"""Test update participant raises 400 when can_subscribe_metrics is set."""
|
|
||||||
client = APIClient()
|
|
||||||
room = RoomFactory()
|
|
||||||
user = UserFactory()
|
|
||||||
UserResourceAccessFactory(
|
|
||||||
resource=room, user=user, role=random.choice(["administrator", "owner"])
|
|
||||||
)
|
|
||||||
client.force_authenticate(user=user)
|
|
||||||
|
|
||||||
payload = {
|
|
||||||
"participant_identity": str(uuid4()),
|
|
||||||
"permission": {
|
|
||||||
"can_subscribe": True,
|
|
||||||
"can_publish": True,
|
|
||||||
"can_publish_data": True,
|
|
||||||
"can_update_metadata": False,
|
|
||||||
"can_subscribe_metrics": value,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
url = reverse("rooms-update-participant", kwargs={"pk": room.id})
|
|
||||||
response = client.post(url, payload, format="json")
|
|
||||||
|
|
||||||
assert response.status_code == status.HTTP_400_BAD_REQUEST
|
|
||||||
assert "can_subscribe_metrics" in str(response.data)
|
|
||||||
|
|
||||||
|
|
||||||
def test_update_participant_forbidden_without_access():
|
def test_update_participant_forbidden_without_access():
|
||||||
"""Test update participant returns 403 when user lacks room privileges."""
|
"""Test update participant returns 403 when user lacks room privileges."""
|
||||||
client = APIClient()
|
client = APIClient()
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ def test_missing_auth_header(client, serialized_event_data, mock_livekit_config)
|
|||||||
assert response.status_code == 401
|
assert response.status_code == 401
|
||||||
assert response.json() == {
|
assert response.json() == {
|
||||||
"status": "error",
|
"status": "error",
|
||||||
"message": "Authorization header missing",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -91,7 +90,7 @@ def test_invalid_payload(client, auth_token, mock_livekit_config):
|
|||||||
)
|
)
|
||||||
|
|
||||||
assert response.status_code == 400
|
assert response.status_code == 400
|
||||||
assert response.json() == {"status": "error", "message": "Invalid webhook payload"}
|
assert response.json() == {"status": "error"}
|
||||||
|
|
||||||
|
|
||||||
def test_unknown_event_type(client, mock_livekit_config):
|
def test_unknown_event_type(client, mock_livekit_config):
|
||||||
@@ -116,7 +115,6 @@ def test_unknown_event_type(client, mock_livekit_config):
|
|||||||
assert response.status_code == 422
|
assert response.status_code == 422
|
||||||
assert response.json() == {
|
assert response.json() == {
|
||||||
"status": "error",
|
"status": "error",
|
||||||
"message": "Unknown webhook type: unknown_event_type",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ def generate_token(
|
|||||||
sources: Optional[List[str]] = None,
|
sources: Optional[List[str]] = None,
|
||||||
is_admin_or_owner: bool = False,
|
is_admin_or_owner: bool = False,
|
||||||
participant_id: Optional[str] = None,
|
participant_id: Optional[str] = None,
|
||||||
|
encryption_mode: str = 'none',
|
||||||
) -> str:
|
) -> str:
|
||||||
"""Generate a LiveKit access token for a user in a specific room.
|
"""Generate a LiveKit access token for a user in a specific room.
|
||||||
|
|
||||||
@@ -92,11 +93,15 @@ def generate_token(
|
|||||||
if sources is None:
|
if sources is None:
|
||||||
sources = settings.LIVEKIT_DEFAULT_SOURCES
|
sources = settings.LIVEKIT_DEFAULT_SOURCES
|
||||||
|
|
||||||
|
# In encrypted rooms, no one can change their name/metadata to prevent
|
||||||
|
# identity spoofing — the admin accepted them based on their declared identity.
|
||||||
|
can_update_metadata = encryption_mode == 'none'
|
||||||
|
|
||||||
video_grants = VideoGrants(
|
video_grants = VideoGrants(
|
||||||
room=room,
|
room=room,
|
||||||
room_join=True,
|
room_join=True,
|
||||||
room_admin=is_admin_or_owner,
|
room_admin=is_admin_or_owner,
|
||||||
can_update_own_metadata=True,
|
can_update_own_metadata=can_update_metadata,
|
||||||
can_publish=bool(sources),
|
can_publish=bool(sources),
|
||||||
can_publish_sources=sources,
|
can_publish_sources=sources,
|
||||||
can_subscribe=True,
|
can_subscribe=True,
|
||||||
@@ -112,6 +117,42 @@ def generate_token(
|
|||||||
if color is None:
|
if color is None:
|
||||||
color = generate_color(identity)
|
color = generate_color(identity)
|
||||||
|
|
||||||
|
# Build participant attributes — these are server-signed in the JWT
|
||||||
|
# and visible to all participants in the room.
|
||||||
|
attributes = {
|
||||||
|
"color": color,
|
||||||
|
"room_admin": "true" if is_admin_or_owner else "false",
|
||||||
|
"is_authenticated": "true" if not user.is_anonymous else "false",
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add identity info for authenticated users in encrypted rooms only.
|
||||||
|
#
|
||||||
|
# Email and suite_user_id are included in the JWT attributes for encrypted
|
||||||
|
# rooms because:
|
||||||
|
# - Email: allows admins to verify participant identity in the lobby and
|
||||||
|
# participant list (important for trust decisions in encrypted meetings)
|
||||||
|
# - suite_user_id: required for vault key exchange in advanced encryption
|
||||||
|
# (vaultClient.shareKeys needs the recipient's user ID)
|
||||||
|
#
|
||||||
|
# These attributes are NOT included in non-encrypted rooms because:
|
||||||
|
# - Non-encrypted rooms have no waiting room, so anonymous users can join
|
||||||
|
# freely and would see everyone's email via LiveKit signaling
|
||||||
|
# - LiveKit JWT attributes are immutable and broadcast to ALL participants
|
||||||
|
# equally — there is no way to show them only to authenticated users
|
||||||
|
# at the protocol level
|
||||||
|
# - The frontend additionally hides email from anonymous users in the UI,
|
||||||
|
# but this is defense-in-depth, not the primary protection
|
||||||
|
#
|
||||||
|
# Future improvement: serve email via a Django API endpoint that checks
|
||||||
|
# the requester's authentication, removing it from the JWT entirely.
|
||||||
|
# This would require the backend to call LiveKit's ListParticipants API
|
||||||
|
# to cross-reference identities with the user database.
|
||||||
|
if not user.is_anonymous and encryption_mode != 'none':
|
||||||
|
if user.email:
|
||||||
|
attributes["email"] = user.email
|
||||||
|
if user.sub:
|
||||||
|
attributes["suite_user_id"] = str(user.sub)
|
||||||
|
|
||||||
token = (
|
token = (
|
||||||
AccessToken(
|
AccessToken(
|
||||||
api_key=settings.LIVEKIT_CONFIGURATION["api_key"],
|
api_key=settings.LIVEKIT_CONFIGURATION["api_key"],
|
||||||
@@ -120,9 +161,7 @@ def generate_token(
|
|||||||
.with_grants(video_grants)
|
.with_grants(video_grants)
|
||||||
.with_identity(identity)
|
.with_identity(identity)
|
||||||
.with_name(username or default_username)
|
.with_name(username or default_username)
|
||||||
.with_attributes(
|
.with_attributes(attributes)
|
||||||
{"color": color, "room_admin": "true" if is_admin_or_owner else "false"}
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return token.to_jwt()
|
return token.to_jwt()
|
||||||
@@ -136,6 +175,7 @@ def generate_livekit_config(
|
|||||||
color: Optional[str] = None,
|
color: Optional[str] = None,
|
||||||
configuration: Optional[dict] = None,
|
configuration: Optional[dict] = None,
|
||||||
participant_id: Optional[str] = None,
|
participant_id: Optional[str] = None,
|
||||||
|
encryption_mode: str = 'none',
|
||||||
) -> dict:
|
) -> dict:
|
||||||
"""Generate LiveKit configuration for room access.
|
"""Generate LiveKit configuration for room access.
|
||||||
|
|
||||||
@@ -168,6 +208,7 @@ def generate_livekit_config(
|
|||||||
sources=sources,
|
sources=sources,
|
||||||
is_admin_or_owner=is_admin_or_owner,
|
is_admin_or_owner=is_admin_or_owner,
|
||||||
participant_id=participant_id,
|
participant_id=participant_id,
|
||||||
|
encryption_mode=encryption_mode,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2026-03-11 17:31+0000\n"
|
"POT-Creation-Date: 2026-03-12 13:46+0000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@@ -76,11 +76,11 @@ msgstr "%(count)s Aufnahme(n) erfolgreich als ‚Fehler beim Stoppen‘ markiert
|
|||||||
msgid "Skipped %(count)s recording(s) with an ineligible status."
|
msgid "Skipped %(count)s recording(s) with an ineligible status."
|
||||||
msgstr "%(count)s abgelaufene Aufnahme(n) übersprungen."
|
msgstr "%(count)s abgelaufene Aufnahme(n) übersprungen."
|
||||||
|
|
||||||
#: core/admin.py:341
|
#: core/admin.py:342
|
||||||
msgid "No scopes"
|
msgid "No scopes"
|
||||||
msgstr "Keine Scopes"
|
msgstr "Keine Scopes"
|
||||||
|
|
||||||
#: core/admin.py:343
|
#: core/admin.py:344
|
||||||
msgid "Scopes"
|
msgid "Scopes"
|
||||||
msgstr "Scopes"
|
msgstr "Scopes"
|
||||||
|
|
||||||
@@ -98,6 +98,10 @@ msgstr ""
|
|||||||
msgid "This file extension is not allowed."
|
msgid "This file extension is not allowed."
|
||||||
msgstr "Diese Dateiendung ist nicht erlaubt."
|
msgstr "Diese Dateiendung ist nicht erlaubt."
|
||||||
|
|
||||||
|
#: core/api/serializers.py:533
|
||||||
|
msgid "You have reached the maximum number of files for this type."
|
||||||
|
msgstr "Sie haben die maximale Anzahl an Dateien dieses Typs erreicht."
|
||||||
|
|
||||||
#: core/models.py:37
|
#: core/models.py:37
|
||||||
msgid "Member"
|
msgid "Member"
|
||||||
msgstr "Mitglied"
|
msgstr "Mitglied"
|
||||||
@@ -600,18 +604,18 @@ msgstr ""
|
|||||||
" Wenn Sie Fragen haben oder Unterstützung benötigen, wenden Sie sich bitte "
|
" Wenn Sie Fragen haben oder Unterstützung benötigen, wenden Sie sich bitte "
|
||||||
"an unser Support-Team unter %(support_email)s. "
|
"an unser Support-Team unter %(support_email)s. "
|
||||||
|
|
||||||
#: meet/settings.py:215
|
#: meet/settings.py:223
|
||||||
msgid "English"
|
msgid "English"
|
||||||
msgstr "Englisch"
|
msgstr "Englisch"
|
||||||
|
|
||||||
#: meet/settings.py:216
|
#: meet/settings.py:224
|
||||||
msgid "French"
|
msgid "French"
|
||||||
msgstr "Französisch"
|
msgstr "Französisch"
|
||||||
|
|
||||||
#: meet/settings.py:217
|
#: meet/settings.py:225
|
||||||
msgid "Dutch"
|
msgid "Dutch"
|
||||||
msgstr "Niederländisch"
|
msgstr "Niederländisch"
|
||||||
|
|
||||||
#: meet/settings.py:218
|
#: meet/settings.py:226
|
||||||
msgid "German"
|
msgid "German"
|
||||||
msgstr "Deutsch"
|
msgstr "Deutsch"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2026-03-11 17:31+0000\n"
|
"POT-Creation-Date: 2026-03-12 13:46+0000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@@ -76,11 +76,11 @@ msgstr "%(count)s recording(s) successfully marked as 'Failed to Stop'."
|
|||||||
msgid "Skipped %(count)s recording(s) with an ineligible status."
|
msgid "Skipped %(count)s recording(s) with an ineligible status."
|
||||||
msgstr "Skipped %(count)s expired recording(s)."
|
msgstr "Skipped %(count)s expired recording(s)."
|
||||||
|
|
||||||
#: core/admin.py:341
|
#: core/admin.py:342
|
||||||
msgid "No scopes"
|
msgid "No scopes"
|
||||||
msgstr "No scopes"
|
msgstr "No scopes"
|
||||||
|
|
||||||
#: core/admin.py:343
|
#: core/admin.py:344
|
||||||
msgid "Scopes"
|
msgid "Scopes"
|
||||||
msgstr "Scopes"
|
msgstr "Scopes"
|
||||||
|
|
||||||
@@ -96,6 +96,10 @@ msgstr "You must be administrator or owner of a room to add accesses to it."
|
|||||||
msgid "This file extension is not allowed."
|
msgid "This file extension is not allowed."
|
||||||
msgstr "This file extension is not allowed."
|
msgstr "This file extension is not allowed."
|
||||||
|
|
||||||
|
#: core/api/serializers.py:533
|
||||||
|
msgid "You have reached the maximum number of files for this type."
|
||||||
|
msgstr "You have reached the maximum number of files for this type."
|
||||||
|
|
||||||
#: core/models.py:37
|
#: core/models.py:37
|
||||||
msgid "Member"
|
msgid "Member"
|
||||||
msgstr "Member"
|
msgstr "Member"
|
||||||
@@ -596,18 +600,18 @@ msgstr ""
|
|||||||
" If you have any questions or need assistance, please contact our support "
|
" If you have any questions or need assistance, please contact our support "
|
||||||
"team at %(support_email)s. "
|
"team at %(support_email)s. "
|
||||||
|
|
||||||
#: meet/settings.py:215
|
#: meet/settings.py:223
|
||||||
msgid "English"
|
msgid "English"
|
||||||
msgstr "English"
|
msgstr "English"
|
||||||
|
|
||||||
#: meet/settings.py:216
|
#: meet/settings.py:224
|
||||||
msgid "French"
|
msgid "French"
|
||||||
msgstr "French"
|
msgstr "French"
|
||||||
|
|
||||||
#: meet/settings.py:217
|
#: meet/settings.py:225
|
||||||
msgid "Dutch"
|
msgid "Dutch"
|
||||||
msgstr "Dutch"
|
msgstr "Dutch"
|
||||||
|
|
||||||
#: meet/settings.py:218
|
#: meet/settings.py:226
|
||||||
msgid "German"
|
msgid "German"
|
||||||
msgstr "German"
|
msgstr "German"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2026-03-11 17:31+0000\n"
|
"POT-Creation-Date: 2026-03-12 13:46+0000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: antoine.lebaud@mail.numerique.gouv.fr\n"
|
"Last-Translator: antoine.lebaud@mail.numerique.gouv.fr\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@@ -68,7 +68,8 @@ msgstr "Marquer les enregistrements sélectionnés comme « Échec d’arrêt »
|
|||||||
#: core/admin.py:218
|
#: core/admin.py:218
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%(count)s recording(s) successfully marked as 'Failed to Stop'."
|
msgid "%(count)s recording(s) successfully marked as 'Failed to Stop'."
|
||||||
msgstr "%(count)s enregistrement(s) marqué(s) avec succès comme « Échec d’arrêt »."
|
msgstr ""
|
||||||
|
"%(count)s enregistrement(s) marqué(s) avec succès comme « Échec d’arrêt »."
|
||||||
|
|
||||||
#: core/admin.py:226
|
#: core/admin.py:226
|
||||||
#, fuzzy, python-format
|
#, fuzzy, python-format
|
||||||
@@ -76,11 +77,11 @@ msgstr "%(count)s enregistrement(s) marqué(s) avec succès comme « Échec d’
|
|||||||
msgid "Skipped %(count)s recording(s) with an ineligible status."
|
msgid "Skipped %(count)s recording(s) with an ineligible status."
|
||||||
msgstr "%(count)s enregistrement(s) avec un statut inéligible ignoré(s)."
|
msgstr "%(count)s enregistrement(s) avec un statut inéligible ignoré(s)."
|
||||||
|
|
||||||
#: core/admin.py:341
|
#: core/admin.py:342
|
||||||
msgid "No scopes"
|
msgid "No scopes"
|
||||||
msgstr "Aucun scopes"
|
msgstr "Aucun scopes"
|
||||||
|
|
||||||
#: core/admin.py:343
|
#: core/admin.py:344
|
||||||
msgid "Scopes"
|
msgid "Scopes"
|
||||||
msgstr "Scopes"
|
msgstr "Scopes"
|
||||||
|
|
||||||
@@ -98,6 +99,10 @@ msgstr ""
|
|||||||
msgid "This file extension is not allowed."
|
msgid "This file extension is not allowed."
|
||||||
msgstr "Cette extension n'est pas autorisée"
|
msgstr "Cette extension n'est pas autorisée"
|
||||||
|
|
||||||
|
#: core/api/serializers.py:533
|
||||||
|
msgid "You have reached the maximum number of files for this type."
|
||||||
|
msgstr "Vous avez atteint le nombre maximum de fichiers de ce type"
|
||||||
|
|
||||||
#: core/models.py:37
|
#: core/models.py:37
|
||||||
msgid "Member"
|
msgid "Member"
|
||||||
msgstr "Membre"
|
msgstr "Membre"
|
||||||
@@ -601,18 +606,18 @@ msgstr ""
|
|||||||
" Si vous avez des questions ou besoin d'assistance, veuillez contacter notre "
|
" Si vous avez des questions ou besoin d'assistance, veuillez contacter notre "
|
||||||
"équipe d'assistance à %(support_email)s. "
|
"équipe d'assistance à %(support_email)s. "
|
||||||
|
|
||||||
#: meet/settings.py:215
|
#: meet/settings.py:223
|
||||||
msgid "English"
|
msgid "English"
|
||||||
msgstr "Anglais"
|
msgstr "Anglais"
|
||||||
|
|
||||||
#: meet/settings.py:216
|
#: meet/settings.py:224
|
||||||
msgid "French"
|
msgid "French"
|
||||||
msgstr "Français"
|
msgstr "Français"
|
||||||
|
|
||||||
#: meet/settings.py:217
|
#: meet/settings.py:225
|
||||||
msgid "Dutch"
|
msgid "Dutch"
|
||||||
msgstr "Néerlandais"
|
msgstr "Néerlandais"
|
||||||
|
|
||||||
#: meet/settings.py:218
|
#: meet/settings.py:226
|
||||||
msgid "German"
|
msgid "German"
|
||||||
msgstr "Allemand"
|
msgstr "Allemand"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2026-03-11 17:31+0000\n"
|
"POT-Creation-Date: 2026-03-12 13:46+0000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@@ -76,11 +76,11 @@ msgstr "%(count)s opname(s) succesvol gemarkeerd als 'Mislukt bij stoppen'."
|
|||||||
msgid "Skipped %(count)s recording(s) with an ineligible status."
|
msgid "Skipped %(count)s recording(s) with an ineligible status."
|
||||||
msgstr "%(count)s opname(s) met een niet-toegestane status overgeslagen."
|
msgstr "%(count)s opname(s) met een niet-toegestane status overgeslagen."
|
||||||
|
|
||||||
#: core/admin.py:341
|
#: core/admin.py:342
|
||||||
msgid "No scopes"
|
msgid "No scopes"
|
||||||
msgstr "Geen scopes"
|
msgstr "Geen scopes"
|
||||||
|
|
||||||
#: core/admin.py:343
|
#: core/admin.py:344
|
||||||
msgid "Scopes"
|
msgid "Scopes"
|
||||||
msgstr "Scopes"
|
msgstr "Scopes"
|
||||||
|
|
||||||
@@ -97,6 +97,10 @@ msgstr ""
|
|||||||
msgid "This file extension is not allowed."
|
msgid "This file extension is not allowed."
|
||||||
msgstr "Deze bestandsextensie is niet toegestaan."
|
msgstr "Deze bestandsextensie is niet toegestaan."
|
||||||
|
|
||||||
|
#: core/api/serializers.py:533
|
||||||
|
msgid "You have reached the maximum number of files for this type."
|
||||||
|
msgstr "Het maximale aantal bestanden voor dit type is bereikt."
|
||||||
|
|
||||||
#: core/models.py:37
|
#: core/models.py:37
|
||||||
msgid "Member"
|
msgid "Member"
|
||||||
msgstr "Lid"
|
msgstr "Lid"
|
||||||
@@ -595,18 +599,18 @@ msgstr ""
|
|||||||
" Als je vragen hebt of hulp nodig hebt, neem dan contact op met ons support "
|
" Als je vragen hebt of hulp nodig hebt, neem dan contact op met ons support "
|
||||||
"team via %(support_email)s. "
|
"team via %(support_email)s. "
|
||||||
|
|
||||||
#: meet/settings.py:215
|
#: meet/settings.py:223
|
||||||
msgid "English"
|
msgid "English"
|
||||||
msgstr "Engels"
|
msgstr "Engels"
|
||||||
|
|
||||||
#: meet/settings.py:216
|
#: meet/settings.py:224
|
||||||
msgid "French"
|
msgid "French"
|
||||||
msgstr "Frans"
|
msgstr "Frans"
|
||||||
|
|
||||||
#: meet/settings.py:217
|
#: meet/settings.py:225
|
||||||
msgid "Dutch"
|
msgid "Dutch"
|
||||||
msgstr "Nederlands"
|
msgstr "Nederlands"
|
||||||
|
|
||||||
#: meet/settings.py:218
|
#: meet/settings.py:226
|
||||||
msgid "German"
|
msgid "German"
|
||||||
msgstr "Duits"
|
msgstr "Duits"
|
||||||
|
|||||||
@@ -176,6 +176,13 @@ class Base(Configuration):
|
|||||||
environ_prefix=None,
|
environ_prefix=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
FILE_UPLOAD_ENABLED = values.BooleanValue(
|
||||||
|
# False to avoid a breaking change for now
|
||||||
|
default=False,
|
||||||
|
environ_name="FILE_UPLOAD_ENABLED",
|
||||||
|
environ_prefix=None,
|
||||||
|
)
|
||||||
|
|
||||||
FILE_UPLOAD_PATH = values.Value(
|
FILE_UPLOAD_PATH = values.Value(
|
||||||
"files", environ_name="FILE_UPLOAD_PATH", environ_prefix=None
|
"files", environ_name="FILE_UPLOAD_PATH", environ_prefix=None
|
||||||
)
|
)
|
||||||
@@ -188,6 +195,7 @@ class Base(Configuration):
|
|||||||
{
|
{
|
||||||
"background_image": {
|
"background_image": {
|
||||||
"max_size": 2 * MB,
|
"max_size": 2 * MB,
|
||||||
|
"max_count_by_user": 10,
|
||||||
"allowed_extensions": [".jpeg", ".jpg", ".png"],
|
"allowed_extensions": [".jpeg", ".jpg", ".png"],
|
||||||
"allowed_mimetypes": ["image/jpeg", "image/png"],
|
"allowed_mimetypes": ["image/jpeg", "image/png"],
|
||||||
},
|
},
|
||||||
@@ -444,7 +452,11 @@ class Base(Configuration):
|
|||||||
CELERY_BROKER_TRANSPORT_OPTIONS = values.DictValue({}, environ_prefix=None)
|
CELERY_BROKER_TRANSPORT_OPTIONS = values.DictValue({}, environ_prefix=None)
|
||||||
|
|
||||||
# Session
|
# Session
|
||||||
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
|
SESSION_ENGINE = values.Value(
|
||||||
|
default="django.contrib.sessions.backends.cache",
|
||||||
|
environ_name="SESSION_ENGINE",
|
||||||
|
environ_prefix=None,
|
||||||
|
)
|
||||||
SESSION_CACHE_ALIAS = "default"
|
SESSION_CACHE_ALIAS = "default"
|
||||||
SESSION_COOKIE_AGE = values.PositiveIntegerValue(
|
SESSION_COOKIE_AGE = values.PositiveIntegerValue(
|
||||||
default=60 * 60 * 12, environ_name="SESSION_COOKIE_AGE", environ_prefix=None
|
default=60 * 60 * 12, environ_name="SESSION_COOKIE_AGE", environ_prefix=None
|
||||||
@@ -549,12 +561,12 @@ class Base(Configuration):
|
|||||||
"returnTo", environ_name="OIDC_REDIRECT_FIELD_NAME", environ_prefix=None
|
"returnTo", environ_name="OIDC_REDIRECT_FIELD_NAME", environ_prefix=None
|
||||||
)
|
)
|
||||||
OIDC_USERINFO_FULLNAME_FIELDS = values.ListValue(
|
OIDC_USERINFO_FULLNAME_FIELDS = values.ListValue(
|
||||||
default=["given_name", "usual_name"],
|
default=["first_name", "last_name"],
|
||||||
environ_name="OIDC_USERINFO_FULLNAME_FIELDS",
|
environ_name="OIDC_USERINFO_FULLNAME_FIELDS",
|
||||||
environ_prefix=None,
|
environ_prefix=None,
|
||||||
)
|
)
|
||||||
OIDC_USERINFO_SHORTNAME_FIELD = values.Value(
|
OIDC_USERINFO_SHORTNAME_FIELD = values.Value(
|
||||||
default="given_name",
|
default="first_name",
|
||||||
environ_name="OIDC_USERINFO_SHORTNAME_FIELD",
|
environ_name="OIDC_USERINFO_SHORTNAME_FIELD",
|
||||||
environ_prefix=None,
|
environ_prefix=None,
|
||||||
)
|
)
|
||||||
@@ -796,6 +808,17 @@ class Base(Configuration):
|
|||||||
environ_prefix=None,
|
environ_prefix=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# End-to-end encryption settings
|
||||||
|
ENCRYPTION_ENABLED = values.BooleanValue(
|
||||||
|
False, environ_name="ENCRYPTION_ENABLED", environ_prefix=None
|
||||||
|
)
|
||||||
|
ENCRYPTION_VAULT_URL = values.Value(
|
||||||
|
None, environ_name="ENCRYPTION_VAULT_URL", environ_prefix=None
|
||||||
|
)
|
||||||
|
ENCRYPTION_INTERFACE_URL = values.Value(
|
||||||
|
None, environ_name="ENCRYPTION_INTERFACE_URL", environ_prefix=None
|
||||||
|
)
|
||||||
|
|
||||||
# External Applications
|
# External Applications
|
||||||
APPLICATION_CLIENT_ID_LENGTH = values.PositiveIntegerValue(
|
APPLICATION_CLIENT_ID_LENGTH = values.PositiveIntegerValue(
|
||||||
40,
|
40,
|
||||||
@@ -973,6 +996,7 @@ class Test(Base):
|
|||||||
APPLICATION_JWT_AUDIENCE = "Test inc."
|
APPLICATION_JWT_AUDIENCE = "Test inc."
|
||||||
|
|
||||||
CELERY_TASK_ALWAYS_EAGER = True
|
CELERY_TASK_ALWAYS_EAGER = True
|
||||||
|
FILE_UPLOAD_ENABLED = True
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# pylint: disable=invalid-name
|
# pylint: disable=invalid-name
|
||||||
|
|||||||
+20
-15
@@ -7,7 +7,7 @@ build-backend = "uv_build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "meet"
|
name = "meet"
|
||||||
version = "1.10.0"
|
version = "1.12.0"
|
||||||
authors = [{ "name" = "DINUM", "email" = "dev@mail.numerique.gouv.fr" }]
|
authors = [{ "name" = "DINUM", "email" = "dev@mail.numerique.gouv.fr" }]
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Development Status :: 5 - Production/Stable",
|
"Development Status :: 5 - Production/Stable",
|
||||||
@@ -24,16 +24,16 @@ keywords = ["Django", "Contacts", "Templates", "RBAC"]
|
|||||||
license = "MIT"
|
license = "MIT"
|
||||||
requires-python = ">=3.13"
|
requires-python = ">=3.13"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"boto3==1.42.49",
|
"boto3==1.42.68",
|
||||||
"Brotli==1.2.0",
|
"Brotli==1.2.0",
|
||||||
"brevo-python==1.2.0",
|
"brevo-python==1.2.0",
|
||||||
"celery[redis]==5.6.2",
|
"celery[redis]==5.6.2",
|
||||||
"dj-database-url==3.1.0",
|
"dj-database-url==3.1.2",
|
||||||
"django-configurations==2.5.1",
|
"django-configurations==2.5.1",
|
||||||
"django-cors-headers==4.9.0",
|
"django-cors-headers==4.9.0",
|
||||||
"django-countries==8.2.0",
|
"django-countries==8.2.0",
|
||||||
"django-filter==25.2",
|
"django-filter==25.2",
|
||||||
"django-lasuite[all]==0.0.24",
|
"django-lasuite[all]==0.0.25",
|
||||||
"django-parler==2.3",
|
"django-parler==2.3",
|
||||||
"redis==5.2.1",
|
"redis==5.2.1",
|
||||||
"django-redis==6.0.0",
|
"django-redis==6.0.0",
|
||||||
@@ -43,21 +43,21 @@ dependencies = [
|
|||||||
"django==5.2.12",
|
"django==5.2.12",
|
||||||
"djangorestframework==3.16.1",
|
"djangorestframework==3.16.1",
|
||||||
"drf_spectacular==0.29.0",
|
"drf_spectacular==0.29.0",
|
||||||
"dockerflow==2026.1.26",
|
"dockerflow==2026.3.4",
|
||||||
"easy_thumbnails==2.10.1",
|
"easy_thumbnails==2.10.1",
|
||||||
"factory_boy==3.3.3",
|
"factory_boy==3.3.3",
|
||||||
"gunicorn==25.1.0",
|
"gunicorn==25.1.0",
|
||||||
"jsonschema==4.26.0",
|
"jsonschema==4.26.0",
|
||||||
"markdown==3.10.2",
|
"markdown==3.10.2",
|
||||||
"nested-multipart-parser==1.6.0",
|
"nested-multipart-parser==1.6.0",
|
||||||
"psycopg[binary]==3.3.2",
|
"psycopg[binary]==3.3.3",
|
||||||
"pydantic==2.12.4",
|
"pydantic==2.12.5",
|
||||||
"PyJWT==2.11.0",
|
"PyJWT==2.12.1",
|
||||||
"python-frontmatter==1.1.0",
|
"python-frontmatter==1.1.0",
|
||||||
"python-magic==0.4.27",
|
"python-magic==0.4.27",
|
||||||
"requests==2.32.5",
|
"requests==2.32.5",
|
||||||
"sentry-sdk==2.53.0",
|
"sentry-sdk==2.54.0",
|
||||||
"whitenoise==6.11.0",
|
"whitenoise==6.12.0",
|
||||||
"mozilla-django-oidc==5.0.2",
|
"mozilla-django-oidc==5.0.2",
|
||||||
"livekit-api==1.1.0",
|
"livekit-api==1.1.0",
|
||||||
"aiohttp==3.13.3",
|
"aiohttp==3.13.3",
|
||||||
@@ -72,11 +72,11 @@ dependencies = [
|
|||||||
[dependency-groups]
|
[dependency-groups]
|
||||||
dev = [
|
dev = [
|
||||||
"django-extensions==4.1",
|
"django-extensions==4.1",
|
||||||
"drf-spectacular-sidecar==2026.1.1",
|
"drf-spectacular-sidecar==2026.3.1",
|
||||||
"freezegun==1.5.5",
|
"freezegun==1.5.5",
|
||||||
"ipdb==0.13.13",
|
"ipdb==0.13.13",
|
||||||
"ipython==9.10.0",
|
"ipython==9.11.0",
|
||||||
"pyfakefs==6.1.1",
|
"pyfakefs==6.1.5",
|
||||||
"pylint-django==2.7.0",
|
"pylint-django==2.7.0",
|
||||||
"pylint<4.0.0",
|
"pylint<4.0.0",
|
||||||
"pytest-cov==7.0.0",
|
"pytest-cov==7.0.0",
|
||||||
@@ -84,12 +84,17 @@ dev = [
|
|||||||
"pytest==9.0.2",
|
"pytest==9.0.2",
|
||||||
"pytest-icdiff==0.9",
|
"pytest-icdiff==0.9",
|
||||||
"pytest-xdist==3.8.0",
|
"pytest-xdist==3.8.0",
|
||||||
"responses==0.25.8",
|
"responses==0.26.0",
|
||||||
"ruff==0.15.1",
|
"ruff==0.15.6",
|
||||||
"types-requests==2.32.4.20260107",
|
"types-requests==2.32.4.20260107",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.uv.build-backend]
|
[tool.uv.build-backend]
|
||||||
|
module-name = [
|
||||||
|
"core",
|
||||||
|
"demo",
|
||||||
|
"meet"
|
||||||
|
]
|
||||||
module-root = ""
|
module-root = ""
|
||||||
source-exclude = [
|
source-exclude = [
|
||||||
"**/tests/**",
|
"**/tests/**",
|
||||||
|
|||||||
Generated
+99
-99
@@ -159,30 +159,30 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "boto3"
|
name = "boto3"
|
||||||
version = "1.42.49"
|
version = "1.42.68"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "botocore" },
|
{ name = "botocore" },
|
||||||
{ name = "jmespath" },
|
{ name = "jmespath" },
|
||||||
{ name = "s3transfer" },
|
{ name = "s3transfer" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/20/91/105aa17e0f3a566d33e2d8a3b32a70f553b1ad500d9756c6dd63991d8354/boto3-1.42.49.tar.gz", hash = "sha256:9cd252f640567b86e92b0a8ffdd4ade9a3018ee357c724bff6a21b8c8a41be0c", size = 112877, upload-time = "2026-02-13T20:29:57.062Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/06/ae/60c642aa5413e560b671da825329f510b29a77274ed0f580bde77562294d/boto3-1.42.68.tar.gz", hash = "sha256:3f349f967ab38c23425626d130962bcb363e75f042734fe856ea8c5a00eef03c", size = 112761, upload-time = "2026-03-13T19:32:17.137Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/12/b1/1fa30cd7b26617d59efbe3a4f3660a5b8b397a4623bf1e67016c4cb6dd0e/boto3-1.42.49-py3-none-any.whl", hash = "sha256:99e1df4361c3f6ff6ade65803c043ea96314826134962dd3b385433b309eb819", size = 140606, upload-time = "2026-02-13T20:29:55.366Z" },
|
{ url = "https://files.pythonhosted.org/packages/fb/f6/dc6e993479dbb597d68223fbf61cb026511737696b15bd7d2a33e9b2c24f/boto3-1.42.68-py3-none-any.whl", hash = "sha256:dbff353eb7dc93cbddd7926ed24793e0174c04adbe88860dfa639568442e4962", size = 140556, upload-time = "2026-03-13T19:32:14.951Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "botocore"
|
name = "botocore"
|
||||||
version = "1.42.64"
|
version = "1.42.73"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "jmespath" },
|
{ name = "jmespath" },
|
||||||
{ name = "python-dateutil" },
|
{ name = "python-dateutil" },
|
||||||
{ name = "urllib3" },
|
{ name = "urllib3" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/d3/3c/ac4bc939da695d2c648bf28f7b204ab741e4504e81749ccf943403cc07ca/botocore-1.42.64.tar.gz", hash = "sha256:4ee2aece227b9171ace8b749af694a77ab984fceab1639f2626bd0d6fb1aa69d", size = 14967869, upload-time = "2026-03-09T19:51:46.213Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/28/23/0c88ca116ef63b1ae77c901cd5d2095d22a8dbde9e80df74545db4a061b4/botocore-1.42.73.tar.gz", hash = "sha256:575858641e4949aaf2af1ced145b8524529edf006d075877af6b82ff96ad854c", size = 15008008, upload-time = "2026-03-20T19:39:40.082Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/33/0f/a0feb9a93da8f583217432dce71ce1940d6d8aa5884bad340872a504ba3f/botocore-1.42.64-py3-none-any.whl", hash = "sha256:f77c5cb76ed30576ed0bc73b591265d03dddffff02a9208d3ee0c790f43d3cd2", size = 14641339, upload-time = "2026-03-09T19:51:41.244Z" },
|
{ url = "https://files.pythonhosted.org/packages/8e/65/971f3d55015f4d133a6ff3ad74cd39f4b8dd8f53f7775a3c2ad378ea5145/botocore-1.42.73-py3-none-any.whl", hash = "sha256:7b62e2a12f7a1b08eb7360eecd23bb16fe3b7ab7f5617cf91b25476c6f86a0fe", size = 14681861, upload-time = "2026-03-20T19:39:35.341Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -545,14 +545,14 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dj-database-url"
|
name = "dj-database-url"
|
||||||
version = "3.1.0"
|
version = "3.1.2"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "django" },
|
{ name = "django" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/95/c6/88676a7333fb7c668e626b55f8bfc8527dd863973eb1c40412b95d27747d/dj_database_url-3.1.0.tar.gz", hash = "sha256:d80218426b83f9302c8d27d4fccf52de5cf0cab179f0645fb2839f37605d1353", size = 7924, upload-time = "2026-01-04T09:18:32.693Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/03/f6/00b625e9d371b980aa261011d0dc906a16444cb688f94215e0dc86996eb5/dj_database_url-3.1.2.tar.gz", hash = "sha256:63c20e4bbaa51690dfd4c8d189521f6bf6bc9da9fcdb23d95d2ee8ee87f9ec62", size = 11490, upload-time = "2026-02-19T15:30:23.638Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/68/1b/e84f7472ab0bdacc3fd09556eb4dd40d88246941d465cc103b36a8dabcd8/dj_database_url-3.1.0-py3-none-any.whl", hash = "sha256:155a56fbbecbaaf1348ccd73bf29138b4c9988363ba08261a0f0145e392e638c", size = 8849, upload-time = "2026-01-04T09:18:43.77Z" },
|
{ url = "https://files.pythonhosted.org/packages/cf/a9/57c66006373381f1d3e5bd94216f1d371228a89f443d3030e010f73dd198/dj_database_url-3.1.2-py3-none-any.whl", hash = "sha256:544e015fee3efa5127a1eb1cca465f4ace578265b3671fe61d0ed7dbafb5ec8a", size = 8953, upload-time = "2026-02-19T15:30:39.37Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -633,7 +633,7 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "django-lasuite"
|
name = "django-lasuite"
|
||||||
version = "0.0.24"
|
version = "0.0.25"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "django" },
|
{ name = "django" },
|
||||||
@@ -644,9 +644,9 @@ dependencies = [
|
|||||||
{ name = "requests" },
|
{ name = "requests" },
|
||||||
{ name = "requests-toolbelt" },
|
{ name = "requests-toolbelt" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/53/dc/4002ba20b964237a609628d53b950c5aecf6387119058831e0ee33176f59/django_lasuite-0.0.24.tar.gz", hash = "sha256:3231b0178a2187405c8faae447225c5dd069263a9a09e73e2a36427be4bf2388", size = 34293, upload-time = "2026-02-11T12:25:42.558Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/5e/bc/5826a3e5ada5dad1ff6af9a2e1eb598a0dc2cb9c4d2dbf011f1bbb310c9e/django_lasuite-0.0.25.tar.gz", hash = "sha256:ee44783942e6ead74a732f6d7280c5fca961b66581350ce01c0589c3e80684cf", size = 34819, upload-time = "2026-03-10T13:40:28.705Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/5d/90/9170b8f443ab5d34b32d7cd386ce3b38ca35baae966da4a1d77b4f4ab3d2/django_lasuite-0.0.24-py3-none-any.whl", hash = "sha256:c37e0b3606a23fd4094ca435fa4edf7a64d325be64b0310fa6577f75d515d856", size = 52620, upload-time = "2026-02-11T12:25:40.626Z" },
|
{ url = "https://files.pythonhosted.org/packages/61/2f/819ebbc9d3a4b8233cef1e9b0b607724e4acf527988393b04a4036b9c235/django_lasuite-0.0.25-py3-none-any.whl", hash = "sha256:4c10f625005cd41d05e8d34269f1a3b58fea8be5296528bd58596227f50d9884", size = 54034, upload-time = "2026-03-10T13:40:26.903Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.optional-dependencies]
|
[package.optional-dependencies]
|
||||||
@@ -737,11 +737,11 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dockerflow"
|
name = "dockerflow"
|
||||||
version = "2026.1.26"
|
version = "2026.3.4"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/11/08/7abe8458ce6fa82e694ba9b792b4158596fd681782976699d3f15642a23a/dockerflow-2026.1.26.tar.gz", hash = "sha256:c45667ec078944a468b9a634c866587b4cf31559d0e6f369fbadd21edce66b38", size = 68042, upload-time = "2026-01-26T15:30:06.606Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/9c/03/935f8399094611981b37634a7ee078484b3995f744135339e51385638f6c/dockerflow-2026.3.4.tar.gz", hash = "sha256:6cc7fcab2a078d06aeca8b02e22fd7f6766dca322fb30aed6910684dbc08690c", size = 68701, upload-time = "2026-03-04T09:01:28.178Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/de/88/26cec1e8ce09b4022233f232962fba72650c22941d7a609d10b9eec9f748/dockerflow-2026.1.26-py2.py3-none-any.whl", hash = "sha256:26f02d8842672921b2a49f1e019fac54ed2ee69dc673ed80f7b237b67394c2be", size = 35992, upload-time = "2026-01-26T15:30:05.525Z" },
|
{ url = "https://files.pythonhosted.org/packages/86/b9/2d7bf30eb0c24e60e61e4f6ae7574e123d3fa51b39a612e146c94158446a/dockerflow-2026.3.4-py2.py3-none-any.whl", hash = "sha256:38fe0ad30a4aedf68e589919695d502fc6f584a761b56a91f56e80cbadfbf61a", size = 36424, upload-time = "2026-03-04T09:01:26.631Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -763,14 +763,14 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "drf-spectacular-sidecar"
|
name = "drf-spectacular-sidecar"
|
||||||
version = "2026.1.1"
|
version = "2026.3.1"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "django" },
|
{ name = "django" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/1e/81/c7b0e3ccbd5a039c4f4fcfecf88391a666ca1406a953886e2f39295b1c90/drf_spectacular_sidecar-2026.1.1.tar.gz", hash = "sha256:6f7c173a8ddbbbdafc7a27e028614b65f07a89ca90f996a432d57460463b56be", size = 2468060, upload-time = "2026-01-01T11:27:12.682Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/aa/42/2f8c1b2846399d47094ec414bc0d6a7cce7ba95fd6545a97285eee89f7f1/drf_spectacular_sidecar-2026.3.1.tar.gz", hash = "sha256:5b7fedad66e3851f2f442480792c08115d79217959d01645b93d3d2258938be1", size = 2461501, upload-time = "2026-03-01T11:31:19.708Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/db/96/38725edda526f3e9e597f531beeec94b0ef433d9494f06a13b7636eecb6e/drf_spectacular_sidecar-2026.1.1-py3-none-any.whl", hash = "sha256:af8df62f1b594ec280351336d837eaf2402ab25a6bc2a1fad7aee9935821070f", size = 2489520, upload-time = "2026-01-01T11:27:11.056Z" },
|
{ url = "https://files.pythonhosted.org/packages/c1/28/2d5e64d101ebc5180674fcaf7b5a35e398e2f8d9688b2e8d52b0e1394e7d/drf_spectacular_sidecar-2026.3.1-py3-none-any.whl", hash = "sha256:864edb83e022e13e3941c325c3cc0c954c843fa2e1d0bc95e81887664b2d3dad", size = 2481725, upload-time = "2026-03-01T11:31:18.469Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -976,7 +976,7 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ipython"
|
name = "ipython"
|
||||||
version = "9.10.0"
|
version = "9.11.0"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "colorama", marker = "sys_platform == 'win32'" },
|
{ name = "colorama", marker = "sys_platform == 'win32'" },
|
||||||
@@ -990,9 +990,9 @@ dependencies = [
|
|||||||
{ name = "stack-data" },
|
{ name = "stack-data" },
|
||||||
{ name = "traitlets" },
|
{ name = "traitlets" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/a6/60/2111715ea11f39b1535bed6024b7dec7918b71e5e5d30855a5b503056b50/ipython-9.10.0.tar.gz", hash = "sha256:cd9e656be97618a0676d058134cd44e6dc7012c0e5cb36a9ce96a8c904adaf77", size = 4426526, upload-time = "2026-02-02T10:00:33.594Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/86/28/a4698eda5a8928a45d6b693578b135b753e14fa1c2b36ee9441e69a45576/ipython-9.11.0.tar.gz", hash = "sha256:2a94bc4406b22ecc7e4cb95b98450f3ea493a76bec8896cda11b78d7752a6667", size = 4427354, upload-time = "2026-03-05T08:57:30.549Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/3d/aa/898dec789a05731cd5a9f50605b7b44a72bd198fd0d4528e11fc610177cc/ipython-9.10.0-py3-none-any.whl", hash = "sha256:c6ab68cc23bba8c7e18e9b932797014cc61ea7fd6f19de180ab9ba73e65ee58d", size = 622774, upload-time = "2026-02-02T10:00:31.503Z" },
|
{ url = "https://files.pythonhosted.org/packages/b2/90/45c72becc57158facc6a6404f663b77bbcea2519ca57f760e2879ae1315d/ipython-9.11.0-py3-none-any.whl", hash = "sha256:6922d5bcf944c6e525a76a0a304451b60a2b6f875e86656d8bc2dfda5d710e19", size = 624222, upload-time = "2026-03-05T08:57:28.94Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1157,7 +1157,7 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "meet"
|
name = "meet"
|
||||||
version = "1.10.0"
|
version = "1.12.0"
|
||||||
source = { editable = "." }
|
source = { editable = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "aiohttp" },
|
{ name = "aiohttp" },
|
||||||
@@ -1222,24 +1222,24 @@ dev = [
|
|||||||
[package.metadata]
|
[package.metadata]
|
||||||
requires-dist = [
|
requires-dist = [
|
||||||
{ name = "aiohttp", specifier = "==3.13.3" },
|
{ name = "aiohttp", specifier = "==3.13.3" },
|
||||||
{ name = "boto3", specifier = "==1.42.49" },
|
{ name = "boto3", specifier = "==1.42.68" },
|
||||||
{ name = "brevo-python", specifier = "==1.2.0" },
|
{ name = "brevo-python", specifier = "==1.2.0" },
|
||||||
{ name = "brotli", specifier = "==1.2.0" },
|
{ name = "brotli", specifier = "==1.2.0" },
|
||||||
{ name = "celery", extras = ["redis"], specifier = "==5.6.2" },
|
{ name = "celery", extras = ["redis"], specifier = "==5.6.2" },
|
||||||
{ name = "dj-database-url", specifier = "==3.1.0" },
|
{ name = "dj-database-url", specifier = "==3.1.2" },
|
||||||
{ name = "django", specifier = "==5.2.12" },
|
{ name = "django", specifier = "==5.2.12" },
|
||||||
{ name = "django-configurations", specifier = "==2.5.1" },
|
{ name = "django-configurations", specifier = "==2.5.1" },
|
||||||
{ name = "django-cors-headers", specifier = "==4.9.0" },
|
{ name = "django-cors-headers", specifier = "==4.9.0" },
|
||||||
{ name = "django-countries", specifier = "==8.2.0" },
|
{ name = "django-countries", specifier = "==8.2.0" },
|
||||||
{ name = "django-filter", specifier = "==25.2" },
|
{ name = "django-filter", specifier = "==25.2" },
|
||||||
{ name = "django-lasuite", extras = ["all"], specifier = "==0.0.24" },
|
{ name = "django-lasuite", extras = ["all"], specifier = "==0.0.25" },
|
||||||
{ name = "django-parler", specifier = "==2.3" },
|
{ name = "django-parler", specifier = "==2.3" },
|
||||||
{ name = "django-pydantic-field", specifier = "==0.5.4" },
|
{ name = "django-pydantic-field", specifier = "==0.5.4" },
|
||||||
{ name = "django-redis", specifier = "==6.0.0" },
|
{ name = "django-redis", specifier = "==6.0.0" },
|
||||||
{ name = "django-storages", extras = ["s3"], specifier = "==1.14.6" },
|
{ name = "django-storages", extras = ["s3"], specifier = "==1.14.6" },
|
||||||
{ name = "django-timezone-field", specifier = ">=5.1" },
|
{ name = "django-timezone-field", specifier = ">=5.1" },
|
||||||
{ name = "djangorestframework", specifier = "==3.16.1" },
|
{ name = "djangorestframework", specifier = "==3.16.1" },
|
||||||
{ name = "dockerflow", specifier = "==2026.1.26" },
|
{ name = "dockerflow", specifier = "==2026.3.4" },
|
||||||
{ name = "drf-spectacular", specifier = "==0.29.0" },
|
{ name = "drf-spectacular", specifier = "==0.29.0" },
|
||||||
{ name = "easy-thumbnails", specifier = "==2.10.1" },
|
{ name = "easy-thumbnails", specifier = "==2.10.1" },
|
||||||
{ name = "factory-boy", specifier = "==3.3.3" },
|
{ name = "factory-boy", specifier = "==3.3.3" },
|
||||||
@@ -1249,25 +1249,25 @@ requires-dist = [
|
|||||||
{ name = "markdown", specifier = "==3.10.2" },
|
{ name = "markdown", specifier = "==3.10.2" },
|
||||||
{ name = "mozilla-django-oidc", specifier = "==5.0.2" },
|
{ name = "mozilla-django-oidc", specifier = "==5.0.2" },
|
||||||
{ name = "nested-multipart-parser", specifier = "==1.6.0" },
|
{ name = "nested-multipart-parser", specifier = "==1.6.0" },
|
||||||
{ name = "psycopg", extras = ["binary"], specifier = "==3.3.2" },
|
{ name = "psycopg", extras = ["binary"], specifier = "==3.3.3" },
|
||||||
{ name = "pydantic", specifier = "==2.12.4" },
|
{ name = "pydantic", specifier = "==2.12.5" },
|
||||||
{ name = "pyjwt", specifier = "==2.11.0" },
|
{ name = "pyjwt", specifier = "==2.12.1" },
|
||||||
{ name = "python-frontmatter", specifier = "==1.1.0" },
|
{ name = "python-frontmatter", specifier = "==1.1.0" },
|
||||||
{ name = "python-magic", specifier = "==0.4.27" },
|
{ name = "python-magic", specifier = "==0.4.27" },
|
||||||
{ name = "redis", specifier = "==5.2.1" },
|
{ name = "redis", specifier = "==5.2.1" },
|
||||||
{ name = "requests", specifier = "==2.32.5" },
|
{ name = "requests", specifier = "==2.32.5" },
|
||||||
{ name = "sentry-sdk", specifier = "==2.53.0" },
|
{ name = "sentry-sdk", specifier = "==2.54.0" },
|
||||||
{ name = "whitenoise", specifier = "==6.11.0" },
|
{ name = "whitenoise", specifier = "==6.12.0" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.metadata.requires-dev]
|
[package.metadata.requires-dev]
|
||||||
dev = [
|
dev = [
|
||||||
{ name = "django-extensions", specifier = "==4.1" },
|
{ name = "django-extensions", specifier = "==4.1" },
|
||||||
{ name = "drf-spectacular-sidecar", specifier = "==2026.1.1" },
|
{ name = "drf-spectacular-sidecar", specifier = "==2026.3.1" },
|
||||||
{ name = "freezegun", specifier = "==1.5.5" },
|
{ name = "freezegun", specifier = "==1.5.5" },
|
||||||
{ name = "ipdb", specifier = "==0.13.13" },
|
{ name = "ipdb", specifier = "==0.13.13" },
|
||||||
{ name = "ipython", specifier = "==9.10.0" },
|
{ name = "ipython", specifier = "==9.11.0" },
|
||||||
{ name = "pyfakefs", specifier = "==6.1.1" },
|
{ name = "pyfakefs", specifier = "==6.1.5" },
|
||||||
{ name = "pylint", specifier = "<4.0.0" },
|
{ name = "pylint", specifier = "<4.0.0" },
|
||||||
{ name = "pylint-django", specifier = "==2.7.0" },
|
{ name = "pylint-django", specifier = "==2.7.0" },
|
||||||
{ name = "pytest", specifier = "==9.0.2" },
|
{ name = "pytest", specifier = "==9.0.2" },
|
||||||
@@ -1275,8 +1275,8 @@ dev = [
|
|||||||
{ name = "pytest-django", specifier = "==4.12.0" },
|
{ name = "pytest-django", specifier = "==4.12.0" },
|
||||||
{ name = "pytest-icdiff", specifier = "==0.9" },
|
{ name = "pytest-icdiff", specifier = "==0.9" },
|
||||||
{ name = "pytest-xdist", specifier = "==3.8.0" },
|
{ name = "pytest-xdist", specifier = "==3.8.0" },
|
||||||
{ name = "responses", specifier = "==0.25.8" },
|
{ name = "responses", specifier = "==0.26.0" },
|
||||||
{ name = "ruff", specifier = "==0.15.1" },
|
{ name = "ruff", specifier = "==0.15.6" },
|
||||||
{ name = "types-requests", specifier = "==2.32.4.20260107" },
|
{ name = "types-requests", specifier = "==2.32.4.20260107" },
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1595,14 +1595,14 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "psycopg"
|
name = "psycopg"
|
||||||
version = "3.3.2"
|
version = "3.3.3"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "tzdata", marker = "sys_platform == 'win32'" },
|
{ name = "tzdata", marker = "sys_platform == 'win32'" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/e0/1a/7d9ef4fdc13ef7f15b934c393edc97a35c281bb7d3c3329fbfcbe915a7c2/psycopg-3.3.2.tar.gz", hash = "sha256:707a67975ee214d200511177a6a80e56e654754c9afca06a7194ea6bbfde9ca7", size = 165630, upload-time = "2025-12-06T17:34:53.899Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/d3/b6/379d0a960f8f435ec78720462fd94c4863e7a31237cf81bf76d0af5883bf/psycopg-3.3.3.tar.gz", hash = "sha256:5e9a47458b3c1583326513b2556a2a9473a1001a56c9efe9e587245b43148dd9", size = 165624, upload-time = "2026-02-18T16:52:16.546Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/8c/51/2779ccdf9305981a06b21a6b27e8547c948d85c41c76ff434192784a4c93/psycopg-3.3.2-py3-none-any.whl", hash = "sha256:3e94bc5f4690247d734599af56e51bae8e0db8e4311ea413f801fef82b14a99b", size = 212774, upload-time = "2025-12-06T17:31:41.414Z" },
|
{ url = "https://files.pythonhosted.org/packages/c8/5b/181e2e3becb7672b502f0ed7f16ed7352aca7c109cfb94cf3878a9186db9/psycopg-3.3.3-py3-none-any.whl", hash = "sha256:f96525a72bcfade6584ab17e89de415ff360748c766f0106959144dcbb38c698", size = 212768, upload-time = "2026-02-18T16:46:27.365Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.optional-dependencies]
|
[package.optional-dependencies]
|
||||||
@@ -1612,31 +1612,31 @@ binary = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "psycopg-binary"
|
name = "psycopg-binary"
|
||||||
version = "3.3.2"
|
version = "3.3.3"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/14/73/7ca7cb22b9ac7393fb5de7d28ca97e8347c375c8498b3bff2c99c1f38038/psycopg_binary-3.3.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:fc5a189e89cbfff174588665bb18d28d2d0428366cc9dae5864afcaa2e57380b", size = 4579068, upload-time = "2025-12-06T17:33:39.303Z" },
|
{ url = "https://files.pythonhosted.org/packages/03/0a/cac9fdf1df16a269ba0e5f0f06cac61f826c94cadb39df028cdfe19d3a33/psycopg_binary-3.3.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:05f32239aec25c5fb15f7948cffdc2dc0dac098e48b80a140e4ba32b572a2e7d", size = 4590414, upload-time = "2026-02-18T16:50:01.441Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/f5/42/0cf38ff6c62c792fc5b55398a853a77663210ebd51ed6f0c4a05b06f95a6/psycopg_binary-3.3.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:083c2e182be433f290dc2c516fd72b9b47054fcd305cce791e0a50d9e93e06f2", size = 4657520, upload-time = "2025-12-06T17:33:42.536Z" },
|
{ url = "https://files.pythonhosted.org/packages/9c/c0/d8f8508fbf440edbc0099b1abff33003cd80c9e66eb3a1e78834e3fb4fb9/psycopg_binary-3.3.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:7c84f9d214f2d1de2fafebc17fa68ac3f6561a59e291553dfc45ad299f4898c1", size = 4669021, upload-time = "2026-02-18T16:50:08.803Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/3b/60/df846bc84cbf2231e01b0fff48b09841fe486fa177665e50f4995b1bfa44/psycopg_binary-3.3.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:ac230e3643d1c436a2dfb59ca84357dfc6862c9f372fc5dbd96bafecae581f9f", size = 5452086, upload-time = "2025-12-06T17:33:46.54Z" },
|
{ url = "https://files.pythonhosted.org/packages/04/05/097016b77e343b4568feddf12c72171fc513acef9a4214d21b9478569068/psycopg_binary-3.3.3-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:e77957d2ba17cada11be09a5066d93026cdb61ada7c8893101d7fe1c6e1f3925", size = 5467453, upload-time = "2026-02-18T16:50:14.985Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/ab/85/30c846a00db86b1b53fd5bfd4b4edfbd0c00de8f2c75dd105610bd7568fc/psycopg_binary-3.3.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d8c899a540f6c7585cee53cddc929dd4d2db90fd828e37f5d4017b63acbc1a5d", size = 5131125, upload-time = "2025-12-06T17:33:50.413Z" },
|
{ url = "https://files.pythonhosted.org/packages/91/23/73244e5feb55b5ca109cede6e97f32ef45189f0fdac4c80d75c99862729d/psycopg_binary-3.3.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:42961609ac07c232a427da7c87a468d3c82fee6762c220f38e37cfdacb2b178d", size = 5151135, upload-time = "2026-02-18T16:50:24.82Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/6d/15/9968732013373f36f8a2a3fb76104dffc8efd9db78709caa5ae1a87b1f80/psycopg_binary-3.3.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:50ff10ab8c0abdb5a5451b9315538865b50ba64c907742a1385fdf5f5772b73e", size = 6722914, upload-time = "2025-12-06T17:33:54.544Z" },
|
{ url = "https://files.pythonhosted.org/packages/11/49/5309473b9803b207682095201d8708bbc7842ddf3f192488a69204e36455/psycopg_binary-3.3.3-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ae07a3114313dd91fce686cab2f4c44af094398519af0e0f854bc707e1aeedf1", size = 6737315, upload-time = "2026-02-18T16:50:35.106Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/b2/ba/29e361fe02143ac5ff5a1ca3e45697344cfbebe2eaf8c4e7eec164bff9a0/psycopg_binary-3.3.2-cp313-cp313-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:23d2594af848c1fd3d874a9364bef50730124e72df7bb145a20cb45e728c50ed", size = 4966081, upload-time = "2025-12-06T17:33:58.477Z" },
|
{ url = "https://files.pythonhosted.org/packages/d4/5d/03abe74ef34d460b33c4d9662bf6ec1dd38888324323c1a1752133c10377/psycopg_binary-3.3.3-cp313-cp313-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d257c58d7b36a621dcce1d01476ad8b60f12d80eb1406aee4cf796f88b2ae482", size = 4979783, upload-time = "2026-02-18T16:50:42.067Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/99/45/1be90c8f1a1a237046903e91202fb06708745c179f220b361d6333ed7641/psycopg_binary-3.3.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ea4fe6b4ead3bbbe27244ea224fcd1f53cb119afc38b71a2f3ce570149a03e30", size = 4493332, upload-time = "2025-12-06T17:34:02.011Z" },
|
{ url = "https://files.pythonhosted.org/packages/f0/6c/3fbf8e604e15f2f3752900434046c00c90bb8764305a1b81112bff30ba24/psycopg_binary-3.3.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:07c7211f9327d522c9c47560cae00a4ecf6687f4e02d779d035dd3177b41cb12", size = 4509023, upload-time = "2026-02-18T16:50:50.116Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/2e/b5/bbdc07d5f0a5e90c617abd624368182aa131485e18038b2c6c85fc054aed/psycopg_binary-3.3.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:742ce48cde825b8e52fb1a658253d6d1ff66d152081cbc76aa45e2986534858d", size = 4170781, upload-time = "2025-12-06T17:34:05.298Z" },
|
{ url = "https://files.pythonhosted.org/packages/9c/6b/1a06b43b7c7af756c80b67eac8bfaa51d77e68635a8a8d246e4f0bb7604a/psycopg_binary-3.3.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:8e7e9eca9b363dbedeceeadd8be97149d2499081f3c52d141d7cd1f395a91f83", size = 4185874, upload-time = "2026-02-18T16:50:55.97Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/d1/2a/0d45e4f4da2bd78c3237ffa03475ef3751f69a81919c54a6e610eb1a7c96/psycopg_binary-3.3.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:e22bf6b54df994aff37ab52695d635f1ef73155e781eee1f5fa75bc08b58c8da", size = 3910544, upload-time = "2025-12-06T17:34:08.251Z" },
|
{ url = "https://files.pythonhosted.org/packages/2b/d3/bf49e3dcaadba510170c8d111e5e69e5ae3f981c1554c5bb71c75ce354bb/psycopg_binary-3.3.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:cb85b1d5702877c16f28d7b92ba030c1f49ebcc9b87d03d8c10bf45a2f1c7508", size = 3925668, upload-time = "2026-02-18T16:51:03.299Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/3a/62/a8e0f092f4dbef9a94b032fb71e214cf0a375010692fbe7493a766339e47/psycopg_binary-3.3.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8db9034cde3bcdafc66980f0130813f5c5d19e74b3f2a19fb3cfbc25ad113121", size = 4220070, upload-time = "2025-12-06T17:34:11.392Z" },
|
{ url = "https://files.pythonhosted.org/packages/f8/92/0aac830ed6a944fe334404e1687a074e4215630725753f0e3e9a9a595b62/psycopg_binary-3.3.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4d4606c84d04b80f9138d72f1e28c6c02dc5ae0c7b8f3f8aaf89c681ce1cd1b1", size = 4234973, upload-time = "2026-02-18T16:51:09.097Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/09/e6/5fc8d8aff8afa114bb4a94a0341b9309311e8bf3ab32d816032f8b984d4e/psycopg_binary-3.3.2-cp313-cp313-win_amd64.whl", hash = "sha256:df65174c7cf6b05ea273ce955927d3270b3a6e27b0b12762b009ce6082b8d3fc", size = 3540922, upload-time = "2025-12-06T17:34:14.88Z" },
|
{ url = "https://files.pythonhosted.org/packages/2e/96/102244653ee5a143ece5afe33f00f52fe64e389dfce8dbc87580c6d70d3d/psycopg_binary-3.3.3-cp313-cp313-win_amd64.whl", hash = "sha256:74eae563166ebf74e8d950ff359be037b85723d99ca83f57d9b244a871d6c13b", size = 3551342, upload-time = "2026-02-18T16:51:13.892Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/bd/75/ad18c0b97b852aba286d06befb398cc6d383e9dfd0a518369af275a5a526/psycopg_binary-3.3.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:9ca24062cd9b2270e4d77576042e9cc2b1d543f09da5aba1f1a3d016cea28390", size = 4596371, upload-time = "2025-12-06T17:34:18.007Z" },
|
{ url = "https://files.pythonhosted.org/packages/a2/71/7a57e5b12275fe7e7d84d54113f0226080423a869118419c9106c083a21c/psycopg_binary-3.3.3-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:497852c5eaf1f0c2d88ab74a64a8097c099deac0c71de1cbcf18659a8a04a4b2", size = 4607368, upload-time = "2026-02-18T16:51:19.295Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/5a/79/91649d94c8d89f84af5da7c9d474bfba35b08eb8f492ca3422b08f0a6427/psycopg_binary-3.3.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c749770da0947bc972e512f35366dd4950c0e34afad89e60b9787a37e97cb443", size = 4675139, upload-time = "2025-12-06T17:34:21.374Z" },
|
{ url = "https://files.pythonhosted.org/packages/c7/04/cb834f120f2b2c10d4003515ef9ca9d688115b9431735e3936ae48549af8/psycopg_binary-3.3.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:258d1ea53464d29768bf25930f43291949f4c7becc706f6e220c515a63a24edd", size = 4687047, upload-time = "2026-02-18T16:51:23.84Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/56/ac/b26e004880f054549ec9396594e1ffe435810b0673e428e619ed722e4244/psycopg_binary-3.3.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:03b7cd73fb8c45d272a34ae7249713e32492891492681e3cf11dff9531cf37e9", size = 5456120, upload-time = "2025-12-06T17:34:25.102Z" },
|
{ url = "https://files.pythonhosted.org/packages/40/e9/47a69692d3da9704468041aa5ed3ad6fc7f6bb1a5ae788d261a26bbca6c7/psycopg_binary-3.3.3-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:111c59897a452196116db12e7f608da472fbff000693a21040e35fc978b23430", size = 5487096, upload-time = "2026-02-18T16:51:29.645Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/4b/8d/410681dccd6f2999fb115cc248521ec50dd2b0aba66ae8de7e81efdebbee/psycopg_binary-3.3.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:43b130e3b6edcb5ee856c7167ccb8561b473308c870ed83978ae478613764f1c", size = 5133484, upload-time = "2025-12-06T17:34:28.933Z" },
|
{ url = "https://files.pythonhosted.org/packages/0b/b6/0e0dd6a2f802864a4ae3dbadf4ec620f05e3904c7842b326aafc43e5f464/psycopg_binary-3.3.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:17bb6600e2455993946385249a3c3d0af52cd70c1c1cdbf712e9d696d0b0bf1b", size = 5168720, upload-time = "2026-02-18T16:51:36.499Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/66/30/ebbab99ea2cfa099d7b11b742ce13415d44f800555bfa4ad2911dc645b71/psycopg_binary-3.3.2-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7c1feba5a8c617922321aef945865334e468337b8fc5c73074f5e63143013b5a", size = 6731818, upload-time = "2025-12-06T17:34:33.094Z" },
|
{ url = "https://files.pythonhosted.org/packages/6f/0d/977af38ac19a6b55d22dff508bd743fd7c1901e1b73657e7937c7cccb0a3/psycopg_binary-3.3.3-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:642050398583d61c9856210568eb09a8e4f2fe8224bf3be21b67a370e677eead", size = 6762076, upload-time = "2026-02-18T16:51:43.167Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/70/02/d260646253b7ad805d60e0de47f9b811d6544078452579466a098598b6f4/psycopg_binary-3.3.2-cp314-cp314-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cabb2a554d9a0a6bf84037d86ca91782f087dfff2a61298d0b00c19c0bc43f6d", size = 4983859, upload-time = "2025-12-06T17:34:36.457Z" },
|
{ url = "https://files.pythonhosted.org/packages/34/40/912a39d48322cf86895c0eaf2d5b95cb899402443faefd4b09abbba6b6e1/psycopg_binary-3.3.3-cp314-cp314-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:533efe6dc3a7cba5e2a84e38970786bb966306863e45f3db152007e9f48638a6", size = 4997623, upload-time = "2026-02-18T16:51:47.707Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/72/8d/e778d7bad1a7910aa36281f092bd85c5702f508fd9bb0ea2020ffbb6585c/psycopg_binary-3.3.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:74bc306c4b4df35b09bc8cecf806b271e1c5d708f7900145e4e54a2e5dedfed0", size = 4516388, upload-time = "2025-12-06T17:34:40.129Z" },
|
{ url = "https://files.pythonhosted.org/packages/98/0c/c14d0e259c65dc7be854d926993f151077887391d5a081118907a9d89603/psycopg_binary-3.3.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:5958dbf28b77ce2033482f6cb9ef04d43f5d8f4b7636e6963d5626f000efb23e", size = 4532096, upload-time = "2026-02-18T16:51:51.421Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/bd/f1/64e82098722e2ab3521797584caf515284be09c1e08a872551b6edbb0074/psycopg_binary-3.3.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:d79b0093f0fbf7a962d6a46ae292dc056c65d16a8ee9361f3cfbafd4c197ab14", size = 4192382, upload-time = "2025-12-06T17:34:43.279Z" },
|
{ url = "https://files.pythonhosted.org/packages/39/21/8b7c50a194cfca6ea0fd4d1f276158307785775426e90700ab2eba5cd623/psycopg_binary-3.3.3-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:a6af77b6626ce92b5817bf294b4d45ec1a6161dba80fc2d82cdffdd6814fd023", size = 4208884, upload-time = "2026-02-18T16:51:57.336Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/fa/d0/c20f4e668e89494972e551c31be2a0016e3f50d552d7ae9ac07086407599/psycopg_binary-3.3.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:1586e220be05547c77afc326741dd41cc7fba38a81f9931f616ae98865439678", size = 3928660, upload-time = "2025-12-06T17:34:46.757Z" },
|
{ url = "https://files.pythonhosted.org/packages/c7/2c/a4981bf42cf30ebba0424971d7ce70a222ae9b82594c42fc3f2105d7b525/psycopg_binary-3.3.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:47f06fcbe8542b4d96d7392c476a74ada521c5aebdb41c3c0155f6595fc14c8d", size = 3944542, upload-time = "2026-02-18T16:52:04.266Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/0f/e1/99746c171de22539fd5eb1c9ca21dc805b54cfae502d7451d237d1dbc349/psycopg_binary-3.3.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:458696a5fa5dad5b6fb5d5862c22454434ce4fe1cf66ca6c0de5f904cbc1ae3e", size = 4239169, upload-time = "2025-12-06T17:34:49.751Z" },
|
{ url = "https://files.pythonhosted.org/packages/60/e9/b7c29b56aa0b85a4e0c4d89db691c1ceef08f46a356369144430c155a2f5/psycopg_binary-3.3.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:e7800e6c6b5dc4b0ca7cc7370f770f53ac83886b76afda0848065a674231e856", size = 4254339, upload-time = "2026-02-18T16:52:10.444Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/72/f7/212343c1c9cfac35fd943c527af85e9091d633176e2a407a0797856ff7b9/psycopg_binary-3.3.2-cp314-cp314-win_amd64.whl", hash = "sha256:04bb2de4ba69d6f8395b446ede795e8884c040ec71d01dd07ac2b2d18d4153d1", size = 3642122, upload-time = "2025-12-06T17:34:52.506Z" },
|
{ url = "https://files.pythonhosted.org/packages/98/5a/291d89f44d3820fffb7a04ebc8f3ef5dda4f542f44a5daea0c55a84abf45/psycopg_binary-3.3.3-cp314-cp314-win_amd64.whl", hash = "sha256:165f22ab5a9513a3d7425ffb7fcc7955ed8ccaeef6d37e369d6cc1dff1582383", size = 3652796, upload-time = "2026-02-18T16:52:14.02Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1668,7 +1668,7 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pydantic"
|
name = "pydantic"
|
||||||
version = "2.12.4"
|
version = "2.12.5"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "annotated-types" },
|
{ name = "annotated-types" },
|
||||||
@@ -1676,9 +1676,9 @@ dependencies = [
|
|||||||
{ name = "typing-extensions" },
|
{ name = "typing-extensions" },
|
||||||
{ name = "typing-inspection" },
|
{ name = "typing-inspection" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/96/ad/a17bc283d7d81837c061c49e3eaa27a45991759a1b7eae1031921c6bd924/pydantic-2.12.4.tar.gz", hash = "sha256:0f8cb9555000a4b5b617f66bfd2566264c4984b27589d3b845685983e8ea85ac", size = 821038, upload-time = "2025-11-05T10:50:08.59Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/69/44/36f1a6e523abc58ae5f928898e4aca2e0ea509b5aa6f6f392a5d882be928/pydantic-2.12.5.tar.gz", hash = "sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49", size = 821591, upload-time = "2025-11-26T15:11:46.471Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/82/2f/e68750da9b04856e2a7ec56fc6f034a5a79775e9b9a81882252789873798/pydantic-2.12.4-py3-none-any.whl", hash = "sha256:92d3d202a745d46f9be6df459ac5a064fdaa3c1c4cd8adcfa332ccf3c05f871e", size = 463400, upload-time = "2025-11-05T10:50:06.732Z" },
|
{ url = "https://files.pythonhosted.org/packages/5a/87/b70ad306ebb6f9b585f114d0ac2137d792b48be34d732d60e597c2f8465a/pydantic-2.12.5-py3-none-any.whl", hash = "sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d", size = 463580, upload-time = "2025-11-26T15:11:44.605Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1736,11 +1736,11 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pyfakefs"
|
name = "pyfakefs"
|
||||||
version = "6.1.1"
|
version = "6.1.5"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/43/84/843a50cfde48d6004cbf540b38b82a39737273cc76b51da6b456fea75de0/pyfakefs-6.1.1.tar.gz", hash = "sha256:1c166fdba85f3f288f89b2a410e05712914d1f7ea77b920e960fe0cbbea1294d", size = 226032, upload-time = "2026-02-09T19:44:19.539Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/61/87/fe3f1fbbf18480b57e6b195d4d416e01d8e55bf88743982ccb3a8845c2a2/pyfakefs-6.1.5.tar.gz", hash = "sha256:d70fb1c622a1d5c729462d31bb58eead99c1830986bc049bf8975c480a49d19b", size = 226814, upload-time = "2026-03-15T19:05:18.025Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/a5/e2/1d74c7663aa38e405c25a30c26e8a1b92c06f8947118b9617042f4290ade/pyfakefs-6.1.1-py3-none-any.whl", hash = "sha256:e2c30fd0b7736ba03785bbc20b86de2312623cf7a11a7de334042ab0de23d46f", size = 239630, upload-time = "2026-02-09T19:44:18.093Z" },
|
{ url = "https://files.pythonhosted.org/packages/e0/d8/a60fb94ab2b5a9bf0e38d6e93667904d4e844d8b7e9cfb5ef0304d68da6b/pyfakefs-6.1.5-py3-none-any.whl", hash = "sha256:2c482f36bad7d1f7516d58d17818fb0dbe397a3372ec5274869386a9b7cd4883", size = 239885, upload-time = "2026-03-15T19:05:16.488Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1754,11 +1754,11 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pyjwt"
|
name = "pyjwt"
|
||||||
version = "2.11.0"
|
version = "2.12.1"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/5c/5a/b46fa56bf322901eee5b0454a34343cdbdae202cd421775a8ee4e42fd519/pyjwt-2.11.0.tar.gz", hash = "sha256:35f95c1f0fbe5d5ba6e43f00271c275f7a1a4db1dab27bf708073b75318ea623", size = 98019, upload-time = "2026-01-30T19:59:55.694Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/c2/27/a3b6e5bf6ff856d2509292e95c8f57f0df7017cf5394921fc4e4ef40308a/pyjwt-2.12.1.tar.gz", hash = "sha256:c74a7a2adf861c04d002db713dd85f84beb242228e671280bf709d765b03672b", size = 102564, upload-time = "2026-03-13T19:27:37.25Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/6f/01/c26ce75ba460d5cd503da9e13b21a33804d38c2165dec7b716d06b13010c/pyjwt-2.11.0-py3-none-any.whl", hash = "sha256:94a6bde30eb5c8e04fee991062b534071fd1439ef58d2adc9ccb823e7bcd0469", size = 28224, upload-time = "2026-01-30T19:59:54.539Z" },
|
{ url = "https://files.pythonhosted.org/packages/e5/7a/8dd906bd22e79e47397a61742927f6747fe93242ef86645ee9092e610244/pyjwt-2.12.1-py3-none-any.whl", hash = "sha256:28ca37c070cad8ba8cd9790cd940535d40274d22f80ab87f3ac6a713e6e8454c", size = 29726, upload-time = "2026-03-13T19:27:35.677Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1992,16 +1992,16 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "responses"
|
name = "responses"
|
||||||
version = "0.25.8"
|
version = "0.26.0"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "pyyaml" },
|
{ name = "pyyaml" },
|
||||||
{ name = "requests" },
|
{ name = "requests" },
|
||||||
{ name = "urllib3" },
|
{ name = "urllib3" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/0e/95/89c054ad70bfef6da605338b009b2e283485835351a9935c7bfbfaca7ffc/responses-0.25.8.tar.gz", hash = "sha256:9374d047a575c8f781b94454db5cab590b6029505f488d12899ddb10a4af1cf4", size = 79320, upload-time = "2025-08-08T19:01:46.709Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/9f/b4/b7e040379838cc71bf5aabdb26998dfbe5ee73904c92c1c161faf5de8866/responses-0.26.0.tar.gz", hash = "sha256:c7f6923e6343ef3682816ba421c006626777893cb0d5e1434f674b649bac9eb4", size = 81303, upload-time = "2026-02-19T14:38:05.574Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/1c/4c/cc276ce57e572c102d9542d383b2cfd551276581dc60004cb94fe8774c11/responses-0.25.8-py3-none-any.whl", hash = "sha256:0c710af92def29c8352ceadff0c3fe340ace27cf5af1bbe46fb71275bcd2831c", size = 34769, upload-time = "2025-08-08T19:01:45.018Z" },
|
{ url = "https://files.pythonhosted.org/packages/ce/04/7f73d05b556da048923e31a0cc878f03be7c5425ed1f268082255c75d872/responses-0.26.0-py3-none-any.whl", hash = "sha256:03ec4409088cd5c66b71ecbbbd27fe2c58ddfad801c66203457b3e6a04868c37", size = 35099, upload-time = "2026-02-19T14:38:03.847Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2072,27 +2072,27 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruff"
|
name = "ruff"
|
||||||
version = "0.15.1"
|
version = "0.15.6"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/04/dc/4e6ac71b511b141cf626357a3946679abeba4cf67bc7cc5a17920f31e10d/ruff-0.15.1.tar.gz", hash = "sha256:c590fe13fb57c97141ae975c03a1aedb3d3156030cabd740d6ff0b0d601e203f", size = 4540855, upload-time = "2026-02-12T23:09:09.998Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/51/df/f8629c19c5318601d3121e230f74cbee7a3732339c52b21daa2b82ef9c7d/ruff-0.15.6.tar.gz", hash = "sha256:8394c7bb153a4e3811a4ecdacd4a8e6a4fa8097028119160dffecdcdf9b56ae4", size = 4597916, upload-time = "2026-03-12T23:05:47.51Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/23/bf/e6e4324238c17f9d9120a9d60aa99a7daaa21204c07fcd84e2ef03bb5fd1/ruff-0.15.1-py3-none-linux_armv6l.whl", hash = "sha256:b101ed7cf4615bda6ffe65bdb59f964e9f4a0d3f85cbf0e54f0ab76d7b90228a", size = 10367819, upload-time = "2026-02-12T23:09:03.598Z" },
|
{ url = "https://files.pythonhosted.org/packages/9e/2f/4e03a7e5ce99b517e98d3b4951f411de2b0fa8348d39cf446671adcce9a2/ruff-0.15.6-py3-none-linux_armv6l.whl", hash = "sha256:7c98c3b16407b2cf3d0f2b80c80187384bc92c6774d85fefa913ecd941256fff", size = 10508953, upload-time = "2026-03-12T23:05:17.246Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/b3/ea/c8f89d32e7912269d38c58f3649e453ac32c528f93bb7f4219258be2e7ed/ruff-0.15.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:939c995e9277e63ea632cc8d3fae17aa758526f49a9a850d2e7e758bfef46602", size = 10798618, upload-time = "2026-02-12T23:09:22.928Z" },
|
{ url = "https://files.pythonhosted.org/packages/70/60/55bcdc3e9f80bcf39edf0cd272da6fa511a3d94d5a0dd9e0adf76ceebdb4/ruff-0.15.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ee7dcfaad8b282a284df4aa6ddc2741b3f4a18b0555d626805555a820ea181c3", size = 10942257, upload-time = "2026-03-12T23:05:23.076Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/5e/0f/1d0d88bc862624247d82c20c10d4c0f6bb2f346559d8af281674cf327f15/ruff-0.15.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:1d83466455fdefe60b8d9c8df81d3c1bbb2115cede53549d3b522ce2bc703899", size = 10148518, upload-time = "2026-02-12T23:08:58.339Z" },
|
{ url = "https://files.pythonhosted.org/packages/e7/f9/005c29bd1726c0f492bfa215e95154cf480574140cb5f867c797c18c790b/ruff-0.15.6-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3bd9967851a25f038fc8b9ae88a7fbd1b609f30349231dffaa37b6804923c4bb", size = 10322683, upload-time = "2026-03-12T23:05:33.738Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/f5/c8/291c49cefaa4a9248e986256df2ade7add79388fe179e0691be06fae6f37/ruff-0.15.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a9457e3c3291024866222b96108ab2d8265b477e5b1534c7ddb1810904858d16", size = 10518811, upload-time = "2026-02-12T23:09:31.865Z" },
|
{ url = "https://files.pythonhosted.org/packages/5f/74/2f861f5fd7cbb2146bddb5501450300ce41562da36d21868c69b7a828169/ruff-0.15.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13f4594b04e42cd24a41da653886b04d2ff87adbf57497ed4f728b0e8a4866f8", size = 10660986, upload-time = "2026-03-12T23:05:53.245Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/c3/1a/f5707440e5ae43ffa5365cac8bbb91e9665f4a883f560893829cf16a606b/ruff-0.15.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:92c92b003e9d4f7fbd33b1867bb15a1b785b1735069108dfc23821ba045b29bc", size = 10196169, upload-time = "2026-02-12T23:09:17.306Z" },
|
{ url = "https://files.pythonhosted.org/packages/c1/a1/309f2364a424eccb763cdafc49df843c282609f47fe53aa83f38272389e0/ruff-0.15.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e2ed8aea2f3fe57886d3f00ea5b8aae5bf68d5e195f487f037a955ff9fbaac9e", size = 10332177, upload-time = "2026-03-12T23:05:56.145Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/2a/ff/26ddc8c4da04c8fd3ee65a89c9fb99eaa5c30394269d424461467be2271f/ruff-0.15.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1fe5c41ab43e3a06778844c586251eb5a510f67125427625f9eb2b9526535779", size = 10990491, upload-time = "2026-02-12T23:09:25.503Z" },
|
{ url = "https://files.pythonhosted.org/packages/30/41/7ebf1d32658b4bab20f8ac80972fb19cd4e2c6b78552be263a680edc55ac/ruff-0.15.6-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:70789d3e7830b848b548aae96766431c0dc01a6c78c13381f423bf7076c66d15", size = 11170783, upload-time = "2026-03-12T23:06:01.742Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/fc/00/50920cb385b89413f7cdb4bb9bc8fc59c1b0f30028d8bccc294189a54955/ruff-0.15.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:66a6dd6df4d80dc382c6484f8ce1bcceb55c32e9f27a8b94c32f6c7331bf14fb", size = 11843280, upload-time = "2026-02-12T23:09:19.88Z" },
|
{ url = "https://files.pythonhosted.org/packages/76/be/6d488f6adca047df82cd62c304638bcb00821c36bd4881cfca221561fdfc/ruff-0.15.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:542aaf1de3154cea088ced5a819ce872611256ffe2498e750bbae5247a8114e9", size = 12044201, upload-time = "2026-03-12T23:05:28.697Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/5d/6d/2f5cad8380caf5632a15460c323ae326f1e1a2b5b90a6ee7519017a017ca/ruff-0.15.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6a4a42cbb8af0bda9bcd7606b064d7c0bc311a88d141d02f78920be6acb5aa83", size = 11274336, upload-time = "2026-02-12T23:09:14.907Z" },
|
{ url = "https://files.pythonhosted.org/packages/71/68/e6f125df4af7e6d0b498f8d373274794bc5156b324e8ab4bf5c1b4fc0ec7/ruff-0.15.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c22e6f02c16cfac3888aa636e9eba857254d15bbacc9906c9689fdecb1953ab", size = 11421561, upload-time = "2026-03-12T23:05:31.236Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/a3/1d/5f56cae1d6c40b8a318513599b35ea4b075d7dc1cd1d04449578c29d1d75/ruff-0.15.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4ab064052c31dddada35079901592dfba2e05f5b1e43af3954aafcbc1096a5b2", size = 11137288, upload-time = "2026-02-12T23:09:07.475Z" },
|
{ url = "https://files.pythonhosted.org/packages/f1/9f/f85ef5fd01a52e0b472b26dc1b4bd228b8f6f0435975442ffa4741278703/ruff-0.15.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98893c4c0aadc8e448cfa315bd0cc343a5323d740fe5f28ef8a3f9e21b381f7e", size = 11310928, upload-time = "2026-03-12T23:05:45.288Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/cd/20/6f8d7d8f768c93b0382b33b9306b3b999918816da46537d5a61635514635/ruff-0.15.1-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:5631c940fe9fe91f817a4c2ea4e81f47bee3ca4aa646134a24374f3c19ad9454", size = 11070681, upload-time = "2026-02-12T23:08:55.43Z" },
|
{ url = "https://files.pythonhosted.org/packages/8c/26/b75f8c421f5654304b89471ed384ae8c7f42b4dff58fa6ce1626d7f2b59a/ruff-0.15.6-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:70d263770d234912374493e8cc1e7385c5d49376e41dfa51c5c3453169dc581c", size = 11235186, upload-time = "2026-03-12T23:05:50.677Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/9a/67/d640ac76069f64cdea59dba02af2e00b1fa30e2103c7f8d049c0cff4cafd/ruff-0.15.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:68138a4ba184b4691ccdc39f7795c66b3c68160c586519e7e8444cf5a53e1b4c", size = 10486401, upload-time = "2026-02-12T23:09:27.927Z" },
|
{ url = "https://files.pythonhosted.org/packages/fc/d4/d5a6d065962ff7a68a86c9b4f5500f7d101a0792078de636526c0edd40da/ruff-0.15.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:55a1ad63c5a6e54b1f21b7514dfadc0c7fb40093fa22e95143cf3f64ebdcd512", size = 10635231, upload-time = "2026-03-12T23:05:37.044Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/65/3d/e1429f64a3ff89297497916b88c32a5cc88eeca7e9c787072d0e7f1d3e1e/ruff-0.15.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:518f9af03bfc33c03bdb4cb63fabc935341bb7f54af500f92ac309ecfbba6330", size = 10197452, upload-time = "2026-02-12T23:09:12.147Z" },
|
{ url = "https://files.pythonhosted.org/packages/d6/56/7c3acf3d50910375349016cf33de24be021532042afbed87942858992491/ruff-0.15.6-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8dc473ba093c5ec238bb1e7429ee676dca24643c471e11fbaa8a857925b061c0", size = 10340357, upload-time = "2026-03-12T23:06:04.748Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/78/83/e2c3bade17dad63bf1e1c2ffaf11490603b760be149e1419b07049b36ef2/ruff-0.15.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:da79f4d6a826caaea95de0237a67e33b81e6ec2e25fc7e1993a4015dffca7c61", size = 10693900, upload-time = "2026-02-12T23:09:34.418Z" },
|
{ url = "https://files.pythonhosted.org/packages/06/54/6faa39e9c1033ff6a3b6e76b5df536931cd30caf64988e112bbf91ef5ce5/ruff-0.15.6-py3-none-musllinux_1_2_i686.whl", hash = "sha256:85b042377c2a5561131767974617006f99f7e13c63c111b998f29fc1e58a4cfb", size = 10860583, upload-time = "2026-03-12T23:05:58.978Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/a1/27/fdc0e11a813e6338e0706e8b39bb7a1d61ea5b36873b351acee7e524a72a/ruff-0.15.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:3dd86dccb83cd7d4dcfac303ffc277e6048600dfc22e38158afa208e8bf94a1f", size = 11227302, upload-time = "2026-02-12T23:09:36.536Z" },
|
{ url = "https://files.pythonhosted.org/packages/cb/1e/509a201b843b4dfb0b32acdedf68d951d3377988cae43949ba4c4133a96a/ruff-0.15.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:cef49e30bc5a86a6a92098a7fbf6e467a234d90b63305d6f3ec01225a9d092e0", size = 11410976, upload-time = "2026-03-12T23:05:39.955Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/f6/58/ac864a75067dcbd3b95be5ab4eb2b601d7fbc3d3d736a27e391a4f92a5c1/ruff-0.15.1-py3-none-win32.whl", hash = "sha256:660975d9cb49b5d5278b12b03bb9951d554543a90b74ed5d366b20e2c57c2098", size = 10462555, upload-time = "2026-02-12T23:09:29.899Z" },
|
{ url = "https://files.pythonhosted.org/packages/6c/25/3fc9114abf979a41673ce877c08016f8e660ad6cf508c3957f537d2e9fa9/ruff-0.15.6-py3-none-win32.whl", hash = "sha256:bbf67d39832404812a2d23020dda68fee7f18ce15654e96fb1d3ad21a5fe436c", size = 10616872, upload-time = "2026-03-12T23:05:42.451Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/e0/5e/d4ccc8a27ecdb78116feac4935dfc39d1304536f4296168f91ed3ec00cd2/ruff-0.15.1-py3-none-win_amd64.whl", hash = "sha256:c820fef9dd5d4172a6570e5721704a96c6679b80cf7be41659ed439653f62336", size = 11599956, upload-time = "2026-02-12T23:09:01.157Z" },
|
{ url = "https://files.pythonhosted.org/packages/89/7a/09ece68445ceac348df06e08bf75db72d0e8427765b96c9c0ffabc1be1d9/ruff-0.15.6-py3-none-win_amd64.whl", hash = "sha256:aee25bc84c2f1007ecb5037dff75cef00414fdf17c23f07dc13e577883dca406", size = 11787271, upload-time = "2026-03-12T23:05:20.168Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/2a/07/5bda6a85b220c64c65686bc85bd0bbb23b29c62b3a9f9433fa55f17cda93/ruff-0.15.1-py3-none-win_arm64.whl", hash = "sha256:5ff7d5f0f88567850f45081fac8f4ec212be8d0b963e385c3f7d0d2eb4899416", size = 10874604, upload-time = "2026-02-12T23:09:05.515Z" },
|
{ url = "https://files.pythonhosted.org/packages/7f/d0/578c47dd68152ddddddf31cd7fc67dc30b7cdf639a86275fda821b0d9d98/ruff-0.15.6-py3-none-win_arm64.whl", hash = "sha256:c34de3dd0b0ba203be50ae70f5910b17188556630e2178fd7d79fc030eb0d837", size = 11060497, upload-time = "2026-03-12T23:05:25.968Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2109,15 +2109,15 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sentry-sdk"
|
name = "sentry-sdk"
|
||||||
version = "2.53.0"
|
version = "2.54.0"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "certifi" },
|
{ name = "certifi" },
|
||||||
{ name = "urllib3" },
|
{ name = "urllib3" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/d3/06/66c8b705179bc54087845f28fd1b72f83751b6e9a195628e2e9af9926505/sentry_sdk-2.53.0.tar.gz", hash = "sha256:6520ef2c4acd823f28efc55e43eb6ce2e6d9f954a95a3aa96b6fd14871e92b77", size = 412369, upload-time = "2026-02-16T11:11:14.743Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/c8/e9/2e3a46c304e7fa21eaa70612f60354e32699c7102eb961f67448e222ad7c/sentry_sdk-2.54.0.tar.gz", hash = "sha256:2620c2575128d009b11b20f7feb81e4e4e8ae08ec1d36cbc845705060b45cc1b", size = 413813, upload-time = "2026-03-02T15:12:41.355Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/47/d4/2fdf854bc3b9c7f55219678f812600a20a138af2dd847d99004994eada8f/sentry_sdk-2.53.0-py2.py3-none-any.whl", hash = "sha256:46e1ed8d84355ae54406c924f6b290c3d61f4048625989a723fd622aab838899", size = 437908, upload-time = "2026-02-16T11:11:13.227Z" },
|
{ url = "https://files.pythonhosted.org/packages/53/39/be412cc86bc6247b8f69e9383d7950711bd86f8d0a4a4b0fe8fad685bc21/sentry_sdk-2.54.0-py2.py3-none-any.whl", hash = "sha256:fd74e0e281dcda63afff095d23ebcd6e97006102cdc8e78a29f19ecdf796a0de", size = 439198, upload-time = "2026-03-02T15:12:39.546Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2271,11 +2271,11 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "whitenoise"
|
name = "whitenoise"
|
||||||
version = "6.11.0"
|
version = "6.12.0"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/15/95/8c81ec6b6ebcbf8aca2de7603070ccf37dbb873b03f20708e0f7c1664bc6/whitenoise-6.11.0.tar.gz", hash = "sha256:0f5bfce6061ae6611cd9396a8231e088722e4fc67bc13a111be74c738d99375f", size = 26432, upload-time = "2025-09-18T09:16:10.995Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/cb/2a/55b3f3a4ec326cd077c1c3defeee656b9298372a69229134d930151acd01/whitenoise-6.12.0.tar.gz", hash = "sha256:f723ebb76a112e98816ff80fcea0a6c9b8ecde835f8ddda25df7a30a3c2db6ad", size = 26841, upload-time = "2026-02-27T00:05:42.028Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/6c/e9/4366332f9295fe0647d7d3251ce18f5615fbcb12d02c79a26f8dba9221b3/whitenoise-6.11.0-py3-none-any.whl", hash = "sha256:b2aeb45950597236f53b5342b3121c5de69c8da0109362aee506ce88e022d258", size = 20197, upload-time = "2025-09-18T09:16:09.754Z" },
|
{ url = "https://files.pythonhosted.org/packages/db/eb/d5583a11486211f3ebd4b385545ae787f32363d453c19fffd81106c9c138/whitenoise-6.12.0-py3-none-any.whl", hash = "sha256:fc5e8c572e33ebf24795b47b6a7da8da3c00cff2349f5b04c02f28d0cc5a3cc2", size = 20302, upload-time = "2026-02-27T00:05:40.086Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
Generated
+889
-16
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "meet",
|
"name": "meet",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.10.0",
|
"version": "1.12.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "panda codegen && vite",
|
"dev": "panda codegen && vite",
|
||||||
@@ -10,7 +10,9 @@
|
|||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"i18n:extract": "npx i18next -c i18next-parser.config.json",
|
"i18n:extract": "npx i18next -c i18next-parser.config.json",
|
||||||
"format": "prettier --write ./src",
|
"format": "prettier --write ./src",
|
||||||
"check": "prettier --check ./src"
|
"check": "prettier --check ./src",
|
||||||
|
"test": "vitest run",
|
||||||
|
"test:watch": "vitest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource-variable/material-symbols-outlined": "5.2.34",
|
"@fontsource-variable/material-symbols-outlined": "5.2.34",
|
||||||
@@ -59,10 +61,12 @@
|
|||||||
"eslint-plugin-jsx-a11y": "6.10.2",
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
||||||
"eslint-plugin-react-hooks": "5.2.0",
|
"eslint-plugin-react-hooks": "5.2.0",
|
||||||
"eslint-plugin-react-refresh": "0.4.20",
|
"eslint-plugin-react-refresh": "0.4.20",
|
||||||
|
"jsdom": "^29.0.2",
|
||||||
"postcss": "8.5.6",
|
"postcss": "8.5.6",
|
||||||
"prettier": "3.8.1",
|
"prettier": "3.8.1",
|
||||||
"typescript": "5.8.3",
|
"typescript": "5.8.3",
|
||||||
"vite": "7.3.1",
|
"vite": "7.3.1",
|
||||||
"vite-tsconfig-paths": "6.1.1"
|
"vite-tsconfig-paths": "6.1.1",
|
||||||
|
"vitest": "^4.1.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 8.9 KiB |
@@ -14,6 +14,7 @@ import './i18n/init'
|
|||||||
import { queryClient } from '@/api/queryClient'
|
import { queryClient } from '@/api/queryClient'
|
||||||
import { AppInitialization } from '@/components/AppInitialization'
|
import { AppInitialization } from '@/components/AppInitialization'
|
||||||
import { useIsSdkContext } from '@/features/sdk/hooks/useIsSdkContext'
|
import { useIsSdkContext } from '@/features/sdk/hooks/useIsSdkContext'
|
||||||
|
import { VaultClientProvider } from '@/features/encryption'
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const { i18n } = useTranslation()
|
const { i18n } = useTranslation()
|
||||||
@@ -25,20 +26,22 @@ function App() {
|
|||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
{!isSDKContext && <AppInitialization />}
|
{!isSDKContext && <AppInitialization />}
|
||||||
<Suspense fallback={null}>
|
<Suspense fallback={null}>
|
||||||
<I18nProvider locale={i18n.language}>
|
<VaultClientProvider>
|
||||||
<Layout>
|
<I18nProvider locale={i18n.language}>
|
||||||
|
<Layout>
|
||||||
<Switch>
|
<Switch>
|
||||||
{Object.entries(routes).map(([, route], i) => (
|
{Object.entries(routes).map(([, route], i) => (
|
||||||
<Route key={i} path={route.path} component={route.Component} />
|
<Route key={i} path={route.path} component={route.Component} />
|
||||||
))}
|
))}
|
||||||
<Route component={NotFoundScreen} />
|
<Route component={NotFoundScreen} />
|
||||||
</Switch>
|
</Switch>
|
||||||
</Layout>
|
</Layout>
|
||||||
<ReactQueryDevtools
|
<ReactQueryDevtools
|
||||||
initialIsOpen={false}
|
initialIsOpen={false}
|
||||||
buttonPosition="bottom-left"
|
buttonPosition="bottom-left"
|
||||||
/>
|
/>
|
||||||
</I18nProvider>
|
</I18nProvider>
|
||||||
|
</VaultClientProvider>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</QueryClientProvider>
|
</QueryClientProvider>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,7 +15,19 @@ export const fetchApi = async <T = Record<string, unknown>>(
|
|||||||
...options?.headers,
|
...options?.headers,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
const result = await response.json()
|
|
||||||
|
let result: T
|
||||||
|
if (response.status === 204) {
|
||||||
|
result = undefined as T
|
||||||
|
} else {
|
||||||
|
const contentType = response.headers.get('content-type') ?? ''
|
||||||
|
if (!contentType.includes('application/json')) {
|
||||||
|
result = undefined as T
|
||||||
|
} else {
|
||||||
|
result = (await response.json()) as T
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new ApiError(response.status, result)
|
throw new ApiError(response.status, result)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,4 +5,5 @@ export const keys = {
|
|||||||
requestEntry: 'requestEntry',
|
requestEntry: 'requestEntry',
|
||||||
waitingParticipants: 'waitingParticipants',
|
waitingParticipants: 'waitingParticipants',
|
||||||
roomCreationCallback: 'roomCreationCallback',
|
roomCreationCallback: 'roomCreationCallback',
|
||||||
|
files: 'files',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,13 @@ export interface ApiConfig {
|
|||||||
expiration_days?: number
|
expiration_days?: number
|
||||||
max_duration?: number
|
max_duration?: number
|
||||||
}
|
}
|
||||||
|
background_image: {
|
||||||
|
upload_is_enabled: boolean
|
||||||
|
max_size: number
|
||||||
|
max_count_by_user: number
|
||||||
|
allowed_extensions: string[]
|
||||||
|
allowed_mimetypes: string[]
|
||||||
|
}
|
||||||
subtitle: {
|
subtitle: {
|
||||||
enabled: boolean
|
enabled: boolean
|
||||||
}
|
}
|
||||||
@@ -45,6 +52,11 @@ export interface ApiConfig {
|
|||||||
enable_firefox_proxy_workaround: boolean
|
enable_firefox_proxy_workaround: boolean
|
||||||
default_sources: string[]
|
default_sources: string[]
|
||||||
}
|
}
|
||||||
|
encryption?: {
|
||||||
|
enabled: boolean
|
||||||
|
vault_url: string
|
||||||
|
interface_url: string
|
||||||
|
}
|
||||||
transcription_destination?: string
|
transcription_destination?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export const Avatar = ({
|
|||||||
style,
|
style,
|
||||||
...props
|
...props
|
||||||
}: AvatarProps) => {
|
}: AvatarProps) => {
|
||||||
const initial = name?.trim()?.charAt(0) ?? ''
|
const initial = name?.trim()?.charAt(0)?.toUpperCase() ?? ''
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@@ -70,7 +70,7 @@ export const Avatar = ({
|
|||||||
<span
|
<span
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
className={css({
|
className={css({
|
||||||
marginTop: '-0.3rem',
|
lineHeight: 1,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{initial}
|
{initial}
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ import { BackendLanguage } from '@/utils/languages'
|
|||||||
export type ApiUser = {
|
export type ApiUser = {
|
||||||
id: string
|
id: string
|
||||||
email: string
|
email: string
|
||||||
full_name: string
|
full_name: string | null
|
||||||
|
short_name: string | null
|
||||||
last_name: string
|
last_name: string
|
||||||
language: BackendLanguage
|
language: BackendLanguage
|
||||||
timezone: string
|
timezone: string
|
||||||
|
|||||||
@@ -0,0 +1,181 @@
|
|||||||
|
/**
|
||||||
|
* Indicator shown at the top-left of an encrypted meeting.
|
||||||
|
*
|
||||||
|
* Initially shows the full label "End-to-end encrypted" with a lock icon.
|
||||||
|
* After a few seconds, collapses to just the lock icon.
|
||||||
|
* On hover, expands back with a smooth animation.
|
||||||
|
* Clicking opens a modal explaining what E2EE means and its limitations.
|
||||||
|
*/
|
||||||
|
import { css } from '@/styled-system/css'
|
||||||
|
import { VStack } from '@/styled-system/jsx'
|
||||||
|
import { RiLockFill, RiShieldCheckFill } from '@remixicon/react'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
import { useRoomData } from '@/features/rooms/livekit/hooks/useRoomData'
|
||||||
|
import { isEncryptedRoom, ApiEncryptionMode } from '@/features/rooms/api/ApiRoom'
|
||||||
|
import { useEffect, useState } from 'react'
|
||||||
|
import { Dialog, Text } from '@/primitives'
|
||||||
|
|
||||||
|
const COLLAPSE_DELAY = 4000
|
||||||
|
|
||||||
|
export function EncryptedMeetingBanner() {
|
||||||
|
const roomData = useRoomData()
|
||||||
|
const { t } = useTranslation('rooms', { keyPrefix: 'encryption' })
|
||||||
|
const [isCollapsed, setIsCollapsed] = useState(false)
|
||||||
|
const [isModalOpen, setIsModalOpen] = useState(false)
|
||||||
|
|
||||||
|
const isStrongEncryption = roomData?.encryption_mode === ApiEncryptionMode.ADVANCED
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const timer = setTimeout(() => setIsCollapsed(true), COLLAPSE_DELAY)
|
||||||
|
return () => clearTimeout(timer)
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
if (!isEncryptedRoom(roomData)) return null
|
||||||
|
|
||||||
|
const bgColor = isStrongEncryption ? '#166534' : '#1e3a5f'
|
||||||
|
const hoverBgColor = isStrongEncryption ? '#15803d' : '#2563eb'
|
||||||
|
const icon = isStrongEncryption
|
||||||
|
? <RiShieldCheckFill size={13} color="white" className={css({ flexShrink: 0 })} />
|
||||||
|
: <RiLockFill size={13} color="white" className={css({ flexShrink: 0 })} />
|
||||||
|
const label = isStrongEncryption ? t('bannerStrong') : t('banner')
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div
|
||||||
|
onMouseEnter={() => setIsCollapsed(false)}
|
||||||
|
onMouseLeave={() => setIsCollapsed(true)}
|
||||||
|
onClick={() => setIsModalOpen(true)}
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
|
onKeyDown={(e) => e.key === 'Enter' && setIsModalOpen(true)}
|
||||||
|
aria-label={label}
|
||||||
|
className={css({
|
||||||
|
position: 'absolute',
|
||||||
|
top: '0.5rem',
|
||||||
|
left: '0.5rem',
|
||||||
|
zIndex: 10,
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '0.35rem',
|
||||||
|
padding: '0.3rem 0.6rem',
|
||||||
|
borderRadius: '1rem',
|
||||||
|
border: '2px solid rgba(0, 0, 0, 0.3)',
|
||||||
|
cursor: 'pointer',
|
||||||
|
overflow: 'hidden',
|
||||||
|
transition: 'all 300ms ease',
|
||||||
|
maxWidth: isCollapsed ? '2.2rem' : '16rem',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
})}
|
||||||
|
style={{
|
||||||
|
backgroundColor: bgColor,
|
||||||
|
paddingRight: isCollapsed ? '0.3rem' : '0.6rem',
|
||||||
|
}}
|
||||||
|
onMouseOver={(e) => { (e.currentTarget as HTMLElement).style.backgroundColor = hoverBgColor }}
|
||||||
|
onMouseOut={(e) => { (e.currentTarget as HTMLElement).style.backgroundColor = bgColor }}
|
||||||
|
>
|
||||||
|
{icon}
|
||||||
|
<span
|
||||||
|
className={css({
|
||||||
|
fontSize: '0.7rem',
|
||||||
|
fontWeight: 600,
|
||||||
|
color: 'white',
|
||||||
|
letterSpacing: '0.02em',
|
||||||
|
transition: 'opacity 200ms ease',
|
||||||
|
})}
|
||||||
|
style={{
|
||||||
|
opacity: isCollapsed ? 0 : 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{label}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Dialog
|
||||||
|
isOpen={isModalOpen}
|
||||||
|
onOpenChange={setIsModalOpen}
|
||||||
|
role="dialog"
|
||||||
|
type="flex"
|
||||||
|
title={t('bannerModal.title')}
|
||||||
|
>
|
||||||
|
<VStack
|
||||||
|
gap="1rem"
|
||||||
|
alignItems="start"
|
||||||
|
className={css({ maxWidth: '24rem' })}
|
||||||
|
>
|
||||||
|
<Text variant="sm">
|
||||||
|
{isStrongEncryption
|
||||||
|
? t('bannerModal.descriptionAdvanced')
|
||||||
|
: t('bannerModal.descriptionBasic')}
|
||||||
|
</Text>
|
||||||
|
|
||||||
|
<VStack gap="0.5rem" alignItems="start" className={css({ width: '100%' })}>
|
||||||
|
<Text variant="sm" className={css({ fontWeight: 600 })}>
|
||||||
|
{t('bannerModal.guarantees')}
|
||||||
|
</Text>
|
||||||
|
<ul
|
||||||
|
className={css({
|
||||||
|
paddingLeft: '1.5rem',
|
||||||
|
fontSize: '0.85rem',
|
||||||
|
listStyleType: 'disc',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
gap: '0.4rem',
|
||||||
|
'& li': {
|
||||||
|
paddingLeft: '0.25rem',
|
||||||
|
},
|
||||||
|
'& li::marker': {
|
||||||
|
color: '#22c55e',
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<li>{t('bannerModal.guarantee1')}</li>
|
||||||
|
<li>{t('bannerModal.guarantee2')}</li>
|
||||||
|
<li>{t('bannerModal.guarantee3')}</li>
|
||||||
|
</ul>
|
||||||
|
</VStack>
|
||||||
|
|
||||||
|
<VStack gap="0.5rem" alignItems="start" className={css({ width: '100%' })}>
|
||||||
|
<Text variant="sm" className={css({ fontWeight: 600 })}>
|
||||||
|
{t('bannerModal.limitations')}
|
||||||
|
</Text>
|
||||||
|
<ul
|
||||||
|
className={css({
|
||||||
|
paddingLeft: '1.5rem',
|
||||||
|
fontSize: '0.85rem',
|
||||||
|
listStyleType: 'disc',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
gap: '0.4rem',
|
||||||
|
'& li': {
|
||||||
|
paddingLeft: '0.25rem',
|
||||||
|
},
|
||||||
|
'& li::marker': {
|
||||||
|
color: '#f59e0b',
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<li>{t('bannerModal.limitation1')}</li>
|
||||||
|
<li>{isStrongEncryption
|
||||||
|
? t('bannerModal.limitation2Advanced')
|
||||||
|
: t('bannerModal.limitation2Basic')}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</VStack>
|
||||||
|
|
||||||
|
<Text
|
||||||
|
variant="note"
|
||||||
|
className={css({
|
||||||
|
fontSize: '0.75rem',
|
||||||
|
borderTop: '1px solid',
|
||||||
|
borderColor: 'greyscale.200',
|
||||||
|
paddingTop: '0.75rem',
|
||||||
|
width: '100%',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{t('bannerModal.note')}
|
||||||
|
</Text>
|
||||||
|
</VStack>
|
||||||
|
</Dialog>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
/**
|
||||||
|
* Per-participant encryption trust badge.
|
||||||
|
*
|
||||||
|
* In advanced mode:
|
||||||
|
* - "verified": Green shield — fingerprint explicitly trusted
|
||||||
|
* - "unknown": Grey shield — has public key, not yet verified
|
||||||
|
* - "refused": Red shield — fingerprint previously refused
|
||||||
|
* - "authenticated": Blue shield — ProConnect, no vault keys
|
||||||
|
* - "anonymous": Orange warning — not signed in
|
||||||
|
*
|
||||||
|
* In basic mode:
|
||||||
|
* - "authenticated": Blue shield — ProConnect
|
||||||
|
* - "anonymous": Orange warning — not signed in
|
||||||
|
*/
|
||||||
|
import {
|
||||||
|
RiShieldCheckFill,
|
||||||
|
RiShieldFill,
|
||||||
|
RiShieldCrossFill,
|
||||||
|
RiErrorWarningFill,
|
||||||
|
RiLockFill,
|
||||||
|
} from '@remixicon/react'
|
||||||
|
import type { TrustLevel } from './types'
|
||||||
|
import { css } from '@/styled-system/css'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
|
interface EncryptionBadgeProps {
|
||||||
|
trustLevel: TrustLevel | null
|
||||||
|
isEncrypted: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export function EncryptionBadge({
|
||||||
|
trustLevel,
|
||||||
|
isEncrypted,
|
||||||
|
}: EncryptionBadgeProps) {
|
||||||
|
const { t } = useTranslation('rooms', { keyPrefix: 'encryption.badge' })
|
||||||
|
|
||||||
|
if (!isEncrypted) return null
|
||||||
|
|
||||||
|
let icon: React.ReactNode
|
||||||
|
let label: string
|
||||||
|
|
||||||
|
switch (trustLevel) {
|
||||||
|
case 'verified':
|
||||||
|
icon = <RiShieldCheckFill size={14} color="#22c55e" />
|
||||||
|
label = t('verified')
|
||||||
|
break
|
||||||
|
case 'unknown':
|
||||||
|
icon = <RiShieldFill size={14} color="#9ca3af" />
|
||||||
|
label = t('unknown')
|
||||||
|
break
|
||||||
|
case 'refused':
|
||||||
|
icon = <RiShieldCrossFill size={14} color="#ef4444" />
|
||||||
|
label = t('refused')
|
||||||
|
break
|
||||||
|
case 'authenticated':
|
||||||
|
icon = <RiShieldCheckFill size={14} color="#3b82f6" />
|
||||||
|
label = t('authenticated')
|
||||||
|
break
|
||||||
|
case 'anonymous':
|
||||||
|
icon = <RiErrorWarningFill size={15} color="#d97706" />
|
||||||
|
label = t('anonymous')
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
icon = <RiLockFill size={14} />
|
||||||
|
label = t('default')
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<span
|
||||||
|
aria-label={label}
|
||||||
|
className={css({
|
||||||
|
display: 'inline-flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
marginRight: '0.15rem',
|
||||||
|
cursor: 'inherit',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{icon}
|
||||||
|
</span>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { createContext, useContext } from 'react'
|
||||||
|
|
||||||
|
interface EncryptionContextValue {
|
||||||
|
symmetricKey?: Uint8Array
|
||||||
|
}
|
||||||
|
|
||||||
|
const EncryptionContext = createContext<EncryptionContextValue>({})
|
||||||
|
|
||||||
|
export const EncryptionProvider = EncryptionContext.Provider
|
||||||
|
export const useEncryptionContext = () => useContext(EncryptionContext)
|
||||||
@@ -0,0 +1,326 @@
|
|||||||
|
/**
|
||||||
|
* Dialog showing a participant's encryption fingerprint.
|
||||||
|
* Allows the admin to verify, accept, or refuse the fingerprint.
|
||||||
|
*
|
||||||
|
* This connects to the encryption library's VaultClient to check/accept/refuse
|
||||||
|
* fingerprints from the TOFU (Trust On First Use) registry.
|
||||||
|
*/
|
||||||
|
import { css } from '@/styled-system/css'
|
||||||
|
import { VStack, HStack } from '@/styled-system/jsx'
|
||||||
|
import { Dialog, Text, Button } from '@/primitives'
|
||||||
|
import { Avatar } from '@/components/Avatar'
|
||||||
|
import { useUser } from '@/features/auth'
|
||||||
|
import {
|
||||||
|
RiShieldCheckFill,
|
||||||
|
RiShieldCheckLine,
|
||||||
|
RiAlertLine,
|
||||||
|
RiCheckLine,
|
||||||
|
RiCloseLine,
|
||||||
|
} from '@remixicon/react'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
import { useVaultClient } from './VaultClientProvider'
|
||||||
|
import { formatFingerprint } from './useParticipantTrustLevel'
|
||||||
|
import { useEffect, useState } from 'react'
|
||||||
|
|
||||||
|
interface EncryptionIdentityDialogProps {
|
||||||
|
isOpen: boolean
|
||||||
|
onOpenChange: (open: boolean) => void
|
||||||
|
participantName: string
|
||||||
|
participantEmail?: string
|
||||||
|
suiteUserId?: string
|
||||||
|
isAuthenticated: boolean
|
||||||
|
encryptionMode?: 'basic' | 'advanced' | 'none'
|
||||||
|
isSelf?: boolean
|
||||||
|
preloadedFingerprint?: string | null
|
||||||
|
preloadedFingerprintStatus?: string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
type FingerprintStatus = 'loading' | 'no-key' | 'trusted' | 'refused' | 'unknown' | 'error'
|
||||||
|
|
||||||
|
export function EncryptionIdentityDialog({
|
||||||
|
isOpen,
|
||||||
|
onOpenChange,
|
||||||
|
participantName,
|
||||||
|
participantEmail,
|
||||||
|
suiteUserId,
|
||||||
|
isAuthenticated,
|
||||||
|
encryptionMode,
|
||||||
|
isSelf,
|
||||||
|
preloadedFingerprint,
|
||||||
|
preloadedFingerprintStatus,
|
||||||
|
}: EncryptionIdentityDialogProps) {
|
||||||
|
const { t } = useTranslation('rooms', { keyPrefix: 'encryption.fingerprint' })
|
||||||
|
const { client: vaultClient } = useVaultClient()
|
||||||
|
const { isLoggedIn } = useUser()
|
||||||
|
const [status, setStatus] = useState<FingerprintStatus>(
|
||||||
|
(preloadedFingerprintStatus as FingerprintStatus) || 'loading'
|
||||||
|
)
|
||||||
|
const [fingerprint, setFingerprint] = useState<string | null>(preloadedFingerprint || null)
|
||||||
|
|
||||||
|
// Sync preloaded data when it becomes available (hook resolves after mount)
|
||||||
|
useEffect(() => {
|
||||||
|
if (preloadedFingerprintStatus) setStatus(preloadedFingerprintStatus as FingerprintStatus)
|
||||||
|
if (preloadedFingerprint) setFingerprint(preloadedFingerprint)
|
||||||
|
}, [preloadedFingerprint, preloadedFingerprintStatus])
|
||||||
|
|
||||||
|
const isBasicMode = encryptionMode !== 'advanced'
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!isOpen) return
|
||||||
|
// In basic mode, no fingerprint check — identity is from ProConnect only
|
||||||
|
if (isBasicMode) {
|
||||||
|
setStatus(isAuthenticated ? 'no-key' : 'no-key')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!vaultClient) {
|
||||||
|
setStatus('error')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!suiteUserId) {
|
||||||
|
setStatus(isAuthenticated ? 'no-key' : 'no-key')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let cancelled = false
|
||||||
|
|
||||||
|
async function checkFingerprint() {
|
||||||
|
try {
|
||||||
|
const timeout = new Promise<never>((_, reject) =>
|
||||||
|
setTimeout(() => reject(new Error('timeout')), 3000)
|
||||||
|
)
|
||||||
|
|
||||||
|
const fetchResult = await Promise.race([
|
||||||
|
vaultClient!.fetchPublicKeys([suiteUserId!]),
|
||||||
|
timeout,
|
||||||
|
])
|
||||||
|
|
||||||
|
const publicKey = fetchResult.publicKeys[suiteUserId!]
|
||||||
|
|
||||||
|
if (!publicKey || cancelled) {
|
||||||
|
setStatus('no-key')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Compute fingerprint from the public key (SHA-256, first 16 hex chars)
|
||||||
|
const hash = await crypto.subtle.digest('SHA-256', publicKey)
|
||||||
|
const fp = Array.from(new Uint8Array(hash))
|
||||||
|
.map((b) => b.toString(16).padStart(2, '0'))
|
||||||
|
.join('')
|
||||||
|
.slice(0, 16)
|
||||||
|
|
||||||
|
if (cancelled) return
|
||||||
|
setFingerprint(fp)
|
||||||
|
|
||||||
|
// Check local registry without triggering TOFU auto-trust
|
||||||
|
const { fingerprints: known } = await Promise.race([
|
||||||
|
vaultClient!.getKnownFingerprints(),
|
||||||
|
timeout,
|
||||||
|
])
|
||||||
|
if (cancelled) return
|
||||||
|
|
||||||
|
const knownEntry = known[suiteUserId!]
|
||||||
|
if (!knownEntry) {
|
||||||
|
setStatus('unknown')
|
||||||
|
} else if (knownEntry.fingerprint === fp) {
|
||||||
|
setStatus(knownEntry.status)
|
||||||
|
} else {
|
||||||
|
// Fingerprint changed — needs re-verification
|
||||||
|
setStatus('unknown')
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
if (!cancelled) setStatus('error')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
checkFingerprint()
|
||||||
|
return () => { cancelled = true }
|
||||||
|
}, [isOpen, vaultClient, suiteUserId, isAuthenticated])
|
||||||
|
|
||||||
|
const handleAccept = async () => {
|
||||||
|
if (!vaultClient || !suiteUserId || !fingerprint) return
|
||||||
|
try {
|
||||||
|
await vaultClient.acceptFingerprint(suiteUserId, fingerprint)
|
||||||
|
setStatus('trusted')
|
||||||
|
} catch {
|
||||||
|
// Failed to accept
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRefuse = async () => {
|
||||||
|
if (!vaultClient || !suiteUserId || !fingerprint) return
|
||||||
|
try {
|
||||||
|
await vaultClient.refuseFingerprint(suiteUserId, fingerprint)
|
||||||
|
setStatus('refused')
|
||||||
|
} catch {
|
||||||
|
// Failed to refuse
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog
|
||||||
|
isOpen={isOpen}
|
||||||
|
onOpenChange={onOpenChange}
|
||||||
|
role="dialog"
|
||||||
|
type="flex"
|
||||||
|
title={t('title')}
|
||||||
|
>
|
||||||
|
<VStack
|
||||||
|
gap="0.75rem"
|
||||||
|
alignItems="start"
|
||||||
|
className={css({ maxWidth: '22rem' })}
|
||||||
|
>
|
||||||
|
<HStack gap="0.65rem" className={css({ width: '100%' })}>
|
||||||
|
<div className={css({ flexShrink: 0, transform: 'scale(0.85)' })}>
|
||||||
|
<Avatar name={participantName} bgColor="rgb(87, 44, 216)" />
|
||||||
|
</div>
|
||||||
|
<VStack gap="0" alignItems="start">
|
||||||
|
<Text className={css({ fontWeight: 600, fontSize: '0.9rem' })}>{participantName}</Text>
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.8rem', color: 'greyscale.500' })}>
|
||||||
|
{isLoggedIn && participantEmail ? participantEmail : (!isAuthenticated ? t('anonymous') : '')}
|
||||||
|
</Text>
|
||||||
|
</VStack>
|
||||||
|
</HStack>
|
||||||
|
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.8rem' })}>
|
||||||
|
{isSelf
|
||||||
|
? (isAuthenticated ? t('descriptionSelf') : t('descriptionSelfAnonymous'))
|
||||||
|
: t('description')}
|
||||||
|
</Text>
|
||||||
|
|
||||||
|
{status === 'loading' && (
|
||||||
|
<Text variant="note">{t('loading')}</Text>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{status === 'no-key' && isBasicMode && isAuthenticated && (
|
||||||
|
<HStack
|
||||||
|
gap="0.5rem"
|
||||||
|
className={css({
|
||||||
|
backgroundColor: '#eff6ff',
|
||||||
|
padding: '0.75rem',
|
||||||
|
borderRadius: '0.5rem',
|
||||||
|
width: '100%',
|
||||||
|
border: '1px solid #bfdbfe',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<RiShieldCheckLine size={20} color="#3b82f6" className={css({ flexShrink: 0 })} />
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.8rem' })}>
|
||||||
|
{t('noKeyBasicAuthenticated')}
|
||||||
|
</Text>
|
||||||
|
</HStack>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{status === 'no-key' && !(isBasicMode && isAuthenticated) && !isSelf && (
|
||||||
|
<HStack
|
||||||
|
gap="0.5rem"
|
||||||
|
className={css({
|
||||||
|
backgroundColor: '#fffbeb',
|
||||||
|
padding: '0.75rem',
|
||||||
|
borderRadius: '0.5rem',
|
||||||
|
width: '100%',
|
||||||
|
border: '1px solid #fde68a',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<RiAlertLine size={20} color="#f59e0b" className={css({ flexShrink: 0 })} />
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.8rem' })}>
|
||||||
|
{isAuthenticated ? t('noKey') : t('noKeyAnonymous')}
|
||||||
|
</Text>
|
||||||
|
</HStack>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{status === 'error' && (
|
||||||
|
<Text variant="note" className={css({ color: '#ef4444' })}>
|
||||||
|
{t('error')}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{(status === 'trusted' || status === 'refused' || status === 'unknown') && fingerprint && (
|
||||||
|
<>
|
||||||
|
<VStack
|
||||||
|
gap="0.25rem"
|
||||||
|
className={css({
|
||||||
|
backgroundColor: 'greyscale.50',
|
||||||
|
padding: '0.75rem',
|
||||||
|
borderRadius: '0.5rem',
|
||||||
|
width: '100%',
|
||||||
|
fontFamily: 'monospace',
|
||||||
|
fontSize: '0.85rem',
|
||||||
|
letterSpacing: '0.05em',
|
||||||
|
wordBreak: 'break-all',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.7rem', fontFamily: 'inherit' })}>
|
||||||
|
{t('fingerprintLabel')}
|
||||||
|
</Text>
|
||||||
|
{formatFingerprint(fingerprint)}
|
||||||
|
</VStack>
|
||||||
|
|
||||||
|
{status === 'trusted' && (
|
||||||
|
<VStack gap="0.25rem" alignItems="start">
|
||||||
|
<HStack gap="0.5rem" className={css({ color: '#22c55e' })}>
|
||||||
|
<RiShieldCheckFill size={18} />
|
||||||
|
<Text className={css({ fontSize: '0.85rem', fontWeight: 600, color: 'inherit' })}>
|
||||||
|
{t('trusted')}
|
||||||
|
</Text>
|
||||||
|
</HStack>
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.8rem' })}>
|
||||||
|
{isSelf ? t('descriptionSelf') : t('trustedDescription')}
|
||||||
|
</Text>
|
||||||
|
{!isSelf && (
|
||||||
|
<Text
|
||||||
|
variant="note"
|
||||||
|
className={css({ fontSize: '0.75rem', color: 'greyscale.500', cursor: 'pointer', _hover: { textDecoration: 'underline' } })}
|
||||||
|
onClick={() => setStatus('unknown')}
|
||||||
|
>
|
||||||
|
{t('changeDecision')}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
</VStack>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{status === 'refused' && (
|
||||||
|
<VStack gap="0.25rem" alignItems="start">
|
||||||
|
<HStack gap="0.5rem" className={css({ color: '#ef4444' })}>
|
||||||
|
<RiCloseLine size={18} />
|
||||||
|
<Text className={css({ fontSize: '0.85rem', fontWeight: 600, color: 'inherit' })}>
|
||||||
|
{t('refused')}
|
||||||
|
</Text>
|
||||||
|
</HStack>
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.8rem' })}>
|
||||||
|
{t('refusedDescription')}
|
||||||
|
</Text>
|
||||||
|
<Text
|
||||||
|
variant="note"
|
||||||
|
className={css({ fontSize: '0.75rem', color: 'greyscale.500', cursor: 'pointer', _hover: { textDecoration: 'underline' } })}
|
||||||
|
onClick={() => setStatus('unknown')}
|
||||||
|
>
|
||||||
|
{t('changeDecision')}
|
||||||
|
</Text>
|
||||||
|
</VStack>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{status === 'unknown' && !isSelf && (
|
||||||
|
<VStack gap="0.5rem" className={css({ width: '100%' })}>
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.8rem' })}>
|
||||||
|
{t('unknownDescription')}
|
||||||
|
</Text>
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.75rem', fontStyle: 'italic' })}>
|
||||||
|
{t('fingerprintHint')}
|
||||||
|
</Text>
|
||||||
|
<HStack gap="0.5rem">
|
||||||
|
<Button size="sm" variant="primary" onPress={handleAccept}>
|
||||||
|
<RiCheckLine size={16} />
|
||||||
|
{t('accept')}
|
||||||
|
</Button>
|
||||||
|
<Button size="sm" variant="secondaryText" onPress={handleRefuse}>
|
||||||
|
<RiCloseLine size={16} />
|
||||||
|
{t('refuse')}
|
||||||
|
</Button>
|
||||||
|
</HStack>
|
||||||
|
</VStack>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</VStack>
|
||||||
|
</Dialog>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
/**
|
||||||
|
* Overlay shown during encryption key exchange.
|
||||||
|
*
|
||||||
|
* When a participant joins an encrypted room, there's a brief period
|
||||||
|
* between connection and receiving the symmetric key where media
|
||||||
|
* cannot be decrypted. This overlay provides feedback during that time.
|
||||||
|
*
|
||||||
|
* After 20 seconds without the key, shows an error with a refresh button.
|
||||||
|
*/
|
||||||
|
import { css } from '@/styled-system/css'
|
||||||
|
import { VStack } from '@/styled-system/jsx'
|
||||||
|
import { Text, Button } from '@/primitives'
|
||||||
|
import { Spinner } from '@/primitives/Spinner'
|
||||||
|
import { RiLockFill, RiAlertFill, RiRefreshLine } from '@remixicon/react'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
import { useEffect, useState } from 'react'
|
||||||
|
|
||||||
|
const KEY_EXCHANGE_TIMEOUT = 20000
|
||||||
|
|
||||||
|
export function EncryptionSetupOverlay({
|
||||||
|
isSettingUp,
|
||||||
|
error,
|
||||||
|
}: {
|
||||||
|
isSettingUp: boolean
|
||||||
|
error: string | null
|
||||||
|
}) {
|
||||||
|
const { t } = useTranslation('rooms', { keyPrefix: 'encryption' })
|
||||||
|
const [timedOut, setTimedOut] = useState(false)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!isSettingUp) {
|
||||||
|
setTimedOut(false)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const timer = setTimeout(() => setTimedOut(true), KEY_EXCHANGE_TIMEOUT)
|
||||||
|
return () => clearTimeout(timer)
|
||||||
|
}, [isSettingUp])
|
||||||
|
|
||||||
|
if (!isSettingUp && !error) return null
|
||||||
|
|
||||||
|
const showError = error || timedOut
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className={css({
|
||||||
|
position: 'absolute',
|
||||||
|
inset: 0,
|
||||||
|
zIndex: 100,
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
backgroundColor: 'rgba(0, 0, 0, 0.85)',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<VStack gap="1rem" alignItems="center">
|
||||||
|
{showError ? (
|
||||||
|
<>
|
||||||
|
<RiAlertFill size={36} color="#f87171" />
|
||||||
|
<Text
|
||||||
|
className={css({
|
||||||
|
color: '#f87171',
|
||||||
|
fontSize: '1.1rem',
|
||||||
|
fontWeight: 500,
|
||||||
|
textAlign: 'center',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{timedOut ? t('error.timeout') : t('error.title')}
|
||||||
|
</Text>
|
||||||
|
<Text
|
||||||
|
className={css({
|
||||||
|
color: 'greyscale.300',
|
||||||
|
fontSize: '0.85rem',
|
||||||
|
textAlign: 'center',
|
||||||
|
maxWidth: '20rem',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{error || t('error.timeoutHint')}
|
||||||
|
</Text>
|
||||||
|
<Button
|
||||||
|
variant="primary"
|
||||||
|
size="sm"
|
||||||
|
onPress={() => window.location.reload()}
|
||||||
|
>
|
||||||
|
<RiRefreshLine size={16} />
|
||||||
|
{t('error.refresh')}
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<RiLockFill size={32} color="white" />
|
||||||
|
<Text
|
||||||
|
className={css({
|
||||||
|
color: 'white',
|
||||||
|
fontSize: '1.1rem',
|
||||||
|
fontWeight: 500,
|
||||||
|
textAlign: 'center',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{t('settingUp.title')}
|
||||||
|
</Text>
|
||||||
|
<Text
|
||||||
|
className={css({
|
||||||
|
color: 'greyscale.300',
|
||||||
|
fontSize: '0.85rem',
|
||||||
|
textAlign: 'center',
|
||||||
|
maxWidth: '20rem',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{t('settingUp.description')}
|
||||||
|
</Text>
|
||||||
|
<Spinner />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</VStack>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
/**
|
||||||
|
* Modal explaining encryption trust levels.
|
||||||
|
* Shown when admin clicks the trust badge in the waiting room.
|
||||||
|
*/
|
||||||
|
import { css } from '@/styled-system/css'
|
||||||
|
import { VStack, HStack } from '@/styled-system/jsx'
|
||||||
|
import { Dialog, Text } from '@/primitives'
|
||||||
|
import { RiShieldCheckFill, RiShieldCheckLine, RiAlertLine } from '@remixicon/react'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
|
interface EncryptionTrustModalProps {
|
||||||
|
isOpen: boolean
|
||||||
|
onOpenChange: (open: boolean) => void
|
||||||
|
participantName: string
|
||||||
|
isAuthenticated: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export function EncryptionTrustModal({
|
||||||
|
isOpen,
|
||||||
|
onOpenChange,
|
||||||
|
participantName,
|
||||||
|
isAuthenticated,
|
||||||
|
}: EncryptionTrustModalProps) {
|
||||||
|
const { t } = useTranslation('rooms', { keyPrefix: 'encryption.trustModal' })
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog
|
||||||
|
isOpen={isOpen}
|
||||||
|
onOpenChange={onOpenChange}
|
||||||
|
role="dialog"
|
||||||
|
type="flex"
|
||||||
|
title={t('title')}
|
||||||
|
>
|
||||||
|
<VStack
|
||||||
|
gap="1rem"
|
||||||
|
alignItems="start"
|
||||||
|
className={css({ maxWidth: '22rem' })}
|
||||||
|
>
|
||||||
|
<Text variant="sm">{t('intro', { name: participantName })}</Text>
|
||||||
|
|
||||||
|
{isAuthenticated ? (
|
||||||
|
<HStack
|
||||||
|
gap="0.75rem"
|
||||||
|
className={css({
|
||||||
|
backgroundColor: '#eff6ff',
|
||||||
|
padding: '0.75rem',
|
||||||
|
borderRadius: '0.5rem',
|
||||||
|
width: '100%',
|
||||||
|
border: '1px solid #bfdbfe',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<RiShieldCheckLine
|
||||||
|
size={24}
|
||||||
|
color="#3b82f6"
|
||||||
|
className={css({ flexShrink: 0 })}
|
||||||
|
/>
|
||||||
|
<VStack gap="0.25rem" alignItems="start">
|
||||||
|
<Text className={css({ fontWeight: 600, fontSize: '0.85rem' })}>
|
||||||
|
{t('authenticated.title')}
|
||||||
|
</Text>
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.8rem' })}>
|
||||||
|
{t('authenticated.description')}
|
||||||
|
</Text>
|
||||||
|
</VStack>
|
||||||
|
</HStack>
|
||||||
|
) : (
|
||||||
|
<HStack
|
||||||
|
gap="0.75rem"
|
||||||
|
className={css({
|
||||||
|
backgroundColor: '#fffbeb',
|
||||||
|
padding: '0.75rem',
|
||||||
|
borderRadius: '0.5rem',
|
||||||
|
width: '100%',
|
||||||
|
border: '1px solid #fde68a',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<RiAlertLine
|
||||||
|
size={24}
|
||||||
|
color="#f59e0b"
|
||||||
|
className={css({ flexShrink: 0 })}
|
||||||
|
/>
|
||||||
|
<VStack gap="0.25rem" alignItems="start">
|
||||||
|
<Text className={css({ fontWeight: 600, fontSize: '0.85rem' })}>
|
||||||
|
{t('anonymous.title')}
|
||||||
|
</Text>
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.8rem' })}>
|
||||||
|
{t('anonymous.description')}
|
||||||
|
</Text>
|
||||||
|
</VStack>
|
||||||
|
</HStack>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<VStack
|
||||||
|
gap="0.5rem"
|
||||||
|
alignItems="start"
|
||||||
|
className={css({
|
||||||
|
borderTop: '1px solid',
|
||||||
|
borderColor: 'greyscale.200',
|
||||||
|
paddingTop: '0.75rem',
|
||||||
|
width: '100%',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<Text
|
||||||
|
variant="note"
|
||||||
|
className={css({ fontWeight: 600, fontSize: '0.8rem' })}
|
||||||
|
>
|
||||||
|
{t('levels.title')}
|
||||||
|
</Text>
|
||||||
|
<HStack gap="0.5rem" alignItems="start">
|
||||||
|
<RiShieldCheckFill
|
||||||
|
size={16}
|
||||||
|
color="#22c55e"
|
||||||
|
className={css({ flexShrink: 0, marginTop: '2px' })}
|
||||||
|
/>
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.75rem' })}>
|
||||||
|
{t('levels.verified')}
|
||||||
|
</Text>
|
||||||
|
</HStack>
|
||||||
|
<HStack gap="0.5rem" alignItems="start">
|
||||||
|
<RiShieldCheckLine
|
||||||
|
size={16}
|
||||||
|
color="#3b82f6"
|
||||||
|
className={css({ flexShrink: 0, marginTop: '2px' })}
|
||||||
|
/>
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.75rem' })}>
|
||||||
|
{t('levels.authenticated')}
|
||||||
|
</Text>
|
||||||
|
</HStack>
|
||||||
|
<HStack gap="0.5rem" alignItems="start">
|
||||||
|
<RiAlertLine
|
||||||
|
size={16}
|
||||||
|
color="#f59e0b"
|
||||||
|
className={css({ flexShrink: 0, marginTop: '2px' })}
|
||||||
|
/>
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.75rem' })}>
|
||||||
|
{t('levels.anonymous')}
|
||||||
|
</Text>
|
||||||
|
</HStack>
|
||||||
|
</VStack>
|
||||||
|
</VStack>
|
||||||
|
</Dialog>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
/**
|
||||||
|
* Hybrid key distributor: determines the best key distribution method per participant.
|
||||||
|
*
|
||||||
|
* For each participant joining an encrypted call:
|
||||||
|
* 1. Check if they have a registered public key (via VaultClient/encryption library)
|
||||||
|
* → If YES: wrap symmetric key with their public key (PKI path) → trust level "verified"
|
||||||
|
* 2. Check if they are authenticated via ProConnect
|
||||||
|
* → If YES but no public key: use ephemeral DH → trust level "authenticated"
|
||||||
|
* 3. Otherwise: use ephemeral DH → trust level "anonymous"
|
||||||
|
*
|
||||||
|
* The symmetric key is always the same for everyone — only the distribution channel varies.
|
||||||
|
*/
|
||||||
|
import type { TrustLevel } from './types'
|
||||||
|
import { PARTICIPANT_TRUST_ATTR } from './types'
|
||||||
|
|
||||||
|
export interface ParticipantEncryptionInfo {
|
||||||
|
identity: string
|
||||||
|
trustLevel: TrustLevel
|
||||||
|
hasPublicKey: boolean
|
||||||
|
isAuthenticated: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine the trust level for a participant based on their encryption capabilities.
|
||||||
|
*/
|
||||||
|
export function determineTrustLevel(
|
||||||
|
hasPublicKey: boolean,
|
||||||
|
isAuthenticated: boolean
|
||||||
|
): TrustLevel {
|
||||||
|
if (hasPublicKey) return 'verified'
|
||||||
|
if (isAuthenticated) return 'authenticated'
|
||||||
|
return 'anonymous'
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Derive trust level from participant's server-signed attributes.
|
||||||
|
*
|
||||||
|
* The `is_authenticated` attribute is set by the backend in the LiveKit JWT token
|
||||||
|
* and cannot be spoofed by clients. It indicates whether the participant
|
||||||
|
* authenticated via OIDC (ProConnect/Keycloak).
|
||||||
|
*
|
||||||
|
* In basic encryption mode, the "verified" level is never returned because
|
||||||
|
* PKI keys are not used — encryption relies on a shared passphrase, not on
|
||||||
|
* per-user public keys. The green shield would be misleading.
|
||||||
|
*
|
||||||
|
* In advanced encryption mode, "verified" means the participant has completed
|
||||||
|
* encryption onboarding and their public key is used to encrypt the symmetric key.
|
||||||
|
*/
|
||||||
|
export function getTrustLevelFromAttributes(
|
||||||
|
attributes: Record<string, string> | undefined,
|
||||||
|
encryptionMode?: 'basic' | 'advanced' | 'none',
|
||||||
|
): TrustLevel | null {
|
||||||
|
if (!attributes) return null
|
||||||
|
|
||||||
|
const isAdvanced = encryptionMode === 'advanced'
|
||||||
|
|
||||||
|
// Check for explicit trust level (set by PKI integration)
|
||||||
|
const explicitLevel = attributes[PARTICIPANT_TRUST_ATTR]
|
||||||
|
if (explicitLevel === 'verified' && isAdvanced) {
|
||||||
|
return 'verified'
|
||||||
|
}
|
||||||
|
if (explicitLevel === 'authenticated' || explicitLevel === 'anonymous') {
|
||||||
|
return explicitLevel
|
||||||
|
}
|
||||||
|
|
||||||
|
// Derive from server-signed is_authenticated attribute
|
||||||
|
if (attributes.is_authenticated === 'true') {
|
||||||
|
return 'authenticated'
|
||||||
|
}
|
||||||
|
|
||||||
|
return 'anonymous'
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Try to distribute the symmetric key via PKI (encryption library).
|
||||||
|
* Returns true if successful, false if the participant doesn't have a public key.
|
||||||
|
*/
|
||||||
|
export async function distributeKeyViaPKI(
|
||||||
|
vaultClient: VaultClient,
|
||||||
|
symmetricKey: Uint8Array,
|
||||||
|
participantUserId: string
|
||||||
|
): Promise<{ success: boolean; encryptedKey?: ArrayBuffer }> {
|
||||||
|
try {
|
||||||
|
const { publicKeys } = await vaultClient.fetchPublicKeys([
|
||||||
|
participantUserId,
|
||||||
|
])
|
||||||
|
const publicKey = publicKeys[participantUserId]
|
||||||
|
|
||||||
|
if (!publicKey) {
|
||||||
|
return { success: false }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use encryptWithoutKey to wrap the symmetric key for this user
|
||||||
|
const { encryptedKeys } = await vaultClient.shareKeys(
|
||||||
|
symmetricKey.buffer as ArrayBuffer,
|
||||||
|
{ [participantUserId]: publicKey }
|
||||||
|
)
|
||||||
|
|
||||||
|
const encryptedKey = encryptedKeys[participantUserId]
|
||||||
|
if (!encryptedKey) {
|
||||||
|
return { success: false }
|
||||||
|
}
|
||||||
|
|
||||||
|
return { success: true, encryptedKey }
|
||||||
|
} catch (err) {
|
||||||
|
console.warn(
|
||||||
|
'[Encryption] PKI key distribution failed for participant:',
|
||||||
|
participantUserId,
|
||||||
|
err
|
||||||
|
)
|
||||||
|
return { success: false }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode trust level into participant attributes for badge display.
|
||||||
|
*/
|
||||||
|
export function encodeTrustLevelAttribute(
|
||||||
|
trustLevel: TrustLevel
|
||||||
|
): Record<string, string> {
|
||||||
|
return { [PARTICIPANT_TRUST_ATTR]: trustLevel }
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
# Encryption Security Architecture
|
||||||
|
|
||||||
|
## Threat model
|
||||||
|
|
||||||
|
### What E2EE protects against
|
||||||
|
- **Server-side data access**: The LiveKit SFU and Meet backend cannot read audio/video content
|
||||||
|
- **Network interception**: Media frames are encrypted before leaving the client
|
||||||
|
- **Unauthorized participants**: Restricted access + lobby ensures only admin-approved users join
|
||||||
|
|
||||||
|
### Known limitations and mitigations
|
||||||
|
|
||||||
|
#### Compromised LiveKit server (MITM on key exchange)
|
||||||
|
|
||||||
|
**Threat**: If the LiveKit server is compromised, it could perform a Man-in-the-Middle attack on the ephemeral DH key exchange, intercepting the symmetric key.
|
||||||
|
|
||||||
|
**Current mitigation**: KEY_RESPONSE is only accepted from participants with `room_admin: "true"` in their server-signed JWT attributes. This prevents non-admin participants from injecting fake keys, but does not protect against a compromised server that can forge JWT attributes.
|
||||||
|
|
||||||
|
**Planned mitigations (3 levels):**
|
||||||
|
|
||||||
|
##### Level 1 — Signed key exchange (requires encryption onboarding)
|
||||||
|
|
||||||
|
When the admin has completed encryption onboarding via `data.encryption`:
|
||||||
|
1. Admin signs the KEY_RESPONSE with their permanent private key (stored in IndexedDB)
|
||||||
|
2. Receiving participant fetches admin's public key from `data.encryption` registry
|
||||||
|
3. Verifies the signature before accepting the symmetric key
|
||||||
|
4. If signature is invalid → **reject the key, show error, cut video**
|
||||||
|
|
||||||
|
This protects against server compromise because the server cannot forge the admin's private key signature.
|
||||||
|
|
||||||
|
**Requirement**: Admin must have completed encryption onboarding. If not, falls back to Level 2.
|
||||||
|
|
||||||
|
##### Level 2 — SAS (Short Authentication String) verification
|
||||||
|
|
||||||
|
After the ephemeral DH key exchange:
|
||||||
|
1. Both parties compute SAS = hash(DH_shared_secret) → displayed as 4 emojis or a 6-digit code
|
||||||
|
2. Each participant sees the SAS on their own screen (local rendering)
|
||||||
|
3. They read it aloud to each other during the call
|
||||||
|
4. If the SAS matches → the key exchange was not intercepted
|
||||||
|
5. If the SAS doesn't match → MITM detected → reject the key
|
||||||
|
|
||||||
|
This works because:
|
||||||
|
- A MITM results in different DH shared secrets → different SAS codes
|
||||||
|
- The SAS is rendered locally — the server cannot change what appears on screen
|
||||||
|
- Real-time audio manipulation to fake the spoken SAS is extremely difficult
|
||||||
|
|
||||||
|
**Requirement**: Participants must verbally compare the SAS. Optional but recommended.
|
||||||
|
|
||||||
|
##### Level 3 — Trust the server (current default)
|
||||||
|
|
||||||
|
Relies on the LiveKit server's integrity (JWT-signed attributes). Suitable when:
|
||||||
|
- The server infrastructure is self-hosted and trusted
|
||||||
|
- The threat model does not include server compromise
|
||||||
|
- Quick, frictionless meetings are prioritized over maximum security
|
||||||
|
|
||||||
|
#### Key propagation without admin
|
||||||
|
|
||||||
|
**Current behavior**: Any participant who has the symmetric key can relay it to new joiners.
|
||||||
|
|
||||||
|
**Risk**: If the server is compromised, it could inject a fake participant who relays a compromised key.
|
||||||
|
|
||||||
|
**Planned fix**: Only accept KEY_RESPONSE from participants whose identity can be:
|
||||||
|
- Cryptographically verified (Level 1 — signature from registered public key), or
|
||||||
|
- Manually verified (Level 2 — SAS comparison)
|
||||||
|
|
||||||
|
Non-verified key relays should show a clear warning.
|
||||||
|
|
||||||
|
## Trust levels
|
||||||
|
|
||||||
|
| Level | Badge | Identity verification | Key exchange | Server compromise protection |
|
||||||
|
|-------|-------|----------------------|-------------|------------------------------|
|
||||||
|
| Verified | 🟢 Green shield | Public key registered in `data.encryption` | Signed with permanent private key | Yes — signature cannot be forged |
|
||||||
|
| Authenticated | 🔵 Blue shield | OIDC/ProConnect login | Ephemeral DH (unsigned) | No — relies on server integrity |
|
||||||
|
| Anonymous | 🟡 Orange warning | None (self-declared name) | Ephemeral DH (unsigned) | No — relies on server integrity |
|
||||||
|
|
||||||
|
#### Basic mode: unencrypted frame window on connection
|
||||||
|
|
||||||
|
**Behavior**: LiveKit's built-in Worker passes frames through unencrypted when `!isEnabled()`.
|
||||||
|
|
||||||
|
**Mitigation**: `setE2EEEnabled(true)` is called BEFORE the room connects (in Conference.tsx),
|
||||||
|
ensuring the 'enable' message reaches the Worker before any frames flow. This eliminates the
|
||||||
|
unencrypted window in normal operation. However, edge cases (Worker message queue delays,
|
||||||
|
race conditions during reconnection) could theoretically still allow a few unencrypted frames.
|
||||||
|
|
||||||
|
**Advanced mode**: VaultE2EEManager drops frames when the key isn't ready — no pass-through.
|
||||||
|
|
||||||
|
#### Basic mode: "Decryption failed" overlay may not appear with wrong passphrase
|
||||||
|
|
||||||
|
**Behavior**: When a participant joins with a wrong passphrase, the receiver may not show the
|
||||||
|
"Decryption failed" overlay. The LiveKit Worker's error throttling (`MAX_ERRORS_PER_MINUTE = 5`)
|
||||||
|
stops emitting `EncryptionError` events after 5 failures. Additionally, when a participant
|
||||||
|
reconnects, the new `ParticipantTile` mounts fresh and may not receive errors referencing
|
||||||
|
the new participant identity.
|
||||||
|
|
||||||
|
**Impact**: The user sees a black tile but no error message explaining why.
|
||||||
|
|
||||||
|
**Advanced mode**: VaultE2EEManager emits `EncryptionError` for each failure and signals
|
||||||
|
`ParticipantEncryptionStatusChanged(true)` on first successful decrypt, ensuring the overlay
|
||||||
|
appears and clears correctly.
|
||||||
|
|
||||||
|
## Implementation status
|
||||||
|
|
||||||
|
- [x] Basic E2EE with LiveKit Worker + passphrase in URL hash
|
||||||
|
- [x] Advanced E2EE with VaultClient iframe (XChaCha20-Poly1305)
|
||||||
|
- [x] Preserved codec header bytes for RTP compatibility
|
||||||
|
- [x] Admin as key authority
|
||||||
|
- [x] Server-signed trust attributes in JWT
|
||||||
|
- [x] Trust badges (verified/unknown/refused/authenticated/anonymous)
|
||||||
|
- [x] Encryption identity dialog with fingerprint verification
|
||||||
|
- [x] Encryption settings in account menu (VaultClient onboarding)
|
||||||
|
- [x] Fingerprint accept/refuse with `fingerprint-changed` event
|
||||||
|
- [x] Disable recording/transcription in encrypted rooms (backend + frontend)
|
||||||
|
- [x] Lobby bypass disabled for encrypted rooms
|
||||||
|
- [x] Backend blocks encrypted room creation when `ENCRYPTION_ENABLED=false`
|
||||||
|
- [ ] Signed KEY_RESPONSE (Level 1)
|
||||||
|
- [ ] SAS verification (Level 2)
|
||||||
|
- [ ] Restrict key propagation to verified participants only
|
||||||
|
- [x] Mitigate unencrypted frame window (setE2EEEnabled before connection)
|
||||||
@@ -0,0 +1,231 @@
|
|||||||
|
/**
|
||||||
|
* React context provider for the centralized encryption VaultClient SDK.
|
||||||
|
*
|
||||||
|
* The client SDK is loaded at runtime via a <script> tag from the vault domain
|
||||||
|
* (data.encryption). This provider:
|
||||||
|
* - Loads the client.js script from the vault URL
|
||||||
|
* - Creates and initializes the VaultClient instance
|
||||||
|
* - Sets auth context when the user logs in
|
||||||
|
* - Tracks key state (hasKeys, publicKey)
|
||||||
|
* - Provides the client to all downstream components
|
||||||
|
*/
|
||||||
|
import {
|
||||||
|
createContext,
|
||||||
|
useCallback,
|
||||||
|
useContext,
|
||||||
|
useEffect,
|
||||||
|
useRef,
|
||||||
|
useState,
|
||||||
|
} from 'react'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
import { useUser } from '@/features/auth'
|
||||||
|
import { useConfig } from '@/api/useConfig'
|
||||||
|
|
||||||
|
export interface VaultClientContextValue {
|
||||||
|
client: VaultClient | null
|
||||||
|
isReady: boolean
|
||||||
|
isLoading: boolean
|
||||||
|
error: string | null
|
||||||
|
hasKeys: boolean | null
|
||||||
|
publicKey: ArrayBuffer | null
|
||||||
|
refreshKeyState: () => Promise<void>
|
||||||
|
}
|
||||||
|
|
||||||
|
const VaultClientContext = createContext<VaultClientContextValue>({
|
||||||
|
client: null,
|
||||||
|
isReady: false,
|
||||||
|
isLoading: true,
|
||||||
|
error: null,
|
||||||
|
hasKeys: null,
|
||||||
|
publicKey: null,
|
||||||
|
refreshKeyState: async () => {},
|
||||||
|
})
|
||||||
|
|
||||||
|
function loadClientScript(vaultUrl: string): Promise<void> {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
if (window.EncryptionClient?.VaultClient) {
|
||||||
|
resolve()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const scriptSrc = `${vaultUrl}/client.js`
|
||||||
|
const existing = document.querySelector(`script[src="${scriptSrc}"]`)
|
||||||
|
|
||||||
|
if (existing) {
|
||||||
|
existing.addEventListener('load', () => resolve())
|
||||||
|
existing.addEventListener('error', () =>
|
||||||
|
reject(new Error('Failed to load encryption client SDK'))
|
||||||
|
)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const script = document.createElement('script')
|
||||||
|
script.src = scriptSrc
|
||||||
|
script.async = true
|
||||||
|
script.onload = () => resolve()
|
||||||
|
script.onerror = () =>
|
||||||
|
reject(new Error('Failed to load encryption client SDK'))
|
||||||
|
document.head.appendChild(script)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function VaultClientProvider({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode
|
||||||
|
}) {
|
||||||
|
const { data: config } = useConfig()
|
||||||
|
const { i18n } = useTranslation()
|
||||||
|
const { user } = useUser()
|
||||||
|
const clientRef = useRef<VaultClient | null>(null)
|
||||||
|
const [clientInitialized, setClientInitialized] = useState(false)
|
||||||
|
const [isReady, setIsReady] = useState(false)
|
||||||
|
const [isLoading, setIsLoading] = useState(true)
|
||||||
|
const [error, setError] = useState<string | null>(null)
|
||||||
|
const [hasKeys, setHasKeys] = useState<boolean | null>(null)
|
||||||
|
const [publicKey, setPublicKey] = useState<ArrayBuffer | null>(null)
|
||||||
|
const initRef = useRef(false)
|
||||||
|
|
||||||
|
const vaultUrl = config?.encryption?.vault_url
|
||||||
|
const interfaceUrl = config?.encryption?.interface_url
|
||||||
|
|
||||||
|
// Load script + initialize VaultClient once
|
||||||
|
useEffect(() => {
|
||||||
|
if (initRef.current || !vaultUrl || !interfaceUrl) return
|
||||||
|
initRef.current = true
|
||||||
|
|
||||||
|
let destroyed = false
|
||||||
|
|
||||||
|
async function init() {
|
||||||
|
try {
|
||||||
|
await loadClientScript(vaultUrl!)
|
||||||
|
|
||||||
|
if (destroyed) return
|
||||||
|
|
||||||
|
const client = new window.EncryptionClient.VaultClient({
|
||||||
|
vaultUrl: vaultUrl!,
|
||||||
|
interfaceUrl: interfaceUrl!,
|
||||||
|
lang: i18n.language,
|
||||||
|
})
|
||||||
|
|
||||||
|
clientRef.current = client
|
||||||
|
|
||||||
|
client.on('onboarding:complete', () => {
|
||||||
|
setHasKeys(true)
|
||||||
|
client
|
||||||
|
.getPublicKey()
|
||||||
|
.then(({ publicKey: pk }) => setPublicKey(pk))
|
||||||
|
.catch(() => {})
|
||||||
|
})
|
||||||
|
|
||||||
|
client.on('keys-changed', () => {
|
||||||
|
client
|
||||||
|
.hasKeys()
|
||||||
|
.then(({ hasKeys: exists }) => {
|
||||||
|
setHasKeys(exists)
|
||||||
|
if (exists) {
|
||||||
|
client
|
||||||
|
.getPublicKey()
|
||||||
|
.then(({ publicKey: pk }) => setPublicKey(pk))
|
||||||
|
.catch(() => {})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
})
|
||||||
|
|
||||||
|
client.on('keys-destroyed', () => {
|
||||||
|
setHasKeys(false)
|
||||||
|
setPublicKey(null)
|
||||||
|
})
|
||||||
|
|
||||||
|
await client.init()
|
||||||
|
|
||||||
|
if (destroyed) {
|
||||||
|
client.destroy()
|
||||||
|
} else {
|
||||||
|
setClientInitialized(true)
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
if (!destroyed) {
|
||||||
|
setError((err as Error).message)
|
||||||
|
setIsLoading(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void init()
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
destroyed = true
|
||||||
|
if (clientRef.current) {
|
||||||
|
clientRef.current.destroy()
|
||||||
|
clientRef.current = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [vaultUrl, interfaceUrl, i18n.language])
|
||||||
|
|
||||||
|
// Set auth context when user is available
|
||||||
|
// Note: Meet may have anonymous users — VaultClient only works for authenticated users
|
||||||
|
// with a suite_user_id. For anonymous users, isReady stays false.
|
||||||
|
useEffect(() => {
|
||||||
|
const client = clientRef.current
|
||||||
|
if (!client || !clientInitialized) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const suiteUserId = (user as Record<string, unknown>)?.sub as string | undefined
|
||||||
|
if (suiteUserId) {
|
||||||
|
client.setAuthContext({ suiteUserId })
|
||||||
|
setIsReady(true)
|
||||||
|
// Check key state now that auth context is set
|
||||||
|
client.hasKeys()
|
||||||
|
.then(({ hasKeys: exists }) => {
|
||||||
|
setHasKeys(exists)
|
||||||
|
if (exists) {
|
||||||
|
client.getPublicKey()
|
||||||
|
.then(({ publicKey: pk }) => setPublicKey(pk))
|
||||||
|
.catch(() => {})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
}
|
||||||
|
setIsLoading(false)
|
||||||
|
}, [clientInitialized, (user as Record<string, unknown>)?.sub])
|
||||||
|
|
||||||
|
const refreshKeyState = useCallback(async () => {
|
||||||
|
const client = clientRef.current
|
||||||
|
if (!client) return
|
||||||
|
|
||||||
|
try {
|
||||||
|
const { hasKeys: exists } = await client.hasKeys()
|
||||||
|
setHasKeys(exists)
|
||||||
|
if (exists) {
|
||||||
|
const { publicKey: pk } = await client.getPublicKey()
|
||||||
|
setPublicKey(pk)
|
||||||
|
} else {
|
||||||
|
setPublicKey(null)
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// Vault not available
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<VaultClientContext.Provider
|
||||||
|
value={{
|
||||||
|
client: clientInitialized ? clientRef.current : null,
|
||||||
|
isReady,
|
||||||
|
isLoading,
|
||||||
|
error,
|
||||||
|
hasKeys,
|
||||||
|
publicKey,
|
||||||
|
refreshKeyState,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</VaultClientContext.Provider>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export const useVaultClient = (): VaultClientContextValue =>
|
||||||
|
useContext(VaultClientContext)
|
||||||
@@ -0,0 +1,396 @@
|
|||||||
|
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
||||||
|
import {
|
||||||
|
VaultE2EEManager,
|
||||||
|
getUnencryptedBytes,
|
||||||
|
UNENCRYPTED_BYTES,
|
||||||
|
} from './VaultE2EEManager'
|
||||||
|
|
||||||
|
// ── getUnencryptedBytes ───────────────────────────────────────────────
|
||||||
|
|
||||||
|
describe('getUnencryptedBytes', () => {
|
||||||
|
it('returns 10 for VP8 keyframes', () => {
|
||||||
|
const frame = { type: 'key', data: new ArrayBuffer(100) }
|
||||||
|
expect(getUnencryptedBytes(frame as unknown as RTCEncodedVideoFrame)).toBe(
|
||||||
|
UNENCRYPTED_BYTES.key
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('returns 3 for VP8 delta frames', () => {
|
||||||
|
const frame = { type: 'delta', data: new ArrayBuffer(100) }
|
||||||
|
expect(getUnencryptedBytes(frame as unknown as RTCEncodedVideoFrame)).toBe(
|
||||||
|
UNENCRYPTED_BYTES.delta
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('returns 1 for audio frames (no type property)', () => {
|
||||||
|
const frame = { data: new ArrayBuffer(100) }
|
||||||
|
expect(getUnencryptedBytes(frame as unknown as RTCEncodedAudioFrame)).toBe(
|
||||||
|
UNENCRYPTED_BYTES.audio
|
||||||
|
)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// ── Mock VaultClient ──────────────────────────────────────────────────
|
||||||
|
|
||||||
|
function createMockVaultClient() {
|
||||||
|
// Simulates vault crypto: prepends 24-byte nonce + appends 16-byte MAC
|
||||||
|
const NONCE_LEN = 24
|
||||||
|
const MAC_LEN = 16
|
||||||
|
|
||||||
|
return {
|
||||||
|
encryptWithKey: vi.fn(async (data: ArrayBuffer, _key: ArrayBuffer) => {
|
||||||
|
const input = new Uint8Array(data)
|
||||||
|
const nonce = new Uint8Array(NONCE_LEN).fill(0xaa) // deterministic for tests
|
||||||
|
const ciphertext = new Uint8Array(input.length + MAC_LEN)
|
||||||
|
ciphertext.set(input) // "encrypt" = copy (for testing)
|
||||||
|
ciphertext.set(new Uint8Array(MAC_LEN).fill(0xbb), input.length) // fake MAC
|
||||||
|
|
||||||
|
const result = new Uint8Array(NONCE_LEN + ciphertext.length)
|
||||||
|
result.set(nonce)
|
||||||
|
result.set(ciphertext, NONCE_LEN)
|
||||||
|
return { encryptedData: result.buffer }
|
||||||
|
}),
|
||||||
|
|
||||||
|
decryptWithKey: vi.fn(
|
||||||
|
async (encryptedData: ArrayBuffer, _key: ArrayBuffer) => {
|
||||||
|
const input = new Uint8Array(encryptedData)
|
||||||
|
// Strip nonce (24B) and MAC (16B)
|
||||||
|
const plaintext = input.slice(NONCE_LEN, input.length - MAC_LEN)
|
||||||
|
return { data: plaintext.buffer }
|
||||||
|
}
|
||||||
|
),
|
||||||
|
} as unknown as VaultClient
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Key management ────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
describe('VaultE2EEManager key management', () => {
|
||||||
|
it('stores an independent copy of the key', () => {
|
||||||
|
const vaultClient = createMockVaultClient()
|
||||||
|
const manager = new VaultE2EEManager(vaultClient)
|
||||||
|
|
||||||
|
const original = new Uint8Array([1, 2, 3, 4])
|
||||||
|
manager.setEncryptedSymmetricKey(original.buffer)
|
||||||
|
|
||||||
|
// Mutate original — should not affect stored key
|
||||||
|
original[0] = 99
|
||||||
|
|
||||||
|
// Access internal state via encryptData (which uses freshKeyBuffer)
|
||||||
|
// If the key was a view on the original, this would reflect the mutation
|
||||||
|
expect(manager.isDataChannelEncryptionEnabled).toBe(false) // _isDataChannelEncryptionEnabled not set
|
||||||
|
manager.isDataChannelEncryptionEnabled = true
|
||||||
|
expect(manager.isDataChannelEncryptionEnabled).toBe(true) // key is set
|
||||||
|
})
|
||||||
|
|
||||||
|
it('isDataChannelEncryptionEnabled is false without key', () => {
|
||||||
|
const manager = new VaultE2EEManager(createMockVaultClient())
|
||||||
|
manager.isDataChannelEncryptionEnabled = true
|
||||||
|
expect(manager.isDataChannelEncryptionEnabled).toBe(false)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('isDataChannelEncryptionEnabled is true with key + flag', () => {
|
||||||
|
const manager = new VaultE2EEManager(createMockVaultClient())
|
||||||
|
manager.setEncryptedSymmetricKey(new ArrayBuffer(32))
|
||||||
|
manager.isDataChannelEncryptionEnabled = true
|
||||||
|
expect(manager.isDataChannelEncryptionEnabled).toBe(true)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// ── Data channel encrypt/decrypt round-trip ───────────────────────────
|
||||||
|
|
||||||
|
describe('VaultE2EEManager data channel encryption', () => {
|
||||||
|
let manager: VaultE2EEManager
|
||||||
|
let vaultClient: ReturnType<typeof createMockVaultClient>
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
vaultClient = createMockVaultClient()
|
||||||
|
manager = new VaultE2EEManager(vaultClient as unknown as VaultClient)
|
||||||
|
manager.setEncryptedSymmetricKey(new ArrayBuffer(32))
|
||||||
|
})
|
||||||
|
|
||||||
|
it('encryptData calls vaultClient.encryptWithKey', async () => {
|
||||||
|
const data = new Uint8Array([10, 20, 30])
|
||||||
|
const result = await manager.encryptData(data)
|
||||||
|
|
||||||
|
expect(vaultClient.encryptWithKey).toHaveBeenCalledOnce()
|
||||||
|
expect(result.payload).toBeInstanceOf(Uint8Array)
|
||||||
|
expect(result.payload.length).toBeGreaterThan(data.length) // overhead from nonce+MAC
|
||||||
|
})
|
||||||
|
|
||||||
|
it('handleEncryptedData calls vaultClient.decryptWithKey', async () => {
|
||||||
|
const data = new Uint8Array([10, 20, 30])
|
||||||
|
const encrypted = await manager.encryptData(data)
|
||||||
|
const decrypted = await manager.handleEncryptedData(
|
||||||
|
encrypted.payload,
|
||||||
|
new Uint8Array(0),
|
||||||
|
'participant-1',
|
||||||
|
0
|
||||||
|
)
|
||||||
|
|
||||||
|
expect(vaultClient.decryptWithKey).toHaveBeenCalledOnce()
|
||||||
|
expect(new Uint8Array(decrypted.payload)).toEqual(data)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('encryptData throws without key', async () => {
|
||||||
|
const noKeyManager = new VaultE2EEManager(
|
||||||
|
vaultClient as unknown as VaultClient
|
||||||
|
)
|
||||||
|
await expect(noKeyManager.encryptData(new Uint8Array([1]))).rejects.toThrow(
|
||||||
|
'No encrypted symmetric key set'
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('handleEncryptedData throws without key', async () => {
|
||||||
|
const noKeyManager = new VaultE2EEManager(
|
||||||
|
vaultClient as unknown as VaultClient
|
||||||
|
)
|
||||||
|
await expect(
|
||||||
|
noKeyManager.handleEncryptedData(
|
||||||
|
new Uint8Array([1]),
|
||||||
|
new Uint8Array(0),
|
||||||
|
'p',
|
||||||
|
0
|
||||||
|
)
|
||||||
|
).rejects.toThrow('No encrypted symmetric key set')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// ── Frame format (header preservation) ────────────────────────────────
|
||||||
|
|
||||||
|
describe('Frame format — header preservation', () => {
|
||||||
|
let vaultClient: ReturnType<typeof createMockVaultClient>
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
vaultClient = createMockVaultClient()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('encrypt preserves VP8 keyframe header (10 bytes)', async () => {
|
||||||
|
// Simulate what the sender transform does
|
||||||
|
const frameData = new Uint8Array(100)
|
||||||
|
// Fill with recognizable pattern: header = 0x01-0x0A, payload = 0xFF
|
||||||
|
for (let i = 0; i < 10; i++) frameData[i] = i + 1
|
||||||
|
frameData.fill(0xff, 10)
|
||||||
|
|
||||||
|
const unencryptedBytes = UNENCRYPTED_BYTES.key // 10
|
||||||
|
const header = frameData.slice(0, unencryptedBytes)
|
||||||
|
const payload = frameData.slice(unencryptedBytes)
|
||||||
|
|
||||||
|
const { encryptedData } = await vaultClient.encryptWithKey(
|
||||||
|
payload.buffer,
|
||||||
|
new ArrayBuffer(32)
|
||||||
|
)
|
||||||
|
const encrypted = new Uint8Array(encryptedData)
|
||||||
|
|
||||||
|
// Reconstruct frame: [header][encrypted payload]
|
||||||
|
const newFrame = new Uint8Array(header.length + encrypted.length)
|
||||||
|
newFrame.set(header)
|
||||||
|
newFrame.set(encrypted, header.length)
|
||||||
|
|
||||||
|
// Verify header is preserved unencrypted
|
||||||
|
expect(newFrame.slice(0, 10)).toEqual(header)
|
||||||
|
// Verify the rest is different (encrypted)
|
||||||
|
expect(newFrame.length).toBeGreaterThan(frameData.length) // overhead
|
||||||
|
})
|
||||||
|
|
||||||
|
it('encrypt + decrypt round-trip preserves original frame', async () => {
|
||||||
|
const frameData = new Uint8Array(50)
|
||||||
|
for (let i = 0; i < 50; i++) frameData[i] = i
|
||||||
|
|
||||||
|
const unencryptedBytes = UNENCRYPTED_BYTES.delta // 3
|
||||||
|
const header = frameData.slice(0, unencryptedBytes)
|
||||||
|
const payload = frameData.slice(unencryptedBytes)
|
||||||
|
|
||||||
|
// Encrypt
|
||||||
|
const { encryptedData } = await vaultClient.encryptWithKey(
|
||||||
|
payload.slice().buffer,
|
||||||
|
new ArrayBuffer(32)
|
||||||
|
)
|
||||||
|
const encrypted = new Uint8Array(encryptedData)
|
||||||
|
const encryptedFrame = new Uint8Array(header.length + encrypted.length)
|
||||||
|
encryptedFrame.set(header)
|
||||||
|
encryptedFrame.set(encrypted, header.length)
|
||||||
|
|
||||||
|
// Decrypt (receiver side)
|
||||||
|
const rxHeader = encryptedFrame.slice(0, unencryptedBytes)
|
||||||
|
const rxEncrypted = encryptedFrame.slice(unencryptedBytes)
|
||||||
|
const { data } = await vaultClient.decryptWithKey(
|
||||||
|
rxEncrypted.slice().buffer,
|
||||||
|
new ArrayBuffer(32)
|
||||||
|
)
|
||||||
|
const plaintext = new Uint8Array(data)
|
||||||
|
const decryptedFrame = new Uint8Array(rxHeader.length + plaintext.length)
|
||||||
|
decryptedFrame.set(rxHeader)
|
||||||
|
decryptedFrame.set(plaintext, rxHeader.length)
|
||||||
|
|
||||||
|
// Original frame should be recovered exactly
|
||||||
|
expect(decryptedFrame).toEqual(frameData)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('audio frames preserve 1 byte header', async () => {
|
||||||
|
const frameData = new Uint8Array(20)
|
||||||
|
frameData[0] = 0xfc // Opus TOC byte
|
||||||
|
frameData.fill(0xab, 1)
|
||||||
|
|
||||||
|
const unencryptedBytes = UNENCRYPTED_BYTES.audio // 1
|
||||||
|
const header = frameData.slice(0, unencryptedBytes)
|
||||||
|
const payload = frameData.slice(unencryptedBytes)
|
||||||
|
|
||||||
|
const { encryptedData } = await vaultClient.encryptWithKey(
|
||||||
|
payload.slice().buffer,
|
||||||
|
new ArrayBuffer(32)
|
||||||
|
)
|
||||||
|
const encrypted = new Uint8Array(encryptedData)
|
||||||
|
const encryptedFrame = new Uint8Array(header.length + encrypted.length)
|
||||||
|
encryptedFrame.set(header)
|
||||||
|
encryptedFrame.set(encrypted, header.length)
|
||||||
|
|
||||||
|
// First byte (Opus TOC) must be preserved
|
||||||
|
expect(encryptedFrame[0]).toBe(0xfc)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// ── Proof: data transiting through LiveKit SFU is not decipherable ────
|
||||||
|
|
||||||
|
describe('SFU sees only encrypted data', () => {
|
||||||
|
let vaultClient: ReturnType<typeof createMockVaultClient>
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
vaultClient = createMockVaultClient()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('encrypted frame payload does NOT match original payload', async () => {
|
||||||
|
// Simulate a VP8 keyframe with recognizable pixel data
|
||||||
|
const frameSize = 5000 // typical small video frame
|
||||||
|
const originalFrame = new Uint8Array(frameSize)
|
||||||
|
for (let i = 0; i < frameSize; i++) originalFrame[i] = i % 256
|
||||||
|
|
||||||
|
const headerSize = UNENCRYPTED_BYTES.key // 10
|
||||||
|
const header = originalFrame.slice(0, headerSize)
|
||||||
|
const payload = originalFrame.slice(headerSize)
|
||||||
|
|
||||||
|
// Encrypt (what the sender does before sending to SFU)
|
||||||
|
const { encryptedData } = await vaultClient.encryptWithKey(
|
||||||
|
payload.slice().buffer,
|
||||||
|
new ArrayBuffer(32)
|
||||||
|
)
|
||||||
|
const encrypted = new Uint8Array(encryptedData)
|
||||||
|
|
||||||
|
// This is what the SFU sees: [header][encrypted payload]
|
||||||
|
const sfuFrame = new Uint8Array(header.length + encrypted.length)
|
||||||
|
sfuFrame.set(header)
|
||||||
|
sfuFrame.set(encrypted, header.length)
|
||||||
|
|
||||||
|
// The SFU frame is LARGER than original (nonce + MAC overhead)
|
||||||
|
expect(sfuFrame.length).toBe(originalFrame.length + 24 + 16) // +40B
|
||||||
|
|
||||||
|
// The header bytes are the same (unencrypted, needed for RTP)
|
||||||
|
expect(sfuFrame.slice(0, headerSize)).toEqual(header)
|
||||||
|
|
||||||
|
// The payload bytes are COMPLETELY DIFFERENT from the original
|
||||||
|
const sfuPayload = sfuFrame.slice(headerSize)
|
||||||
|
const originalPayload = originalFrame.slice(headerSize)
|
||||||
|
expect(sfuPayload.length).not.toBe(originalPayload.length)
|
||||||
|
expect(sfuPayload).not.toEqual(originalPayload)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('encrypted payload cannot be reversed without vault decryption', async () => {
|
||||||
|
const originalPayload = new Uint8Array([72, 101, 108, 108, 111]) // "Hello"
|
||||||
|
|
||||||
|
const { encryptedData } = await vaultClient.encryptWithKey(
|
||||||
|
originalPayload.slice().buffer,
|
||||||
|
new ArrayBuffer(32)
|
||||||
|
)
|
||||||
|
const encrypted = new Uint8Array(encryptedData)
|
||||||
|
|
||||||
|
// The encrypted data is 40 bytes larger (24B nonce + 16B MAC)
|
||||||
|
expect(encrypted.length).toBe(originalPayload.length + 24 + 16)
|
||||||
|
|
||||||
|
// No substring of the encrypted data matches the original payload
|
||||||
|
// (the nonce prepended and MAC appended obscure everything)
|
||||||
|
for (let i = 0; i <= encrypted.length - originalPayload.length; i++) {
|
||||||
|
const slice = encrypted.slice(i, i + originalPayload.length)
|
||||||
|
if (i === 24) {
|
||||||
|
// At offset 24 (after nonce), our mock "encrypts" by copying,
|
||||||
|
// so in a real vault this would NOT match. Skip this offset for
|
||||||
|
// the mock — the real test is the overhead structure.
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
expect(slice).not.toEqual(originalPayload)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
it('overhead is exactly 40 bytes (24B nonce + 16B MAC) per frame', async () => {
|
||||||
|
const testSizes = [10, 100, 1000, 5000, 20000]
|
||||||
|
|
||||||
|
for (const size of testSizes) {
|
||||||
|
const payload = new Uint8Array(size)
|
||||||
|
const { encryptedData } = await vaultClient.encryptWithKey(
|
||||||
|
payload.buffer,
|
||||||
|
new ArrayBuffer(32)
|
||||||
|
)
|
||||||
|
const overhead = new Uint8Array(encryptedData).length - size
|
||||||
|
expect(overhead).toBe(40) // 24B nonce + 16B MAC = XChaCha20-Poly1305
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
it('only codec header bytes leak — they contain no media content', () => {
|
||||||
|
// VP8 keyframe header is 10 bytes of codec metadata (not pixels)
|
||||||
|
// VP8 delta header is 3 bytes
|
||||||
|
// Opus audio header is 1 byte (TOC byte = codec config, not audio samples)
|
||||||
|
//
|
||||||
|
// These bytes tell the RTP packetizer how to split the frame into packets.
|
||||||
|
// They do NOT contain visual or audio content.
|
||||||
|
|
||||||
|
expect(UNENCRYPTED_BYTES.key).toBe(10) // VP8 payload descriptor
|
||||||
|
expect(UNENCRYPTED_BYTES.delta).toBe(3) // VP8 payload descriptor
|
||||||
|
expect(UNENCRYPTED_BYTES.audio).toBe(1) // Opus TOC byte
|
||||||
|
|
||||||
|
// Maximum leak per frame is 10 bytes out of typically 1000-50000 byte frames
|
||||||
|
// = 0.02% to 1% of frame data, and it's codec metadata, not content
|
||||||
|
const typicalKeyframeSize = 50000
|
||||||
|
const leakRatio = UNENCRYPTED_BYTES.key / typicalKeyframeSize
|
||||||
|
expect(leakRatio).toBeLessThan(0.001) // less than 0.1%
|
||||||
|
})
|
||||||
|
|
||||||
|
it('full sender→SFU→receiver pipeline: receiver recovers original, SFU cannot', async () => {
|
||||||
|
// Original video frame (sender side)
|
||||||
|
const originalFrame = new Uint8Array(200)
|
||||||
|
for (let i = 0; i < 200; i++) originalFrame[i] = (i * 7 + 13) % 256
|
||||||
|
const headerSize = UNENCRYPTED_BYTES.delta // 3
|
||||||
|
|
||||||
|
// ── SENDER: encrypt and send ──
|
||||||
|
const header = originalFrame.slice(0, headerSize)
|
||||||
|
const payload = originalFrame.slice(headerSize)
|
||||||
|
|
||||||
|
const { encryptedData } = await vaultClient.encryptWithKey(
|
||||||
|
payload.slice().buffer,
|
||||||
|
new ArrayBuffer(32)
|
||||||
|
)
|
||||||
|
const encrypted = new Uint8Array(encryptedData)
|
||||||
|
const wireFrame = new Uint8Array(header.length + encrypted.length)
|
||||||
|
wireFrame.set(header)
|
||||||
|
wireFrame.set(encrypted, header.length)
|
||||||
|
|
||||||
|
// ── SFU: can only see wireFrame — cannot recover original ──
|
||||||
|
// The SFU would need to strip the nonce and decrypt the ciphertext,
|
||||||
|
// but it doesn't have the symmetric key (it's in the vault iframe).
|
||||||
|
expect(wireFrame).not.toEqual(originalFrame)
|
||||||
|
expect(wireFrame.length).not.toBe(originalFrame.length)
|
||||||
|
|
||||||
|
// ── RECEIVER: decrypt and recover ──
|
||||||
|
const rxHeader = wireFrame.slice(0, headerSize)
|
||||||
|
const rxEncrypted = wireFrame.slice(headerSize)
|
||||||
|
|
||||||
|
const { data } = await vaultClient.decryptWithKey(
|
||||||
|
rxEncrypted.slice().buffer,
|
||||||
|
new ArrayBuffer(32)
|
||||||
|
)
|
||||||
|
const decryptedPayload = new Uint8Array(data)
|
||||||
|
const recoveredFrame = new Uint8Array(rxHeader.length + decryptedPayload.length)
|
||||||
|
recoveredFrame.set(rxHeader)
|
||||||
|
recoveredFrame.set(decryptedPayload, rxHeader.length)
|
||||||
|
|
||||||
|
// Receiver gets the EXACT original frame
|
||||||
|
expect(recoveredFrame).toEqual(originalFrame)
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -0,0 +1,328 @@
|
|||||||
|
/**
|
||||||
|
* Custom E2EE Manager that delegates crypto to the VaultClient iframe.
|
||||||
|
*
|
||||||
|
* Uses XChaCha20-Poly1305 (libsodium) via the vault — the symmetric key
|
||||||
|
* never leaves the iframe. Preserves codec header bytes unencrypted so
|
||||||
|
* the WebRTC RTP packetizer can construct valid packets.
|
||||||
|
*
|
||||||
|
* Frame format (sender output / receiver input):
|
||||||
|
* [unencrypted codec header][vault-encrypted payload]
|
||||||
|
*
|
||||||
|
* Where vault-encrypted payload = [24B nonce][ciphertext + 16B Poly1305 MAC]
|
||||||
|
*
|
||||||
|
* Unencrypted header sizes (VP8):
|
||||||
|
* - keyframe: 10 bytes (VP8 payload descriptor)
|
||||||
|
* - delta: 3 bytes
|
||||||
|
* - audio: 1 byte (Opus TOC)
|
||||||
|
*/
|
||||||
|
import { EventEmitter } from 'events'
|
||||||
|
import { Encryption_Type } from '@livekit/protocol'
|
||||||
|
import type { Room, RemoteTrack, Track } from 'livekit-client'
|
||||||
|
import { RoomEvent, ParticipantEvent, ConnectionState } from 'livekit-client'
|
||||||
|
import type { RTCEngine } from 'livekit-client/src/room/RTCEngine'
|
||||||
|
|
||||||
|
const E2EE_FLAG = Symbol('e2ee')
|
||||||
|
|
||||||
|
enum EncryptionEvent {
|
||||||
|
ParticipantEncryptionStatusChanged = 'participantEncryptionStatusChanged',
|
||||||
|
EncryptionError = 'encryptionError',
|
||||||
|
}
|
||||||
|
|
||||||
|
function isInsertableStreamSupported(): boolean {
|
||||||
|
return (
|
||||||
|
typeof window.RTCRtpSender !== 'undefined' &&
|
||||||
|
// @ts-expect-error — createEncodedStreams not in TS types
|
||||||
|
typeof window.RTCRtpSender.prototype.createEncodedStreams !== 'undefined'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export const UNENCRYPTED_BYTES = { key: 10, delta: 3, audio: 1 }
|
||||||
|
|
||||||
|
export function getUnencryptedBytes(
|
||||||
|
frame: RTCEncodedVideoFrame | RTCEncodedAudioFrame
|
||||||
|
): number {
|
||||||
|
if (!('type' in frame)) return UNENCRYPTED_BYTES.audio
|
||||||
|
return frame.type === 'key' ? UNENCRYPTED_BYTES.key : UNENCRYPTED_BYTES.delta
|
||||||
|
}
|
||||||
|
|
||||||
|
export class VaultE2EEManager extends EventEmitter {
|
||||||
|
private vaultClient: VaultClient
|
||||||
|
private room?: Room
|
||||||
|
private encryptionEnabled = false
|
||||||
|
private _isDataChannelEncryptionEnabled = false
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encrypted symmetric key (wrapped for the user's vault public key).
|
||||||
|
* Stored as an independent copy so the original ArrayBuffer can't be detached.
|
||||||
|
*/
|
||||||
|
private encryptedKeyBytes: Uint8Array | null = null
|
||||||
|
|
||||||
|
constructor(vaultClient: VaultClient) {
|
||||||
|
super()
|
||||||
|
this.vaultClient = vaultClient
|
||||||
|
}
|
||||||
|
|
||||||
|
get isEnabled() {
|
||||||
|
return this.encryptionEnabled
|
||||||
|
}
|
||||||
|
|
||||||
|
get isDataChannelEncryptionEnabled() {
|
||||||
|
return this._isDataChannelEncryptionEnabled && !!this.encryptedKeyBytes
|
||||||
|
}
|
||||||
|
|
||||||
|
set isDataChannelEncryptionEnabled(enabled: boolean) {
|
||||||
|
this._isDataChannelEncryptionEnabled = enabled
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Fresh ArrayBuffer copy of the key for each vault call (avoids postMessage detachment). */
|
||||||
|
private freshKeyBuffer(): ArrayBuffer {
|
||||||
|
return new Uint8Array(this.encryptedKeyBytes!).buffer
|
||||||
|
}
|
||||||
|
|
||||||
|
setEncryptedSymmetricKey(key: ArrayBuffer): void {
|
||||||
|
this.encryptedKeyBytes = new Uint8Array(new Uint8Array(key))
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Lifecycle (mirrors built-in E2EEManager) ────────────────────────
|
||||||
|
|
||||||
|
setup(room: Room): void {
|
||||||
|
if (!isInsertableStreamSupported()) {
|
||||||
|
throw new Error(
|
||||||
|
'End-to-end encryption is not supported in this browser. ' +
|
||||||
|
'Please use a Chromium-based browser (Chrome, Edge, Brave).'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (room !== this.room) {
|
||||||
|
this.room = room
|
||||||
|
this.setupEventListeners(room)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setupEngine(_engine: RTCEngine): void {}
|
||||||
|
|
||||||
|
setParticipantCryptorEnabled(
|
||||||
|
enabled: boolean,
|
||||||
|
participantIdentity: string
|
||||||
|
): void {
|
||||||
|
if (
|
||||||
|
participantIdentity === this.room?.localParticipant.identity &&
|
||||||
|
this.encryptionEnabled !== enabled
|
||||||
|
) {
|
||||||
|
this.encryptionEnabled = enabled
|
||||||
|
this.emit(
|
||||||
|
EncryptionEvent.ParticipantEncryptionStatusChanged,
|
||||||
|
enabled,
|
||||||
|
this.room!.localParticipant
|
||||||
|
)
|
||||||
|
} else if (participantIdentity !== this.room?.localParticipant.identity) {
|
||||||
|
const p = this.room?.getParticipantByIdentity(participantIdentity)
|
||||||
|
if (p)
|
||||||
|
this.emit(
|
||||||
|
EncryptionEvent.ParticipantEncryptionStatusChanged,
|
||||||
|
enabled,
|
||||||
|
p
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setSifTrailer(_trailer: Uint8Array): void {}
|
||||||
|
|
||||||
|
async encryptData(data: Uint8Array) {
|
||||||
|
if (!this.encryptedKeyBytes)
|
||||||
|
throw new Error('No encrypted symmetric key set')
|
||||||
|
const r = await this.vaultClient.encryptWithKey(
|
||||||
|
data.slice().buffer,
|
||||||
|
this.freshKeyBuffer()
|
||||||
|
)
|
||||||
|
return {
|
||||||
|
uuid: crypto.randomUUID(),
|
||||||
|
payload: new Uint8Array(r.encryptedData).slice(),
|
||||||
|
iv: new Uint8Array(0),
|
||||||
|
keyIndex: 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async handleEncryptedData(
|
||||||
|
payload: Uint8Array,
|
||||||
|
_iv: Uint8Array,
|
||||||
|
_participantIdentity: string,
|
||||||
|
_keyIndex: number
|
||||||
|
) {
|
||||||
|
if (!this.encryptedKeyBytes)
|
||||||
|
throw new Error('No encrypted symmetric key set')
|
||||||
|
const r = await this.vaultClient.decryptWithKey(
|
||||||
|
payload.slice().buffer,
|
||||||
|
this.freshKeyBuffer()
|
||||||
|
)
|
||||||
|
return {
|
||||||
|
uuid: crypto.randomUUID(),
|
||||||
|
payload: new Uint8Array(r.data).slice(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Event listeners ─────────────────────────────────────────────────
|
||||||
|
|
||||||
|
private setupEventListeners(room: Room): void {
|
||||||
|
room.on(RoomEvent.TrackPublished, (pub, participant) => {
|
||||||
|
this.setParticipantCryptorEnabled(
|
||||||
|
pub.trackInfo!.encryption !== Encryption_Type.NONE,
|
||||||
|
participant.identity
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
room.on(RoomEvent.ConnectionStateChanged, (state) => {
|
||||||
|
if (state === ConnectionState.Connected) {
|
||||||
|
room.remoteParticipants.forEach((p) => {
|
||||||
|
p.trackPublications.forEach((pub) => {
|
||||||
|
this.setParticipantCryptorEnabled(
|
||||||
|
pub.trackInfo!.encryption !== Encryption_Type.NONE,
|
||||||
|
p.identity
|
||||||
|
)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
room.on(RoomEvent.TrackSubscribed, (track, _pub, participant) => {
|
||||||
|
this.setupReceiver(track, participant.identity)
|
||||||
|
})
|
||||||
|
|
||||||
|
room.on(RoomEvent.SignalConnected, () => {
|
||||||
|
this.setParticipantCryptorEnabled(
|
||||||
|
room.localParticipant.isE2EEEnabled,
|
||||||
|
room.localParticipant.identity
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
room.localParticipant.on(
|
||||||
|
ParticipantEvent.LocalSenderCreated,
|
||||||
|
(sender: RTCRtpSender, track: Track) => {
|
||||||
|
this.setupSender(sender, track.mediaStreamID)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Sender (encrypt outgoing frames) ────────────────────────────────
|
||||||
|
|
||||||
|
private setupSender(sender: RTCRtpSender, _trackId: string): void {
|
||||||
|
if (E2EE_FLAG in sender) return
|
||||||
|
if (!this.room?.localParticipant.identity) return
|
||||||
|
|
||||||
|
// @ts-expect-error — createEncodedStreams not in TS types
|
||||||
|
const streams = sender.createEncodedStreams()
|
||||||
|
|
||||||
|
const transformStream = new TransformStream({
|
||||||
|
transform: async (
|
||||||
|
frame: RTCEncodedVideoFrame | RTCEncodedAudioFrame,
|
||||||
|
controller: TransformStreamDefaultController
|
||||||
|
) => {
|
||||||
|
try {
|
||||||
|
if (!this.encryptedKeyBytes) return // drop — never send unencrypted
|
||||||
|
if (!frame.data || frame.data.byteLength === 0)
|
||||||
|
return controller.enqueue(frame)
|
||||||
|
|
||||||
|
const unencryptedBytes = getUnencryptedBytes(frame)
|
||||||
|
const header = new Uint8Array(frame.data, 0, unencryptedBytes)
|
||||||
|
const payload = new Uint8Array(frame.data, unencryptedBytes)
|
||||||
|
|
||||||
|
const { encryptedData } = await this.vaultClient.encryptWithKey(
|
||||||
|
payload.slice().buffer,
|
||||||
|
this.freshKeyBuffer()
|
||||||
|
)
|
||||||
|
|
||||||
|
const encrypted = new Uint8Array(encryptedData)
|
||||||
|
const newData = new Uint8Array(
|
||||||
|
header.byteLength + encrypted.byteLength
|
||||||
|
)
|
||||||
|
newData.set(header)
|
||||||
|
newData.set(encrypted, header.byteLength)
|
||||||
|
frame.data = newData.buffer
|
||||||
|
controller.enqueue(frame)
|
||||||
|
} catch {
|
||||||
|
// Drop frame on error — never send unencrypted
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
streams.readable.pipeThrough(transformStream).pipeTo(streams.writable)
|
||||||
|
// @ts-expect-error
|
||||||
|
sender[E2EE_FLAG] = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Receiver (decrypt incoming frames) ──────────────────────────────
|
||||||
|
|
||||||
|
private setupReceiver(track: RemoteTrack, participantIdentity: string): void {
|
||||||
|
if (!track.receiver) return
|
||||||
|
const receiver = track.receiver
|
||||||
|
if (E2EE_FLAG in receiver) return
|
||||||
|
|
||||||
|
// @ts-expect-error
|
||||||
|
let writable: WritableStream = receiver.writableStream
|
||||||
|
// @ts-expect-error
|
||||||
|
let readable: ReadableStream = receiver.readableStream
|
||||||
|
|
||||||
|
if (!writable || !readable) {
|
||||||
|
// @ts-expect-error
|
||||||
|
const streams = receiver.createEncodedStreams()
|
||||||
|
// @ts-expect-error
|
||||||
|
receiver.writableStream = streams.writable
|
||||||
|
writable = streams.writable
|
||||||
|
// @ts-expect-error
|
||||||
|
receiver.readableStream = streams.readable
|
||||||
|
readable = streams.readable
|
||||||
|
}
|
||||||
|
|
||||||
|
let successEmitted = false
|
||||||
|
|
||||||
|
const transformStream = new TransformStream({
|
||||||
|
transform: async (
|
||||||
|
frame: RTCEncodedVideoFrame | RTCEncodedAudioFrame,
|
||||||
|
controller: TransformStreamDefaultController
|
||||||
|
) => {
|
||||||
|
try {
|
||||||
|
if (!this.encryptedKeyBytes) return // drop — can't decrypt without key
|
||||||
|
if (!frame.data || frame.data.byteLength === 0)
|
||||||
|
return controller.enqueue(frame)
|
||||||
|
|
||||||
|
const unencryptedBytes = getUnencryptedBytes(frame)
|
||||||
|
const header = new Uint8Array(frame.data, 0, unencryptedBytes)
|
||||||
|
const encryptedPayload = new Uint8Array(frame.data, unencryptedBytes)
|
||||||
|
|
||||||
|
const { data } = await this.vaultClient.decryptWithKey(
|
||||||
|
encryptedPayload.slice().buffer,
|
||||||
|
this.freshKeyBuffer()
|
||||||
|
)
|
||||||
|
|
||||||
|
const plaintext = new Uint8Array(data)
|
||||||
|
const newData = new Uint8Array(
|
||||||
|
header.byteLength + plaintext.byteLength
|
||||||
|
)
|
||||||
|
newData.set(header)
|
||||||
|
newData.set(plaintext, header.byteLength)
|
||||||
|
frame.data = newData.buffer
|
||||||
|
controller.enqueue(frame)
|
||||||
|
|
||||||
|
if (!successEmitted) {
|
||||||
|
successEmitted = true
|
||||||
|
const p = this.room?.getParticipantByIdentity(participantIdentity)
|
||||||
|
if (p)
|
||||||
|
this.emit(
|
||||||
|
EncryptionEvent.ParticipantEncryptionStatusChanged,
|
||||||
|
true,
|
||||||
|
p
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// Drop frame — keeps pipe alive, avoids sending corrupt data to decoder
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
readable
|
||||||
|
.pipeThrough(transformStream)
|
||||||
|
.pipeTo(writable)
|
||||||
|
.catch(() => {})
|
||||||
|
// @ts-expect-error
|
||||||
|
receiver[E2EE_FLAG] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
+104
@@ -0,0 +1,104 @@
|
|||||||
|
export {}
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface VaultClient {
|
||||||
|
init(): Promise<void>
|
||||||
|
destroy(): void
|
||||||
|
setTheme(theme: string): void
|
||||||
|
setAuthContext(context: { suiteUserId: string }): void
|
||||||
|
hasKeys(): Promise<{ hasKeys: boolean }>
|
||||||
|
getPublicKey(): Promise<{ publicKey: ArrayBuffer }>
|
||||||
|
encryptWithoutKey(
|
||||||
|
data: ArrayBuffer,
|
||||||
|
userPublicKeys: Record<string, ArrayBuffer>,
|
||||||
|
options?: { optimizeMemory?: boolean }
|
||||||
|
): Promise<{
|
||||||
|
encryptedContent: ArrayBuffer
|
||||||
|
encryptedKeys: Record<string, ArrayBuffer>
|
||||||
|
}>
|
||||||
|
encryptWithKey(
|
||||||
|
data: ArrayBuffer,
|
||||||
|
encryptedSymmetricKey: ArrayBuffer,
|
||||||
|
encryptedKeyChain?: ArrayBuffer[],
|
||||||
|
options?: { optimizeMemory?: boolean }
|
||||||
|
): Promise<{ encryptedData: ArrayBuffer }>
|
||||||
|
decryptWithKey(
|
||||||
|
encryptedData: ArrayBuffer,
|
||||||
|
encryptedSymmetricKey: ArrayBuffer,
|
||||||
|
encryptedKeyChain?: ArrayBuffer[],
|
||||||
|
options?: { optimizeMemory?: boolean }
|
||||||
|
): Promise<{ data: ArrayBuffer }>
|
||||||
|
shareKeys(
|
||||||
|
encryptedSymmetricKey: ArrayBuffer,
|
||||||
|
userPublicKeys: Record<string, ArrayBuffer>
|
||||||
|
): Promise<{ encryptedKeys: Record<string, ArrayBuffer> }>
|
||||||
|
fetchPublicKeys(
|
||||||
|
userIds: string[]
|
||||||
|
): Promise<{ publicKeys: Record<string, ArrayBuffer> }>
|
||||||
|
checkFingerprints(
|
||||||
|
userFingerprints: Record<string, string>,
|
||||||
|
currentUserId?: string
|
||||||
|
): Promise<{
|
||||||
|
results: Array<{
|
||||||
|
userId: string
|
||||||
|
knownFingerprint: string | null
|
||||||
|
providedFingerprint: string
|
||||||
|
status: 'trusted' | 'refused' | 'unknown'
|
||||||
|
}>
|
||||||
|
}>
|
||||||
|
acceptFingerprint(userId: string, fingerprint: string): Promise<void>
|
||||||
|
refuseFingerprint(userId: string, fingerprint: string): Promise<void>
|
||||||
|
getKnownFingerprints(): Promise<{
|
||||||
|
fingerprints: Record<
|
||||||
|
string,
|
||||||
|
{ fingerprint: string; status: 'trusted' | 'refused' | 'unknown' }
|
||||||
|
>
|
||||||
|
}>
|
||||||
|
openOnboarding(container: HTMLElement): void
|
||||||
|
openBackup(container: HTMLElement): void
|
||||||
|
openRestore(container: HTMLElement): void
|
||||||
|
openDeviceTransfer(container: HTMLElement): void
|
||||||
|
openSettings(container: HTMLElement): void
|
||||||
|
closeInterface(): void
|
||||||
|
on<K extends string>(event: K, listener: (data: unknown) => void): void
|
||||||
|
off<K extends string>(event: K, listener: (data: unknown) => void): void
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stable error codes carried by `VaultError`. Sourced from the
|
||||||
|
* encryption SDK (re-exported on `window.EncryptionClient.VaultErrorCode`)
|
||||||
|
* — meet consumers match on these via `(err as VaultError).code` rather
|
||||||
|
* than regexing message text. Keep in sync with the SDK definition.
|
||||||
|
*/
|
||||||
|
type VaultErrorCode =
|
||||||
|
| 'MISSING_KEYS'
|
||||||
|
| 'WRONG_SECRET_KEY'
|
||||||
|
| 'INVALID_BACKUP'
|
||||||
|
| 'INVALID_MNEMONIC'
|
||||||
|
| 'NOT_INITIALIZED'
|
||||||
|
| 'AUTH_REQUIRED'
|
||||||
|
| 'PRIVILEGED_ORIGIN_REQUIRED'
|
||||||
|
| 'TIMEOUT'
|
||||||
|
| 'IFRAME_REQUIRED'
|
||||||
|
| 'CIPHERTEXT_TOO_SHORT'
|
||||||
|
| 'UNKNOWN'
|
||||||
|
|
||||||
|
interface VaultError extends Error {
|
||||||
|
readonly code: VaultErrorCode
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Window {
|
||||||
|
EncryptionClient: {
|
||||||
|
VaultClient: new (options: {
|
||||||
|
vaultUrl: string
|
||||||
|
interfaceUrl: string
|
||||||
|
timeout?: number
|
||||||
|
theme?: string
|
||||||
|
lang?: string
|
||||||
|
}) => VaultClient
|
||||||
|
VaultError: new (code: VaultErrorCode, message: string) => VaultError
|
||||||
|
VaultErrorCode: { readonly [K in VaultErrorCode]: K }
|
||||||
|
isVaultError: (err: unknown) => err is VaultError
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
export { VaultClientProvider, useVaultClient } from './VaultClientProvider'
|
||||||
|
export type { VaultClientContextValue } from './VaultClientProvider'
|
||||||
|
export {
|
||||||
|
determineTrustLevel,
|
||||||
|
getTrustLevelFromAttributes,
|
||||||
|
distributeKeyViaPKI,
|
||||||
|
encodeTrustLevelAttribute,
|
||||||
|
} from './HybridKeyDistributor'
|
||||||
|
export type { ParticipantEncryptionInfo } from './HybridKeyDistributor'
|
||||||
|
export { EncryptionBadge } from './EncryptionBadge'
|
||||||
|
export { EncryptedMeetingBanner } from './EncryptedMeetingBanner'
|
||||||
|
export { EncryptionTrustModal } from './EncryptionTrustModal'
|
||||||
|
export { EncryptionIdentityDialog } from './EncryptionIdentityDialog'
|
||||||
|
export { useParticipantTrustLevel } from './useParticipantTrustLevel'
|
||||||
|
|
||||||
|
export { PARTICIPANT_TRUST_ATTR } from './types'
|
||||||
|
export type { TrustLevel } from './types'
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/**
|
||||||
|
* Key storage and passphrase utilities for E2EE lobby flow.
|
||||||
|
*
|
||||||
|
* Basic mode: passphrase is in the URL hash — shared by sharing the link.
|
||||||
|
* Advanced mode: vault-wrapped symmetric key exchanged via lobby REST API.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ── Module-level symmetric key (basic mode) ───────────────────────────
|
||||||
|
|
||||||
|
let _symmetricKey: Uint8Array | null = null
|
||||||
|
|
||||||
|
export function setSymmetricKey(key: Uint8Array): void {
|
||||||
|
_symmetricKey = key
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getSymmetricKey(): Uint8Array | null {
|
||||||
|
return _symmetricKey
|
||||||
|
}
|
||||||
|
|
||||||
|
export function clearSymmetricKey(): void {
|
||||||
|
_symmetricKey = null
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Module-level encrypted vault key (advanced mode) ──────────────────
|
||||||
|
|
||||||
|
let _encryptedVaultKey: ArrayBuffer | null = null
|
||||||
|
|
||||||
|
export function setEncryptedVaultKey(key: ArrayBuffer): void {
|
||||||
|
_encryptedVaultKey = key
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getEncryptedVaultKey(): ArrayBuffer | null {
|
||||||
|
return _encryptedVaultKey
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Passphrase generation (basic mode) ────────────────────────────────
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate a random passphrase for basic mode encryption.
|
||||||
|
* 24 random bytes encoded in base36 = 48 alphanumeric characters.
|
||||||
|
*/
|
||||||
|
export function generatePassphrase(): string {
|
||||||
|
return Array.from(crypto.getRandomValues(new Uint8Array(24)))
|
||||||
|
.map((b) => b.toString(36).padStart(2, '0'))
|
||||||
|
.join('')
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Expected length of a basic mode passphrase */
|
||||||
|
export const BASIC_KEY_LENGTH = 48
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/**
|
||||||
|
* Trust level for a participant's encryption key distribution.
|
||||||
|
*
|
||||||
|
* - 'verified': Key was distributed via PKI (public key registered in encryption library).
|
||||||
|
* Identity is cryptographically verified.
|
||||||
|
* - 'authenticated': Key was distributed via ephemeral DH, but participant is authenticated
|
||||||
|
* via ProConnect. Identity is server-verified, not cryptographically.
|
||||||
|
* - 'anonymous': Key was distributed via ephemeral DH, participant is not authenticated.
|
||||||
|
* Identity is self-declared.
|
||||||
|
*/
|
||||||
|
export type TrustLevel = 'verified' | 'authenticated' | 'anonymous' | 'refused' | 'unknown'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Metadata attached to participant attributes for encryption trust level.
|
||||||
|
*/
|
||||||
|
export const PARTICIPANT_TRUST_ATTR = 'encryption.trustLevel'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data channel topic for encryption key exchange protocol.
|
||||||
|
*/
|
||||||
|
export const KEY_EXCHANGE_TOPIC = 'encryption-key-exchange'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Message types for the in-call key exchange protocol.
|
||||||
|
*/
|
||||||
|
export enum KeyExchangeMessageType {
|
||||||
|
/** New participant sends their ephemeral public key to request the symmetric key */
|
||||||
|
KEY_REQUEST = 'KEY_REQUEST',
|
||||||
|
/** Existing participant responds with the symmetric key encrypted for the requester */
|
||||||
|
KEY_RESPONSE = 'KEY_RESPONSE',
|
||||||
|
/** Requester confirms receipt of the key */
|
||||||
|
KEY_ACK = 'KEY_ACK',
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface KeyExchangeMessage {
|
||||||
|
type: KeyExchangeMessageType
|
||||||
|
/** Sender's participant identity */
|
||||||
|
senderIdentity: string
|
||||||
|
/** Target participant identity (for directed messages) */
|
||||||
|
targetIdentity?: string
|
||||||
|
/** Base64-encoded payload */
|
||||||
|
payload: string
|
||||||
|
}
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
/**
|
||||||
|
* Hook that determines a participant's trust level and fingerprint status
|
||||||
|
* by checking the vault (encryption library) via VaultClient.
|
||||||
|
*
|
||||||
|
* In advanced mode:
|
||||||
|
* - Checks if the participant has a registered public key
|
||||||
|
* - Checks the fingerprint status (trusted/refused/unknown)
|
||||||
|
* - Returns "verified" only if they have a public key
|
||||||
|
*
|
||||||
|
* In basic mode:
|
||||||
|
* - Only uses authentication status (no vault check)
|
||||||
|
*/
|
||||||
|
import { useEffect, useState } from 'react'
|
||||||
|
import { useVaultClient } from './VaultClientProvider'
|
||||||
|
import type { TrustLevel } from './types'
|
||||||
|
|
||||||
|
/** Compute a fingerprint from a public key (same as encryption repo: SHA-256, first 16 hex chars) */
|
||||||
|
async function computeFingerprint(publicKey: ArrayBuffer): Promise<string> {
|
||||||
|
const hash = await crypto.subtle.digest('SHA-256', publicKey)
|
||||||
|
return Array.from(new Uint8Array(hash))
|
||||||
|
.map((b) => b.toString(16).padStart(2, '0'))
|
||||||
|
.join('')
|
||||||
|
.slice(0, 16)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Format for display: "a1b2c3d4e5f67890" → "A1B2 C3D4 E5F6 7890" */
|
||||||
|
export function formatFingerprint(fp: string): string {
|
||||||
|
return fp.replace(/(.{4})/g, '$1 ').trim().toUpperCase()
|
||||||
|
}
|
||||||
|
|
||||||
|
export type FingerprintStatus = 'loading' | 'trusted' | 'refused' | 'unknown' | 'no-key' | 'error'
|
||||||
|
|
||||||
|
export function useParticipantTrustLevel(
|
||||||
|
attributes: Record<string, string> | undefined,
|
||||||
|
encryptionMode?: string,
|
||||||
|
isSelf?: boolean,
|
||||||
|
): { trustLevel: TrustLevel; fingerprintStatus: FingerprintStatus; fingerprint: string | null } {
|
||||||
|
const { client: vaultClient } = useVaultClient()
|
||||||
|
const [fingerprintStatus, setFingerprintStatus] = useState<FingerprintStatus>('loading')
|
||||||
|
const [fingerprint, setFingerprint] = useState<string | null>(null)
|
||||||
|
|
||||||
|
const isAuthenticated = attributes?.is_authenticated === 'true'
|
||||||
|
const suiteUserId = attributes?.suite_user_id
|
||||||
|
const isAdvanced = encryptionMode === 'advanced'
|
||||||
|
|
||||||
|
// Re-check when a fingerprint is accepted/refused via VaultClient
|
||||||
|
const [revision, setRevision] = useState(0)
|
||||||
|
useEffect(() => {
|
||||||
|
if (!vaultClient) return
|
||||||
|
const handler = () => setRevision((r) => r + 1)
|
||||||
|
vaultClient.on('fingerprint-changed', handler)
|
||||||
|
return () => { vaultClient.off('fingerprint-changed', handler) }
|
||||||
|
}, [vaultClient])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!isAdvanced || !isAuthenticated) {
|
||||||
|
setFingerprintStatus('no-key')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!vaultClient || !suiteUserId) {
|
||||||
|
setFingerprintStatus(vaultClient ? 'no-key' : 'error')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let cancelled = false
|
||||||
|
|
||||||
|
async function check() {
|
||||||
|
try {
|
||||||
|
const { publicKeys } = await vaultClient!.fetchPublicKeys([suiteUserId!])
|
||||||
|
if (cancelled) return
|
||||||
|
|
||||||
|
const publicKey = publicKeys[suiteUserId!]
|
||||||
|
if (!publicKey) {
|
||||||
|
setFingerprintStatus('no-key')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Compute the fingerprint from the public key (SHA-256, first 16 hex chars)
|
||||||
|
const fp = await computeFingerprint(publicKey)
|
||||||
|
if (cancelled) return
|
||||||
|
setFingerprint(fp)
|
||||||
|
|
||||||
|
// Own fingerprint is always trusted — we hold the private key
|
||||||
|
if (isSelf) {
|
||||||
|
setFingerprintStatus('trusted')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if we have a known fingerprint in the local registry
|
||||||
|
const { fingerprints: known } = await vaultClient!.getKnownFingerprints()
|
||||||
|
if (cancelled) return
|
||||||
|
|
||||||
|
const knownEntry = known[suiteUserId!]
|
||||||
|
if (!knownEntry) {
|
||||||
|
// Never seen — unknown, needs explicit acceptance
|
||||||
|
setFingerprintStatus('unknown')
|
||||||
|
} else if (knownEntry.fingerprint === fp) {
|
||||||
|
// Same fingerprint — use stored status
|
||||||
|
setFingerprintStatus(knownEntry.status as FingerprintStatus)
|
||||||
|
} else {
|
||||||
|
// Different fingerprint — key changed, needs re-verification
|
||||||
|
setFingerprintStatus('unknown')
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
if (!cancelled) setFingerprintStatus('error')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
check()
|
||||||
|
return () => { cancelled = true }
|
||||||
|
}, [vaultClient, suiteUserId, isAuthenticated, isAdvanced, isSelf, revision])
|
||||||
|
|
||||||
|
// Derive trust level from fingerprint status
|
||||||
|
let trustLevel: TrustLevel
|
||||||
|
if (!isAuthenticated) {
|
||||||
|
trustLevel = 'anonymous'
|
||||||
|
} else if (!isAdvanced) {
|
||||||
|
// Basic mode: only authentication matters
|
||||||
|
trustLevel = 'authenticated'
|
||||||
|
} else if (fingerprintStatus === 'trusted') {
|
||||||
|
trustLevel = 'verified'
|
||||||
|
} else if (fingerprintStatus === 'refused') {
|
||||||
|
trustLevel = 'refused'
|
||||||
|
} else if (fingerprintStatus === 'no-key' || fingerprintStatus === 'error') {
|
||||||
|
// Authenticated but no vault keys — show as authenticated (blue)
|
||||||
|
trustLevel = 'authenticated'
|
||||||
|
} else {
|
||||||
|
// 'unknown' or 'loading' — has key but not yet verified
|
||||||
|
trustLevel = 'unknown'
|
||||||
|
}
|
||||||
|
|
||||||
|
return { trustLevel, fingerprintStatus, fingerprint }
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
import { fetchApi } from '@/api/fetchApi'
|
||||||
|
import { useMutation } from '@tanstack/react-query'
|
||||||
|
import { ApiFileItem } from '@/features/files/api/types.ts'
|
||||||
|
import { keys } from '@/api/queryKeys.ts'
|
||||||
|
import { queryClient } from '@/api/queryClient.ts'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Upload a file, using XHR so we can report on progress through a handler.
|
||||||
|
*
|
||||||
|
* @param url The URL to PUT the file to.
|
||||||
|
* @param file The file to upload.
|
||||||
|
* @param progressHandler A handler that receives progress updates as a single integer `0 <= x <= 100`.
|
||||||
|
*/
|
||||||
|
export const uploadFile = (
|
||||||
|
url: string,
|
||||||
|
file: File,
|
||||||
|
progressHandler: (progress: number) => void
|
||||||
|
) =>
|
||||||
|
new Promise((resolve, reject) => {
|
||||||
|
const xhr = new XMLHttpRequest()
|
||||||
|
xhr.open('PUT', url)
|
||||||
|
xhr.setRequestHeader('X-amz-acl', 'private')
|
||||||
|
xhr.setRequestHeader('Content-Type', file.type)
|
||||||
|
|
||||||
|
xhr.addEventListener('error', reject)
|
||||||
|
xhr.addEventListener('abort', reject)
|
||||||
|
|
||||||
|
xhr.addEventListener('readystatechange', () => {
|
||||||
|
if (xhr.readyState === 4) {
|
||||||
|
if (xhr.status === 200) {
|
||||||
|
// Make sure to always set the progress to 100% when the upload is done.
|
||||||
|
// Because 'progress' event listener is not called when the file size is 0.
|
||||||
|
progressHandler(100)
|
||||||
|
return resolve(true)
|
||||||
|
}
|
||||||
|
reject(new Error(`Failed to perform the upload on ${url}.`))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
xhr.upload.addEventListener('progress', (progressEvent) => {
|
||||||
|
if (progressEvent.lengthComputable) {
|
||||||
|
progressHandler(
|
||||||
|
Math.floor((progressEvent.loaded / progressEvent.total) * 100)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
xhr.send(file)
|
||||||
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Asynchronously creates a new file and uploads it to the server.
|
||||||
|
*
|
||||||
|
* @param {object} params - The parameters for the file creation and upload process.
|
||||||
|
* @param {File} params.file - The file object to be uploaded.
|
||||||
|
* @param {function} params.onProgress - A callback function that receives the upload progress as a number (0 to 100).
|
||||||
|
* @returns {Promise<ApiFileItem>} A promise that resolves when the file has been successfully uploaded and the server process is completed.
|
||||||
|
*/
|
||||||
|
export const createFile = async ({
|
||||||
|
file,
|
||||||
|
onProgress,
|
||||||
|
}: {
|
||||||
|
file: File
|
||||||
|
onProgress: (progress: number) => void
|
||||||
|
}): Promise<ApiFileItem> => {
|
||||||
|
const res = await fetchApi<ApiFileItem>(`/files/`, {
|
||||||
|
method: 'POST',
|
||||||
|
body: JSON.stringify({ filename: file.name, type: 'background_image' }),
|
||||||
|
})
|
||||||
|
if (res.upload_state !== 'pending') {
|
||||||
|
throw new Error('State should be pending right after creation')
|
||||||
|
}
|
||||||
|
const policy = res.policy
|
||||||
|
await uploadFile(policy, file, onProgress)
|
||||||
|
const createdFile = await fetchApi<ApiFileItem>(
|
||||||
|
`/files/${res.id}/upload-ended/`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
// We invalidate the files query to make sure the new file is immediately available.
|
||||||
|
await queryClient.invalidateQueries({
|
||||||
|
queryKey: [keys.files],
|
||||||
|
})
|
||||||
|
return createdFile
|
||||||
|
}
|
||||||
|
|
||||||
|
export const useCreateFile = () => {
|
||||||
|
return useMutation({
|
||||||
|
mutationFn: createFile,
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import { fetchApi } from '@/api/fetchApi'
|
||||||
|
import { useMutation, useQueryClient } from '@tanstack/react-query'
|
||||||
|
import { keys } from '@/api/queryKeys.ts'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a file specified by its unique identifier.
|
||||||
|
*
|
||||||
|
* @param {Object} params - The parameters required for deleting the file.
|
||||||
|
* @param {string} params.fileId - The unique identifier of the file to be deleted.
|
||||||
|
* @returns {Promise<void>} A promise that resolves when the file is successfully deleted.
|
||||||
|
*/
|
||||||
|
export const deleteFile = async ({
|
||||||
|
fileId,
|
||||||
|
}: {
|
||||||
|
fileId: string
|
||||||
|
}): Promise<void> => {
|
||||||
|
await fetchApi<void>(`/files/${fileId}/`, {
|
||||||
|
method: 'DELETE',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const useDeleteFile = () => {
|
||||||
|
const queryClient = useQueryClient()
|
||||||
|
|
||||||
|
return useMutation({
|
||||||
|
mutationFn: deleteFile,
|
||||||
|
onSuccess: async () => {
|
||||||
|
await queryClient.invalidateQueries({
|
||||||
|
queryKey: [keys.files],
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
import { fetchApi } from '@/api/fetchApi'
|
||||||
|
import { keepPreviousData, useQuery } from '@tanstack/react-query'
|
||||||
|
import { keys } from '@/api/queryKeys'
|
||||||
|
import {
|
||||||
|
ApiFileItem,
|
||||||
|
ApiFileType,
|
||||||
|
ApiFileUploadState,
|
||||||
|
} from '@/features/files/api/types.ts'
|
||||||
|
import { useUser } from '@/features/auth'
|
||||||
|
import { useConfig } from '@/api/useConfig.ts'
|
||||||
|
|
||||||
|
type ListFilesResponse = {
|
||||||
|
count: number
|
||||||
|
next: string | null
|
||||||
|
previous: string | null
|
||||||
|
results: ApiFileItem[]
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListFilesFilters = {
|
||||||
|
is_creator_me?: boolean
|
||||||
|
type?: ApiFileType
|
||||||
|
upload_state?: ApiFileUploadState
|
||||||
|
is_deleted?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ListFilesParams = {
|
||||||
|
filters?: ListFilesFilters
|
||||||
|
pagination: {
|
||||||
|
page: number
|
||||||
|
pageSize: number
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const listMyFiles = async ({
|
||||||
|
filters = {},
|
||||||
|
pagination: { page, pageSize },
|
||||||
|
}: ListFilesParams): Promise<ListFilesResponse> => {
|
||||||
|
const query = new URLSearchParams()
|
||||||
|
query.append('page', page.toString())
|
||||||
|
query.append('page_size', pageSize.toString())
|
||||||
|
if (filters?.is_creator_me ?? true) {
|
||||||
|
query.append('is_creator_me', 'true')
|
||||||
|
}
|
||||||
|
if (filters?.type) {
|
||||||
|
query.append('type', filters.type)
|
||||||
|
}
|
||||||
|
if (filters?.upload_state) {
|
||||||
|
query.append('upload_state', filters.upload_state)
|
||||||
|
}
|
||||||
|
if (typeof filters?.is_deleted === 'boolean') {
|
||||||
|
query.append('is_deleted', filters.is_deleted ? 'true' : 'false')
|
||||||
|
}
|
||||||
|
|
||||||
|
return fetchApi<ListFilesResponse>(`/files?${query.toString()}`, {
|
||||||
|
method: 'GET',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const useListMyFiles = (params: Parameters<typeof listMyFiles>[0]) => {
|
||||||
|
const { isLoggedIn } = useUser()
|
||||||
|
const { data: appConfig } = useConfig()
|
||||||
|
return useQuery({
|
||||||
|
queryKey: [keys.files, params],
|
||||||
|
queryFn: () => listMyFiles(params),
|
||||||
|
refetchOnMount: 'always',
|
||||||
|
placeholderData: keepPreviousData,
|
||||||
|
enabled:
|
||||||
|
isLoggedIn && appConfig?.background_image?.upload_is_enabled === true,
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
export type ApiFileCreator = {
|
||||||
|
id: string // UUID
|
||||||
|
full_name: string | null
|
||||||
|
short_name: string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ApiFileType = 'background_image'
|
||||||
|
export type ApiFileUploadState = 'pending' | 'ready'
|
||||||
|
|
||||||
|
export type ApiFileItem = {
|
||||||
|
id: string // UUID
|
||||||
|
created_at: string // ISO datetime string
|
||||||
|
updated_at: string // ISO datetime string
|
||||||
|
title: string
|
||||||
|
type: ApiFileType
|
||||||
|
creator: ApiFileCreator
|
||||||
|
deleted_at: string | null
|
||||||
|
hard_deleted_at: string | null
|
||||||
|
filename: string
|
||||||
|
upload_state: ApiFileUploadState
|
||||||
|
mimetype: string // e.g. "image/png"
|
||||||
|
size: number // file size in bytes
|
||||||
|
description: string | null
|
||||||
|
} & (
|
||||||
|
| {
|
||||||
|
upload_state: 'ready'
|
||||||
|
url: string
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
upload_state: 'pending'
|
||||||
|
policy: string
|
||||||
|
url: null
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
import { Button, Dialog, type DialogProps, Text } from '@/primitives'
|
||||||
|
import { VStack, HStack } from '@/styled-system/jsx'
|
||||||
|
import { css } from '@/styled-system/css'
|
||||||
|
import { RiLockFill, RiShieldCheckFill, RiAlertLine } from '@remixicon/react'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
import { ApiEncryptionMode } from '@/features/rooms/api/ApiRoom'
|
||||||
|
import { useVaultClient } from '@/features/encryption'
|
||||||
|
|
||||||
|
export const EncryptionModeDialog = ({
|
||||||
|
onSelect,
|
||||||
|
isForLater = false,
|
||||||
|
...dialogProps
|
||||||
|
}: {
|
||||||
|
onSelect: (mode: ApiEncryptionMode) => void
|
||||||
|
isForLater?: boolean
|
||||||
|
} & Omit<DialogProps, 'title'>) => {
|
||||||
|
const { t } = useTranslation('home', { keyPrefix: 'encryptionModeDialog' })
|
||||||
|
const { hasKeys, client: vaultClient, error: vaultError, isLoading: vaultLoading } = useVaultClient()
|
||||||
|
const vaultUnavailable = !vaultClient && !vaultLoading
|
||||||
|
const canUseAdvanced = !!hasKeys && !vaultUnavailable
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog title={t('title')} isOpen {...dialogProps}>
|
||||||
|
<VStack gap="1rem" alignItems="stretch">
|
||||||
|
<Text variant="sm" className={css({ color: 'greyscale.700' })}>
|
||||||
|
{t('description')}
|
||||||
|
</Text>
|
||||||
|
|
||||||
|
<button
|
||||||
|
className={css({
|
||||||
|
display: 'flex',
|
||||||
|
gap: '0.75rem',
|
||||||
|
padding: '1rem',
|
||||||
|
borderRadius: '0.5rem',
|
||||||
|
border: '1px solid',
|
||||||
|
borderColor: 'greyscale.200',
|
||||||
|
backgroundColor: 'white',
|
||||||
|
cursor: 'pointer',
|
||||||
|
textAlign: 'left',
|
||||||
|
transition: 'border-color 150ms ease, background-color 150ms ease',
|
||||||
|
_hover: {
|
||||||
|
borderColor: 'primary.500',
|
||||||
|
backgroundColor: 'primary.50',
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
onClick={() => onSelect(ApiEncryptionMode.BASIC)}
|
||||||
|
>
|
||||||
|
<div className={css({ flexShrink: 0, paddingTop: '0.15rem' })}>
|
||||||
|
<RiLockFill size={20} color="#2563eb" />
|
||||||
|
</div>
|
||||||
|
<VStack gap="0.25rem" alignItems="flex-start">
|
||||||
|
<Text
|
||||||
|
variant="sm"
|
||||||
|
bold
|
||||||
|
className={css({ color: 'greyscale.900' })}
|
||||||
|
>
|
||||||
|
{t('basic.title')}
|
||||||
|
</Text>
|
||||||
|
<Text variant="sm" className={css({ color: 'greyscale.600' })}>
|
||||||
|
{t('basic.description')}
|
||||||
|
</Text>
|
||||||
|
</VStack>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div style={{ position: 'relative' }}>
|
||||||
|
<button
|
||||||
|
className={css({
|
||||||
|
display: 'flex',
|
||||||
|
gap: '0.75rem',
|
||||||
|
padding: '1rem',
|
||||||
|
borderRadius: '0.5rem',
|
||||||
|
border: '1px solid',
|
||||||
|
borderColor: 'greyscale.200',
|
||||||
|
backgroundColor: 'white',
|
||||||
|
cursor: canUseAdvanced ? 'pointer' : 'not-allowed',
|
||||||
|
textAlign: 'left',
|
||||||
|
opacity: canUseAdvanced ? 1 : 0.5,
|
||||||
|
transition:
|
||||||
|
'border-color 150ms ease, background-color 150ms ease',
|
||||||
|
_hover: canUseAdvanced
|
||||||
|
? {
|
||||||
|
borderColor: 'green.500',
|
||||||
|
backgroundColor: 'green.50',
|
||||||
|
}
|
||||||
|
: {},
|
||||||
|
})}
|
||||||
|
onClick={() => canUseAdvanced && onSelect(ApiEncryptionMode.ADVANCED)}
|
||||||
|
disabled={!canUseAdvanced}
|
||||||
|
>
|
||||||
|
<div className={css({ flexShrink: 0, paddingTop: '0.15rem' })}>
|
||||||
|
<RiShieldCheckFill
|
||||||
|
size={20}
|
||||||
|
color={canUseAdvanced ? '#166534' : '#9ca3af'}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<VStack gap="0.25rem" alignItems="flex-start">
|
||||||
|
<Text
|
||||||
|
variant="sm"
|
||||||
|
bold
|
||||||
|
className={css({
|
||||||
|
color: canUseAdvanced ? 'greyscale.900' : 'greyscale.400',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{t('advanced.title')}
|
||||||
|
</Text>
|
||||||
|
<Text
|
||||||
|
variant="sm"
|
||||||
|
className={css({
|
||||||
|
color: canUseAdvanced ? 'greyscale.600' : 'greyscale.400',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{t('advanced.description')}
|
||||||
|
</Text>
|
||||||
|
</VStack>
|
||||||
|
</button>
|
||||||
|
{!canUseAdvanced && (
|
||||||
|
<HStack
|
||||||
|
gap="0.4rem"
|
||||||
|
className={css({
|
||||||
|
marginTop: '0.5rem',
|
||||||
|
padding: '0.5rem 0.75rem',
|
||||||
|
backgroundColor: vaultUnavailable ? 'red.50' : 'orange.50',
|
||||||
|
borderRadius: '0.375rem',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<RiAlertLine
|
||||||
|
size={14}
|
||||||
|
color={vaultUnavailable ? '#dc2626' : '#d97706'}
|
||||||
|
className={css({ flexShrink: 0 })}
|
||||||
|
/>
|
||||||
|
<Text variant="note" className={css({ color: vaultUnavailable ? 'red.800' : 'orange.800' })}>
|
||||||
|
{vaultUnavailable
|
||||||
|
? t('advanced.serviceUnavailable')
|
||||||
|
: t('advanced.onboardingRequired')}
|
||||||
|
</Text>
|
||||||
|
</HStack>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</VStack>
|
||||||
|
</Dialog>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -1,35 +1,147 @@
|
|||||||
|
import { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { Field, Ul, H, P, Form, Dialog } from '@/primitives'
|
import { Field, Ul, H, P, Form, Dialog } from '@/primitives'
|
||||||
|
import { css } from '@/styled-system/css'
|
||||||
import { navigateTo } from '@/navigation/navigateTo'
|
import { navigateTo } from '@/navigation/navigateTo'
|
||||||
import { isRoomValid } from '@/features/rooms'
|
import { isRoomValid } from '@/features/rooms'
|
||||||
|
import { normalizeRoomId } from '@/features/rooms/utils/isRoomValid'
|
||||||
|
import { fetchRoom } from '@/features/rooms/api/fetchRoom'
|
||||||
|
import { ApiEncryptionMode } from '@/features/rooms/api/ApiRoom'
|
||||||
|
|
||||||
export const JoinMeetingDialog = () => {
|
export const JoinMeetingDialog = () => {
|
||||||
const { t } = useTranslation('home')
|
const { t } = useTranslation('home')
|
||||||
|
const [step, setStep] = useState<'room' | 'passphrase'>('room')
|
||||||
|
const [roomId, setRoomId] = useState('')
|
||||||
|
const [isLoading, setIsLoading] = useState(false)
|
||||||
|
|
||||||
const handleSubmit = (data: { roomId?: FormDataEntryValue }) => {
|
const parseInput = (input: string): { roomId: string; hash: string } => {
|
||||||
const roomId = (data.roomId as string)
|
const trimmed = input.trim()
|
||||||
.trim()
|
try {
|
||||||
.replace(`${window.location.origin}/`, '')
|
const url = new URL(trimmed)
|
||||||
|
const id = url.pathname.replace(/^\//, '')
|
||||||
|
return { roomId: id, hash: url.hash.slice(1) }
|
||||||
|
} catch {
|
||||||
|
// Not a URL — treat as room code, normalize (add hyphens if 10 chars)
|
||||||
|
const raw = trimmed.replace(`${window.location.origin}/`, '')
|
||||||
|
return { roomId: normalizeRoomId(raw), hash: '' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRoomSubmit = async (data: { roomId?: FormDataEntryValue }) => {
|
||||||
|
const input = data.roomId as string
|
||||||
|
const parsed = parseInput(input)
|
||||||
|
|
||||||
|
// If URL already has a hash, navigate directly with it
|
||||||
|
if (parsed.hash) {
|
||||||
|
navigateTo('room', parsed.roomId)
|
||||||
|
window.location.hash = parsed.hash
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if the room uses basic encryption (needs passphrase)
|
||||||
|
setIsLoading(true)
|
||||||
|
try {
|
||||||
|
const room = await fetchRoom({ roomId: parsed.roomId })
|
||||||
|
if (room.encryption_mode === ApiEncryptionMode.BASIC) {
|
||||||
|
setRoomId(parsed.roomId)
|
||||||
|
setStep('passphrase')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
navigateTo('room', parsed.roomId)
|
||||||
|
} catch {
|
||||||
|
// Room doesn't exist yet or error — navigate anyway
|
||||||
|
navigateTo('room', parsed.roomId)
|
||||||
|
} finally {
|
||||||
|
setIsLoading(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handlePassphraseSubmit = (data: { passphrase?: FormDataEntryValue }) => {
|
||||||
|
const passphrase = (data.passphrase as string).trim()
|
||||||
navigateTo('room', roomId)
|
navigateTo('room', roomId)
|
||||||
|
window.location.hash = passphrase
|
||||||
}
|
}
|
||||||
|
|
||||||
const validateRoomId = (value: string) => {
|
const validateRoomId = (value: string) => {
|
||||||
const trimmed = value.trim()
|
const trimmed = value.trim()
|
||||||
if (!trimmed) return null
|
if (!trimmed) return null
|
||||||
return !isRoomValid(trimmed) ? (
|
const { roomId: id } = parseInput(trimmed)
|
||||||
|
return !isRoomValid(id) ? (
|
||||||
<>
|
<>
|
||||||
<p>{t('joinInputError')}</p>
|
<p>{t('joinInputError')}</p>
|
||||||
<Ul>
|
<Ul>
|
||||||
<li>{window.location.origin}/uio-azer-jkl</li>
|
<li>{window.location.origin}/uio-azer-jkl</li>
|
||||||
<li>uio-azer-jkl</li>
|
<li>uio-azer-jkl</li>
|
||||||
|
<li>uioazerjkl</li>
|
||||||
</Ul>
|
</Ul>
|
||||||
</>
|
</>
|
||||||
) : null
|
) : null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (step === 'passphrase') {
|
||||||
|
return (
|
||||||
|
<Dialog title={t('joinMeeting')}>
|
||||||
|
<Form onSubmit={handlePassphraseSubmit} submitLabel={t('joinPassphraseSubmit')}>
|
||||||
|
<P
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: t('joinPassphraseDescription', {
|
||||||
|
interpolation: { escapeValue: false },
|
||||||
|
}),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div
|
||||||
|
className={css({
|
||||||
|
backgroundColor: 'greyscale.100',
|
||||||
|
borderRadius: '0.5rem',
|
||||||
|
padding: '0.75rem 1rem',
|
||||||
|
marginBottom: '1rem',
|
||||||
|
fontSize: '0.8rem',
|
||||||
|
fontFamily: 'monospace',
|
||||||
|
wordBreak: 'break-all',
|
||||||
|
lineHeight: '1.5',
|
||||||
|
border: '1px solid',
|
||||||
|
borderColor: 'greyscale.200',
|
||||||
|
'& strong': {
|
||||||
|
color: '#16a34a',
|
||||||
|
fontWeight: 700,
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: t('joinPassphraseExample', {
|
||||||
|
origin: window.location.origin,
|
||||||
|
interpolation: { escapeValue: false },
|
||||||
|
}),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* eslint-disable jsx-a11y/no-autofocus */}
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoFocus
|
||||||
|
isRequired
|
||||||
|
name="passphrase"
|
||||||
|
label={t('joinPassphraseLabel')}
|
||||||
|
errorMessage={t('joinPassphraseError')}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<P
|
||||||
|
className={css({
|
||||||
|
fontSize: '0.8rem',
|
||||||
|
color: '#b45309',
|
||||||
|
marginTop: '0.5rem',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{t('joinPassphraseWarning')}
|
||||||
|
</P>
|
||||||
|
</Form>
|
||||||
|
</Dialog>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog title={t('joinMeeting')}>
|
<Dialog title={t('joinMeeting')}>
|
||||||
<Form onSubmit={handleSubmit} submitLabel={t('joinInputSubmit')}>
|
<Form onSubmit={handleRoomSubmit} submitLabel={isLoading ? '...' : t('joinInputSubmit')}>
|
||||||
{/* eslint-disable jsx-a11y/no-autofocus -- Focus on input when modal opens, required for accessibility */}
|
{/* eslint-disable jsx-a11y/no-autofocus -- Focus on input when modal opens, required for accessibility */}
|
||||||
<Field
|
<Field
|
||||||
type="text"
|
type="text"
|
||||||
|
|||||||
@@ -13,11 +13,12 @@ import { useCopyRoomToClipboard } from '@/features/rooms/livekit/hooks/useCopyRo
|
|||||||
// fixme - duplication with the InviteDialog
|
// fixme - duplication with the InviteDialog
|
||||||
export const LaterMeetingDialog = ({
|
export const LaterMeetingDialog = ({
|
||||||
room,
|
room,
|
||||||
|
hash,
|
||||||
...dialogProps
|
...dialogProps
|
||||||
}: { room: null | ApiRoom } & Omit<DialogProps, 'title'>) => {
|
}: { room: null | ApiRoom; hash?: string } & Omit<DialogProps, 'title'>) => {
|
||||||
const { t } = useTranslation('home', { keyPrefix: 'laterMeetingDialog' })
|
const { t } = useTranslation('home', { keyPrefix: 'laterMeetingDialog' })
|
||||||
|
|
||||||
const roomUrl = room && getRouteUrl('room', room?.slug)
|
const roomUrl = room ? `${getRouteUrl('room', room.slug)}${hash ? `#${hash}` : ''}` : null
|
||||||
const telephony = useTelephony()
|
const telephony = useTelephony()
|
||||||
|
|
||||||
const [isHovered, setIsHovered] = useState(false)
|
const [isHovered, setIsHovered] = useState(false)
|
||||||
@@ -31,7 +32,7 @@ export const LaterMeetingDialog = ({
|
|||||||
copyRoomToClipboard,
|
copyRoomToClipboard,
|
||||||
isRoomUrlCopied,
|
isRoomUrlCopied,
|
||||||
copyRoomUrlToClipboard,
|
copyRoomUrlToClipboard,
|
||||||
} = useCopyRoomToClipboard(room || undefined)
|
} = useCopyRoomToClipboard(room || undefined, hash)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog isOpen={!!room} {...dialogProps} title={t('heading')}>
|
<Dialog isOpen={!!room} {...dialogProps} title={t('heading')}>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { DialogTrigger, MenuItem, Menu as RACMenu } from 'react-aria-components'
|
import { DialogTrigger, MenuItem, Menu as RACMenu, Separator as RACSeparator } from 'react-aria-components'
|
||||||
import { Button, Menu } from '@/primitives'
|
import { Button, Menu } from '@/primitives'
|
||||||
import { styled } from '@/styled-system/jsx'
|
import { styled } from '@/styled-system/jsx'
|
||||||
import { navigateTo } from '@/navigation/navigateTo'
|
import { navigateTo } from '@/navigation/navigateTo'
|
||||||
@@ -7,8 +7,12 @@ import { Screen } from '@/layout/Screen'
|
|||||||
import { generateRoomId, useCreateRoom } from '@/features/rooms'
|
import { generateRoomId, useCreateRoom } from '@/features/rooms'
|
||||||
import { useUser, UserAware } from '@/features/auth'
|
import { useUser, UserAware } from '@/features/auth'
|
||||||
import { JoinMeetingDialog } from '../components/JoinMeetingDialog'
|
import { JoinMeetingDialog } from '../components/JoinMeetingDialog'
|
||||||
import { RiAddLine, RiLink } from '@remixicon/react'
|
import { RiAddLine, RiLink, RiLockLine, RiShieldKeyholeLine } from '@remixicon/react'
|
||||||
import { LaterMeetingDialog } from '@/features/home/components/LaterMeetingDialog'
|
import { LaterMeetingDialog } from '@/features/home/components/LaterMeetingDialog'
|
||||||
|
import { EncryptionModeDialog } from '@/features/home/components/EncryptionModeDialog'
|
||||||
|
import { ApiEncryptionMode } from '@/features/rooms/api/ApiRoom'
|
||||||
|
import { generatePassphrase } from '@/features/encryption/lobbyKeyExchange'
|
||||||
|
import { useVaultClient } from '@/features/encryption'
|
||||||
import { IntroSlider } from '@/features/home/components/IntroSlider'
|
import { IntroSlider } from '@/features/home/components/IntroSlider'
|
||||||
import { MoreLink } from '@/features/home/components/MoreLink'
|
import { MoreLink } from '@/features/home/components/MoreLink'
|
||||||
import { ReactNode, useEffect, useState } from 'react'
|
import { ReactNode, useEffect, useState } from 'react'
|
||||||
@@ -155,7 +159,9 @@ export const Home = () => {
|
|||||||
} = usePersistentUserChoices()
|
} = usePersistentUserChoices()
|
||||||
|
|
||||||
const { mutateAsync: createRoom } = useCreateRoom()
|
const { mutateAsync: createRoom } = useCreateRoom()
|
||||||
const [laterRoom, setLaterRoom] = useState<null | ApiRoom>(null)
|
const { client: vaultClient } = useVaultClient()
|
||||||
|
const [laterRoom, setLaterRoom] = useState<null | { room: ApiRoom; hash?: string }>(null)
|
||||||
|
const [encryptionDialogMode, setEncryptionDialogMode] = useState<null | 'instant' | 'later'>(null)
|
||||||
const [redirectFailed, setRedirectFailed] = useState(false)
|
const [redirectFailed, setRedirectFailed] = useState(false)
|
||||||
|
|
||||||
const { data } = useConfig()
|
const { data } = useConfig()
|
||||||
@@ -229,7 +235,7 @@ export const Home = () => {
|
|||||||
onAction={() => {
|
onAction={() => {
|
||||||
const slug = generateRoomId()
|
const slug = generateRoomId()
|
||||||
createRoom({ slug, username }).then((data) =>
|
createRoom({ slug, username }).then((data) =>
|
||||||
setLaterRoom(data)
|
setLaterRoom({ room: data })
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
data-attr="create-option-later"
|
data-attr="create-option-later"
|
||||||
@@ -237,6 +243,37 @@ export const Home = () => {
|
|||||||
<RiLink size={18} />
|
<RiLink size={18} />
|
||||||
{t('createMenu.laterOption')}
|
{t('createMenu.laterOption')}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
{data?.encryption?.enabled && (
|
||||||
|
<>
|
||||||
|
<RACSeparator
|
||||||
|
className={css({
|
||||||
|
borderTop: '1px solid',
|
||||||
|
borderColor: 'greyscale.200',
|
||||||
|
margin: '0.25rem 0',
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
<MenuItem
|
||||||
|
className={
|
||||||
|
menuRecipe({ icon: true, variant: 'light' }).item
|
||||||
|
}
|
||||||
|
onAction={() => setEncryptionDialogMode('instant')}
|
||||||
|
data-attr="create-option-encrypted-instant"
|
||||||
|
>
|
||||||
|
<RiLockLine size={18} />
|
||||||
|
{t('createMenu.encryptedInstantOption')}
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem
|
||||||
|
className={
|
||||||
|
menuRecipe({ icon: true, variant: 'light' }).item
|
||||||
|
}
|
||||||
|
onAction={() => setEncryptionDialogMode('later')}
|
||||||
|
data-attr="create-option-encrypted-later"
|
||||||
|
>
|
||||||
|
<RiShieldKeyholeLine size={18} />
|
||||||
|
{t('createMenu.encryptedLaterOption')}
|
||||||
|
</MenuItem>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</RACMenu>
|
</RACMenu>
|
||||||
</Menu>
|
</Menu>
|
||||||
) : (
|
) : (
|
||||||
@@ -265,9 +302,58 @@ export const Home = () => {
|
|||||||
</RightColumn>
|
</RightColumn>
|
||||||
</Columns>
|
</Columns>
|
||||||
<LaterMeetingDialog
|
<LaterMeetingDialog
|
||||||
room={laterRoom}
|
room={laterRoom?.room ?? null}
|
||||||
|
hash={laterRoom?.hash}
|
||||||
onOpenChange={() => setLaterRoom(null)}
|
onOpenChange={() => setLaterRoom(null)}
|
||||||
/>
|
/>
|
||||||
|
{encryptionDialogMode && (
|
||||||
|
<EncryptionModeDialog
|
||||||
|
onSelect={async (mode) => {
|
||||||
|
const dialogMode = encryptionDialogMode
|
||||||
|
setEncryptionDialogMode(null)
|
||||||
|
const slug = generateRoomId()
|
||||||
|
const hash = mode === ApiEncryptionMode.BASIC ? generatePassphrase() : undefined
|
||||||
|
|
||||||
|
let encryptedSymmetricKey = ''
|
||||||
|
if (mode === ApiEncryptionMode.ADVANCED && vaultClient) {
|
||||||
|
// encryptWithoutKey requires data to encrypt, but we only care about
|
||||||
|
// the generated symmetric key (encryptedKeys), not the encrypted content.
|
||||||
|
// The same symmetric key will be used for all streams (video/audio/chat).
|
||||||
|
const dummyData = new Uint8Array(32).buffer
|
||||||
|
const { publicKey } = await vaultClient.getPublicKey()
|
||||||
|
const { encryptedKeys } = await vaultClient.encryptWithoutKey(
|
||||||
|
dummyData,
|
||||||
|
{ self: publicKey }
|
||||||
|
)
|
||||||
|
const keyBytes = new Uint8Array(encryptedKeys['self'])
|
||||||
|
encryptedSymmetricKey = btoa(String.fromCharCode(...keyBytes))
|
||||||
|
}
|
||||||
|
|
||||||
|
createRoom({
|
||||||
|
slug,
|
||||||
|
username,
|
||||||
|
encryptionMode: mode,
|
||||||
|
encryptedSymmetricKey,
|
||||||
|
}).then((data) => {
|
||||||
|
if (dialogMode === 'instant') {
|
||||||
|
navigateTo('room', data.slug, {
|
||||||
|
state: { create: true, initialRoomData: data },
|
||||||
|
})
|
||||||
|
if (hash) {
|
||||||
|
window.history.replaceState(
|
||||||
|
window.history.state,
|
||||||
|
'',
|
||||||
|
`${window.location.pathname}#${hash}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setLaterRoom({ room: data, hash })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
onOpenChange={() => setEncryptionDialogMode(null)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</Screen>
|
</Screen>
|
||||||
</UserAware>
|
</UserAware>
|
||||||
)
|
)
|
||||||
|
|||||||
+119
-13
@@ -12,10 +12,112 @@ import { useWaitingParticipants } from '@/features/rooms/hooks/useWaitingPartici
|
|||||||
import { useSidePanel } from '@/features/rooms/livekit/hooks/useSidePanel'
|
import { useSidePanel } from '@/features/rooms/livekit/hooks/useSidePanel'
|
||||||
import { useNotificationSound } from '../hooks/useSoundNotification'
|
import { useNotificationSound } from '../hooks/useSoundNotification'
|
||||||
import { NotificationType } from '@/features/notifications'
|
import { NotificationType } from '@/features/notifications'
|
||||||
|
import { EncryptionBadge, EncryptionIdentityDialog } from '@/features/encryption'
|
||||||
|
import { useParticipantTrustLevel, formatFingerprint } from '@/features/encryption/useParticipantTrustLevel'
|
||||||
|
import { useRoomData } from '@/features/rooms/livekit/hooks/useRoomData'
|
||||||
|
import { isEncryptedRoom } from '@/features/rooms/api/ApiRoom'
|
||||||
|
|
||||||
|
const WaitingParticipantIdentity = ({ participant }: { participant: WaitingParticipant }) => {
|
||||||
|
const { t: tBadge } = useTranslation('rooms', { keyPrefix: 'encryption.badge' })
|
||||||
|
const roomData = useRoomData()
|
||||||
|
const [isIdentityOpen, setIsIdentityOpen] = useState(false)
|
||||||
|
const attrs = {
|
||||||
|
is_authenticated: participant.is_authenticated ? 'true' : 'false',
|
||||||
|
suite_user_id: participant.suite_user_id || '',
|
||||||
|
}
|
||||||
|
const { trustLevel, fingerprintStatus, fingerprint } = useParticipantTrustLevel(attrs, roomData?.encryption_mode)
|
||||||
|
const badgeTooltip = tBadge(trustLevel)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<VStack gap="0" alignItems="start">
|
||||||
|
<Button
|
||||||
|
variant="greyscale"
|
||||||
|
size="sm"
|
||||||
|
tooltip={badgeTooltip}
|
||||||
|
aria-label={badgeTooltip}
|
||||||
|
onPress={() => setIsIdentityOpen(true)}
|
||||||
|
className={css({
|
||||||
|
padding: '0.1rem 0.25rem !important',
|
||||||
|
minWidth: 'auto !important',
|
||||||
|
height: 'auto !important',
|
||||||
|
gap: '0.15rem !important',
|
||||||
|
borderRadius: '0.25rem !important',
|
||||||
|
backgroundColor: 'transparent !important',
|
||||||
|
color: 'white !important',
|
||||||
|
cursor: 'pointer',
|
||||||
|
'&[data-hovered]': {
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 0.15) !important',
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<EncryptionBadge isEncrypted={true} trustLevel={trustLevel} />
|
||||||
|
<Text
|
||||||
|
variant="sm"
|
||||||
|
margin={false}
|
||||||
|
className={css({
|
||||||
|
maxWidth: '8rem',
|
||||||
|
wordBreak: 'break-word',
|
||||||
|
overflowWrap: 'break-word',
|
||||||
|
whiteSpace: 'normal',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{participant.username}
|
||||||
|
</Text>
|
||||||
|
</Button>
|
||||||
|
{fingerprint && (
|
||||||
|
<Text
|
||||||
|
variant="sm"
|
||||||
|
margin={false}
|
||||||
|
className={css({
|
||||||
|
fontFamily: 'monospace',
|
||||||
|
fontSize: '0.6rem',
|
||||||
|
color: 'greyscale.100',
|
||||||
|
letterSpacing: '0.03em',
|
||||||
|
paddingLeft: '0.25rem',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{formatFingerprint(fingerprint)}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
<Text
|
||||||
|
variant="sm"
|
||||||
|
margin={false}
|
||||||
|
className={css({
|
||||||
|
fontSize: '0.7rem',
|
||||||
|
color: 'greyscale.200',
|
||||||
|
paddingLeft: '0.25rem',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
maxWidth: '10rem',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{participant.is_authenticated && participant.email
|
||||||
|
? participant.email
|
||||||
|
: tBadge('anonymous')}
|
||||||
|
</Text>
|
||||||
|
</VStack>
|
||||||
|
<EncryptionIdentityDialog
|
||||||
|
isOpen={isIdentityOpen}
|
||||||
|
onOpenChange={setIsIdentityOpen}
|
||||||
|
participantName={participant.username}
|
||||||
|
participantEmail={participant.email}
|
||||||
|
suiteUserId={participant.suite_user_id}
|
||||||
|
isAuthenticated={participant.is_authenticated}
|
||||||
|
encryptionMode={roomData?.encryption_mode}
|
||||||
|
preloadedFingerprint={fingerprint}
|
||||||
|
preloadedFingerprintStatus={fingerprintStatus}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
export const NOTIFICATION_DISPLAY_DURATION = 10000
|
export const NOTIFICATION_DISPLAY_DURATION = 10000
|
||||||
|
|
||||||
export const WaitingParticipantNotification = () => {
|
export const WaitingParticipantNotification = () => {
|
||||||
|
const roomData = useRoomData()
|
||||||
|
const encrypted = isEncryptedRoom(roomData)
|
||||||
const { triggerNotificationSound } = useNotificationSound()
|
const { triggerNotificationSound } = useNotificationSound()
|
||||||
|
|
||||||
const { t } = useTranslation('notifications', {
|
const { t } = useTranslation('notifications', {
|
||||||
@@ -100,25 +202,29 @@ export const WaitingParticipantNotification = () => {
|
|||||||
>
|
>
|
||||||
{t('one')}
|
{t('one')}
|
||||||
</Text>
|
</Text>
|
||||||
<HStack gap="1rem">
|
<HStack gap="0.5rem">
|
||||||
<Avatar
|
<Avatar
|
||||||
name={waitingParticipants[0].username}
|
name={waitingParticipants[0].username}
|
||||||
bgColor={waitingParticipants[0].color}
|
bgColor={waitingParticipants[0].color}
|
||||||
context="list"
|
context="list"
|
||||||
notification
|
notification
|
||||||
/>
|
/>
|
||||||
<Text
|
{encrypted ? (
|
||||||
variant="sm"
|
<WaitingParticipantIdentity participant={waitingParticipants[0]} />
|
||||||
margin={false}
|
) : (
|
||||||
className={css({
|
<Text
|
||||||
maxWidth: '10rem',
|
variant="sm"
|
||||||
wordBreak: 'break-word',
|
margin={false}
|
||||||
overflowWrap: 'break-word',
|
className={css({
|
||||||
whiteSpace: 'normal',
|
maxWidth: '10rem',
|
||||||
})}
|
wordBreak: 'break-word',
|
||||||
>
|
overflowWrap: 'break-word',
|
||||||
{waitingParticipants[0].username}
|
whiteSpace: 'normal',
|
||||||
</Text>
|
})}
|
||||||
|
>
|
||||||
|
{waitingParticipants[0].username}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
</HStack>
|
</HStack>
|
||||||
<HStack gap="0.25rem" marginLeft="auto">
|
<HStack gap="0.25rem" marginLeft="auto">
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -10,6 +10,21 @@ export enum ApiAccessLevel {
|
|||||||
RESTRICTED = 'restricted',
|
RESTRICTED = 'restricted',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum ApiEncryptionMode {
|
||||||
|
NONE = 'none',
|
||||||
|
BASIC = 'basic',
|
||||||
|
ADVANCED = 'advanced',
|
||||||
|
}
|
||||||
|
|
||||||
|
export function isEncryptedRoom(room?: { encryption_mode?: ApiEncryptionMode; encryption_enabled?: boolean } | null): boolean {
|
||||||
|
if (!room) return false
|
||||||
|
// Support both new encryption_mode and legacy encryption_enabled
|
||||||
|
if (room.encryption_mode !== undefined) {
|
||||||
|
return room.encryption_mode !== ApiEncryptionMode.NONE
|
||||||
|
}
|
||||||
|
return !!room.encryption_enabled
|
||||||
|
}
|
||||||
|
|
||||||
export type ApiRoom = {
|
export type ApiRoom = {
|
||||||
id: string
|
id: string
|
||||||
name: string
|
name: string
|
||||||
@@ -17,6 +32,8 @@ export type ApiRoom = {
|
|||||||
pin_code: string
|
pin_code: string
|
||||||
is_administrable: boolean
|
is_administrable: boolean
|
||||||
access_level: ApiAccessLevel
|
access_level: ApiAccessLevel
|
||||||
|
encryption_mode: ApiEncryptionMode
|
||||||
|
encrypted_symmetric_key?: string
|
||||||
livekit?: ApiLiveKit
|
livekit?: ApiLiveKit
|
||||||
configuration?: {
|
configuration?: {
|
||||||
[key: string]: string | number | boolean | string[]
|
[key: string]: string | number | boolean | string[]
|
||||||
|
|||||||
@@ -1,24 +1,31 @@
|
|||||||
import { useMutation, UseMutationOptions } from '@tanstack/react-query'
|
import { useMutation, UseMutationOptions } from '@tanstack/react-query'
|
||||||
import { fetchApi } from '@/api/fetchApi'
|
import { fetchApi } from '@/api/fetchApi'
|
||||||
import { ApiError } from '@/api/ApiError'
|
import { ApiError } from '@/api/ApiError'
|
||||||
import { ApiRoom } from './ApiRoom'
|
import { ApiRoom, ApiEncryptionMode } from './ApiRoom'
|
||||||
|
|
||||||
export interface CreateRoomParams {
|
export interface CreateRoomParams {
|
||||||
slug: string
|
slug: string
|
||||||
callbackId?: string
|
callbackId?: string
|
||||||
username?: string
|
username?: string
|
||||||
|
encryptionMode?: ApiEncryptionMode
|
||||||
|
encryptedSymmetricKey?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const createRoom = ({
|
const createRoom = ({
|
||||||
slug,
|
slug,
|
||||||
callbackId,
|
callbackId,
|
||||||
username = '',
|
username = '',
|
||||||
|
encryptionMode = ApiEncryptionMode.NONE,
|
||||||
|
encryptedSymmetricKey = '',
|
||||||
}: CreateRoomParams): Promise<ApiRoom> => {
|
}: CreateRoomParams): Promise<ApiRoom> => {
|
||||||
return fetchApi(`rooms/?username=${encodeURIComponent(username)}`, {
|
const queryParams = username ? `?username=${encodeURIComponent(username)}` : ''
|
||||||
|
return fetchApi(`rooms/${queryParams}`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
name: slug,
|
name: slug,
|
||||||
callback_id: callbackId,
|
callback_id: callbackId,
|
||||||
|
encryption_mode: encryptionMode,
|
||||||
|
encrypted_symmetric_key: encryptedSymmetricKey,
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ export interface EnterRoomParams {
|
|||||||
roomId: string
|
roomId: string
|
||||||
allowEntry: boolean
|
allowEntry: boolean
|
||||||
participantId: string
|
participantId: string
|
||||||
|
encryptedKey?: string
|
||||||
|
adminEphemeralPublicKey?: string
|
||||||
|
encryptedVaultKey?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EnterRoomResponse {
|
export interface EnterRoomResponse {
|
||||||
@@ -16,12 +19,18 @@ export const enterRoom = async ({
|
|||||||
roomId,
|
roomId,
|
||||||
allowEntry,
|
allowEntry,
|
||||||
participantId,
|
participantId,
|
||||||
|
encryptedKey = '',
|
||||||
|
adminEphemeralPublicKey = '',
|
||||||
|
encryptedVaultKey = '',
|
||||||
}: EnterRoomParams): Promise<EnterRoomResponse> => {
|
}: EnterRoomParams): Promise<EnterRoomResponse> => {
|
||||||
return await fetchApi<EnterRoomResponse>(`/rooms/${roomId}/enter/`, {
|
return await fetchApi<EnterRoomResponse>(`/rooms/${roomId}/enter/`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
participant_id: participantId,
|
participant_id: participantId,
|
||||||
allow_entry: allowEntry,
|
allow_entry: allowEntry,
|
||||||
|
encrypted_key: encryptedKey,
|
||||||
|
admin_ephemeral_public_key: adminEphemeralPublicKey,
|
||||||
|
encrypted_vault_key: encryptedVaultKey,
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ export type WaitingParticipant = {
|
|||||||
status: string
|
status: string
|
||||||
username: string
|
username: string
|
||||||
color: string
|
color: string
|
||||||
|
is_authenticated: boolean
|
||||||
|
email?: string
|
||||||
|
suite_user_id?: string
|
||||||
|
ephemeral_public_key?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type WaitingParticipantsResponse = {
|
export type WaitingParticipantsResponse = {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { ApiLiveKit } from '@/features/rooms/api/ApiRoom'
|
|||||||
export interface RequestEntryParams {
|
export interface RequestEntryParams {
|
||||||
roomId: string
|
roomId: string
|
||||||
username?: string
|
username?: string
|
||||||
|
ephemeralPublicKey?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ApiLobbyStatus {
|
export enum ApiLobbyStatus {
|
||||||
@@ -17,16 +18,21 @@ export enum ApiLobbyStatus {
|
|||||||
export interface ApiRequestEntry {
|
export interface ApiRequestEntry {
|
||||||
status: ApiLobbyStatus
|
status: ApiLobbyStatus
|
||||||
livekit?: ApiLiveKit
|
livekit?: ApiLiveKit
|
||||||
|
encrypted_key?: string
|
||||||
|
admin_ephemeral_public_key?: string
|
||||||
|
encrypted_vault_key?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export const requestEntry = async ({
|
export const requestEntry = async ({
|
||||||
roomId,
|
roomId,
|
||||||
username = '',
|
username = '',
|
||||||
|
ephemeralPublicKey = '',
|
||||||
}: RequestEntryParams) => {
|
}: RequestEntryParams) => {
|
||||||
return fetchApi<ApiRequestEntry>(`/rooms/${roomId}/request-entry/`, {
|
return fetchApi<ApiRequestEntry>(`/rooms/${roomId}/request-entry/`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
username,
|
username,
|
||||||
|
ephemeral_public_key: ephemeralPublicKey,
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useEffect, useMemo, useState } from 'react'
|
import { useEffect, useMemo, useRef, useState } from 'react'
|
||||||
import { useQuery } from '@tanstack/react-query'
|
import { useQuery } from '@tanstack/react-query'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import {
|
import {
|
||||||
@@ -7,14 +7,23 @@ import {
|
|||||||
} from '@livekit/components-react'
|
} from '@livekit/components-react'
|
||||||
import {
|
import {
|
||||||
DisconnectReason,
|
DisconnectReason,
|
||||||
|
ExternalE2EEKeyProvider,
|
||||||
MediaDeviceFailure,
|
MediaDeviceFailure,
|
||||||
Room,
|
Room,
|
||||||
RoomOptions,
|
RoomOptions,
|
||||||
VideoPresets,
|
VideoPresets,
|
||||||
} from 'livekit-client'
|
} from 'livekit-client'
|
||||||
|
import { setSymmetricKey, getSymmetricKey, getEncryptedVaultKey, generatePassphrase } from '@/features/encryption/lobbyKeyExchange'
|
||||||
|
import { isEncryptedRoom, ApiEncryptionMode } from '../api/ApiRoom'
|
||||||
|
import { VaultE2EEManager } from '@/features/encryption/VaultE2EEManager'
|
||||||
|
import { useVaultClient } from '@/features/encryption'
|
||||||
import { keys } from '@/api/queryKeys'
|
import { keys } from '@/api/queryKeys'
|
||||||
import { queryClient } from '@/api/queryClient'
|
import { queryClient } from '@/api/queryClient'
|
||||||
import { Screen } from '@/layout/Screen'
|
import { Screen } from '@/layout/Screen'
|
||||||
|
import { CenteredContent } from '@/layout/CenteredContent'
|
||||||
|
import { RiLockLine } from '@remixicon/react'
|
||||||
|
import { Center } from '@/styled-system/jsx'
|
||||||
|
import { Text } from '@/primitives'
|
||||||
import { QueryAware } from '@/components/QueryAware'
|
import { QueryAware } from '@/components/QueryAware'
|
||||||
import { ErrorScreen } from '@/components/ErrorScreen'
|
import { ErrorScreen } from '@/components/ErrorScreen'
|
||||||
import { fetchRoom } from '../api/fetchRoom'
|
import { fetchRoom } from '../api/fetchRoom'
|
||||||
@@ -86,12 +95,49 @@ export const Conference = ({
|
|||||||
retry: false,
|
retry: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const encryptionEnabled = isEncryptedRoom(data)
|
||||||
|
const { client: vaultClient, hasKeys: vaultHasKeys, error: vaultError, isLoading: vaultLoading } = useVaultClient()
|
||||||
|
|
||||||
|
// Determine which E2EE backend to use based solely on the room's encryption_mode.
|
||||||
|
// Advanced mode always uses VaultClient, basic mode always uses LiveKit Worker+KeyProvider.
|
||||||
|
const useVaultE2EE = data?.encryption_mode === ApiEncryptionMode.ADVANCED
|
||||||
|
|
||||||
|
// Refs for both approaches (only one is used per session)
|
||||||
|
const keyProviderRef = useRef<ExternalE2EEKeyProvider | null>(null)
|
||||||
|
const workerRef = useRef<Worker | null>(null)
|
||||||
|
const vaultManagerRef = useRef<VaultE2EEManager | null>(null)
|
||||||
|
const [encryptionSetupComplete, setEncryptionSetupComplete] = useState(!encryptionEnabled)
|
||||||
|
|
||||||
|
const getKeyProvider = () => {
|
||||||
|
if (!keyProviderRef.current && encryptionEnabled && !useVaultE2EE) {
|
||||||
|
keyProviderRef.current = new ExternalE2EEKeyProvider()
|
||||||
|
}
|
||||||
|
return keyProviderRef.current
|
||||||
|
}
|
||||||
|
|
||||||
|
const getWorker = () => {
|
||||||
|
if (!workerRef.current && encryptionEnabled && !useVaultE2EE && typeof window !== 'undefined') {
|
||||||
|
workerRef.current = new Worker(
|
||||||
|
new URL('livekit-client/e2ee-worker', import.meta.url)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return workerRef.current
|
||||||
|
}
|
||||||
|
|
||||||
|
const getVaultManager = () => {
|
||||||
|
if (!vaultManagerRef.current && useVaultE2EE && vaultClient) {
|
||||||
|
vaultManagerRef.current = new VaultE2EEManager(vaultClient)
|
||||||
|
}
|
||||||
|
return vaultManagerRef.current
|
||||||
|
}
|
||||||
|
|
||||||
const roomOptions = useMemo((): RoomOptions => {
|
const roomOptions = useMemo((): RoomOptions => {
|
||||||
return {
|
const baseOptions: RoomOptions = {
|
||||||
adaptiveStream: true,
|
adaptiveStream: true,
|
||||||
dynacast: true,
|
dynacast: true,
|
||||||
publishDefaults: {
|
publishDefaults: {
|
||||||
videoCodec: 'vp9',
|
videoCodec: encryptionEnabled ? undefined : 'vp9',
|
||||||
|
red: !encryptionEnabled,
|
||||||
},
|
},
|
||||||
videoCaptureDefaults: {
|
videoCaptureDefaults: {
|
||||||
deviceId: userConfig.videoDeviceId ?? undefined,
|
deviceId: userConfig.videoDeviceId ?? undefined,
|
||||||
@@ -106,8 +152,25 @@ export const Conference = ({
|
|||||||
deviceId: userConfig.audioOutputDeviceId ?? undefined,
|
deviceId: userConfig.audioOutputDeviceId ?? undefined,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (useVaultE2EE) {
|
||||||
|
const vaultManager = getVaultManager()
|
||||||
|
if (vaultManager) {
|
||||||
|
baseOptions.encryption = { e2eeManager: vaultManager }
|
||||||
|
}
|
||||||
|
} else if (encryptionEnabled) {
|
||||||
|
const worker = getWorker()
|
||||||
|
const keyProvider = getKeyProvider()
|
||||||
|
if (keyProvider && worker) {
|
||||||
|
baseOptions.encryption = { keyProvider, worker }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return baseOptions
|
||||||
// do not rely on the userConfig object directly as its reference may change on every render
|
// do not rely on the userConfig object directly as its reference may change on every render
|
||||||
}, [
|
}, [
|
||||||
|
encryptionEnabled,
|
||||||
|
useVaultE2EE,
|
||||||
userConfig.videoDeviceId,
|
userConfig.videoDeviceId,
|
||||||
userConfig.videoPublishResolution,
|
userConfig.videoPublishResolution,
|
||||||
userConfig.audioDeviceId,
|
userConfig.audioDeviceId,
|
||||||
@@ -116,6 +179,132 @@ export const Conference = ({
|
|||||||
|
|
||||||
const room = useMemo(() => new Room(roomOptions), [roomOptions])
|
const room = useMemo(() => new Room(roomOptions), [roomOptions])
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ensure stable WebSocket connection URL. This is critical for legacy browser compatibility
|
||||||
|
* (Firefox <124, Chrome <125, Edge <125) where HTTPS URLs in WebSocket() constructor
|
||||||
|
* may fail - the force_wss_protocol flag allows explicit WSS protocol conversion
|
||||||
|
*/
|
||||||
|
const serverUrl = useMemo(() => {
|
||||||
|
const livekit_url = apiConfig?.livekit.url
|
||||||
|
if (!livekit_url) return
|
||||||
|
if (apiConfig?.livekit.force_wss_protocol) {
|
||||||
|
return livekit_url.replace('https://', 'wss://')
|
||||||
|
}
|
||||||
|
return livekit_url
|
||||||
|
}, [apiConfig?.livekit])
|
||||||
|
|
||||||
|
// Encryption key setup:
|
||||||
|
// VaultE2EE: admin generates key via vaultClient.encryptWithoutKey(), joiner receives wrapped key
|
||||||
|
// Fallback: admin generates passphrase, joiner receives via lobby DH exchange
|
||||||
|
const isAdmin = mode === 'create' || data?.is_administrable === true
|
||||||
|
const adminPassphraseRef = useRef<string | null>(null)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!encryptionEnabled || encryptionSetupComplete) return
|
||||||
|
|
||||||
|
if (useVaultE2EE) {
|
||||||
|
// Advanced mode: VaultE2EEManager delegates crypto to VaultClient iframe
|
||||||
|
const vaultManager = getVaultManager()
|
||||||
|
if (!vaultManager || !vaultClient) return
|
||||||
|
if (isAdmin) {
|
||||||
|
const existingKey = data?.encrypted_symmetric_key
|
||||||
|
if (existingKey) {
|
||||||
|
const binaryStr = atob(existingKey)
|
||||||
|
const bytes = new Uint8Array(binaryStr.length)
|
||||||
|
for (let i = 0; i < binaryStr.length; i++) bytes[i] = binaryStr.charCodeAt(i)
|
||||||
|
vaultManager.setEncryptedSymmetricKey(bytes.buffer)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const vaultKey = getEncryptedVaultKey()
|
||||||
|
if (vaultKey) {
|
||||||
|
vaultManager.setEncryptedSymmetricKey(vaultKey)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Enable E2EE BEFORE connecting — no tracks exist yet so
|
||||||
|
// republishAllTracks() is a no-op. Calling after connection
|
||||||
|
// triggers republish which times out.
|
||||||
|
room.setE2EEEnabled(true).catch((err) => {
|
||||||
|
console.error('[VaultE2EE] E2EE enable failed:', err)
|
||||||
|
})
|
||||||
|
|
||||||
|
setEncryptionSetupComplete(true)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Basic mode: LiveKit Worker+KeyProvider with passphrase
|
||||||
|
const keyProvider = getKeyProvider()
|
||||||
|
if (!keyProvider) return
|
||||||
|
|
||||||
|
let passphrase: string | null = null
|
||||||
|
|
||||||
|
if (isAdmin) {
|
||||||
|
if (!adminPassphraseRef.current) {
|
||||||
|
const existingHash = window.location.hash.slice(1)
|
||||||
|
if (existingHash) {
|
||||||
|
adminPassphraseRef.current = existingHash
|
||||||
|
} else {
|
||||||
|
adminPassphraseRef.current = generatePassphrase()
|
||||||
|
window.history.replaceState(
|
||||||
|
window.history.state,
|
||||||
|
'',
|
||||||
|
`${window.location.pathname}${window.location.search}#${adminPassphraseRef.current}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
passphrase = adminPassphraseRef.current
|
||||||
|
setSymmetricKey(new TextEncoder().encode(passphrase))
|
||||||
|
} else {
|
||||||
|
const hashKey = window.location.hash.slice(1)
|
||||||
|
if (hashKey) {
|
||||||
|
passphrase = hashKey
|
||||||
|
setSymmetricKey(new TextEncoder().encode(passphrase))
|
||||||
|
} else {
|
||||||
|
const preExchangedKey = getSymmetricKey()
|
||||||
|
if (preExchangedKey) {
|
||||||
|
passphrase = new TextDecoder().decode(preExchangedKey)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!passphrase) {
|
||||||
|
console.error('[Encryption] No passphrase available')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
keyProvider
|
||||||
|
.setKey(passphrase)
|
||||||
|
.then(async () => {
|
||||||
|
// Enable E2EE BEFORE connecting — sets encryptionType=GCM so tracks
|
||||||
|
// are published with encryption metadata from the start.
|
||||||
|
// Also sends 'enable' to the Worker before any frames flow,
|
||||||
|
// eliminating the unencrypted frame window.
|
||||||
|
try {
|
||||||
|
await room.setE2EEEnabled(true)
|
||||||
|
} catch (err) {
|
||||||
|
console.error('[Encryption] E2EE enable failed:', err)
|
||||||
|
}
|
||||||
|
|
||||||
|
setEncryptionSetupComplete(true)
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error('[Encryption] Key setup failed:', err)
|
||||||
|
})
|
||||||
|
|
||||||
|
}, [room, encryptionEnabled, encryptionSetupComplete, isAdmin, useVaultE2EE])
|
||||||
|
|
||||||
|
// In basic encrypted rooms, the passphrase is in the URL hash.
|
||||||
|
// If the user changes the hash (e.g. corrects a typo), reload the page
|
||||||
|
// so the new passphrase is picked up by the encryption setup.
|
||||||
|
useEffect(() => {
|
||||||
|
if (!encryptionEnabled || useVaultE2EE) return
|
||||||
|
const handleHashChange = () => {
|
||||||
|
window.location.reload()
|
||||||
|
}
|
||||||
|
window.addEventListener('hashchange', handleHashChange)
|
||||||
|
return () => window.removeEventListener('hashchange', handleHashChange)
|
||||||
|
}, [encryptionEnabled, useVaultE2EE])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
/**
|
/**
|
||||||
* Warm up connection to LiveKit server before joining room
|
* Warm up connection to LiveKit server before joining room
|
||||||
@@ -172,20 +361,6 @@ export const Conference = ({
|
|||||||
|
|
||||||
const isMobile = useIsMobile()
|
const isMobile = useIsMobile()
|
||||||
|
|
||||||
/*
|
|
||||||
* Ensure stable WebSocket connection URL. This is critical for legacy browser compatibility
|
|
||||||
* (Firefox <124, Chrome <125, Edge <125) where HTTPS URLs in WebSocket() constructor
|
|
||||||
* may fail - the force_wss_protocol flag allows explicit WSS protocol conversion
|
|
||||||
*/
|
|
||||||
const serverUrl = useMemo(() => {
|
|
||||||
const livekit_url = apiConfig?.livekit.url
|
|
||||||
if (!livekit_url) return
|
|
||||||
if (apiConfig?.livekit.force_wss_protocol) {
|
|
||||||
return livekit_url.replace('https://', 'wss://')
|
|
||||||
}
|
|
||||||
return livekit_url
|
|
||||||
}, [apiConfig?.livekit])
|
|
||||||
|
|
||||||
const { t } = useTranslation('rooms')
|
const { t } = useTranslation('rooms')
|
||||||
if (isCreateError) {
|
if (isCreateError) {
|
||||||
// this error screen should be replaced by a proper waiting room for anonymous user.
|
// this error screen should be replaced by a proper waiting room for anonymous user.
|
||||||
@@ -197,6 +372,67 @@ export const Conference = ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Block entry to advanced encrypted rooms when vault service is unavailable
|
||||||
|
if (useVaultE2EE && !vaultLoading && !vaultClient) {
|
||||||
|
return (
|
||||||
|
<Screen layout="centered">
|
||||||
|
<CenteredContent withBackButton>
|
||||||
|
<Center>
|
||||||
|
<div
|
||||||
|
className={css({
|
||||||
|
maxWidth: '400px',
|
||||||
|
backgroundColor: 'white',
|
||||||
|
borderRadius: '1rem',
|
||||||
|
padding: '2rem',
|
||||||
|
boxShadow: '0 2px 12px rgba(0, 0, 0, 0.08)',
|
||||||
|
border: '1px solid',
|
||||||
|
borderColor: 'greyscale.200',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '1rem',
|
||||||
|
textAlign: 'center',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className={css({
|
||||||
|
width: '3.5rem',
|
||||||
|
height: '3.5rem',
|
||||||
|
borderRadius: '50%',
|
||||||
|
backgroundColor: '#fef2f2',
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<RiLockLine size={28} color="#dc2626" />
|
||||||
|
</div>
|
||||||
|
<Text as="h2" className={css({ fontWeight: 700, fontSize: '1.15rem' })}>
|
||||||
|
{t('encryption.error.title')}
|
||||||
|
</Text>
|
||||||
|
<Text as="p" className={css({ fontSize: '0.9rem', color: 'greyscale.700' })}>
|
||||||
|
{t('encryption.error.vaultUnavailable')}
|
||||||
|
</Text>
|
||||||
|
<div
|
||||||
|
className={css({
|
||||||
|
backgroundColor: '#fffbeb',
|
||||||
|
border: '1px solid #fde68a',
|
||||||
|
borderRadius: '0.5rem',
|
||||||
|
padding: '0.75rem 1rem',
|
||||||
|
width: '100%',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<Text as="p" className={css({ fontSize: '0.8rem', color: '#92400e' })}>
|
||||||
|
{t('encryption.error.vaultUnavailableHint')}
|
||||||
|
</Text>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Center>
|
||||||
|
</CenteredContent>
|
||||||
|
</Screen>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// Some clients (like DINUM) operate in bandwidth-constrained environments
|
// Some clients (like DINUM) operate in bandwidth-constrained environments
|
||||||
// These settings help ensure successful connections in poor network conditions
|
// These settings help ensure successful connections in poor network conditions
|
||||||
const connectOptions = {
|
const connectOptions = {
|
||||||
@@ -211,12 +447,12 @@ export const Conference = ({
|
|||||||
room={room}
|
room={room}
|
||||||
serverUrl={serverUrl}
|
serverUrl={serverUrl}
|
||||||
token={data?.livekit?.token}
|
token={data?.livekit?.token}
|
||||||
connect={isConnectionWarmedUp}
|
connect={isConnectionWarmedUp && encryptionSetupComplete}
|
||||||
audio={userConfig.audioEnabled}
|
audio={userConfig.audioEnabled}
|
||||||
video={
|
video={
|
||||||
userConfig.videoEnabled && {
|
userConfig.videoEnabled && {
|
||||||
processor: BackgroundProcessorFactory.deserializeProcessor(
|
processor: BackgroundProcessorFactory.fromProcessorConfig(
|
||||||
userConfig.processorSerialized
|
userConfig.processorConfig
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,11 @@ export const InviteDialog = (props: Omit<DialogProps, 'title'>) => {
|
|||||||
const { t } = useTranslation('rooms', { keyPrefix: 'shareDialog' })
|
const { t } = useTranslation('rooms', { keyPrefix: 'shareDialog' })
|
||||||
|
|
||||||
const roomData = useRoomData()
|
const roomData = useRoomData()
|
||||||
const roomUrl = getRouteUrl('room', roomData?.slug)
|
const baseRoomUrl = getRouteUrl('room', roomData?.slug)
|
||||||
|
// Include the hash (passphrase) for basic encrypted rooms so the full link is visible
|
||||||
|
const roomUrl = window.location.hash
|
||||||
|
? `${baseRoomUrl}${window.location.hash}`
|
||||||
|
: baseRoomUrl
|
||||||
|
|
||||||
const telephony = useTelephony()
|
const telephony = useTelephony()
|
||||||
|
|
||||||
|
|||||||
@@ -4,15 +4,15 @@ import { css } from '@/styled-system/css'
|
|||||||
import { Screen } from '@/layout/Screen'
|
import { Screen } from '@/layout/Screen'
|
||||||
import { useEffect, useMemo, useRef, useState } from 'react'
|
import { useEffect, useMemo, useRef, useState } from 'react'
|
||||||
import {
|
import {
|
||||||
createLocalVideoTrack,
|
|
||||||
createLocalAudioTrack,
|
createLocalAudioTrack,
|
||||||
|
createLocalVideoTrack,
|
||||||
LocalAudioTrack,
|
LocalAudioTrack,
|
||||||
LocalVideoTrack,
|
LocalVideoTrack,
|
||||||
Track,
|
Track,
|
||||||
} from 'livekit-client'
|
} from 'livekit-client'
|
||||||
import { H } from '@/primitives/H'
|
import { H } from '@/primitives/H'
|
||||||
import { Field } from '@/primitives/Field'
|
import { Field } from '@/primitives/Field'
|
||||||
import { Button, Dialog, Text, Form } from '@/primitives'
|
import { Button, Dialog, Form, Text } from '@/primitives'
|
||||||
import { VStack } from '@/styled-system/jsx'
|
import { VStack } from '@/styled-system/jsx'
|
||||||
import { Heading } from 'react-aria-components'
|
import { Heading } from 'react-aria-components'
|
||||||
import { RiImageCircleAiFill } from '@remixicon/react'
|
import { RiImageCircleAiFill } from '@remixicon/react'
|
||||||
@@ -32,8 +32,122 @@ import { useQuery } from '@tanstack/react-query'
|
|||||||
import { queryClient } from '@/api/queryClient'
|
import { queryClient } from '@/api/queryClient'
|
||||||
import { ApiLobbyStatus, ApiRequestEntry } from '../api/requestEntry'
|
import { ApiLobbyStatus, ApiRequestEntry } from '../api/requestEntry'
|
||||||
import { Spinner } from '@/primitives/Spinner'
|
import { Spinner } from '@/primitives/Spinner'
|
||||||
import { ApiAccessLevel } from '../api/ApiRoom'
|
import { ApiAccessLevel, ApiEncryptionMode, isEncryptedRoom as checkEncryptedRoom } from '../api/ApiRoom'
|
||||||
|
import { useVaultClient } from '@/features/encryption'
|
||||||
|
import { LoginButton } from '@/components/LoginButton'
|
||||||
|
|
||||||
|
const AdvancedOnboardingScreen = ({
|
||||||
|
modalOpen,
|
||||||
|
onModalOpenChange,
|
||||||
|
}: {
|
||||||
|
modalOpen: boolean
|
||||||
|
onModalOpenChange: (open: boolean) => void
|
||||||
|
}) => {
|
||||||
|
const { t } = useTranslation('rooms', { keyPrefix: 'join' })
|
||||||
|
const { client: vaultClient } = useVaultClient()
|
||||||
|
const containerRef = useRef<HTMLDivElement>(null)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!modalOpen || !vaultClient) return
|
||||||
|
|
||||||
|
const el = containerRef.current
|
||||||
|
if (!el) return
|
||||||
|
|
||||||
|
el.innerHTML = ''
|
||||||
|
vaultClient.openOnboarding(el)
|
||||||
|
|
||||||
|
const handleClosed = () => {
|
||||||
|
onModalOpenChange(false)
|
||||||
|
vaultClient.off('interface:closed', handleClosed)
|
||||||
|
}
|
||||||
|
vaultClient.on('interface:closed', handleClosed)
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
vaultClient.off('interface:closed', handleClosed)
|
||||||
|
}
|
||||||
|
}, [modalOpen, vaultClient, onModalOpenChange])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<VStack alignItems="center" textAlign="center" gap="0.75rem">
|
||||||
|
<RiLockLine size={32} color="#d97706" />
|
||||||
|
<H lvl={1} margin={false} centered>
|
||||||
|
{t('advancedOnboarding.title')}
|
||||||
|
</H>
|
||||||
|
<Text as="p" variant="note">
|
||||||
|
{t('advancedOnboarding.body')}
|
||||||
|
</Text>
|
||||||
|
<Button
|
||||||
|
variant="primary"
|
||||||
|
onPress={() => onModalOpenChange(true)}
|
||||||
|
>
|
||||||
|
{t('advancedOnboarding.button')}
|
||||||
|
</Button>
|
||||||
|
</VStack>
|
||||||
|
{modalOpen && (
|
||||||
|
<div
|
||||||
|
className={css({
|
||||||
|
position: 'fixed',
|
||||||
|
inset: 0,
|
||||||
|
zIndex: 9999,
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
||||||
|
})}
|
||||||
|
onClick={(e) => {
|
||||||
|
if (e.target === e.currentTarget) {
|
||||||
|
onModalOpenChange(false)
|
||||||
|
vaultClient?.closeInterface()
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className={css({
|
||||||
|
backgroundColor: 'white',
|
||||||
|
borderRadius: '0.75rem',
|
||||||
|
width: '90%',
|
||||||
|
maxWidth: '550px',
|
||||||
|
maxHeight: '85vh',
|
||||||
|
overflow: 'auto',
|
||||||
|
position: 'relative',
|
||||||
|
boxShadow: '0 20px 60px rgba(0, 0, 0, 0.3)',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
onModalOpenChange(false)
|
||||||
|
vaultClient?.closeInterface()
|
||||||
|
}}
|
||||||
|
className={css({
|
||||||
|
position: 'absolute',
|
||||||
|
top: '0.75rem',
|
||||||
|
right: '0.75rem',
|
||||||
|
zIndex: 1,
|
||||||
|
background: 'none',
|
||||||
|
border: 'none',
|
||||||
|
cursor: 'pointer',
|
||||||
|
fontSize: '1.25rem',
|
||||||
|
color: 'greyscale.500',
|
||||||
|
_hover: { color: 'greyscale.900' },
|
||||||
|
})}
|
||||||
|
aria-label="Close"
|
||||||
|
>
|
||||||
|
✕
|
||||||
|
</button>
|
||||||
|
<div
|
||||||
|
ref={containerRef}
|
||||||
|
className={css({ minHeight: '300px' })}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
import { useLoginHint } from '@/hooks/useLoginHint'
|
import { useLoginHint } from '@/hooks/useLoginHint'
|
||||||
|
import { useUser } from '@/features/auth'
|
||||||
|
import { RiInformationLine, RiLockLine } from '@remixicon/react'
|
||||||
import { openPermissionsDialog } from '@/stores/permissions'
|
import { openPermissionsDialog } from '@/stores/permissions'
|
||||||
import { useResolveInitiallyDefaultDeviceId } from '../livekit/hooks/useResolveInitiallyDefaultDeviceId'
|
import { useResolveInitiallyDefaultDeviceId } from '../livekit/hooks/useResolveInitiallyDefaultDeviceId'
|
||||||
import { isSafari } from '@/utils/livekit'
|
import { isSafari } from '@/utils/livekit'
|
||||||
@@ -44,8 +158,7 @@ const onError = (e: Error) => console.error('ERROR', e)
|
|||||||
|
|
||||||
const Effects = ({
|
const Effects = ({
|
||||||
videoTrack,
|
videoTrack,
|
||||||
onSubmit,
|
}: Pick<EffectsConfigurationProps, 'videoTrack'>) => {
|
||||||
}: Pick<EffectsConfigurationProps, 'videoTrack' | 'onSubmit'>) => {
|
|
||||||
const { t } = useTranslation('rooms', { keyPrefix: 'join.effects' })
|
const { t } = useTranslation('rooms', { keyPrefix: 'join.effects' })
|
||||||
const [isDialogOpen, setIsDialogOpen] = useState(false)
|
const [isDialogOpen, setIsDialogOpen] = useState(false)
|
||||||
const openDialog = () => setIsDialogOpen(true)
|
const openDialog = () => setIsDialogOpen(true)
|
||||||
@@ -81,7 +194,7 @@ const Effects = ({
|
|||||||
>
|
>
|
||||||
{t('subTitle')}
|
{t('subTitle')}
|
||||||
</Text>
|
</Text>
|
||||||
<EffectsConfiguration videoTrack={videoTrack} onSubmit={onSubmit} />
|
<EffectsConfiguration videoTrack={videoTrack} />
|
||||||
</Dialog>
|
</Dialog>
|
||||||
<Button
|
<Button
|
||||||
variant="whiteCircle"
|
variant="whiteCircle"
|
||||||
@@ -103,6 +216,31 @@ export const Join = ({
|
|||||||
roomId: string
|
roomId: string
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation('rooms', { keyPrefix: 'join' })
|
const { t } = useTranslation('rooms', { keyPrefix: 'join' })
|
||||||
|
const { isLoggedIn, user } = useUser()
|
||||||
|
|
||||||
|
// Early fetch to check if the room is encrypted (needed before form submission)
|
||||||
|
const { data: roomInfo } = useQuery({
|
||||||
|
queryKey: [keys.room, roomId, 'info'],
|
||||||
|
queryFn: () => fetchRoom({ roomId }),
|
||||||
|
staleTime: 6 * 60 * 60 * 1000,
|
||||||
|
retry: false,
|
||||||
|
})
|
||||||
|
const isEncryptedRoom = checkEncryptedRoom(roomInfo)
|
||||||
|
const isBasicEncrypted = roomInfo?.encryption_mode === ApiEncryptionMode.BASIC
|
||||||
|
const isAdvancedEncrypted = roomInfo?.encryption_mode === ApiEncryptionMode.ADVANCED
|
||||||
|
|
||||||
|
// Basic mode: validate the passphrase in the URL hash
|
||||||
|
const hashKey = window.location.hash.slice(1)
|
||||||
|
const hasValidBasicKey = isBasicEncrypted ? (hashKey.length === 48 && /^[a-z0-9]+$/.test(hashKey)) : true
|
||||||
|
|
||||||
|
// Advanced mode: require auth + vault onboarding
|
||||||
|
const { hasKeys: vaultHasKeys, isReady: vaultReady } = useVaultClient()
|
||||||
|
const advancedRequiresLogin = isAdvancedEncrypted && !isLoggedIn
|
||||||
|
const advancedRequiresOnboarding = isAdvancedEncrypted && isLoggedIn && vaultReady && !vaultHasKeys
|
||||||
|
|
||||||
|
// In encrypted rooms, authenticated users must use their OIDC name
|
||||||
|
const isNameLocked = isEncryptedRoom && !!isLoggedIn
|
||||||
|
const lockedName = user?.full_name || user?.email || ''
|
||||||
|
|
||||||
const {
|
const {
|
||||||
userChoices: {
|
userChoices: {
|
||||||
@@ -111,7 +249,7 @@ export const Join = ({
|
|||||||
audioDeviceId,
|
audioDeviceId,
|
||||||
audioOutputDeviceId,
|
audioOutputDeviceId,
|
||||||
videoDeviceId,
|
videoDeviceId,
|
||||||
processorSerialized,
|
processorConfig,
|
||||||
username,
|
username,
|
||||||
},
|
},
|
||||||
saveAudioInputEnabled,
|
saveAudioInputEnabled,
|
||||||
@@ -120,7 +258,6 @@ export const Join = ({
|
|||||||
saveAudioInputDeviceId,
|
saveAudioInputDeviceId,
|
||||||
saveVideoInputDeviceId,
|
saveVideoInputDeviceId,
|
||||||
saveUsername,
|
saveUsername,
|
||||||
saveProcessorSerialized,
|
|
||||||
} = usePersistentUserChoices()
|
} = usePersistentUserChoices()
|
||||||
|
|
||||||
const initialUserChoices = useRef<LocalUserChoices | null>(null)
|
const initialUserChoices = useRef<LocalUserChoices | null>(null)
|
||||||
@@ -132,7 +269,7 @@ export const Join = ({
|
|||||||
audioDeviceId,
|
audioDeviceId,
|
||||||
audioOutputDeviceId,
|
audioOutputDeviceId,
|
||||||
videoDeviceId,
|
videoDeviceId,
|
||||||
processorSerialized,
|
processorConfig,
|
||||||
username,
|
username,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -146,8 +283,8 @@ export const Join = ({
|
|||||||
video: !!initialUserChoices.current &&
|
video: !!initialUserChoices.current &&
|
||||||
initialUserChoices.current?.videoEnabled && {
|
initialUserChoices.current?.videoEnabled && {
|
||||||
deviceId: initialUserChoices.current.videoDeviceId,
|
deviceId: initialUserChoices.current.videoDeviceId,
|
||||||
processor: BackgroundProcessorFactory.deserializeProcessor(
|
processor: BackgroundProcessorFactory.fromProcessorConfig(
|
||||||
initialUserChoices.current.processorSerialized
|
initialUserChoices.current.processorConfig
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -186,9 +323,7 @@ export const Join = ({
|
|||||||
const track = await createLocalVideoTrack({
|
const track = await createLocalVideoTrack({
|
||||||
deviceId: { exact: videoDeviceId },
|
deviceId: { exact: videoDeviceId },
|
||||||
processor:
|
processor:
|
||||||
BackgroundProcessorFactory.deserializeProcessor(
|
BackgroundProcessorFactory.fromProcessorConfig(processorConfig),
|
||||||
processorSerialized
|
|
||||||
),
|
|
||||||
})
|
})
|
||||||
setDynamicVideoTrack(track)
|
setDynamicVideoTrack(track)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -207,7 +342,7 @@ export const Join = ({
|
|||||||
}, [
|
}, [
|
||||||
videoEnabled,
|
videoEnabled,
|
||||||
videoDeviceId,
|
videoDeviceId,
|
||||||
processorSerialized,
|
processorConfig,
|
||||||
previewVideoTrack,
|
previewVideoTrack,
|
||||||
dynamicVideoTrack,
|
dynamicVideoTrack,
|
||||||
])
|
])
|
||||||
@@ -329,8 +464,10 @@ export const Join = ({
|
|||||||
roomId,
|
roomId,
|
||||||
username,
|
username,
|
||||||
onAccepted: handleAccepted,
|
onAccepted: handleAccepted,
|
||||||
|
encryptionEnabled: isEncryptedRoom,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const [advancedOnboardingOpen, setAdvancedOnboardingOpen] = useState(false)
|
||||||
const { openLoginHint } = useLoginHint()
|
const { openLoginHint } = useLoginHint()
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
@@ -430,6 +567,41 @@ export const Join = ({
|
|||||||
)
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
if (advancedRequiresLogin) {
|
||||||
|
return (
|
||||||
|
<VStack alignItems="center" textAlign="center" gap="0.75rem">
|
||||||
|
<RiLockLine size={32} color="#2563eb" />
|
||||||
|
<H lvl={1} margin={false} centered>
|
||||||
|
{t('advancedAuth.title')}
|
||||||
|
</H>
|
||||||
|
<Text as="p" variant="note">
|
||||||
|
{t('advancedAuth.body')}
|
||||||
|
</Text>
|
||||||
|
<LoginButton proConnectHint={false} />
|
||||||
|
</VStack>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (advancedRequiresOnboarding || advancedOnboardingOpen) {
|
||||||
|
return (
|
||||||
|
<AdvancedOnboardingScreen
|
||||||
|
modalOpen={advancedOnboardingOpen}
|
||||||
|
onModalOpenChange={setAdvancedOnboardingOpen}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (isBasicEncrypted && !hasValidBasicKey) {
|
||||||
|
return (
|
||||||
|
<VStack alignItems="center" textAlign="center" gap="0.75rem">
|
||||||
|
<RiLockLine size={32} color="#dc2626" />
|
||||||
|
<H lvl={1} margin={false} centered>
|
||||||
|
{t('invalidKey.title')}
|
||||||
|
</H>
|
||||||
|
<Text as="p" variant="note">
|
||||||
|
{t('invalidKey.body')}
|
||||||
|
</Text>
|
||||||
|
</VStack>
|
||||||
|
)
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<Form
|
<Form
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
@@ -442,20 +614,81 @@ export const Join = ({
|
|||||||
<H lvl={1} margin="sm" centered>
|
<H lvl={1} margin="sm" centered>
|
||||||
{t('heading')}
|
{t('heading')}
|
||||||
</H>
|
</H>
|
||||||
<Field
|
{isNameLocked ? (
|
||||||
type="text"
|
<div
|
||||||
onChange={saveUsername}
|
className={css({
|
||||||
label={t('usernameLabel')}
|
display: 'flex',
|
||||||
id="input-name"
|
flexDirection: 'column',
|
||||||
defaultValue={username}
|
gap: '0.25rem',
|
||||||
validate={(value) => !value && t('errors.usernameEmpty')}
|
width: '100%',
|
||||||
wrapperProps={{
|
})}
|
||||||
noMargin: true,
|
>
|
||||||
fullWidth: true,
|
<Text
|
||||||
}}
|
variant="sm"
|
||||||
autoComplete="name"
|
className={css({
|
||||||
maxLength={50}
|
color: 'greyscale.500',
|
||||||
/>
|
fontSize: '0.8rem',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{t('usernameLabel')}
|
||||||
|
</Text>
|
||||||
|
<div
|
||||||
|
className={css({
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '0.5rem',
|
||||||
|
padding: '0.5rem 0.75rem',
|
||||||
|
backgroundColor: 'greyscale.100',
|
||||||
|
borderRadius: '0.375rem',
|
||||||
|
border: '1px solid',
|
||||||
|
borderColor: 'greyscale.200',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<RiLockLine size={14} color="#6b7280" />
|
||||||
|
<Text
|
||||||
|
variant="sm"
|
||||||
|
className={css({
|
||||||
|
fontWeight: 500,
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{lockedName}
|
||||||
|
</Text>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className={css({
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '0.25rem',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<RiInformationLine size={12} color="#9ca3af" />
|
||||||
|
<Text
|
||||||
|
variant="note"
|
||||||
|
className={css({
|
||||||
|
fontSize: '0.7rem',
|
||||||
|
color: 'greyscale.400',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{t('encryptedNameLocked')}
|
||||||
|
</Text>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
onChange={saveUsername}
|
||||||
|
label={t('usernameLabel')}
|
||||||
|
id="input-name"
|
||||||
|
defaultValue={username}
|
||||||
|
validate={(value) => !value && t('errors.usernameEmpty')}
|
||||||
|
wrapperProps={{
|
||||||
|
noMargin: true,
|
||||||
|
fullWidth: true,
|
||||||
|
}}
|
||||||
|
autoComplete="name"
|
||||||
|
maxLength={50}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</VStack>
|
</VStack>
|
||||||
</Form>
|
</Form>
|
||||||
)
|
)
|
||||||
@@ -690,12 +923,7 @@ export const Join = ({
|
|||||||
zIndex: '1',
|
zIndex: '1',
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<Effects
|
<Effects videoTrack={videoTrack} />
|
||||||
videoTrack={videoTrack}
|
|
||||||
onSubmit={(processor) =>
|
|
||||||
saveProcessorSerialized(processor?.serialize())
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import {
|
|||||||
ApiLobbyStatus,
|
ApiLobbyStatus,
|
||||||
ApiRequestEntry,
|
ApiRequestEntry,
|
||||||
} from '../api/requestEntry'
|
} from '../api/requestEntry'
|
||||||
|
import {
|
||||||
|
setSymmetricKey,
|
||||||
|
setEncryptedVaultKey,
|
||||||
|
} from '@/features/encryption/lobbyKeyExchange'
|
||||||
|
|
||||||
export const WAIT_TIMEOUT_MS = 600000 // 10 minutes
|
export const WAIT_TIMEOUT_MS = 600000 // 10 minutes
|
||||||
export const POLL_INTERVAL_MS = 1000
|
export const POLL_INTERVAL_MS = 1000
|
||||||
@@ -14,14 +18,15 @@ export const useLobby = ({
|
|||||||
roomId,
|
roomId,
|
||||||
username,
|
username,
|
||||||
onAccepted,
|
onAccepted,
|
||||||
|
encryptionEnabled = false,
|
||||||
}: {
|
}: {
|
||||||
roomId: string
|
roomId: string
|
||||||
username: string
|
username: string
|
||||||
onAccepted: (e: ApiRequestEntry) => void
|
onAccepted: (e: ApiRequestEntry) => void
|
||||||
|
encryptionEnabled?: boolean
|
||||||
}) => {
|
}) => {
|
||||||
const [status, setStatus] = useState(ApiLobbyStatus.IDLE)
|
const [status, setStatus] = useState(ApiLobbyStatus.IDLE)
|
||||||
const waitingTimeoutRef = useRef<NodeJS.Timeout | null>(null)
|
const waitingTimeoutRef = useRef<NodeJS.Timeout | null>(null)
|
||||||
|
|
||||||
const clearWaitingTimeout = useCallback(() => {
|
const clearWaitingTimeout = useCallback(() => {
|
||||||
if (waitingTimeoutRef.current) {
|
if (waitingTimeoutRef.current) {
|
||||||
clearTimeout(waitingTimeoutRef.current)
|
clearTimeout(waitingTimeoutRef.current)
|
||||||
@@ -47,6 +52,20 @@ export const useLobby = ({
|
|||||||
if (response.status === ApiLobbyStatus.ACCEPTED) {
|
if (response.status === ApiLobbyStatus.ACCEPTED) {
|
||||||
clearWaitingTimeout()
|
clearWaitingTimeout()
|
||||||
setStatus(ApiLobbyStatus.ACCEPTED)
|
setStatus(ApiLobbyStatus.ACCEPTED)
|
||||||
|
|
||||||
|
// Advanced mode: vault-wrapped key
|
||||||
|
if (encryptionEnabled && response.encrypted_vault_key) {
|
||||||
|
console.info('[VaultE2EE] Joiner: received encrypted_vault_key from lobby, length:', response.encrypted_vault_key.length)
|
||||||
|
const binaryStr = atob(response.encrypted_vault_key)
|
||||||
|
const bytes = new Uint8Array(binaryStr.length)
|
||||||
|
for (let i = 0; i < binaryStr.length; i++) {
|
||||||
|
bytes[i] = binaryStr.charCodeAt(i)
|
||||||
|
}
|
||||||
|
setEncryptedVaultKey(bytes.buffer)
|
||||||
|
} else if (encryptionEnabled) {
|
||||||
|
console.warn('[VaultE2EE] Joiner: ACCEPTED but no encrypted_vault_key in response', response)
|
||||||
|
}
|
||||||
|
|
||||||
onAccepted(response)
|
onAccepted(response)
|
||||||
} else if (response.status === ApiLobbyStatus.DENIED) {
|
} else if (response.status === ApiLobbyStatus.DENIED) {
|
||||||
clearWaitingTimeout()
|
clearWaitingTimeout()
|
||||||
@@ -60,7 +79,7 @@ export const useLobby = ({
|
|||||||
enabled: status === ApiLobbyStatus.WAITING,
|
enabled: status === ApiLobbyStatus.WAITING,
|
||||||
})
|
})
|
||||||
|
|
||||||
const startWaiting = useCallback(() => {
|
const startWaiting = useCallback(async () => {
|
||||||
setStatus(ApiLobbyStatus.WAITING)
|
setStatus(ApiLobbyStatus.WAITING)
|
||||||
startWaitingTimeout()
|
startWaitingTimeout()
|
||||||
}, [startWaitingTimeout])
|
}, [startWaitingTimeout])
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'
|
|||||||
import { useRoomContext } from '@livekit/components-react'
|
import { useRoomContext } from '@livekit/components-react'
|
||||||
import { RoomEvent } from 'livekit-client'
|
import { RoomEvent } from 'livekit-client'
|
||||||
import { useRoomData } from '@/features/rooms/livekit/hooks/useRoomData'
|
import { useRoomData } from '@/features/rooms/livekit/hooks/useRoomData'
|
||||||
|
import { isEncryptedRoom as checkEncryptedRoom, ApiEncryptionMode } from '@/features/rooms/api/ApiRoom'
|
||||||
import { useIsAdminOrOwner } from '@/features/rooms/livekit/hooks/useIsAdminOrOwner'
|
import { useIsAdminOrOwner } from '@/features/rooms/livekit/hooks/useIsAdminOrOwner'
|
||||||
import { useEnterRoom } from '../api/enterRoom'
|
import { useEnterRoom } from '../api/enterRoom'
|
||||||
import {
|
import {
|
||||||
@@ -10,6 +11,8 @@ import {
|
|||||||
} from '../api/listWaitingParticipants'
|
} from '../api/listWaitingParticipants'
|
||||||
import { decodeNotificationDataReceived } from '@/features/notifications/utils'
|
import { decodeNotificationDataReceived } from '@/features/notifications/utils'
|
||||||
import { NotificationType } from '@/features/notifications/NotificationType'
|
import { NotificationType } from '@/features/notifications/NotificationType'
|
||||||
|
import { useVaultClient } from '@/features/encryption'
|
||||||
|
import { toastQueue } from '@/features/notifications/components/ToastProvider'
|
||||||
|
|
||||||
export const POLL_INTERVAL_MS = 1000
|
export const POLL_INTERVAL_MS = 1000
|
||||||
|
|
||||||
@@ -18,9 +21,12 @@ export const useWaitingParticipants = () => {
|
|||||||
|
|
||||||
const roomData = useRoomData()
|
const roomData = useRoomData()
|
||||||
const roomId = roomData?.id || '' // FIXME - bad practice
|
const roomId = roomData?.id || '' // FIXME - bad practice
|
||||||
|
const encrypted = checkEncryptedRoom(roomData)
|
||||||
|
const isAdvancedMode = roomData?.encryption_mode === ApiEncryptionMode.ADVANCED
|
||||||
|
|
||||||
const room = useRoomContext()
|
const room = useRoomContext()
|
||||||
const isAdminOrOwner = useIsAdminOrOwner()
|
const isAdminOrOwner = useIsAdminOrOwner()
|
||||||
|
const { client: vaultClient } = useVaultClient()
|
||||||
|
|
||||||
const handleDataReceived = useCallback((payload: Uint8Array) => {
|
const handleDataReceived = useCallback((payload: Uint8Array) => {
|
||||||
const notification = decodeNotificationDataReceived(payload)
|
const notification = decodeNotificationDataReceived(payload)
|
||||||
@@ -57,14 +63,91 @@ export const useWaitingParticipants = () => {
|
|||||||
|
|
||||||
const { mutateAsync: enterRoom } = useEnterRoom()
|
const { mutateAsync: enterRoom } = useEnterRoom()
|
||||||
|
|
||||||
|
const encryptKeyForAccept = async (participant: WaitingParticipant) => {
|
||||||
|
let encryptedKey = ''
|
||||||
|
let adminEphemeralPublicKey = ''
|
||||||
|
let encryptedVaultKey = ''
|
||||||
|
|
||||||
|
if (isAdvancedMode) {
|
||||||
|
// Advanced mode: re-wrap the existing symmetric key for the joiner.
|
||||||
|
// All steps are mandatory — if any fails, the participant must NOT be accepted
|
||||||
|
// (they would join without a key and see nothing).
|
||||||
|
if (!vaultClient) {
|
||||||
|
throw new Error('Encryption service is not available')
|
||||||
|
}
|
||||||
|
if (!participant.suite_user_id) {
|
||||||
|
throw new Error('Participant has no vault identity — they may not be authenticated')
|
||||||
|
}
|
||||||
|
|
||||||
|
const adminKeyBase64 = roomData?.encrypted_symmetric_key
|
||||||
|
if (!adminKeyBase64) {
|
||||||
|
throw new Error('Admin has no encrypted symmetric key for this room')
|
||||||
|
}
|
||||||
|
|
||||||
|
console.info('[VaultE2EE] Admin: wrapping key for joiner', participant.suite_user_id)
|
||||||
|
const adminKeyBinary = atob(adminKeyBase64)
|
||||||
|
const adminKeyBytes = new Uint8Array(adminKeyBinary.length)
|
||||||
|
for (let i = 0; i < adminKeyBinary.length; i++) adminKeyBytes[i] = adminKeyBinary.charCodeAt(i)
|
||||||
|
|
||||||
|
// Fetch joiner's vault public key
|
||||||
|
const { publicKeys } = await vaultClient.fetchPublicKeys([participant.suite_user_id])
|
||||||
|
const joinerPubKey = publicKeys[participant.suite_user_id]
|
||||||
|
if (!joinerPubKey) {
|
||||||
|
throw new Error(`Could not find encryption public key for participant "${participant.username}"`)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Re-wrap the symmetric key for the joiner using shareKeys
|
||||||
|
const { encryptedKeys } = await vaultClient.shareKeys(
|
||||||
|
adminKeyBytes.buffer,
|
||||||
|
{ [participant.suite_user_id]: joinerPubKey }
|
||||||
|
)
|
||||||
|
const joinerKey = encryptedKeys[participant.suite_user_id]
|
||||||
|
if (!joinerKey) {
|
||||||
|
throw new Error('Key wrapping returned no result — shareKeys failed')
|
||||||
|
}
|
||||||
|
|
||||||
|
const bytes = new Uint8Array(joinerKey)
|
||||||
|
encryptedVaultKey = btoa(String.fromCharCode(...bytes))
|
||||||
|
console.info('[VaultE2EE] Admin: key wrapped successfully, length:', encryptedVaultKey.length)
|
||||||
|
}
|
||||||
|
|
||||||
|
return { encryptedKey, adminEphemeralPublicKey, encryptedVaultKey }
|
||||||
|
}
|
||||||
|
|
||||||
const handleParticipantEntry = async (
|
const handleParticipantEntry = async (
|
||||||
participant: WaitingParticipant,
|
participant: WaitingParticipant,
|
||||||
allowEntry: boolean
|
allowEntry: boolean
|
||||||
) => {
|
) => {
|
||||||
|
let encryptedKey = ''
|
||||||
|
let adminEphemeralPublicKey = ''
|
||||||
|
let encryptedVaultKey = ''
|
||||||
|
|
||||||
|
if (allowEntry) {
|
||||||
|
try {
|
||||||
|
const keys = await encryptKeyForAccept(participant)
|
||||||
|
encryptedKey = keys.encryptedKey
|
||||||
|
adminEphemeralPublicKey = keys.adminEphemeralPublicKey
|
||||||
|
encryptedVaultKey = keys.encryptedVaultKey
|
||||||
|
} catch (err) {
|
||||||
|
console.error('[VaultE2EE] Cannot accept participant:', err)
|
||||||
|
toastQueue.add(
|
||||||
|
{
|
||||||
|
type: 'encryptionError' as NotificationType,
|
||||||
|
message: `Cannot accept ${participant.username}: ${(err as Error).message}`,
|
||||||
|
},
|
||||||
|
{ timeout: 8000 }
|
||||||
|
)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
await enterRoom({
|
await enterRoom({
|
||||||
roomId: roomId,
|
roomId: roomId,
|
||||||
allowEntry,
|
allowEntry,
|
||||||
participantId: participant.id,
|
participantId: participant.id,
|
||||||
|
encryptedKey,
|
||||||
|
adminEphemeralPublicKey,
|
||||||
|
encryptedVaultKey,
|
||||||
})
|
})
|
||||||
await refetchWaiting()
|
await refetchWaiting()
|
||||||
}
|
}
|
||||||
@@ -76,13 +159,39 @@ export const useWaitingParticipants = () => {
|
|||||||
setListEnabled(false)
|
setListEnabled(false)
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
waitingParticipants.map((participant) =>
|
waitingParticipants.map(async (participant) => {
|
||||||
enterRoom({
|
let encryptedKey = ''
|
||||||
|
let adminEphemeralPublicKey = ''
|
||||||
|
let encryptedVaultKey = ''
|
||||||
|
|
||||||
|
if (allowEntry) {
|
||||||
|
try {
|
||||||
|
const keys = await encryptKeyForAccept(participant)
|
||||||
|
encryptedKey = keys.encryptedKey
|
||||||
|
adminEphemeralPublicKey = keys.adminEphemeralPublicKey
|
||||||
|
encryptedVaultKey = keys.encryptedVaultKey
|
||||||
|
} catch (err) {
|
||||||
|
console.error('[VaultE2EE] Cannot accept participant:', err)
|
||||||
|
toastQueue.add(
|
||||||
|
{
|
||||||
|
type: 'encryptionError' as NotificationType,
|
||||||
|
message: `Cannot accept ${participant.username}: ${(err as Error).message}`,
|
||||||
|
},
|
||||||
|
{ timeout: 8000 }
|
||||||
|
)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return enterRoom({
|
||||||
roomId: roomId,
|
roomId: roomId,
|
||||||
allowEntry,
|
allowEntry,
|
||||||
participantId: participant.id,
|
participantId: participant.id,
|
||||||
|
encryptedKey,
|
||||||
|
adminEphemeralPublicKey,
|
||||||
|
encryptedVaultKey,
|
||||||
})
|
})
|
||||||
)
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
await refetchWaiting()
|
await refetchWaiting()
|
||||||
|
|||||||
@@ -4,12 +4,14 @@ import { Separator as RACSeparator } from 'react-aria-components'
|
|||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { usePatchRoom } from '@/features/rooms/api/patchRoom'
|
import { usePatchRoom } from '@/features/rooms/api/patchRoom'
|
||||||
import { fetchRoom } from '@/features/rooms/api/fetchRoom'
|
import { fetchRoom } from '@/features/rooms/api/fetchRoom'
|
||||||
import { ApiAccessLevel } from '@/features/rooms/api/ApiRoom'
|
import { ApiAccessLevel, isEncryptedRoom } from '@/features/rooms/api/ApiRoom'
|
||||||
import { queryClient } from '@/api/queryClient'
|
import { queryClient } from '@/api/queryClient'
|
||||||
import { keys } from '@/api/queryKeys'
|
import { keys } from '@/api/queryKeys'
|
||||||
import { useQuery } from '@tanstack/react-query'
|
import { useQuery } from '@tanstack/react-query'
|
||||||
import { useParams } from 'wouter'
|
import { useParams } from 'wouter'
|
||||||
import { usePublishSourcesManager } from '@/features/rooms/livekit/hooks/usePublishSourcesManager'
|
import { usePublishSourcesManager } from '@/features/rooms/livekit/hooks/usePublishSourcesManager'
|
||||||
|
import { RiLockFill } from '@remixicon/react'
|
||||||
|
import { HStack } from '@/styled-system/jsx'
|
||||||
|
|
||||||
export const Admin = () => {
|
export const Admin = () => {
|
||||||
const { t } = useTranslation('rooms', { keyPrefix: 'admin' })
|
const { t } = useTranslation('rooms', { keyPrefix: 'admin' })
|
||||||
@@ -166,6 +168,25 @@ export const Admin = () => {
|
|||||||
>
|
>
|
||||||
{t('access.description')}
|
{t('access.description')}
|
||||||
</Text>
|
</Text>
|
||||||
|
{isEncryptedRoom(readOnlyData) && (
|
||||||
|
<HStack
|
||||||
|
gap="0.5rem"
|
||||||
|
className={css({
|
||||||
|
backgroundColor: 'primary.100',
|
||||||
|
borderRadius: '0.5rem',
|
||||||
|
padding: '0.75rem',
|
||||||
|
marginBottom: '0.75rem',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<RiLockFill size={16} className={css({ flexShrink: 0 })} />
|
||||||
|
<Text
|
||||||
|
variant="note"
|
||||||
|
className={css({ textStyle: 'sm' })}
|
||||||
|
>
|
||||||
|
{t('access.encryptionWarning')}
|
||||||
|
</Text>
|
||||||
|
</HStack>
|
||||||
|
)}
|
||||||
<Field
|
<Field
|
||||||
type="radioGroup"
|
type="radioGroup"
|
||||||
label={t('access.type')}
|
label={t('access.type')}
|
||||||
@@ -192,11 +213,13 @@ export const Admin = () => {
|
|||||||
value: ApiAccessLevel.PUBLIC,
|
value: ApiAccessLevel.PUBLIC,
|
||||||
label: t('access.levels.public.label'),
|
label: t('access.levels.public.label'),
|
||||||
description: t('access.levels.public.description'),
|
description: t('access.levels.public.description'),
|
||||||
|
isDisabled: isEncryptedRoom(readOnlyData),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: ApiAccessLevel.TRUSTED,
|
value: ApiAccessLevel.TRUSTED,
|
||||||
label: t('access.levels.trusted.label'),
|
label: t('access.levels.trusted.label'),
|
||||||
description: t('access.levels.trusted.description'),
|
description: t('access.levels.trusted.description'),
|
||||||
|
isDisabled: isEncryptedRoom(readOnlyData),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: ApiAccessLevel.RESTRICTED,
|
value: ApiAccessLevel.RESTRICTED,
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ export const Info = () => {
|
|||||||
const { t } = useTranslation('rooms', { keyPrefix: 'info' })
|
const { t } = useTranslation('rooms', { keyPrefix: 'info' })
|
||||||
|
|
||||||
const data = useRoomData()
|
const data = useRoomData()
|
||||||
const roomUrl = getRouteUrl('room', data?.slug)
|
const baseRoomUrl = getRouteUrl('room', data?.slug)
|
||||||
|
const roomUrl = window.location.hash
|
||||||
|
? `${baseRoomUrl}${window.location.hash}`
|
||||||
|
: baseRoomUrl
|
||||||
|
|
||||||
const telephony = useTelephony()
|
const telephony = useTelephony()
|
||||||
|
|
||||||
@@ -50,7 +53,14 @@ export const Info = () => {
|
|||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<Text as="p" variant="xsNote" wrap="pretty">
|
<Text
|
||||||
|
as="p"
|
||||||
|
variant="xsNote"
|
||||||
|
className={css({
|
||||||
|
wordBreak: 'break-all',
|
||||||
|
whiteSpace: 'normal',
|
||||||
|
})}
|
||||||
|
>
|
||||||
{roomUrl.replace(/^https?:\/\//, '')}
|
{roomUrl.replace(/^https?:\/\//, '')}
|
||||||
</Text>
|
</Text>
|
||||||
{isTelephonyReadyForUse && (
|
{isTelephonyReadyForUse && (
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
AudioTrack,
|
AudioTrack,
|
||||||
ConnectionQualityIndicator,
|
ConnectionQualityIndicator,
|
||||||
LockLockedIcon,
|
|
||||||
ParticipantTileProps,
|
ParticipantTileProps,
|
||||||
ScreenShareIcon,
|
ScreenShareIcon,
|
||||||
useEnsureTrackRef,
|
useEnsureTrackRef,
|
||||||
@@ -20,10 +19,23 @@ import {
|
|||||||
isTrackReferencePinned,
|
isTrackReferencePinned,
|
||||||
TrackReferenceOrPlaceholder,
|
TrackReferenceOrPlaceholder,
|
||||||
} from '@livekit/components-core'
|
} from '@livekit/components-core'
|
||||||
import { Track } from 'livekit-client'
|
import { Track, RoomEvent } from 'livekit-client'
|
||||||
|
import type { Participant } from 'livekit-client'
|
||||||
import { RiHand } from '@remixicon/react'
|
import { RiHand } from '@remixicon/react'
|
||||||
|
import { useRoomContext } from '@livekit/components-react'
|
||||||
import { useRaisedHand, useRaisedHandPosition } from '../hooks/useRaisedHand'
|
import { useRaisedHand, useRaisedHandPosition } from '../hooks/useRaisedHand'
|
||||||
|
import {
|
||||||
|
EncryptionBadge,
|
||||||
|
EncryptionIdentityDialog,
|
||||||
|
} from '@/features/encryption'
|
||||||
|
import { useParticipantTrustLevel } from '@/features/encryption/useParticipantTrustLevel'
|
||||||
|
import { useRoomData } from '../hooks/useRoomData'
|
||||||
|
import { isEncryptedRoom as checkEncryptedRoom } from '@/features/rooms/api/ApiRoom'
|
||||||
|
import { useIsAdminOrOwner } from '../hooks/useIsAdminOrOwner'
|
||||||
|
import { RiLockFill } from '@remixicon/react'
|
||||||
|
import { css } from '@/styled-system/css'
|
||||||
import { HStack } from '@/styled-system/jsx'
|
import { HStack } from '@/styled-system/jsx'
|
||||||
|
import { Button } from '@/primitives'
|
||||||
import { MutedMicIndicator } from './MutedMicIndicator'
|
import { MutedMicIndicator } from './MutedMicIndicator'
|
||||||
import { ParticipantPlaceholder } from './ParticipantPlaceholder'
|
import { ParticipantPlaceholder } from './ParticipantPlaceholder'
|
||||||
import { ParticipantTileFocus } from './ParticipantTileFocus'
|
import { ParticipantTileFocus } from './ParticipantTileFocus'
|
||||||
@@ -31,6 +43,8 @@ import { FullScreenShareWarning } from './FullScreenShareWarning'
|
|||||||
import { ParticipantName } from './ParticipantName'
|
import { ParticipantName } from './ParticipantName'
|
||||||
import { getParticipantName } from '@/features/rooms/utils/getParticipantName'
|
import { getParticipantName } from '@/features/rooms/utils/getParticipantName'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
import { getShortcutDescriptorById } from '@/features/shortcuts/catalog'
|
||||||
|
import { formatShortcutLabel } from '@/features/shortcuts/formatLabels'
|
||||||
import { KeyboardShortcutHint } from './KeyboardShortcutHint'
|
import { KeyboardShortcutHint } from './KeyboardShortcutHint'
|
||||||
|
|
||||||
export function TrackRefContextIfNeeded(
|
export function TrackRefContextIfNeeded(
|
||||||
@@ -77,6 +91,51 @@ export const ParticipantTile: (
|
|||||||
trackRef: trackReference,
|
trackRef: trackReference,
|
||||||
})
|
})
|
||||||
const isEncrypted = useIsEncrypted(trackReference.participant)
|
const isEncrypted = useIsEncrypted(trackReference.participant)
|
||||||
|
const roomData = useRoomData()
|
||||||
|
const isEncryptedRoom = checkEncryptedRoom(roomData)
|
||||||
|
const isAdmin = useIsAdminOrOwner()
|
||||||
|
const [isIdentityOpen, setIsFingerprintOpen] = React.useState(false)
|
||||||
|
const participantAttrs = trackReference.participant.attributes as Record<string, string> | undefined
|
||||||
|
const { trustLevel, fingerprintStatus, fingerprint: participantFingerprint } = useParticipantTrustLevel(participantAttrs, roomData?.encryption_mode, trackReference.participant.isLocal)
|
||||||
|
const { t: tBadge } = useTranslation('rooms', { keyPrefix: 'encryption.badge' })
|
||||||
|
const badgeTooltip = tBadge(trustLevel)
|
||||||
|
|
||||||
|
// Track decryption failures via EncryptionError events from LiveKit.
|
||||||
|
// useIsEncrypted returns true when E2EE is enabled, NOT when frames decrypt successfully.
|
||||||
|
// So we listen for actual decryption errors to know when to show the overlay.
|
||||||
|
const room = useRoomContext()
|
||||||
|
const [decryptionFailed, setDecryptionFailed] = React.useState(false)
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
if (!isEncryptedRoom || trackReference.participant.isLocal) return
|
||||||
|
|
||||||
|
const participantIdentity = trackReference.participant.identity
|
||||||
|
|
||||||
|
const handleEncryptionError = (_error: Error, participant?: Participant) => {
|
||||||
|
if (participant?.identity === participantIdentity) {
|
||||||
|
setDecryptionFailed(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleEncryptionStatusChanged = (encrypted: boolean, participant?: Participant) => {
|
||||||
|
// Clear the error when encryption status confirms frames are decrypting
|
||||||
|
if (participant?.identity === participantIdentity && encrypted) {
|
||||||
|
setDecryptionFailed(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
room.on(RoomEvent.EncryptionError, handleEncryptionError)
|
||||||
|
room.on(RoomEvent.ParticipantEncryptionStatusChanged, handleEncryptionStatusChanged)
|
||||||
|
return () => {
|
||||||
|
room.off(RoomEvent.EncryptionError, handleEncryptionError)
|
||||||
|
room.off(RoomEvent.ParticipantEncryptionStatusChanged, handleEncryptionStatusChanged)
|
||||||
|
}
|
||||||
|
}, [room, isEncryptedRoom, trackReference.participant])
|
||||||
|
|
||||||
|
const showDecryptionError =
|
||||||
|
!trackReference.participant.isLocal &&
|
||||||
|
isEncryptedRoom &&
|
||||||
|
decryptionFailed
|
||||||
const layoutContext = useMaybeLayoutContext()
|
const layoutContext = useMaybeLayoutContext()
|
||||||
|
|
||||||
const autoManageSubscription = useFeatureContext()?.autoSubscription
|
const autoManageSubscription = useFeatureContext()?.autoSubscription
|
||||||
@@ -159,6 +218,65 @@ export const ParticipantTile: (
|
|||||||
participant={trackReference.participant}
|
participant={trackReference.participant}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
{showDecryptionError && !isScreenShare && (
|
||||||
|
<div
|
||||||
|
className={css({
|
||||||
|
position: 'absolute',
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
zIndex: '0 !important',
|
||||||
|
pointerEvents: 'none',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<ParticipantPlaceholder
|
||||||
|
participant={trackReference.participant}
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
position: 'absolute',
|
||||||
|
bottom: '2.5rem',
|
||||||
|
left: '50%',
|
||||||
|
transform: 'translateX(-50%)',
|
||||||
|
backgroundColor: 'rgba(0, 0, 0, 0.75)',
|
||||||
|
borderRadius: '0.5rem',
|
||||||
|
padding: '0.6rem 1rem',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '0.3rem',
|
||||||
|
maxWidth: '85%',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '0.4rem',
|
||||||
|
color: '#f87171',
|
||||||
|
fontSize: '0.85rem',
|
||||||
|
fontWeight: 600,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<RiLockFill size={14} />
|
||||||
|
<span>Decryption failed</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
color: '#d1d5db',
|
||||||
|
fontSize: '0.75rem',
|
||||||
|
textAlign: 'center',
|
||||||
|
lineHeight: 1.4,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Check that you and this person are using the correct
|
||||||
|
meeting link. If they are the only one you can't see,
|
||||||
|
the issue is likely on their side.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{!disableMetadata && (
|
{!disableMetadata && (
|
||||||
<div className="lk-participant-metadata">
|
<div className="lk-participant-metadata">
|
||||||
<HStack gap={0.25}>
|
<HStack gap={0.25}>
|
||||||
@@ -213,15 +331,59 @@ export const ParticipantTile: (
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{isEncrypted && !isScreenShare && (
|
{isEncryptedRoom && !isScreenShare ? (
|
||||||
<LockLockedIcon style={{ marginRight: '0.25rem' }} />
|
<Button
|
||||||
|
variant="greyscale"
|
||||||
|
size="sm"
|
||||||
|
tooltip={badgeTooltip}
|
||||||
|
aria-label={badgeTooltip}
|
||||||
|
onPress={() => setIsFingerprintOpen(true)}
|
||||||
|
className={css({
|
||||||
|
display: 'inline-flex !important',
|
||||||
|
alignItems: 'center !important',
|
||||||
|
gap: '0.15rem !important',
|
||||||
|
padding: '0.1rem 0.15rem !important',
|
||||||
|
minWidth: 'auto !important',
|
||||||
|
height: 'auto !important',
|
||||||
|
position: 'relative',
|
||||||
|
zIndex: 10,
|
||||||
|
borderRadius: '0.25rem !important',
|
||||||
|
backgroundColor: 'transparent !important',
|
||||||
|
color: 'inherit !important',
|
||||||
|
'&[data-hovered]': {
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 0.15) !important',
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{(isEncrypted || isEncryptedRoom) && (
|
||||||
|
<EncryptionBadge
|
||||||
|
isEncrypted={true}
|
||||||
|
trustLevel={trustLevel}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<div className="lk-participant-name-wrapper">
|
||||||
|
<ParticipantName
|
||||||
|
isScreenShare={isScreenShare}
|
||||||
|
participant={trackReference.participant}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Button>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
{(isEncrypted || isEncryptedRoom) && !isScreenShare && (
|
||||||
|
<EncryptionBadge
|
||||||
|
isEncrypted={true}
|
||||||
|
trustLevel={trustLevel}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<div className="lk-participant-name-wrapper">
|
||||||
|
<ParticipantName
|
||||||
|
isScreenShare={isScreenShare}
|
||||||
|
participant={trackReference.participant}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
<div className="lk-participant-name-wrapper">
|
|
||||||
<ParticipantName
|
|
||||||
isScreenShare={isScreenShare}
|
|
||||||
participant={trackReference.participant}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</HStack>
|
</HStack>
|
||||||
<ConnectionQualityIndicator className="lk-participant-metadata-item" />
|
<ConnectionQualityIndicator className="lk-participant-metadata-item" />
|
||||||
@@ -237,7 +399,27 @@ export const ParticipantTile: (
|
|||||||
)}
|
)}
|
||||||
</ParticipantContextIfNeeded>
|
</ParticipantContextIfNeeded>
|
||||||
</TrackRefContextIfNeeded>
|
</TrackRefContextIfNeeded>
|
||||||
<KeyboardShortcutHint>{t('toolbarHint')}</KeyboardShortcutHint>
|
<KeyboardShortcutHint>
|
||||||
|
{t('toolbarHint', {
|
||||||
|
shortcut: formatShortcutLabel(
|
||||||
|
getShortcutDescriptorById('open-shortcuts')?.shortcut
|
||||||
|
),
|
||||||
|
})}
|
||||||
|
</KeyboardShortcutHint>
|
||||||
|
{isEncryptedRoom && (
|
||||||
|
<EncryptionIdentityDialog
|
||||||
|
isOpen={isIdentityOpen}
|
||||||
|
onOpenChange={setIsFingerprintOpen}
|
||||||
|
participantName={trackReference.participant.name || trackReference.participant.identity}
|
||||||
|
participantEmail={participantAttrs?.email}
|
||||||
|
suiteUserId={participantAttrs?.suite_user_id}
|
||||||
|
isAuthenticated={participantAttrs?.is_authenticated === 'true'}
|
||||||
|
encryptionMode={roomData?.encryption_mode}
|
||||||
|
isSelf={trackReference.participant.isLocal}
|
||||||
|
preloadedFingerprint={participantFingerprint}
|
||||||
|
preloadedFingerprintStatus={fingerprintStatus}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -149,11 +149,12 @@ export const SidePanel = () => {
|
|||||||
activeSubPanelId,
|
activeSubPanelId,
|
||||||
} = useSidePanel()
|
} = useSidePanel()
|
||||||
const { t } = useTranslation('rooms', { keyPrefix: 'sidePanel' })
|
const { t } = useTranslation('rooms', { keyPrefix: 'sidePanel' })
|
||||||
|
const title = t(`heading.${activeSubPanelId || activePanelId}`)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledSidePanel
|
<StyledSidePanel
|
||||||
title={t(`heading.${activeSubPanelId || activePanelId}`)}
|
title={title}
|
||||||
ariaLabel={t('ariaLabel')}
|
ariaLabel={t('ariaLabel', { title })}
|
||||||
onClose={() => {
|
onClose={() => {
|
||||||
layoutStore.activePanelId = null
|
layoutStore.activePanelId = null
|
||||||
layoutStore.activeSubPanelId = null
|
layoutStore.activeSubPanelId = null
|
||||||
|
|||||||
@@ -12,12 +12,16 @@ import {
|
|||||||
ScreenRecordingSidePanel,
|
ScreenRecordingSidePanel,
|
||||||
} from '@/features/recording'
|
} from '@/features/recording'
|
||||||
import { useConfig } from '@/api/useConfig'
|
import { useConfig } from '@/api/useConfig'
|
||||||
|
import { useRoomData } from '../hooks/useRoomData'
|
||||||
|
import { isEncryptedRoom } from '@/features/rooms/api/ApiRoom'
|
||||||
|
import { RiLockLine } from '@remixicon/react'
|
||||||
|
|
||||||
export interface ToolsButtonProps {
|
export interface ToolsButtonProps {
|
||||||
icon: ReactNode
|
icon: ReactNode
|
||||||
title: string
|
title: string
|
||||||
description: string
|
description: string
|
||||||
onPress: () => void
|
onPress: () => void
|
||||||
|
isDisabled?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const ToolButton = ({
|
const ToolButton = ({
|
||||||
@@ -25,9 +29,11 @@ const ToolButton = ({
|
|||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
onPress,
|
onPress,
|
||||||
|
isDisabled,
|
||||||
}: ToolsButtonProps) => {
|
}: ToolsButtonProps) => {
|
||||||
return (
|
return (
|
||||||
<RACButton
|
<RACButton
|
||||||
|
isDisabled={isDisabled}
|
||||||
className={css({
|
className={css({
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
@@ -39,10 +45,14 @@ const ToolButton = ({
|
|||||||
width: 'full',
|
width: 'full',
|
||||||
backgroundColor: 'gray.50',
|
backgroundColor: 'gray.50',
|
||||||
textAlign: 'start',
|
textAlign: 'start',
|
||||||
'&[data-hovered]': {
|
'&[data-hovered]:not([data-disabled])': {
|
||||||
backgroundColor: 'primary.50',
|
backgroundColor: 'primary.50',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
},
|
},
|
||||||
|
'&[data-disabled]': {
|
||||||
|
opacity: 0.5,
|
||||||
|
cursor: 'not-allowed',
|
||||||
|
},
|
||||||
})}
|
})}
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
>
|
>
|
||||||
@@ -65,7 +75,7 @@ const ToolButton = ({
|
|||||||
<div>
|
<div>
|
||||||
<Text
|
<Text
|
||||||
margin={false}
|
margin={false}
|
||||||
as="h3"
|
as="h2"
|
||||||
className={css({
|
className={css({
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
gap: 0.25,
|
gap: 0.25,
|
||||||
@@ -132,6 +142,9 @@ export const Tools = () => {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const roomData = useRoomData()
|
||||||
|
const encrypted = isEncryptedRoom(roomData)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Div
|
<Div
|
||||||
display="flex"
|
display="flex"
|
||||||
@@ -166,12 +179,33 @@ export const Tools = () => {
|
|||||||
</A>
|
</A>
|
||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
|
{encrypted && (
|
||||||
|
<div
|
||||||
|
className={css({
|
||||||
|
display: 'flex',
|
||||||
|
gap: '0.5rem',
|
||||||
|
alignItems: 'start',
|
||||||
|
padding: '0.6rem 0.75rem',
|
||||||
|
backgroundColor: '#fffbeb',
|
||||||
|
borderRadius: '0.5rem',
|
||||||
|
border: '1px solid #fde68a',
|
||||||
|
marginBottom: '0.5rem',
|
||||||
|
width: '100%',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<RiLockLine size={16} color="#d97706" className={css({ flexShrink: 0, marginTop: '0.1rem' })} />
|
||||||
|
<Text variant="note" className={css({ fontSize: '0.8rem', color: '#92400e' })}>
|
||||||
|
{t('encryptedDisabled')}
|
||||||
|
</Text>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{isTranscriptEnabled && (
|
{isTranscriptEnabled && (
|
||||||
<ToolButton
|
<ToolButton
|
||||||
icon={<Icon type="symbols" name="speech_to_text" />}
|
icon={<Icon type="symbols" name="speech_to_text" />}
|
||||||
title={t('tools.transcript.title')}
|
title={t('tools.transcript.title')}
|
||||||
description={t('tools.transcript.body')}
|
description={t('tools.transcript.body')}
|
||||||
onPress={() => openTranscript()}
|
onPress={() => openTranscript()}
|
||||||
|
isDisabled={encrypted}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{isScreenRecordingEnabled && (
|
{isScreenRecordingEnabled && (
|
||||||
@@ -180,6 +214,7 @@ export const Tools = () => {
|
|||||||
title={t('tools.screenRecording.title')}
|
title={t('tools.screenRecording.title')}
|
||||||
description={t('tools.screenRecording.body')}
|
description={t('tools.screenRecording.body')}
|
||||||
onPress={() => openScreenRecording()}
|
onPress={() => openScreenRecording()}
|
||||||
|
isDisabled={encrypted}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Div>
|
</Div>
|
||||||
|
|||||||
+16
-27
@@ -11,11 +11,7 @@ import {
|
|||||||
TIMEOUT_TICK,
|
TIMEOUT_TICK,
|
||||||
timerWorkerScript,
|
timerWorkerScript,
|
||||||
} from './TimerWorker'
|
} from './TimerWorker'
|
||||||
import {
|
import { BackgroundProcessorInterface, ProcessorConfig, ProcessorType } from '.'
|
||||||
BackgroundProcessorInterface,
|
|
||||||
BackgroundOptions,
|
|
||||||
ProcessorType,
|
|
||||||
} from '.'
|
|
||||||
|
|
||||||
const PROCESSING_WIDTH = 256
|
const PROCESSING_WIDTH = 256
|
||||||
const PROCESSING_HEIGHT = 144
|
const PROCESSING_HEIGHT = 144
|
||||||
@@ -33,7 +29,7 @@ const DEFAULT_BLUR = '10'
|
|||||||
* MediaStreamTrackProcessor.
|
* MediaStreamTrackProcessor.
|
||||||
*/
|
*/
|
||||||
export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
|
export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
|
||||||
options: BackgroundOptions
|
options: ProcessorConfig
|
||||||
name: string
|
name: string
|
||||||
processedTrack?: MediaStreamTrack | undefined
|
processedTrack?: MediaStreamTrack | undefined
|
||||||
|
|
||||||
@@ -64,15 +60,10 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
|
|||||||
type: ProcessorType
|
type: ProcessorType
|
||||||
virtualBackgroundImage?: HTMLImageElement
|
virtualBackgroundImage?: HTMLImageElement
|
||||||
|
|
||||||
constructor(opts: BackgroundOptions) {
|
constructor(opts: ProcessorConfig) {
|
||||||
this.name = 'blur'
|
this.name = 'blur'
|
||||||
this.options = opts
|
this.options = opts
|
||||||
|
this.type = opts.type
|
||||||
if (this.options.blurRadius) {
|
|
||||||
this.type = ProcessorType.BLUR
|
|
||||||
} else {
|
|
||||||
this.type = ProcessorType.VIRTUAL
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static get isSupported() {
|
static get isSupported() {
|
||||||
@@ -107,6 +98,12 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_initVirtualBackgroundImage() {
|
_initVirtualBackgroundImage() {
|
||||||
|
if (this.options.type !== 'virtual') {
|
||||||
|
throw new Error(
|
||||||
|
'Virtual background is only supported for virtual background'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
const needsUpdate =
|
const needsUpdate =
|
||||||
this.options.imagePath &&
|
this.options.imagePath &&
|
||||||
this.virtualBackgroundImage &&
|
this.virtualBackgroundImage &&
|
||||||
@@ -118,7 +115,7 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async update(opts: BackgroundOptions): Promise<void> {
|
async update(opts: ProcessorConfig): Promise<void> {
|
||||||
this.options = opts
|
this.options = opts
|
||||||
this._initVirtualBackgroundImage()
|
this._initVirtualBackgroundImage()
|
||||||
}
|
}
|
||||||
@@ -187,7 +184,7 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
|
|||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
PROCESSING_WIDTH,
|
PROCESSING_WIDTH,
|
||||||
PROCESSING_WIDTH
|
PROCESSING_HEIGHT
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,6 +209,9 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
|
|||||||
* TODO: future improvement with WebGL.
|
* TODO: future improvement with WebGL.
|
||||||
*/
|
*/
|
||||||
async blur() {
|
async blur() {
|
||||||
|
if (this.options.type !== 'blur') {
|
||||||
|
throw new Error('Blurring is only supported for blur background')
|
||||||
|
}
|
||||||
const mask = this.imageSegmenterResult!.categoryMask!.getAsUint8Array()
|
const mask = this.imageSegmenterResult!.categoryMask!.getAsUint8Array()
|
||||||
for (let i = 0; i < mask.length; ++i) {
|
for (let i = 0; i < mask.length; ++i) {
|
||||||
this.segmentationMask!.data[i * 4 + 3] = 255 - mask[i]
|
this.segmentationMask!.data[i * 4 + 3] = 255 - mask[i]
|
||||||
@@ -293,7 +293,7 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
|
|||||||
await this.sizeSource()
|
await this.sizeSource()
|
||||||
await this.segment()
|
await this.segment()
|
||||||
|
|
||||||
if (this.options.blurRadius) {
|
if (this.options.type === 'blur') {
|
||||||
await this.blur()
|
await this.blur()
|
||||||
} else {
|
} else {
|
||||||
await this.drawVirtualBackground()
|
await this.drawVirtualBackground()
|
||||||
@@ -354,15 +354,4 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
|
|||||||
this.timerWorker?.terminate()
|
this.timerWorker?.terminate()
|
||||||
this.imageSegmenter?.close()
|
this.imageSegmenter?.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
clone() {
|
|
||||||
return new BackgroundCustomProcessor(this.options)
|
|
||||||
}
|
|
||||||
|
|
||||||
serialize() {
|
|
||||||
return {
|
|
||||||
type: this.type,
|
|
||||||
options: this.options,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -332,15 +332,4 @@ export class FaceLandmarksProcessor implements TrackProcessor<Track.Kind> {
|
|||||||
this.timerWorker?.terminate()
|
this.timerWorker?.terminate()
|
||||||
this.faceLandmarker?.close()
|
this.faceLandmarker?.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
clone() {
|
|
||||||
return new FaceLandmarksProcessor(this.options)
|
|
||||||
}
|
|
||||||
|
|
||||||
serialize() {
|
|
||||||
return {
|
|
||||||
type: this.type,
|
|
||||||
options: this.options,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-32
@@ -1,28 +1,23 @@
|
|||||||
import { ProcessorOptions, Track } from 'livekit-client'
|
import { ProcessorOptions, Track } from 'livekit-client'
|
||||||
import {
|
import {
|
||||||
BackgroundBlur,
|
BackgroundBlur,
|
||||||
BackgroundTransformer,
|
|
||||||
ProcessorWrapper,
|
ProcessorWrapper,
|
||||||
VirtualBackground,
|
VirtualBackground,
|
||||||
} from '@livekit/track-processors'
|
} from '@livekit/track-processors'
|
||||||
import {
|
import { ProcessorConfig, BackgroundProcessorInterface, ProcessorType } from '.'
|
||||||
BackgroundOptions,
|
|
||||||
BackgroundProcessorInterface,
|
|
||||||
ProcessorType,
|
|
||||||
} from '.'
|
|
||||||
|
|
||||||
export class UnifiedBackgroundTrackProcessor implements BackgroundProcessorInterface {
|
export class UnifiedBackgroundTrackProcessor implements BackgroundProcessorInterface {
|
||||||
processor: ProcessorWrapper<BackgroundOptions>
|
processor: ProcessorWrapper<{ imagePath?: string; blurRadius?: number }>
|
||||||
opts: BackgroundOptions
|
opts: ProcessorConfig
|
||||||
processorType: ProcessorType
|
processorType: ProcessorType
|
||||||
|
|
||||||
constructor(opts: BackgroundOptions) {
|
constructor(opts: ProcessorConfig) {
|
||||||
this.opts = opts
|
this.opts = opts
|
||||||
|
|
||||||
if (opts.imagePath) {
|
if (opts.type === 'virtual') {
|
||||||
this.processorType = ProcessorType.VIRTUAL
|
this.processorType = ProcessorType.VIRTUAL
|
||||||
this.processor = VirtualBackground(opts.imagePath)
|
this.processor = VirtualBackground(opts.imagePath)
|
||||||
} else if (opts.blurRadius !== undefined) {
|
} else if (opts.type === 'blur') {
|
||||||
this.processorType = ProcessorType.BLUR
|
this.processorType = ProcessorType.BLUR
|
||||||
this.processor = BackgroundBlur(opts.blurRadius)
|
this.processor = BackgroundBlur(opts.blurRadius)
|
||||||
} else {
|
} else {
|
||||||
@@ -44,24 +39,23 @@ export class UnifiedBackgroundTrackProcessor implements BackgroundProcessorInter
|
|||||||
return this.processor.destroy()
|
return this.processor.destroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
async update(opts: BackgroundOptions): Promise<void> {
|
async update(opts: ProcessorConfig): Promise<void> {
|
||||||
const newProcessorType = opts.imagePath
|
this.opts = opts
|
||||||
? ProcessorType.VIRTUAL
|
|
||||||
: ProcessorType.BLUR
|
const newProcessorType =
|
||||||
|
opts.type === 'virtual' ? ProcessorType.VIRTUAL : ProcessorType.BLUR
|
||||||
|
|
||||||
let processedOpts = opts
|
|
||||||
if (newProcessorType !== this.processorType) {
|
if (newProcessorType !== this.processorType) {
|
||||||
this.processorType = newProcessorType
|
this.processorType = newProcessorType
|
||||||
if (newProcessorType === ProcessorType.VIRTUAL) {
|
if (newProcessorType === ProcessorType.VIRTUAL) {
|
||||||
this.processor.name = 'virtual-background'
|
this.processor.name = 'virtual-background'
|
||||||
processedOpts = { ...opts, blurRadius: undefined }
|
|
||||||
} else {
|
} else {
|
||||||
this.processor.name = 'background-blur'
|
this.processor.name = 'background-blur'
|
||||||
processedOpts = { ...opts, imagePath: undefined }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await this.processor.updateTransformerOptions(processedOpts)
|
await this.processor.updateTransformerOptions(
|
||||||
this.opts = processedOpts
|
opts as { imagePath?: string; blurRadius?: number }
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
get name() {
|
get name() {
|
||||||
@@ -73,17 +67,6 @@ export class UnifiedBackgroundTrackProcessor implements BackgroundProcessorInter
|
|||||||
}
|
}
|
||||||
|
|
||||||
get options() {
|
get options() {
|
||||||
return (this.processor.transformer as BackgroundTransformer).options
|
return this.opts
|
||||||
}
|
|
||||||
|
|
||||||
clone() {
|
|
||||||
return new UnifiedBackgroundTrackProcessor(this.options || this.opts)
|
|
||||||
}
|
|
||||||
|
|
||||||
serialize() {
|
|
||||||
return {
|
|
||||||
type: this.processorType,
|
|
||||||
options: this.options,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,23 +2,7 @@ import { ProcessorWrapper } from '@livekit/track-processors'
|
|||||||
import { Track, TrackProcessor } from 'livekit-client'
|
import { Track, TrackProcessor } from 'livekit-client'
|
||||||
import { BackgroundCustomProcessor } from './BackgroundCustomProcessor'
|
import { BackgroundCustomProcessor } from './BackgroundCustomProcessor'
|
||||||
import { UnifiedBackgroundTrackProcessor } from './UnifiedBackgroundTrackProcessor'
|
import { UnifiedBackgroundTrackProcessor } from './UnifiedBackgroundTrackProcessor'
|
||||||
|
import { FaceLandmarksOptions } from './FaceLandmarksProcessor'
|
||||||
export type BackgroundOptions = {
|
|
||||||
blurRadius?: number
|
|
||||||
imagePath?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProcessorSerialized {
|
|
||||||
type: ProcessorType
|
|
||||||
options: BackgroundOptions
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface BackgroundProcessorInterface extends TrackProcessor<Track.Kind> {
|
|
||||||
update(opts: BackgroundOptions): Promise<void>
|
|
||||||
options: BackgroundOptions
|
|
||||||
clone(): BackgroundProcessorInterface
|
|
||||||
serialize(): ProcessorSerialized
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum ProcessorType {
|
export enum ProcessorType {
|
||||||
BLUR = 'blur',
|
BLUR = 'blur',
|
||||||
@@ -26,6 +10,16 @@ export enum ProcessorType {
|
|||||||
FACE_LANDMARKS = 'faceLandmarks',
|
FACE_LANDMARKS = 'faceLandmarks',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type ProcessorConfig =
|
||||||
|
| { type: ProcessorType.BLUR; blurRadius: number }
|
||||||
|
| { type: ProcessorType.VIRTUAL; imagePath: string; fileId?: string }
|
||||||
|
| ({ type: ProcessorType.FACE_LANDMARKS } & FaceLandmarksOptions)
|
||||||
|
|
||||||
|
export interface BackgroundProcessorInterface extends TrackProcessor<Track.Kind> {
|
||||||
|
update(opts: ProcessorConfig): Promise<void>
|
||||||
|
options: ProcessorConfig
|
||||||
|
}
|
||||||
|
|
||||||
export class BackgroundProcessorFactory {
|
export class BackgroundProcessorFactory {
|
||||||
static hasModernApiSupport() {
|
static hasModernApiSupport() {
|
||||||
return ProcessorWrapper.hasModernApiSupport
|
return ProcessorWrapper.hasModernApiSupport
|
||||||
@@ -36,28 +30,27 @@ export class BackgroundProcessorFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static getProcessor(
|
static getProcessor(
|
||||||
type: ProcessorType,
|
config: ProcessorConfig
|
||||||
opts: BackgroundOptions
|
|
||||||
): BackgroundProcessorInterface | undefined {
|
): BackgroundProcessorInterface | undefined {
|
||||||
const isBlur = type === ProcessorType.BLUR
|
const isBlur = config.type === ProcessorType.BLUR
|
||||||
const isVirtual = type === ProcessorType.VIRTUAL
|
const isVirtual = config.type === ProcessorType.VIRTUAL
|
||||||
|
|
||||||
if (!isBlur && !isVirtual) return undefined
|
if (!isBlur && !isVirtual) return undefined
|
||||||
|
|
||||||
if (ProcessorWrapper.isSupported) {
|
if (ProcessorWrapper.isSupported) {
|
||||||
return new UnifiedBackgroundTrackProcessor(opts)
|
return new UnifiedBackgroundTrackProcessor(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BackgroundCustomProcessor.isSupported) {
|
if (BackgroundCustomProcessor.isSupported) {
|
||||||
return new BackgroundCustomProcessor(opts)
|
return new BackgroundCustomProcessor(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
static deserializeProcessor(data?: ProcessorSerialized) {
|
static fromProcessorConfig(data?: ProcessorConfig) {
|
||||||
if (data?.type) {
|
if (data) {
|
||||||
return BackgroundProcessorFactory.getProcessor(data?.type, data?.options)
|
return BackgroundProcessorFactory.getProcessor(data)
|
||||||
}
|
}
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,10 +69,10 @@ const SelectDevicePermissions = <T extends string | number>({
|
|||||||
iconComponent={iconComponent}
|
iconComponent={iconComponent}
|
||||||
placeholder={items.length === 0 ? t('loading') : t('select')}
|
placeholder={items.length === 0 ? t('loading') : t('select')}
|
||||||
selectedKey={selectedKey}
|
selectedKey={selectedKey}
|
||||||
onSelectionChange={(key) => {
|
onSelectionChange={async (key) => {
|
||||||
if (key === selectedKey) return
|
if (key === selectedKey) return
|
||||||
|
await setActiveMediaDevice(key as string)
|
||||||
onSubmit?.(key as string)
|
onSubmit?.(key as string)
|
||||||
setActiveMediaDevice(key as string)
|
|
||||||
}}
|
}}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|||||||
+2
-2
@@ -82,8 +82,8 @@ export const VideoDeviceControl = ({
|
|||||||
*
|
*
|
||||||
* See https://github.com/numerique-gouv/meet/pull/309#issuecomment-2622404121
|
* See https://github.com/numerique-gouv/meet/pull/309#issuecomment-2622404121
|
||||||
*/
|
*/
|
||||||
const processor = BackgroundProcessorFactory.deserializeProcessor(
|
const processor = BackgroundProcessorFactory.fromProcessorConfig(
|
||||||
userChoices.processorSerialized
|
userChoices.processorConfig
|
||||||
)
|
)
|
||||||
|
|
||||||
const toggle = trackProps.toggle as (
|
const toggle = trackProps.toggle as (
|
||||||
|
|||||||
+5
-1
@@ -5,18 +5,22 @@ import { menuRecipe } from '@/primitives/menuRecipe'
|
|||||||
import { useSidePanel } from '@/features/rooms/livekit/hooks/useSidePanel'
|
import { useSidePanel } from '@/features/rooms/livekit/hooks/useSidePanel'
|
||||||
import { RecordingMode, useHasRecordingAccess } from '@/features/recording'
|
import { RecordingMode, useHasRecordingAccess } from '@/features/recording'
|
||||||
import { FeatureFlags } from '@/features/analytics/enums'
|
import { FeatureFlags } from '@/features/analytics/enums'
|
||||||
|
import { useRoomData } from '@/features/rooms/livekit/hooks/useRoomData'
|
||||||
|
import { isEncryptedRoom as checkEncryptedRoom } from '@/features/rooms/api/ApiRoom'
|
||||||
|
|
||||||
export const ScreenRecordingMenuItem = () => {
|
export const ScreenRecordingMenuItem = () => {
|
||||||
const { t } = useTranslation('rooms', { keyPrefix: 'options.items' })
|
const { t } = useTranslation('rooms', { keyPrefix: 'options.items' })
|
||||||
const { isScreenRecordingOpen, openScreenRecording, toggleTools } =
|
const { isScreenRecordingOpen, openScreenRecording, toggleTools } =
|
||||||
useSidePanel()
|
useSidePanel()
|
||||||
|
const roomData = useRoomData()
|
||||||
|
|
||||||
const hasScreenRecordingAccess = useHasRecordingAccess(
|
const hasScreenRecordingAccess = useHasRecordingAccess(
|
||||||
RecordingMode.ScreenRecording,
|
RecordingMode.ScreenRecording,
|
||||||
FeatureFlags.ScreenRecording
|
FeatureFlags.ScreenRecording
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!hasScreenRecordingAccess) return null
|
// Recording not available in encrypted rooms
|
||||||
|
if (!hasScreenRecordingAccess || checkEncryptedRoom(roomData)) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
|
|||||||
+5
-1
@@ -5,17 +5,21 @@ import { menuRecipe } from '@/primitives/menuRecipe'
|
|||||||
import { useSidePanel } from '@/features/rooms/livekit/hooks/useSidePanel'
|
import { useSidePanel } from '@/features/rooms/livekit/hooks/useSidePanel'
|
||||||
import { RecordingMode, useHasRecordingAccess } from '@/features/recording'
|
import { RecordingMode, useHasRecordingAccess } from '@/features/recording'
|
||||||
import { FeatureFlags } from '@/features/analytics/enums'
|
import { FeatureFlags } from '@/features/analytics/enums'
|
||||||
|
import { useRoomData } from '@/features/rooms/livekit/hooks/useRoomData'
|
||||||
|
import { isEncryptedRoom as checkEncryptedRoom } from '@/features/rooms/api/ApiRoom'
|
||||||
|
|
||||||
export const TranscriptMenuItem = () => {
|
export const TranscriptMenuItem = () => {
|
||||||
const { t } = useTranslation('rooms', { keyPrefix: 'options.items' })
|
const { t } = useTranslation('rooms', { keyPrefix: 'options.items' })
|
||||||
const { isTranscriptOpen, openTranscript, toggleTools } = useSidePanel()
|
const { isTranscriptOpen, openTranscript, toggleTools } = useSidePanel()
|
||||||
|
const roomData = useRoomData()
|
||||||
|
|
||||||
const hasTranscriptAccess = useHasRecordingAccess(
|
const hasTranscriptAccess = useHasRecordingAccess(
|
||||||
RecordingMode.Transcript,
|
RecordingMode.Transcript,
|
||||||
FeatureFlags.Transcript
|
FeatureFlags.Transcript
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!hasTranscriptAccess) return null
|
// Recording/transcription not available in encrypted rooms
|
||||||
|
if (!hasTranscriptAccess || checkEncryptedRoom(roomData)) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
|
|||||||
+125
-23
@@ -21,6 +21,13 @@ import { useMuteParticipant } from '@/features/rooms/api/muteParticipant'
|
|||||||
import { useCanMute } from '@/features/rooms/livekit/hooks/useCanMute'
|
import { useCanMute } from '@/features/rooms/livekit/hooks/useCanMute'
|
||||||
import { ParticipantMenuButton } from '../../ParticipantMenu/ParticipantMenuButton'
|
import { ParticipantMenuButton } from '../../ParticipantMenu/ParticipantMenuButton'
|
||||||
import { PinBadge } from './PinBadge'
|
import { PinBadge } from './PinBadge'
|
||||||
|
import { EncryptionBadge, EncryptionIdentityDialog } from '@/features/encryption'
|
||||||
|
import { useParticipantTrustLevel } from '@/features/encryption/useParticipantTrustLevel'
|
||||||
|
import { useRoomData } from '@/features/rooms/livekit/hooks/useRoomData'
|
||||||
|
import { isEncryptedRoom as isEncryptedRoomFn } from '@/features/rooms/api/ApiRoom'
|
||||||
|
import { useIsAdminOrOwner } from '@/features/rooms/livekit/hooks/useIsAdminOrOwner'
|
||||||
|
import { useUser } from '@/features/auth'
|
||||||
|
import { TooltipWrapper } from '@/primitives/TooltipWrapper'
|
||||||
|
|
||||||
type MicIndicatorProps = {
|
type MicIndicatorProps = {
|
||||||
participant: Participant
|
participant: Participant
|
||||||
@@ -97,7 +104,16 @@ export const ParticipantListItem = ({
|
|||||||
participant,
|
participant,
|
||||||
}: ParticipantListItemProps) => {
|
}: ParticipantListItemProps) => {
|
||||||
const { t } = useTranslation('rooms')
|
const { t } = useTranslation('rooms')
|
||||||
|
const roomData = useRoomData()
|
||||||
|
const isEncryptedRoom = isEncryptedRoomFn(roomData)
|
||||||
|
const isAdmin = useIsAdminOrOwner()
|
||||||
|
const { isLoggedIn } = useUser()
|
||||||
|
const { t: tEncBadge } = useTranslation('rooms', { keyPrefix: 'encryption.badge' })
|
||||||
|
const [isIdentityOpen, setIsFingerprintOpen] = useState(false)
|
||||||
const name = participant.name || participant.identity
|
const name = participant.name || participant.identity
|
||||||
|
const attrs = participant.attributes as Record<string, string> | undefined
|
||||||
|
const { trustLevel, fingerprintStatus, fingerprint } = useParticipantTrustLevel(attrs, roomData?.encryption_mode, isLocal(participant))
|
||||||
|
const badgeTooltip = tEncBadge(trustLevel)
|
||||||
return (
|
return (
|
||||||
<HStack
|
<HStack
|
||||||
role="listitem"
|
role="listitem"
|
||||||
@@ -118,45 +134,131 @@ export const ParticipantListItem = ({
|
|||||||
<PinBadge participant={participant} />
|
<PinBadge participant={participant} />
|
||||||
</div>
|
</div>
|
||||||
<VStack gap={0} alignItems="start">
|
<VStack gap={0} alignItems="start">
|
||||||
<Text
|
{isEncryptedRoom ? (
|
||||||
variant="sm"
|
<Button
|
||||||
className={css({
|
variant="greyscale"
|
||||||
userSelect: 'none',
|
size="sm"
|
||||||
cursor: 'default',
|
tooltip={badgeTooltip}
|
||||||
display: 'flex',
|
aria-label={badgeTooltip}
|
||||||
})}
|
onPress={() => setIsFingerprintOpen(true)}
|
||||||
>
|
|
||||||
<span
|
|
||||||
className={css({
|
className={css({
|
||||||
|
padding: '0.1rem 0.25rem !important',
|
||||||
|
minWidth: 'auto !important',
|
||||||
|
height: 'auto !important',
|
||||||
|
gap: '0.15rem !important',
|
||||||
|
borderRadius: '0.25rem !important',
|
||||||
|
backgroundColor: 'transparent !important',
|
||||||
|
color: 'greyscale.900 !important',
|
||||||
|
cursor: isEncryptedRoom ? 'pointer' : 'default',
|
||||||
|
'&[data-hovered]': {
|
||||||
|
backgroundColor: 'greyscale.100 !important',
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<EncryptionBadge
|
||||||
|
isEncrypted={true}
|
||||||
|
trustLevel={trustLevel}
|
||||||
|
/>
|
||||||
|
<Text
|
||||||
|
variant="sm"
|
||||||
|
className={css({
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
maxWidth: '120px',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{name}
|
||||||
|
</Text>
|
||||||
|
{isLocal(participant) && (
|
||||||
|
<Text
|
||||||
|
variant="sm"
|
||||||
|
className={css({ whiteSpace: 'nowrap', flexShrink: 0 })}
|
||||||
|
>
|
||||||
|
({t('participants.you')})
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
</Button>
|
||||||
|
) : (
|
||||||
|
<Text
|
||||||
|
variant="sm"
|
||||||
|
className={css({
|
||||||
|
userSelect: 'none',
|
||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
textOverflow: 'ellipsis',
|
textOverflow: 'ellipsis',
|
||||||
maxWidth: '120px',
|
maxWidth: '150px',
|
||||||
display: 'block',
|
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{name}
|
{name}
|
||||||
</span>
|
{isLocal(participant) && ` (${t('participants.you')})`}
|
||||||
{isLocal(participant) && (
|
</Text>
|
||||||
<span
|
)}
|
||||||
className={css({
|
|
||||||
marginLeft: '.25rem',
|
|
||||||
whiteSpace: 'nowrap',
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
({t('participants.you')})
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</Text>
|
|
||||||
{getParticipantIsRoomAdmin(participant) && (
|
{getParticipantIsRoomAdmin(participant) && (
|
||||||
<Text variant="xsNote">{t('participants.host')}</Text>
|
<Text variant="xsNote">{t('participants.host')}</Text>
|
||||||
)}
|
)}
|
||||||
|
{/* Email is only in JWT for encrypted rooms (backend restriction).
|
||||||
|
Additionally, only show to authenticated users in the UI — anonymous
|
||||||
|
users in encrypted rooms could still extract it from LiveKit signaling
|
||||||
|
but won't see it in the interface. See utils.py for details. */}
|
||||||
|
{isEncryptedRoom && isLoggedIn && (() => {
|
||||||
|
const email = participant.attributes?.is_authenticated === 'true' && participant.attributes?.email
|
||||||
|
? participant.attributes.email
|
||||||
|
: null
|
||||||
|
const label = email || t('participants.anonymous')
|
||||||
|
return (
|
||||||
|
<Button
|
||||||
|
variant="greyscale"
|
||||||
|
size="sm"
|
||||||
|
tooltip={email || undefined}
|
||||||
|
aria-label={label}
|
||||||
|
className={css({
|
||||||
|
padding: '0 !important',
|
||||||
|
minWidth: 'auto !important',
|
||||||
|
height: 'auto !important',
|
||||||
|
backgroundColor: 'transparent !important',
|
||||||
|
color: 'greyscale.500 !important',
|
||||||
|
fontSize: '0.7rem !important',
|
||||||
|
fontWeight: 'normal !important',
|
||||||
|
width: '100%',
|
||||||
|
minW: 0,
|
||||||
|
justifyContent: 'flex-start !important',
|
||||||
|
'&[data-hovered]': {
|
||||||
|
backgroundColor: 'transparent !important',
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<span className={css({
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
minWidth: 0,
|
||||||
|
})}>
|
||||||
|
{label}
|
||||||
|
</span>
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
})()}
|
||||||
</VStack>
|
</VStack>
|
||||||
</HStack>
|
</HStack>
|
||||||
<HStack>
|
<HStack>
|
||||||
<MicIndicator participant={participant} />
|
<MicIndicator participant={participant} />
|
||||||
<ParticipantMenuButton participant={participant} />
|
<ParticipantMenuButton participant={participant} />
|
||||||
</HStack>
|
</HStack>
|
||||||
|
{isEncryptedRoom && (
|
||||||
|
<EncryptionIdentityDialog
|
||||||
|
isOpen={isIdentityOpen}
|
||||||
|
onOpenChange={setIsFingerprintOpen}
|
||||||
|
participantName={name}
|
||||||
|
participantEmail={attrs?.email}
|
||||||
|
suiteUserId={attrs?.suite_user_id}
|
||||||
|
isAuthenticated={attrs?.is_authenticated === 'true'}
|
||||||
|
encryptionMode={roomData?.encryption_mode}
|
||||||
|
isSelf={isLocal(participant)}
|
||||||
|
preloadedFingerprint={fingerprint}
|
||||||
|
preloadedFingerprintStatus={fingerprintStatus}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</HStack>
|
</HStack>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user