Commit graph

22 commits

Author SHA1 Message Date
senke
d934eaa763 fix(deps): upgrade jsonwebtoken 9.2 -> 10.x in chat-server
- Upgrade jsonwebtoken from 9.2 to 10.x with aws_lc_rs crypto backend
- The API (encode, decode, Validation, EncodingKey, DecodingKey, Header,
  Algorithm) remains compatible -- the main v10 change is the crypto
  backend selection via features
- Aligns with veza-stream-server which already uses jsonwebtoken 10

Addresses audit finding: A06 (Vulnerable & Outdated Components).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 22:46:47 +01:00
senke
72b5edb5b5 feat(chat): implement Redis rate limiting for WebSocket messages
- Create security/rate_limiter.rs with Redis-backed sliding window counter
- Falls back to in-memory HashMap when Redis is unavailable
- Per-action rate limits: messages (30/min), reactions (60/min),
  edits (20/min), deletes (10/min), typing (120/min), joins (10/min),
  searches (15/min)
- Integrate rate limiting into handle_incoming_message in WebSocket handler
- Add RateLimiter to WebSocketState, initialized from REDIS_URL env var
- Rate-limited clients receive an Error message, connection stays open
- Includes unit tests for in-memory fallback path
- Remove TODO stub from EnhancedSecurity::validate_request

Addresses audit findings: A04 (Insecure Design), debt item 3.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 22:45:39 +01:00
senke
a83a76e942 chore(rust): chat server env, veza-common auth, stream server routes/websocket
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 22:19:17 +01:00
senke
27722db148 feat(chat): add JWT revocation persistante Redis (P3.1)
- Add JwtRevocationStore trait with InMemoryRevocationStore and RedisRevocationStore
- Wire Redis store when REDIS_URL is set (fallback in-memory if Redis unavailable)
- JWT blacklist persists across restarts when using Redis

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 22:06:25 +01:00
senke
48ccb8527d fix(chat): restore compilation - add reactions module, imports, request_id param
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 22:04:11 +01:00
senke
81d08a4680 stabilisation commit 2026-01-04 01:44:23 +01:00
senke
0e7b6fede1 [T0-002] fix(rust): Corriger erreurs compilation Rust
- Conflit SQLx résolu (alignement sur version 0.7)
- build.rs configurés pour protoc dans chat/stream servers
- API Prometheus migrée vers HistogramOpts
- Traits Display/Debug corrigés (String au lieu de &dyn Display)
- API TOTP corrigée (totp-rs 5.4 avec Secret::Encoded)
- Layers tracing-subscriber corrigés (types conditionnels)
- VezaError/VezaResult exportés dans lib.rs
- TransactionProvider simplifié (retour void au lieu de Box<dyn>)
- VezaConfig contraint Serialize pour to_json()

Files: veza-common/Cargo.toml, veza-common/src/*.rs, veza-chat-server/Cargo.toml, veza-chat-server/build.rs, veza-stream-server/Cargo.toml, veza-stream-server/build.rs, VEZA_ROADMAP.json
Hours: 8 estimated, 3 actual
2026-01-04 01:44:20 +01:00
senke
cdf7da36d1 [FIX] PROD-003: Corriger imports use-toast → useToast 2026-01-04 01:44:17 +01:00
senke
bd7f184dce [LOGGING] Fix #24: Standardisation LOG_LEVEL pour tous les services - Support LOG_LEVEL dans Rust et frontend avec fallback 2026-01-04 01:44:16 +01:00
senke
a05a5040ec [LOGGING] Fix #13: Corrélation request_id pour WebSocket dans chat-server - Extraction depuis extensions et utilisation dans spans 2026-01-04 01:44:16 +01:00
senke
9cd76a512f [LOGGING] Fix #10: Erreurs silencieuses - Ajout de logs avec contexte pour toutes les erreurs dans core/auth et core/track 2026-01-04 01:44:15 +01:00
senke
d61d851f65 stabilizing veza-backend-api: phase 1 2025-12-16 11:23:49 -05:00
senke
2dfde29f7d refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
okinrev
87c6461900 report generation and future tasks selection 2025-12-08 19:57:54 +01:00
okinrev
1e4f7b1756 STABILISATION: phase 3–5 – API contract, tests & chat-server hardening 2025-12-06 17:21:59 +01:00
okinrev
cfe6ed0119 STABILISATION: phase 1 & phase 2 2025-12-06 14:45:07 +01:00
okinrev
004007d80c fix(chat-server): finalize HTTP auth and startup wiring 2025-12-06 13:25:25 +01:00
okinrev
61c9d3e264 security(chat-server): implement auth middleware and permission checks for HTTP API 2025-12-06 13:18:12 +01:00
okinrev
2e6ded914d feat(chat-server): implement graceful shutdown with OS signal handling 2025-12-06 12:02:46 +01:00
okinrev
31d52c87cb feat(chat-server): implement 60s inactivity heartbeat timeout 2025-12-06 12:00:20 +01:00
okinrev
b7955a680c P0: stabilisation backend/chat/stream + nouvelle base migrations v1
Backend Go:
- Remplacement complet des anciennes migrations par la base V1 alignée sur ORIGIN.
- Durcissement global du parsing JSON (BindAndValidateJSON + RespondWithAppError).
- Sécurisation de config.go, CORS, statuts de santé et monitoring.
- Implémentation des transactions P0 (RBAC, duplication de playlists, social toggles).
- Ajout d’un job worker structuré (emails, analytics, thumbnails) + tests associés.
- Nouvelle doc backend : AUDIT_CONFIG, BACKEND_CONFIG, AUTH_PASSWORD_RESET, JOB_WORKER_*.

Chat server (Rust):
- Refonte du pipeline JWT + sécurité, audit et rate limiting avancé.
- Implémentation complète du cycle de message (read receipts, delivered, edit/delete, typing).
- Nettoyage des panics, gestion d’erreurs robuste, logs structurés.
- Migrations chat alignées sur le schéma UUID et nouvelles features.

Stream server (Rust):
- Refonte du moteur de streaming (encoding pipeline + HLS) et des modules core.
- Transactions P0 pour les jobs et segments, garanties d’atomicité.
- Documentation détaillée de la pipeline (AUDIT_STREAM_*, DESIGN_STREAM_PIPELINE, TRANSACTIONS_P0_IMPLEMENTATION).

Documentation & audits:
- TRIAGE.md et AUDIT_STABILITY.md à jour avec l’état réel des 3 services.
- Cartographie complète des migrations et des transactions (DB_MIGRATIONS_*, DB_TRANSACTION_PLAN, AUDIT_DB_TRANSACTIONS, TRANSACTION_TESTS_PHASE3).
- Scripts de reset et de cleanup pour la lab DB et la V1.

Ce commit fige l’ensemble du travail de stabilisation P0 (UUID, backend, chat et stream) avant les phases suivantes (Coherence Guardian, WS hardening, etc.).
2025-12-06 11:14:38 +01:00
okinrev
38ac12b3ad adding initial chat server (Rust) 2025-12-03 20:33:26 +01:00