fix(security): implement IDataProtector-based credential encryption for CameraCredentials

- Add ICredentialProtector/DataProtectorCredentialProtector using ASP.NET Core Data Protection
- Register AddDataProtection + ICredentialProtector in Infrastructure DI
- Update CameraCredentials XML comments to reference real protector
- Add SetCredentialsAsync to CameraService with encryption
- Update ICameraService interface
This commit is contained in:
Arnaud Dartois committed 2026-07-17 20:07:03 +00:00
1 parent 12a1ff2737
commit 076bc58e93
5 files changed
+94 -6

No files matched your search

@@ -51,9 +51,15 @@ public static class DependencyInjection
.AddEntityFrameworkStores<AppDbContext>()
.AddDefaultTokenProviders();
// Data Protection (for camera credential encryption)
services.AddDataProtection();
// JWT
services.AddScoped<IJwtService, JwtService>();
// Credential encryption
services.AddScoped<ICredentialProtector, DataProtectorCredentialProtector>();
// Application services
services.AddScoped<IAuthService, AuthService>();
services.AddScoped<ISiteService, SiteService>();