Commit Graph
150 Commits
Author SHA1 Message Date
arnaud.dartois dac178930b Merge pull request 'Fix config broadcast dependency cycle' (#11) from fix/config-broadcast-di into main
Heimdall Gitea / Publish versioned release (push) Canceled after 0s
Heimdall Gitea / Build and tests (push) Canceled after 5m19s
2026-10-20 21:05:55 +02:00
Arnaud Dartois 93b9257e47 Fix config broadcast dependency cycle 2026-10-20 20:57:16 +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 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 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 a182af36d9 merge main into pipe profile and preserve isolation fixes 2026-10-20 07:26:50 +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 087161db76 build(gitea): refresh portable dependency locks after restore 2026-10-20 02:30:09 +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 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 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 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 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 Dartoisandthe-developer f948a4a287 fix: restore main build — missing using + obsolete EF Core warning + UsersPage Razor compile errors (#200)
Co-authored-by: the-developer <the-developer@tordais.local>
Reviewed-on: https://forgejo.tordais.cc/nonobis/Heimdall/pulls/200
2026-10-10 12:39:39 +02:00
Arnaud Dartois 9a77a775a3 fix: suppress PendingModelChangesWarning for global query filters (#197)
## Contexte

Les migrations de base de données échouent à cause d'un warning EF Core `PendingModelChangesWarning` promu en exception lors du démarrage du conteneur.

**Cause racine** : Les filtres de requête globaux (utilisés pour le soft-delete) provoquent ce warning quand le modèle a des changements en attente. Npgsql/EF Core lève une `InvalidOperationException` au lieu de simplement logger.

## Changements

- Ajout de `warnings.Ignore(CoreEventId.PendingModelChangesWarning)` dans `OnModelCreating`
- Commentaire explicatif dans `Program.cs` sur la suppression

## Tests

- Vérifié : les migrations s'appliquent correctement
- Les filtres soft-delete continuent de fonctionner

**Note** : Le Co-authored-by est interdit dans les commits (règle projet).

Reviewed-on: https://forgejo.tordais.cc/nonobis/Heimdall/pulls/197
2026-09-01 10:18:43 +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 acf3a4304c fix(ci): réduire artifact build + corriger URL YOLO ONNX (#181) 2026-08-30 09:45:37 +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 80ee2aa1bb feat(persons): interface Persons — page liste + détail avec échantillons visage (#163) 2026-08-27 15:06:06 +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 6eae4eea2f feat(agent): détection GPU + heartbeat étendu + badges Admin UI (#160) 2026-08-26 23:52:16 +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 2d1734114f feat(metrics): métriques OpenTelemetry Prometheus (spec §13.1) (#161) 2026-08-20 18:22:37 +02:00
Arnaud Dartois 7a89a97bf3 feat(notifications): add user-configurable ntfy to 2026-08-20 18:14:46 +02:00
Arnaud Dartois 2ac2789728 chore(hangfire): migrate from obsolete UsePostgreS 2026-08-20 18:14:28 +02:00
Arnaud Dartois 13456ab4f5 fix(security): align rate limiting and password po 2026-08-20 18:14:18 +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 4792b69e46 feat(agent): télémétrie inventaire matériel — CPU/mémoire/disque/GPU/OS/réseau (Fixes #82 #83 #84 #85) (#137)
## Contexte

Implémentation des tickets #82, #83, #84, #85 — télémétrie inventaire matériel agent. L'objectif est de fournir au central un maximum d'informations sur les machines des agents (CPU, mémoire, disques, GPU, OS, réseau, conteneur) sans SSH.

## Changements

### Nouveaux collecteurs (src/Heimdall.Agent/Services/)
- **CpuInfoProvider** : parse `/proc/cpuinfo` (vendor, modèle, cœurs physiques/logiques, fréquence, flags AVX/AVX2/FMA/AVX512, cache), topologie, détection cgroup CPU (`/sys/fs/cgroup/cpu.max` v2)
- **DiskInventoryProvider** : énumère les montages (`/proc/mounts`), capacité/libre/type SSD/HDD via `/sys/block/*/queue/rotation`
- **GpuInventoryProvider** : nvidia-smi, sysfs DRM, vainfo, rocm-smi avec fallback silencieux, multi-GPU
- **HostInfoProvider** : os-release, uname, `/proc/uptime` (uptime machine ≠ process), températures sysfs
- **ContainerInfoProvider** : détection Docker (/.dockerenv, cgroup), ID conteneur, limites CPU/mémoire

### Refonte SystemMetricsProvider
- Séparation host vs process (RAM machine ≠ RAM conteneur ≠ WorkingSet64)
- Uptime machine (`/proc/uptime`) distinct de l'uptime process
- Mémoire swap

### Entité Agent + Migration
- Champs structurés CPU/mémoire/disque/GPU/OS/réseau (tous nullable, rétrocompatible)
- Migration EF `AddAgentTelemetryInventory`

### Transport heartbeat
- Inventaire au register + refresh périodique (5 min, pas à chaque tick)
- Champs JSON pour listes (disques, GPU, interfaces réseau, températures)

### UI Admin (AgentDetail.razor)
- Sections CPU, Mémoire/Disques, GPU, Machine/Conteneur avec barres de progression et badges

### Tests
- 40+ tests unitaires : providers, handlers, entité Agent
- Total : 999 tests verts (Domain 149, Application 397, Agent 210, Web 243)

## Tickets liés
- Fixes #82 — CPU inventory
- Fixes #83 — Mémoire & disque
- Fixes #84 — GPU inventory
- Fixes #85 — OS, conteneur, réseau

## Résultats des tests
- `dotnet build` : 0 erreur, 0 warning
- Domain.Tests : 149 passed
- Application.Tests : 397 passed
- Agent.Tests : 210 passed
- Web.Tests : 243 passed
- Total : 999 tests ✅

## Checklist
- [x] `dotnet build` vert (TreatWarningsAsErrors)
- [x] Tests unitaires verts
- [x] Migration EF créée
- [x] Champs nullable (rétrocompatible)
- [x] Pas de référence Infrastructure dans les contrôleurs
- [x] Collecteurs avec fallback silencieux (pas de crash sans GPU/Docker/sysfs)

Reviewed-on: https://forgejo.tordais.cc/nonobis/Heimdall/pulls/137
2026-08-20 14:13:06 +02:00
Arnaud Dartois f7e6b0cec3 feat(vehicles): API /api/vehicles - contrôleur + recherche par plaque (#150)
Résumé

Implémentation complète de l'API Vehicles (Phase 17 spec) : contrôleur REST + handlers CQRS MediatR.

Endpoints

GET /api/vehicles - Liste avec recherche par plaque (?search=XX-XXX-XX) + pagination
GET /api/vehicles/{id} - Détail avec historique events (50 derniers) + personne associée
POST /api/vehicles - Créer un véhicule
PUT /api/vehicles/{id} - Mettre à jour + associer/dissocier une personne
DELETE /api/vehicles/{id} - Supprimer un véhicule

Fichiers modifiés/créés

- src/Heimdall.Domain/Entities/Vehicle.cs - AssignPerson accepte Guid? (permet unassign)
- src/Heimdall.Infrastructure/Security/AppPermissions.cs - VehicleRead/VehicleWrite ajoutés
- src/Heimdall.Application/DTOs/VehicleDto.cs - Response, Request, EventSummary
- src/Heimdall.Application/Vehicles/ - Commands + Queries + Mapping
- src/Heimdall.Web/Controllers/VehiclesController.cs - 5 endpoints
- tests/Heimdall.Application.Tests/Handlers/Vehicles/ - 16 tests unitaires

Tests

Build 0 erreurs 0 warnings
16 nouveaux tests unitaires
Suite complète ~1149 tests 0 échec

Closes #9

Reviewed-on: https://forgejo.tordais.cc/nonobis/Heimdall/pulls/150
2026-08-20 07:34:49 +02:00
Arnaud Dartois 66cec88e6e feat(notifications): complète le paramétrage ntfy (serveur + utilisateur) (#152)
## What
Complète le paramétrage des notifications ntfy (serveur + utilisateur, UI + backend).

## Why
L'issue #60 demandait un paramétrage complet. Le code existant avait des bugs et des manques :
- Le lookup DB de l'URL ntfy ratait à cause d'un mismatch de casing (`ntfy.baseUrl` vs `ntfy.baseurl`)
- L'override URL par utilisateur (`UserNotificationConfig.NtfyUrl`) n'était jamais utilisé lors de l'envoi
- La page profil n'affichait pas le topic ntfy à s'abonner
- Le test ntfy n'envoyait pas le topic de l'utilisateur

## Changes
- **Fix casing** : `NtfyService.ResolveConfigAsync` lit maintenant `ntfy.baseurl` (lowercase) pour correspondre à ce que l'UI écrit
- **Per-user URL override** : `INtfyService` accepte un `baseUrl` optionnel ; `NotificationService` passe `config.NtfyUrl` lors de l'envoi
- **Profile.razor** : affiche le topic ntfy personnalisé (`heimdall_{userId}`) + bouton "Tester ntfy" qui envoie vers le topic de l'utilisateur
- **HeimdallApiClient** : `TestNtfyAsync` accepte et envoie le topic dans le body
- **SendNotificationJob** : transmet le paramètre `baseUrl`

## Testing
- `dotnet build` : 0 erreurs, 0 warnings
- 963 tests unitaires passent (Domain 142, Application 391, Infrastructure 177, Agent 197, Web 243, Api 2)

Closes #60

Reviewed-on: https://forgejo.tordais.cc/nonobis/Heimdall/pulls/152
2026-08-19 23:06:51 +02:00
Arnaud Dartois b0cfd50c3f feat(api-keys): API key management endpoint + admin UI (#149)
## Summary

Adds API key management functionality to Heimdall:

- **CQRS Handlers**: CreateApiKey, ListApiKeys, RevokeApiKey
- **Controller**: ApiKeysController with admin authorization (Admin.ApiKeys policy)
- **UI**: ApiKeysPage.razor admin page with create, list, and revoke
- **Auth**: Updated ApiKeyAuthenticationHandler to reject expired keys
- **Tests**: 10 unit tests for all handlers

## Changes

- `src/Heimdall.Application/ApiKeys/` — New CQRS handlers and DTOs
- `src/Heimdall.Web/Controllers/ApiKeysController.cs` — Admin API endpoints
- `src/Heimdall.Web/Components/Pages/Admin/ApiKeysPage.razor` — Admin UI
- `src/Heimdall.Infrastructure/Security/ApiKeyAuthenticationHandler.cs` — Expiry check
- `src/Heimdall.Web/Services/HeimdallApiClient.cs` — API client methods
- `tests/Heimdall.Application.Tests/Handlers/ApiKeys/` — Unit tests

## Acceptance Criteria

- [x] POST /api/api-keys → key created (plain shown once, hash in DB)
- [x] GET /api/api-keys → prefix only (never the full key)
- [x] DELETE /api/api-keys/{id} → key revoked immediately
- [x] Expired keys rejected by auth handler
- [x] Admin UI with create, list, and revoke functionality
- [x] All tests passing (10 new tests)

Closes #10

Reviewed-on: https://forgejo.tordais.cc/nonobis/Heimdall/pulls/149
2026-08-19 22:47:22 +02:00
Arnaud Dartois 566aa84bc7 chore: auto-commit 2026-08-12 20:05 [Heimdall] src/Heimdall.Agent/Services/AgentRegistrationService.cs, src/Heimdall.Agent/Services/SnapshotPipelineService.cs, src/Heimdall.Application/DTOs/SettingDto.cs, src/Heimdall.Domain/Entities/UserNotificationConfig.cs, src/Heimdall.Infrastructure/BackgroundJobs/DependencyInjection.cs… 2026-08-12 20:05:12 +02:00
Arnaud Dartois dc8a24918d feat(settings): topic ntfy par site, SMTP/ntfy/S3 globaux, DSN GlitchTip fixe + toggle (Fixes #105 #106 #107 #108)
#105 — Topic ntfy cible par site :
- Site.NtfyTopic (migration AddSiteNtfyTopic), UI création/édition SitesPage
- NotificationService.ResolveNtfyTopicAsync : topic du site sinon heimdall_{userId}

#106 — Paramètres SMTP/ntfy/S3 GLOBAUX :
- Seed + sections UI : agentScoped=false pour ntfy.*/email.*/storage.*/sentry.*
- Migration douce au démarrage : UPDATE des clés existantes en base

#107 — GlitchTip : DSN fixes (central projet 6, agent projet 7) dans appsettings,
- plus de champ DSN éditable en UI → switch sentry.enabled (nécessite redémarrage)
- Init Sentry déplacé après AddInfrastructure, lit sentry.enabled en base (fallback true)

#108 — Composants typés : MudNumericField borné (port SMTP, rétention, heartbeat),
- switch pour booléens, select pour log.level — pas de saisie libre
2026-08-12 12:18:52 +02:00
Arnaud Dartois 85bfdac7ee feat(settings): boutons Tester email/ntfy/IA + clés techniques masquées (partiel #80)
- Endpoints POST api/settings/{email,ntfy,ai}/test (Admin) :
  - email : envoi réel via EmailService vers l'expéditeur configuré
  - ntfy : SendTestAsync (nouvelle méthode INtfyService, retour HTTP 2xx)
  - ai : ping CodeProject.AI/Ollama via AiHealthCheck
- Client API : TestEmailAsync/TestNtfyAsync/TestAiAsync + record TestActionResult
- UI : boutons Tester dans NotificationSettingsSection (ntfy + email) et
  AiSettingsSection (moteurs IA) avec résultat inline
- AgentDetail : la clé brute n'est plus affichée (libellé global/surchargé)
- Tests bUnit : 3 nouveaux (POST par endpoint + affichage résultat) — 224 verts
2026-08-12 11:50:47 +02:00
Arnaud Dartois 97d0b76a5e feat(settings): NtfyService/EmailService/AiHealthCheck lisent les AppSettings (partiel #80)
- Source de vérité DB (ntfy.*, email.*, ai.cpaiUrl, ai.ollamaUrl) avec
  fallback config/env pour migration douce — relu à chaque appel, une
  modification UI est prise en compte sans redémarrage
- Nouveau helper AppSettingReader (lecture async + parse int/bool, silencieux
  si DB indisponible), pattern StorageProviderFactory (scope + DbContext)
- Les env vars restent en fallback uniquement
2026-08-12 11:04:04 +02:00
Arnaud Dartois a8d665dc78 chore: auto-commit 2026-08-12 11:00 [Heimdall] src/Heimdall.Infrastructure/Settings/ 2026-08-12 11:00:55 +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