Arnaud Dartois
f832d2fb62
refactor: use EF Core for SQLite persistence
Heimdall Gitea / Detect CI scope (pull_request) Successful in 4s
Heimdall Gitea / Build and tests (pull_request) Successful in 14m48s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan server image (pull_request) Successful in 4m24s
Heimdall Gitea / CI policy (pull_request) Successful in 4s
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 9m12s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
2026-10-26 08:19:44 +01:00
Arnaud Dartois
864bf026f9
fix(test): import application storage context contract
Heimdall Gitea / Detect CI scope (pull_request) Successful in 4s
Heimdall Gitea / Build and tests (pull_request) Successful in 4m33s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan server image (pull_request) Successful in 4m8s
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 11m0s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Successful in 2s
2026-10-25 19:33:16 +01:00
Arnaud Dartois
5a8dfedaa8
test(storage): cover cleanup after destination changes
Heimdall Gitea / Detect CI scope (pull_request) Successful in 4s
Heimdall Gitea / Build and tests (pull_request) Failing after 5m8s
Heimdall Gitea / Build and scan server image (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Skipped
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Failing after 2s
2026-10-25 19:27:04 +01:00
Arnaud Dartois
3ebead5445
test: grant camera in site access coverage fixture
Heimdall Gitea / Detect CI scope (pull_request) Successful in 4s
Heimdall Gitea / Build and tests (pull_request) Failing after 5m31s
Heimdall Gitea / Build and scan server image (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Skipped
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Failing after 1s
2026-10-25 11:01:19 +01:00
Arnaud Dartois
3c4fa9e91b
test: cover camera access authorization paths
Heimdall Gitea / Detect CI scope (pull_request) Successful in 4s
Heimdall Gitea / Build and tests (pull_request) Failing after 6m30s
Heimdall Gitea / Build and scan server image (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Skipped
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Failing after 3s
2026-10-25 10:54:04 +01:00
Arnaud Dartois
b41d8d3910
test(agent): use supported stale heartbeat threshold
Heimdall Gitea / Build and tests (pull_request) Successful in 17m24s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan server image (pull_request) Successful in 6m43s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Canceled after 0s
Heimdall Gitea / Build and scan agent image (pull_request) Canceled after 3m26s
2026-10-25 02:18:51 +01:00
Arnaud Dartois
6fc8efc438
Complete durable agent analysis job flow
Heimdall Gitea / Build and scan server image (pull_request) Canceled after 0s
Heimdall Gitea / Build and scan agent image (pull_request) Canceled after 0s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Canceled after 0s
Heimdall Gitea / Publish versioned release (pull_request) Canceled after 0s
Heimdall Gitea / Build and tests (pull_request) Canceled after 12m24s
2026-10-24 13:43:21 +02:00
Arnaud Dartois
6503a17545
Merge main into repository health fix
Heimdall Gitea / Build and tests (pull_request) Failing after 1m2s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-23 20:21:43 +02:00
Arnaud Dartois
0cc950967e
Align CI fixtures with camera config and release manifest
Heimdall Gitea / Build and tests (pull_request) Failing after 1m21s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-23 18:58:06 +02:00
Arnaud Dartois
9e27e89af5
Fix health check failures and align patch dependencies
Heimdall Gitea / Build and tests (pull_request) Failing after 1m34s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-23 03:14:43 +02:00
Arnaud Dartois
2b41ab4ea3
fix(storage): record historical object destinations
Heimdall Gitea / Build and tests (pull_request) Failing after 4m57s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-22 19:58:55 +02:00
Arnaud Dartois
249c4ef0de
fix: scope email digests to accessible camera events
Heimdall Gitea / Build and tests (pull_request) Successful in 31m9s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-21 18:59:50 +02:00
Arnaud Dartois
6fc6aa1ff2
test(infrastructure): resolve broadcaster through services
Heimdall Gitea / Publish versioned release (pull_request) Canceled after 0s
Heimdall Gitea / Build and tests (pull_request) Canceled after 7m44s
2026-10-20 21:10:59 +02:00
Arnaud Dartois
5c533a8167
Merge remote-tracking branch 'origin/main' into audit-build-gitea
Heimdall Gitea / Publish versioned release (pull_request) Canceled after 0s
Heimdall Gitea / Build and tests (pull_request) Canceled after 2h17m47s
2026-10-20 07:39:27 +02:00
arnaud.dartois
6b887d5fbf
Merge pull request 'fix(auth): secure 2FA challenges and session revocation' ( #5 ) from audit-auth-session into main
...
Validation intégrée avec profils/failover : Infrastructure 305/305 (dont upgrade/rollback migrations combinées), Application 504/504. Branche auth Web389/389 et PostgreSQL auth3/3 ; révocation abonnements inter-contextes11/11. Galerie #10 suit séparément.
2026-10-20 07:38:58 +02:00
Arnaud Dartois
a0401280be
Merge remote-tracking branch 'origin/main' into audit-build-gitea
2026-10-20 07:36:38 +02:00
arnaud.dartois
e932290852
Merge pull request 'fix(pipeline): reconcile camera assignment history and recovery' ( #9 ) from audit/pipe-profile-followup into main
...
Suite intégrée main + profils + affectations + galerie : Infrastructure 286/286, Application 506/506 ; Agent branche synchronisée 364/364. Aucun échec ni ignoré.
2026-10-20 07:35:47 +02:00
Arnaud Dartois
5109b8fa34
merge latest pipe profile and main into follow-up
2026-10-20 07:29:42 +02:00
arnaud.dartois
90704e6e0e
Merge pull request 'fix(scheduler): separate eligibility from negative GPU scores' ( #7 ) from audit/pipe-scoring into main
...
48 tests AnalysisJobSchedulerServiceTests réussis, 0 échec/ignoré. Suite Agent intégrée main+#6+#7 : 362/362.
2026-10-20 07:28:47 +02:00
Arnaud Dartois
084edc313c
fix(pipeline): reconcile camera assignments after failover
2026-10-20 07:27:31 +02:00
Arnaud Dartois
cab8a789fc
build(deps): regenerate test locks after integrating ops and access
Heimdall Gitea / Build and tests (push) Failing after 2m23s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and tests (pull_request) Failing after 4m26s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-20 07:25:06 +02:00
Arnaud Dartois
50cd3f3210
Merge remote-tracking branch 'origin/main' into audit-build-gitea
2026-10-20 07:24:18 +02:00
Arnaud Dartois
8cdbe6c7fa
fix(deps): update vulnerable NuGet dependencies without weakening gates
2026-10-20 07:24:18 +02:00
arnaud.dartois
8b87bbe760
Merge pull request 'fix(security): isolate API resources and SignalR broadcasts' ( #4 ) from audit-access-isolation into main
...
Validation combinée après exploitation #2 : 251 tests Infrastructure et 385 Web réussis, aucun échec ni ignoré. Auth/session #5 suit avec revalidation des connexions SignalR.
2026-10-20 07:23:27 +02:00
Arnaud Dartois
7ecf4ad247
merge: integrate access isolation into auth session security
2026-10-20 07:22:51 +02:00
Arnaud Dartois
26321bb81c
fix(auth): secure 2FA challenges and session revocation
2026-10-20 07:21:28 +02:00
Arnaud Dartois
1cd4e2b4b5
fix(security): enforce resource isolation across API and hubs
2026-10-20 07:16:44 +02:00
Arnaud Dartois
e2a7442175
fix(scheduler): separate eligibility from negative GPU scores
2026-10-20 02:31:17 +02:00
Arnaud Dartois
ad2a582b63
build(gitea): reconstruct tests packaging images and release lanes (Refs #1 )
Heimdall Gitea / Build and tests (push) Failing after 1m12s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and tests (pull_request) Failing after 40s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-20 02:29:19 +02:00
Arnaud Dartois
cef3434c3c
fix(ops): confine local storage and repair maintenance jobs (Refs #1 )
2026-10-20 02:27:03 +02:00
Arnaud Dartois
58b6a1de9b
feat(app): implement all open issues - camera access control, i18n, GPU, mDNS, site filtering
...
- Implement UserCameraAccess entity and CRUD API (issues #131 , #133 )
- Add CameraAccessPanel UI component for granular access management (issue #134 )
- Implement camera toggle UI (issues #59 , #199 )
- Implement site filtering by user rights (issue #136 )
- Implement Groups camera access assignment (issue #138 )
- Implement audit logging for camera access changes (issue #140 )
- Add comprehensive camera access test coverage (issue #141 )
- Implement i18n/l10n localization infrastructure (issue #142 )
- Implement OpenTelemetry metrics infrastructure (issue #14 )
- Implement Agent GPU worker (issue #76 )
- Implement Agent remote sensor mode (issue #75 )
- Fix Docker GPU exposure in compose files (issues #76 , #77 )
- Fix mDNS divergence by extracting shared MdnsClient library (issue #81 )
- Implement User email confirm/edit UI (issues #88 , #89 )
- Implement Persons UI (issue #11 )
- Fix E2E test timing issues by increasing circuit delay
- Add MdnsClient library with unified unicast/multicast mDNS support
- Refactor MdnsProbeService and HomeKitMdnsProbe to use shared client
- Add GroupCameraAccess entity for group-based camera access
- Add comprehensive camera access test coverage
- Add i18n localization infrastructure with fr/en support
- Add Docker GPU exposure for NVIDIA/AMD/Intel
- Update Docker compose files with GPU device exposure
- Fix mDNS divergence between Central unicast and Agent multicast
- Fix E2E test timing issues with increased circuit delay
All 1700+ tests pass (unit + integration)
2026-10-11 21:23:16 +02:00
Arnaud Dartois
eabea58353
fix: narrow _dbFactory type to TestDbContextFactory to fix CA1859
...
The 7 failing test files used IDbContextFactory<AppDbContext> for a field
that's always initialized with TestDbContextFactory. Narrowing to the
concrete type satisfies the analyzer and matches the pattern already used
in 5 other tests in the same folder.
Fixes: AgentFailoverJobTests, BusinessEntityPersistenceTests,
AnalysisJobDispatcherJobTests, AnalysisJobSchedulerServiceTests,
AgentDiscoveryServiceTests, CameraAssignmentServiceTests,
CameraEventServiceTests
2026-10-10 13:46:12 +02:00
Arnaud Dartois
e6e8690588
feat(security): add ICameraAccessService for granular per-user camera access control ( #178 )
2026-08-30 09:48:47 +02:00
Arnaud Dartois
e0290c8a1b
feat(db): partitionnement camera_events + gestion automatique des partitions mensuelles ( #164 )
2026-08-27 00:31:12 +02:00
Arnaud Dartois
ca43c6d28e
feat(analysis): scheduler de jobs d'analyse avec routage par capacités, priorités et dead-letter ( #159 )
2026-08-26 23:44:38 +02:00
Arnaud Dartois
6b611e908a
feat(notifications): abonnement par type d'événement + priorité ntfy ( Fixes #61 ) ( #154 )
...
## Contexte
Issue #61 : Gestion des types d'alertes — abonnement par type d'événement + sévérité/priorité.
Les utilisateurs ne peuvent pas filtrer quelles notifications push/email ils reçoivent. Tous les événements (mouvement, personne, caméra hors ligne...) sont envoyés sans distinction.
## Changements
### Domaine
- **EventTypePriorityMap** (`src/Heimdall.Domain/Helpers/`) : mapping `EventType` → priorité ntfy (1-5)
- CameraOffline/UnknownPerson = 5 (urgent), PersonDetected/FaceRecognized = 4 (high), MotionDetected/VehicleDetected/LicensePlateDetected = 3 (default), CameraOnline = 2 (low)
- **UserNotificationConfig** : ajout `SubscribedEventsJson` (JSON array), `GetSubscribedEvents()`, `IsEventTypeSubscribed()`, `SetSubscribedEvents()`
- `null` ou `[]` = recevoir tous les événements (comportement par défaut)
### Infrastructure
- **NotificationService.DispatchToExternalChannelsAsync** : filtre par `IsEventTypeSubscribed()` avant envoi email/ntfy
- Priorité ntfy calculée via `EventTypePriorityMap.GetPriority()` et passée à `NtfyService`
### UI (Profile.razor)
- Checkboxes par type d'événement dans la section Notifications
- Texte explicatif : « Si aucun n'est sélectionné, tous les événements sont notifiés »
- Sauvegarde via `UpdateNotificationConfigRequest.SubscribedEvents`
### Tests
- 10 tests Domain : `UserNotificationConfig` (GetSubscribedEvents, IsEventTypeSubscribed, cas limites JSON invalide/vidé/unknown)
- 1 test Domain : `EventTypePriorityMap` (couvre les 8 EventTypes + null)
- 3 tests Infrastructure : filtrage par abonnement + priorité ntfy + filtre vide
## Vérification
- `dotnet build` : 0 erreur, 0 warning
- Domain.Tests : 161 passed
- Infrastructure.Tests : 180 passed
- Application.Tests : 421 passed
- Web.Tests : 243 passed
- Agent.Tests : 206 passed
- Total : 1211 tests ✅
Closes #61
Reviewed-on: https://forgejo.tordais.cc/nonobis/Heimdall/pulls/154
2026-08-20 15:10:37 +02:00
Arnaud Dartois
45ce41ce7e
fix(deps): CVE bloquantes Trivy — AutoMapper 16.1.1, OpenApi 10.0.11, Newtonsoft 13, SQLitePCLRaw 2.1.13 ( #128 )
...
## Contexte
Trivy (bloquant) détecte 4 CVE HIGH dans les images PR. Ces vulnérabilités sont dans la base du projet (pas liées aux PR #117/#118) → PR dédiée.
## Changements
- **AutoMapper 13.0.1 → 16.1.1** (CVE-2026-32933) : AddAutoMapper passe par cfg.AddMaps(assembly) (v16 : plus de surcharge Assembly) ; MapperConfiguration des tests → constructeur 2 args (NullLoggerFactory.Instance).
- **Microsoft.AspNetCore.OpenApi 10.0.8 → 10.0.11** (CVE-2026-49451) : tire Microsoft.OpenApi 2.7.5.
- **Newtonsoft.Json 13.0.1** en référence directe (CVE-2024-21907, transitif 11.0.1 forcé).
- **SQLitePCLRaw.bundle_e_sqlite3 2.1.13** en référence directe (CVE-2025-6965, transitif 2.1.11 forcé).
## Tickets liés
Fixes #127
## Résultats des tests
- dotnet build Heimdall.slnx -c Release : 0 erreur, 0 warning
- Application.Tests (Mapping + NotificationHandler) : 22/22
- Infrastructure.Tests (NotificationServiceTests, Testcontainers) : 10/10
## SonarQube
À valider sur la CI (gate bloquant).
## CVE
Corrigées par les bumps ci-dessus (à confirmer par Trivy sur le run).
## Checklist
- [x] PR par ticket
- [x] Build + tests locaux verts
- [ ] CI verte (Trivy sans HIGH/CRITICAL)
- [ ] Sonar gate OK
Reviewed-on: https://forgejo.tordais.cc/nonobis/Heimdall/pulls/128
2026-08-15 09:11:25 +02:00
Arnaud Dartois
7d6213696f
feat(storage): stockage configurable par l'IHM — providers Fichier + S3 ( Fixes #78 )
...
- IStorageProvider (Application) : Upload/Download/Delete/DeleteBatch/Health
- LocalStorageProvider : écriture atomique (tmp + move), anti path-traversal
- AlarikStorageProvider : S3-compatible (AWS SDK, ForcePathStyle), upload
staging→final (atomique), batch delete 1000/appel (Correctif D6)
- StorageProviderFactory : provider résolu depuis les settings DB
(storage.provider = Local|S3) avec fallback env, re-résolu à chaque appel
- Seed idempotent des clés storage.* (catégorie 'storage') au démarrage
- UI : section 'Stockage' dédiée dans SettingsPage (sélecteur Local/S3,
champs conditionnels, clé secrète masquée, bouton Tester → POST
/api/settings/storage/test)
- Tests : 6 LocalStorageProvider (roundtrip, delete, batch, traversal,
health) ; Web 217/217, Infrastructure 177/177, Application 391/391
2026-08-12 10:14:40 +02:00
Arnaud Dartois
e3d14eec04
feat(jobs): jobs Hangfire rétention/cleanup + dashboard admin ( Fixes #8 )
...
- RetentionCheckJob (quotidien 3h) : purge enregistrements expirés par
StoragePolicy via ExecuteDelete (1 requête, pas de boucle), défaut 30 j
- CleanupUnknownFacesJob (dim 5h) : personnes 'unknown' > 30 j
- CleanupLicensePlatesJob (dim 6h) : plaques non associées > 30 j
- DatabaseMaintenanceJob (dim 7h) : VACUUM events + REINDEX (VACUUM FULL
1er dimanche)
- Dashboard Hangfire /hangfire protégé AdminJobs (filtre custom)
- S3CleanupJob dépend du ticket #7 (stockage S3) — non inclus ici
- Tests : 2 (rétention avec/sans politique)
2026-08-12 09:43:45 +02:00
Arnaud Dartois
0c7bb86eae
feat(logs): purge des logs agents — AgentLogCleanupJob Hangfire ( Fixes #53 )
...
- Job quotidien 4h : supprime les AgentLogEntry plus vieux que la rétention
(Logs:RetentionDays, défaut 7 j), par lots de 5000 + pause 100 ms
(pas de verrou long ni de transaction log explosée)
- Enregistré dans JobSetup + DI BackgroundJobs
- Tests : 2 (purge des vieux uniquement, rien si rien de vieux)
2026-08-12 09:29:03 +02:00
Arnaud Dartois
e14e4cde78
feat(discovery): base caméras Strix — DB SQLite embarquée 100k+ patterns ( Fixes #64 )
...
- cameras.db récupérée depuis l'image Docker eduard256/strix (MIT © 2025 eduard256,
/app/cameras.db) : 3 688 marques, 17 313 streams, 73 238 modèles, 4 186 presets, 2 406 OUIs
- SqliteCameraDatabase (Microsoft.Data.Sqlite pur managé, Alpine-safe) :
Search (presets+brands+models, multi-mots), BuildStreams (ids b:/m:/p:,
placeholders [CHANNEL]/[USERNAME]/[PASSWORD]..., portFilter), LookupOui
- Copiée en Content CopyToOutputDirectory → dispo Central + Agent + tests
- Central : SearchDatabase/BuildStreamUrls/ResolveOuiVendor préfèrent la DB
(fallback catalogue statique + templates)
- Agent : BuildCandidateUrls utilise les patterns réels de la marque (DB) sinon templates
- Tests : 10 (search marque/modèle/preset, build URLs, portFilter, OUI)
2026-08-12 08:45:18 +02:00
Arnaud Dartois
29ff980db5
feat(domain): entités métier Vehicle/Recording/LicensePlate/StoragePolicy + relations Event→Vehicle/Recording, Camera→StoragePolicy ( Fixes #6 )
2026-08-11 21:42:46 +02:00
Arnaud Dartois
ddfa22bee6
fix(agent): camera discovery — host-network compose, parasite filtering, auto stream detection
...
- Compose (dev+prod): agent on host network (bridge 172.x was skipped by the
scanner), listen on 8081 (ntfy owns 8080), CentralUrl via host/domain,
healthcheck adapted, no Docker DNS
- Scanner: skip the LAN gateway (NAT router, never a camera); wider camera
ports (+34567/34568 Imou SDK, +8000 Hikvision SDK); 750 ms port timeout;
keep only devices with real camera evidence; RTSP OPTIONS + MJPEG
content-type probes prove live streams from the agent (it is on the LAN)
- Central: drop Unknown devices (nginx/gunicorn/gateway) on submit; classify
37777 DVRIP as Standard camera (not NVR), 8899 alone as NVR; persist
agent-tested stream URLs flagged IsAlive; shared CameraStreamTemplates
with the agent so both build identical candidate URLs
- UI: discoveries popup auto-selects the agent-verified main stream — no
manual stream choice
2026-08-11 20:47:27 +02:00
Arnaud Dartois
2678009444
fix(test): List_pending déterministe — cible l'IP exacte au lieu de FirstAsync() non ordonné
...
FirstAsync() sans ORDER BY n'est pas stable entre providers (SQLite local
vs PostgreSQL CI) : le test List_pending_should_return_only_unprocessed_results
échouait en CI quand le premier résultat retourné était 192.168.1.11 au
lieu de 192.168.1.10. On marque maintenant explicitement l'IP à rejeter.
2026-08-11 16:27:35 +02:00
Arnaud Dartois and nonobis
f8f2b08d29
feat(agent): enrichissement ONVIF authentifié côté agent — pool chiffré via config ( #49 )
...
## What
L'enrichissement ONVIF authentifié est déplacé côté **agent**. Le pool de credentials du site (login/mdp) est exposé à l'agent via `GET /api/settings/agent/{id}` sous forme d'enveloppe AES-256-GCM (`AgentCredentialEnvelope`, clé dérivée du SHA-256 de l'API key) — déchiffrable uniquement côté agent. `NetworkCameraScanner` tente `GetDeviceInformation` avec chaque couple du pool (PasswordDigest puis PasswordText) et remonte des devices **déjà identifiés** (fabricant/modèle ONVIF + `CredentialLabel`). Le central persiste et marque le credential utilisé (`LastUsedAt`) — plus aucun appel réseau ONVIF côté central.
## Why
Le central n'est généralement **pas** sur le réseau des caméras : les appels ONVIF authentifiés qu'il faisait après réception des devices bruts échouaient. L'agent, lui, est sur le sous-réseau des caméras — c'est lui qui doit porter l'auth. Enrichissement et identification se font au moment du scan, avant la remontée.
## How
- `AgentCredentialEnvelope` (Application/Security) : AES-256-GCM, clé = SHA-256 de l'API key ; central chiffre (via l'`ApiKeyHash` stocké), agent déchiffre (via sa clé en clair).
- `GetEffectiveAgentConfigQuery` : ajoute `discovery.credentials` (pool chiffré) au dict de config.
- `SettingsController.GetEffectiveConfig` : accepte l'API key agent (vérification par site) en plus du JWT admin — corrige au passage un 403 latent sur cet endpoint.
- `NetworkCameraScanner` : probe ONVIF authentifié avec le pool (anonyme d'abord, puis chaque couple).
- `AgentCredentialStore` (mémoire, jamais sur disque) : reçoit le pool déchiffré par `ConfigReceiverService`, lu par `AgentDiscoveryService`.
- `CameraDiscoveryService` : suppression de l'enrichissement réseau ; persistance + `MarkUsed` via `CredentialLabel` ; vendor déduit du fabricant ONVIF remonté.
- `SitesController` : broadcast `ConfigReload` après add/delete credential pour que les agents re-fetch leur pool.
- Multi-agents : inchangé — upsert par (site, IP) et anti-doublon IP/MAC à la confirmation évitent les caméras en double même si un agent est éteint.
## Testing
- `dotnet build Heimdall.slnx` : 0 erreur / 0 warning.
- Application 346 verts, Agent 108 verts, Infrastructure 143 verts (hors Testcontainers).
- Web.Tests 213 verts — nouveaux bUnit : DiscoveriesPage (5) + SiteDetail credentials (4).
## Breaking Changes
Aucun changement de schéma (pas de migration). Comportement API : `GET /api/settings/agent/{id}` accepte désormais l'API key agent (accès élargi au cas d'usage prévu).
Related to #48
Co-authored-by: nonobis <nonobis@tordais.cc >
Reviewed-on: https://forgejo.tordais.cc/nonobis/Heimdall/pulls/49
2026-08-11 16:15:41 +02:00
Arnaud Dartois
64753b9ba6
fix(ci): reparation tests integration + infrastructure
...
- TestHelpers.CreateAdminClientAsync: bootstrap via register normal
(first user = admin) + active les flags public-registration et
admin-registration.enabled
- JwtService.GetUserIdFromExpiredToken: utilise GetJwtRefreshKey()
(methode appelee avec refresh tokens, signes avec Jwt:RefreshKey)
- AuthDataServiceTests.RevokeRefreshTokenAsync_StoresToken:
utilise SHA256 hash (nouveau comportement ExtractJti fallback)
2026-07-28 15:14:54 +00:00
Arnaud Dartois
f800103239
feat: remplacer Gotify par ntfy — push notifications multi-utilisateur avec isolation par topic
...
- Nouveau NtfyService: topic isolé par user (heimdall_{userId})
- Configuration globale Ntfy:BaseUrl + Ntfy:Token (plus de token par user)
- Renommage UserNotificationConfig: Gotify* → Ntfy*
- Migration des colonnes DB: gotify_enabled/url/token → ntfy_enabled/url
- Ajout service ntfy dans docker-compose (binwiederhier/ntfy)
- Mise à jour .env.example avec NTFY__BASE_URL et NTFY__TOKEN
- Suppression GotifyService et IGotifyService
2026-07-27 04:56:16 +00:00
Arnaud Dartois
f9be0f1e0d
feat: implémenter SignalR hubs (Monitoring, Notifications, Admin) + système de notifications complet
...
SignalR Hubs:
- MonitoringHub (/hubs/monitoring) — statuts agents/caméras/stockage/GPU jobs
- NotificationsHub (/hubs/notifications) — notifications in-app badge temps réel
- AdminHub (/hubs/admin) — broadcast changements config (Admin only)
Notification System:
- Nouvelles entités: Notification, NotificationTemplate, UserNotificationConfig
- CQRS/MediatR: 6 handlers (list, unread, mark-read, mark-all, config get/update)
- Infrastructure: NotificationService orchestrator + EmailService + GotifyService
- Rate limiter IMemoryCache (20 events/min/camera/type)
- Hangfire jobs: SendNotification, DailyDigest, WeeklyDigest
- NotificationsController API (6 endpoints)
- Blazor UI: NotificationsPage + NotificationBadge
- Migration AddNotifications (3 nouvelles tables)
- 644 nouveaux tests (Domain: 131, Application: 321, Infra: 151, Integration: 120, +autres)
2026-07-26 20:45:35 +00:00
Arnaud Dartois
5d06c39160
test(infrastructure): add service tests for Security, Data, Discovery, Jobs layers
2026-07-23 15:08:09 +00:00
Arnaud Dartois
b167c2afcf
fix: share one PostgreSQL Testcontainer across all test projects
...
Create Heimdall.TestCommon project with a single PostgreSqlContainerFixture
shared by both Infrastructure and Integration tests. This prevents Docker
resource conflicts from starting two PostgreSQL containers and ensures
both test suites connect to the same database instance.
- Move shared fixture to tests/Heimdall.TestCommon
- Remove duplicate fixtures from each test project
- Keep test isolation (truncation) and FK fix from previous commit
- Revert DATABASE_URL env var check (Testcontainers works in CI)
2026-07-21 18:48:39 +00:00