- WP-2: SecurityRepository + CentralUiRepository with audit log queries - WP-3: AuditService with transactional guarantee (same SaveChangesAsync) - WP-4: Optimistic concurrency tests (deployment records vs template last-write-wins) - WP-5: Seed data (SCADA-Admins → Admin role mapping) - WP-6: LdapAuthService (direct bind, TLS enforcement, group query) - WP-7: JwtTokenService (HMAC-SHA256, 15-min refresh, 30-min idle timeout) - WP-8: RoleMapper (LDAP groups → roles with site-scoped deployment) - WP-9: Authorization policies (Admin/Design/Deployment + site scope handler) - WP-10: Shared Data Protection keys via EF Core 141 tests pass, zero warnings.
23 lines
622 B
C#
23 lines
622 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace ScadaLink.Security;
|
|
|
|
public static class ServiceCollectionExtensions
|
|
{
|
|
public static IServiceCollection AddSecurity(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<LdapAuthService>();
|
|
services.AddScoped<JwtTokenService>();
|
|
services.AddScoped<RoleMapper>();
|
|
services.AddScadaLinkAuthorization();
|
|
|
|
return services;
|
|
}
|
|
|
|
public static IServiceCollection AddSecurityActors(this IServiceCollection services)
|
|
{
|
|
// Phase 0: placeholder for Akka actor registration
|
|
return services;
|
|
}
|
|
}
|