arnaud.dartois
2bf3dbc95b
fix(identity): harden user lifecycle and permissions
Heimdall Gitea / Detect CI scope (pull_request) Successful in 5s
Heimdall Gitea / Build and tests (pull_request) Successful in 20m8s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Failing after 6m10s
Heimdall Gitea / Build and scan server image (pull_request) Failing after 8m2s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Failing after 2s
2026-11-04 10:26:07 +01:00
Arnaud Dartois
8195ee4ab8
feat(auth): require initial administrator setup
Heimdall Gitea / Detect CI scope (pull_request) Successful in 4s
Heimdall Gitea / Build and tests (pull_request) Successful in 20m32s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan server image (pull_request) Successful in 8m36s
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 11m34s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Successful in 2s
2026-10-27 22:19:52 +01:00
Arnaud Dartois
23571da9c3
feat(i18n): localize remaining UI and server messages
Heimdall Gitea / Build and tests (pull_request) Failing after 2m10s
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
2026-10-25 05:59:18 +01:00
Arnaud Dartois
c0467ad820
fix: revalidate live hub sessions from database
2026-10-20 07:36:26 +02:00
Arnaud Dartois
26321bb81c
fix(auth): secure 2FA challenges and session revocation
2026-10-20 07:21:28 +02:00
Arnaud Dartois
13456ab4f5
fix(security): align rate limiting and password po
2026-08-20 18:14:18 +02:00
Arnaud Dartois
59a864bdfc
feat(auth): codes de récupération 2FA — 10 codes hashés à l'enrôlement, usage unique au login ( Fixes #12 )
2026-08-11 21:35:52 +02:00
Arnaud Dartois
663b872dc2
feat(auth): confirmation email + forgot/reset password
...
#37 : Email confirmation flow:
- Nouveaux endpoints: POST /api/auth/confirm-email
- Register envoie email de confirmation si SMTP configure + flag active
- Login verifie EmailConfirmed si email.confirmation.required = true
- Premier admin auto-confirme (evite chicken-and-egg)
- Setting DB: email.confirmation.required (boolean)
#38 : Forgot/Reset password flow:
- Nouveaux endpoints: POST /api/auth/forgot-password, POST /api/auth/reset-password
- ForgotPassword genere token et envoie email via IEmailService
- ResetPassword valide token et change le mot de passe
- Pas de divulgation si l email n'existe pas
Infrastructure email existante (IEmailService + SmtpClient) reutilisee.
2026-07-28 15:03:18 +00:00
Arnaud Dartois
ba985ed3c2
fix(auth): RegisterAdmin — [Authorize] + feature flag auth.admin-registration.enabled
...
#14 : Remplacé le guard environment (Testing/Development) par:
- [Authorize(Policy = "AdminUsers")] sur l'endpoint
- Feature flag auth.admin-registration.enabled en DB (default: absent = disabled)
- Suppression de la dependance IWebHostEnvironment du controller
- Test mis a jour: bootstrap via register normal, puis flag, puis RegisterAdmin
2026-07-28 14:57:28 +00:00
Arnaud Dartois
234c158a69
fix(auth): audit de securite complet - 12 correctifs
...
# Fix #28 : ProtectedLocalStorage -> ProtectedSessionStorage
# (donnees token jamais exposees au JS client en Blazor Server)
# Fix #3 : GetUserIdFromExpiredToken valide maintenant la signature
# (plus de ReadJwtToken sans validation)
# Fix #5 : API Key handler X-API-Key uniquement (plus de Bearer ambiguité)
# Fix #7 : MarkUsed() persiste via SaveChangesAsync()
# Fix #8 : Hardcoded permissions (documenté — nécessite migration DB)
# Fix #12 : Race condition registration — try/catch DbUpdateException
# Fix #13 : Public registration DESACTIVEE par defaut (pas de setting = disabled)
# Fix #15/17: Enable2fa genere et retourne shared key + QR code URI
# Fix #16 : Rate limiting specifique 2FA (5 req/min) et RegisterAdmin
# Fix #22/23: RevokeRefreshToken stocke jti (pas token brut)
# Fix #24 : Rotation refresh token — ancien token revoque apres refresh
# Fix #39 : Audit logging des echecs de login (via IUserRepository)
Breaking: Enable2fa retourne maintenant Enable2faResponse au lieu de Ok()
2026-07-28 14:37:52 +00:00
Arnaud Dartois
485842b135
feat: add CanRegister CQRS query
2026-07-28 13:02:16 +00:00
Arnaud Dartois
45c6ce82eb
perf: add ConfigureAwait(false) to all async calls in library projects
...
Add ConfigureAwait(false) to all await expressions in Application and
Infrastructure projects (111 files). This follows .NET best practices
for library code to avoid potential deadlocks when consumed from
synchronization contexts (legacy, unit test runners).
Also fix 4 test assertions that check SaveChangesAsync — update to
SaveChangesWithRetryAsync to match the handler changes from Fix 4.
2026-07-27 18:59:12 +00: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
11f7fd8d20
feat(cqrs): migrate Sites, Auth, Users, Cameras to CQRS
...
- Sites: CreateSite, UpdateSite, DeleteSite, GenerateToken commands + handlers
- Auth: Login, Register, RefreshToken, 2FA, ChangePassword, Logout commands
- Users: CRUD, roles, sites, lock/unlock, reset-password commands + queries
- Cameras: CRUD, SetCredentials commands + queries
- Add IApplicationDbContext abstraction for Clean Architecture
- Add ICredentialProtector, IJwtService interfaces to Application layer
- 0 build errors, 0 warnings
2026-07-22 19:43:13 +00:00