Commit Graph
532 Commits
Author SHA1 Message Date
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 c0467ad820 fix: revalidate live hub sessions from database 2026-10-20 07:36:26 +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 582be5627d Merge pull request 'fix(pipeline): version detection profiles and resync camera configuration' (#8) from audit/pipe-profile into main
Validation intégrée main + runtime + scoring + profils : Infrastructure 283/283 ; Application finale 504/504 ; Agent branche résolue 363/363. Aucun échec ni ignoré.
2026-10-20 07:33:56 +02:00
Arnaud Dartois ff04526269 Merge remote-tracking branch 'origin/audit/pipe-profile' into audit/pipe-profile-followup 2026-10-20 07:32:54 +02:00
Arnaud Dartois 4d8bee7b02 test(profile): use an active camera in status fixture 2026-10-20 07:32:51 +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 a0641658d8 Merge pull request 'fix(agent): bound inference work and drain ONNX before disposal' (#6) from audit/pipe-runtime into main
Validation intégrée sur main après #2/#4 avec scoring : suite Agent complète 362 réussis, 0 échec/ignoré. Profil #8 suit.
2026-10-20 07:28:07 +02:00
Arnaud Dartois 084edc313c fix(pipeline): reconcile camera assignments after failover 2026-10-20 07:27:31 +02:00
Arnaud Dartois a182af36d9 merge main into pipe profile and preserve isolation fixes 2026-10-20 07:26:50 +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 965147de86 Merge pull request 'fix(ops): confinement stockage local et maintenance indépendante' (#2) from audit-ops-gitea into main
Validation intégrée exploitation + isolation : 251 tests Infrastructure réussis, 0 échec/ignoré ; validation Compose positive et négative réussie. CI reconstruite dans PR #3 ensuite.
2026-10-20 07:23:18 +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 8c6ecccf49 fix(pipeline): version detection profiles and resync camera configuration 2026-10-20 02:27: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 64a769c7de fix(agent): bound inference work and drain ONNX before disposal 2026-10-20 02:25:27 +02:00
arnaud.dartoisandArnaud Dartois 21f0530b6c chore : Audit incomplete features suite implémentation (#1)
- Nettoyage
- Preparation correction fonctionnalité manquante

---------

Co-authored-by: Arnaud Dartois <nonobis@gmail.com>
Reviewed-on: #1
2026-10-20 02:12:47 +02:00
Arnaud Dartois 57da367c4f feat(migration): add camera assignment leases and epoch fencing
renovate.yml (push) Invalid workflow file
ci.yml (push) Invalid workflow file
release.yml (push) Invalid workflow file
Test Local Checkout / test (push) Canceled after 0s
2026-10-14 12:35:27 +02:00
Arnaud Dartois e41ac78eb5 feat(migration): add versioned detection profiles and class filtering 2026-10-14 12:29:23 +02:00
Arnaud Dartois ec59ee3208 feat(migration): bootstrap Sites and Cameras domain for Heimdall MVP
ci.yml (push) Invalid workflow file
release.yml (push) Invalid workflow file
renovate.yml (push) Invalid workflow file
Test Local Checkout / test (push) Canceled after 0s
2026-10-14 11:01:04 +02:00
Arnaud Dartois 525283c099 rename for gitea build
ci.yml (push) Invalid workflow file
release.yml (push) Invalid workflow file
renovate.yml (push) Invalid workflow file
Test Local Checkout / test (push) Canceled after 0s
2026-10-11 22:00:21 +02:00
Arnaud Dartois 8e824ec6cf feat(ci): add Android mobile test job to CI (issue #185)
- Add test-android job to CI workflow
- Run Android JVM unit tests with Gradle
- Build Debug APK with Gradle
- Upload Debug APK as artifact
- Add mobile_changed detection in changes job
- Add test-android to CI job dependencies

All 1700+ tests pass
2026-10-11 21:52:35 +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 421b2e21e5 feat(docker): add GPU exposure for agent (issues #76, #77)
- Update Dockerfile.agent with multi-runtime support:
  - NVIDIA CUDA runtime (nvidia/cuda:12.6-runtime-ubuntu22.04)
  - AMD ROCm runtime (rocm/rocm-runtime:6.3.3-ubuntu22.04)
  - Intel VAAPI/iGPU runtime (intel/intel-extension-for-pytorch:2.3.0-ubuntu22.04)
  - CPU-only fallback (mcr.microsoft.com/dotnet/aspnet:10.0-alpine)
- Add TARGET_RUNTIME build arg (nvidia|amd|intel|cpu)
- Add GPU device exposure in docker-compose.yml and docker-compose.prod.yml:
  - NVIDIA: driver=nvidia, capabilities=[gpu]
  - AMD: devices /dev/kfd:/dev/kfd, /dev/dri:/dev/dri
  - Intel: device /dev/dri:/dev/dri
- Add ORT_PROVIDER and ORT_CUDA_DEVICE_ID env vars for ONNX Runtime GPU provider selection
- Default to CPU runtime for backward compatibility

All 1700+ tests pass
2026-10-11 12:27:20 +02:00
Arnaud Dartois 7c40524151 test(app): add comprehensive camera access control tests (issue #141)
- Add tests for UserCameraAccess CRUD operations (Create, Delete, Update, List)
- Add tests for GroupCameraAccess CRUD operations (Add, Remove, List)
- Add tests for site filtering by user access rights
- Fix test issues: camera navigation property setup, group/camera ID matching
- Add InternalsVisibleTo for test access to internal methods
- All 1727 tests pass
2026-10-11 12:04:45 +02:00
Arnaud Dartois e068825768 feat(i18n): add localization infrastructure and configure request localization (issue #142)
- Add Localization services with ResourcesPath to Localization folder
- Configure RequestLocalizationMiddleware with fr/en support
- Query string and cookie culture providers
- Supported cultures: fr (default), en
- Build successful, all 1700+ tests pass

Note: Components need IStringLocalizer injection and @L[] usage - ready for incremental adoption
2026-10-10 22:55:26 +02:00
Arnaud Dartois 434a3f0822 feat(app): add Group-Camera access management (issue #138)
- Domain: GroupCameraAccess entity with IAuditableEntity
- Group entity: added GroupCameraAccesses navigation collection
- Camera entity: added GroupCameraAccesses navigation collection
- Infrastructure: DbSet, configuration with unique constraint on (GroupId, CameraId)
- Application: CQRS commands/queries for group camera access
  - AddCameraToGroupCommand / RemoveCameraFromGroupCommand
  - GetCamerasByGroupQuery
- DTOs: GroupCameraAccessResponse, CreateGroupCameraAccessRequest, DeleteGroupCameraAccessRequest
- Web: GroupCamerasController with REST endpoints
- All 1700+ tests pass
2026-10-10 22:45:36 +02:00
Arnaud Dartois e4586c8c1c feat(app): add site filtering by user access rights (issue #136)
- GetSitesQuery now accepts optional UserId parameter
- GetSitesHandler filters sites by user's accessible site IDs via ICameraAccessService
- SitesController.List passes current user ID for RBAC filtering
- Non-admin users only see sites they have access to via UserCameraAccess/UserSite
- Admin users see all sites (ICameraAccessService handles admin bypass)
- Updated GetSitesHandlerTests with ICameraAccessService mock
- All 1700+ tests pass
2026-10-10 22:29:07 +02:00
Arnaud Dartois 6e34c512b6 feat(web): add CameraAccessPanel component for granular camera access management (issue #134)
- New component CameraAccessPanel.razor with MudDialog for managing user camera access
- Lists site-wide and camera-specific access entries
- Allows granting new access (site-wide or specific camera) with dropdowns
- Allows revoking access entries
- Integrated into UsersPage.razor via camera access button
- Uses HeimdallApiClient for API calls
- All 1700+ tests pass
2026-10-10 22:19:52 +02:00
Arnaud Dartois 600c96c9ff feat(app): add UserCameraAccess CRUD API and UI infrastructure (issues #131, #133, #134)
- Domain: UserCameraAccess entity with IAuditableEntity (CreatedAt, UpdatedAt)
- Application: CQRS commands/queries for camera access management
  - CreateUserCameraAccessCommand (site-wide or specific camera)
  - DeleteUserCameraAccessCommand
  - UpdateUserCameraAccessCommand (change camera/scope)
  - ListUserCameraAccessQuery / ListUserCameraAccessByCameraQuery
  - GetUserCameraAccessQuery
- DTOs: UserCameraAccessResponse, CreateUserCameraAccessRequest, UpdateUserCameraAccessRequest
- Web: UserCameraAccessController with REST endpoints
- Mapping: AutoMapper profile for UserCameraAccess
- All 1700+ tests pass
2026-10-10 21:56:03 +02:00
Arnaud Dartois e704877f24 fix(app): RegisterFaceHandler adds to both person.Faces and DbContext Set for test compatibility
- Added person.AddFace(face) to maintain in-memory consistency for domain logic
- Also added _db.GetSet<KnownFace>().Add(face) to avoid EF Core phantom UPDATE
- Both Application.Tests and IntegrationTests pass
2026-10-10 20:15:14 +02:00
Arnaud Dartois 833f31ffad docs(readme): update with accurate project structure, test counts, stack, docker compose services
- Add Domain.Primitives, Contracts, Mobile projects
- Correct test counts: ~1551 total (was ~930)
- Update docker services to match compose (heimdall single service, not web/workers split)
- Fix env variable table: remove outdated 'central/workers', add missing vars
- Add mobile stack (Kotlin/Jetpack Compose)
- Add MassTransit, SIPSorcery, ONNX Runtime to stack
2026-10-10 19:55:33 +02:00
Arnaud Dartois 80e21d63e6 fix(tests): repair PersonsController integration tests and fix EF concurrency on RegisterFace
- Add DbUpdateConcurrencyException to SaveChangesWithRetryAsync transient check
- RegisterFaceHandler adds KnownFace via DbContext Set to avoid phantom UPDATE
- Validate empty embedding (400) before person existence check
- CreateViewerClientAsync bootstraps admin first so 2nd user is Viewer
- Rename GetAll_WithViewerAuth test to match PersonRead permission on Viewer
- PersonsControllerTests: all 20 tests green
2026-10-10 19:47:09 +02:00
Arnaud Dartois fa0b61837a fix(infra): suppress PendingModelChangesWarning in AppDbContext OnConfiguring to fix migration failures 2026-10-10 18:45:58 +02:00
Arnaud Dartois c45ee9f9aa fix(tests): use correct icon button index in UsersPage tests after camera access button added 2026-10-10 18:42:36 +02:00
Arnaud Dartois a5f1d0ff74 test(api): add integration tests for PersonsController
- Add CreateViewerClientAsync helper to TestHelpers
- 12 new integration tests: faces CRUD, vehicles, events filter,
  permissions (Viewer forbidden), cascade delete, audit logging
2026-10-10 17:50:43 +02:00
Arnaud Dartois 6f2530061f feat(ui): add Persons link to MainLayout navigation
- Add 'Personnes' link with People icon in nav menu
- 2 NavigationTests: link visibility and active state
2026-10-10 17:50:33 +02:00
Arnaud Dartois 9bc5c1941c feat(ui): add PersonDetailPage (/persons/{id})
- Header with photo, name, category, watchlist badge, notes
- Face carousel (MudCarousel) with thumbnails
- Associated vehicles table
- 30-day FaceRecognized event history (client-filtered by name)
- Edit/Delete actions with PersonFormDialog
- 10 bUnit tests
2026-10-10 17:50:22 +02:00
Arnaud Dartois 3ef23aabab feat(ui): add PersonsListPage (/persons)
- Card grid with photo, name, category, face count, watchlist badge
- Search bar + Known/Unknown filter
- Create dialog via PersonFormDialog
- 9 bUnit tests
2026-10-10 17:50:02 +02:00
Arnaud Dartois 5a548ab3d9 feat(ui): add PersonFormDialog shared component
- Reusable create/edit dialog for person management
- 4 bUnit tests: validation, create, edit, server error
2026-10-10 17:49:46 +02:00
Arnaud Dartois 89cf524165 feat(client): add person, face, and vehicle methods to HeimdallApiClient
- Add PersonClientItem, KnownFaceClientItem, VehicleClientItem DTOs
- Add GetPersonsAsync, GetPersonAsync, CreatePersonAsync, UpdatePersonAsync, DeletePersonAsync
- Add GetFacesAsync, RegisterFaceAsync, DeleteFaceAsync
- Add GetVehiclesAsync
2026-10-10 17:49:37 +02:00
Arnaud Dartois 5ce13649b0 feat(app): add audit logging to person handlers
- Add AuditLog entries to CreatePerson, UpdatePerson, DeletePerson,
  RegisterFace, DeleteFace handlers
- Extend application unit tests to verify audit log creation
2026-10-10 17:49:26 +02:00
Arnaud Dartois d2a2d6c0c1 wiip 2026-10-10 15:28:34 +02:00
Arnaud Dartois 955d47636a chore: move android project to src folder 2026-10-10 15:28:23 +02:00
Arnaud Dartois 93c662c21d feat(rbac): expose GET /api/sites/by-user using GetSitesByUserQuery
The GetSitesByUserQuery handler (added in #136 RBAC ticket) was dead code —
never called from any controller. Wire it up as GET /api/sites/by-user so
non-admin users only see the sites they have access to (via
ICameraAccessService.GetAccessibleSiteIdsAsync), consistent with the
RBAC filtering already applied to cameras.

Fixes #136 (partial — per-user site filtering)
2026-10-10 13:46:38 +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