Commit Graph
7 Commits
Author SHA1 Message Date
Arnaud Dartois 183e1b37f7 fix(agent): persist detection events until central accepts
Heimdall Gitea / Build and tests (pull_request) Failing after 50s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-22 19:24:18 +02:00
Arnaud Dartois 0042bf6abc feat(gallery): add snapshot filters and paging 2026-10-20 07:32:56 +02:00
Arnaud Dartois b97d3bec11 feat(security): enforcement — filtrage caméra dans les endpoints sensibles (#175) 2026-08-27 20:28:41 +02:00
Arnaud Dartois 22ebcaf73a fix(web): 401 au premier rendu — cookie propagé aux appels API internes (Fixes #23)
Symptôme : après F5 sur une page authentifiée, les appels API des pages
(api/stats, api/agents…) renvoyaient 401 jusqu'à la connexion du circuit
Blazor. Cause : au rendu initial, AuthState est peuplé depuis le cookie
(AccessToken null → pas de Bearer) et le HttpClient serveur n'envoie pas
le cookie navigateur ; les contrôleurs n'acceptaient que JwtBearer.

Correctif :
- SameOriginHttpMessageHandler : propage le cookie d'authentification du
  HttpContext courant vers la requête interne quand aucun Bearer n'est
  posé (le Bearer du circuit prend le relais ensuite).
- Contrôleurs API humains : AuthenticationSchemes = 'JwtBearer,Cookies'
  (77 occurrences) — le cookie porte les mêmes claims de rôle/permission
  que le JWT.
- Vérifié en réel : F5 /dashboard → plus de snackbar 401, console propre,
  api/agents validé et 200 côté serveur. 182 tests Web verts.
2026-08-11 08:32:41 +02:00
Arnaud Dartois 17d2233f56 chore: auto-commit 2026-08-10 21:48 [Heimdall] src/Heimdall.Application/Events/Queries/GetEvents/GetEventsHandler.cs, src/Heimdall.Application/Events/Queries/GetEvents/GetEventsQuery.cs, src/Heimdall.Web/Components/Pages/EventsPage.razor, src/Heimdall.Web/Controllers/EventsController.cs, src/Heimdall.Web/Services/HeimdallApiClient.cs… 2026-08-10 21:48:53 +02:00
Arnaud Dartois 1d1ac8387e feat(cqrs): update controllers, add AutoMapper profiles, SignalR notifications, Hangfire config
- 13 controllers migrated from service DI to IMediator dispatch
- 11 AutoMapper mapping profiles (Sites, Cameras, Auth, Users, Agents, Events, Assignments, Settings, Groups, Persons, Discovery)
- SignalR notifications bridged via MediatR INotificationHandler
- Hangfire config moved from Program.cs to Infrastructure/BackgroundJobs
- 0 build errors, 0 warnings
2026-07-22 19:54:55 +00:00
Arnaud Dartois 562aabdfc8 feat(api+web): merge REST API and Blazor UI into single process
Previously the API (heimdall-central) and Blazor UI (heimdall-web) ran as
separate containers with the Blazor Server making internal HTTP calls to
the API. This caused the Blazor circuit to disconnect when the API was
unreachable (network error → "Une erreur réseau est survenue").

Now both serve from the same .NET process on the same port:
- All 16 API controllers, ExceptionFilter, and SignalR hubs integrated
  into Heimdall.Web
- JWT auth, CORS, rate limiting configured in the unified Program.cs
- Dockerfile.central entrypoint runs web/Heimdall.Web.dll
- docker-compose simplified: heimdall-central service removed
- CI publishes heimdall-web image instead of heimdall-central

Also fixes timezone validation on Alpine/tzdata-less environments
and enables FluentValidation auto-validation in the API project.
2026-07-20 10:30:01 +00:00