Resolve all high-severity architecture review findings
This commit is contained in:
@@ -59,6 +59,7 @@ public class ConnectionCertificatesTests : BunitContext
|
||||
Services.AddSingleton<AuthenticationStateProvider>(
|
||||
new TestAuthStateProvider(BuildPrincipal(roles)));
|
||||
Services.AddAuthorizationCore();
|
||||
Services.AddTestConfigurationMutations();
|
||||
AuthorizationPolicies.AddScadaBridgeAuthorization(Services);
|
||||
Services.AddSingleton<IAuthorizationService, DefaultAuthorizationService>();
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ public class OpcUaEndpointVerifyTests : BunitContext
|
||||
Services.AddSingleton<AuthenticationStateProvider>(
|
||||
new TestAuthStateProvider(BuildPrincipal(roles)));
|
||||
Services.AddAuthorizationCore();
|
||||
Services.AddTestConfigurationMutations();
|
||||
AuthorizationPolicies.AddScadaBridgeAuthorization(Services);
|
||||
Services.AddSingleton<IAuthorizationService, DefaultAuthorizationService>();
|
||||
_authConfigured = true;
|
||||
|
||||
@@ -78,6 +78,7 @@ public class SecuredWritesTests : BunitContext
|
||||
|
||||
Services.AddSingleton<AuthenticationStateProvider>(new TestAuthStateProvider(user));
|
||||
Services.AddAuthorizationCore();
|
||||
Services.AddTestConfigurationMutations();
|
||||
AuthorizationPolicies.AddScadaBridgeAuthorization(Services);
|
||||
// BunitContext pre-registers a placeholder IAuthorizationService that throws on
|
||||
// policy evaluation; force the real one so the regions are actually gated.
|
||||
|
||||
Reference in New Issue
Block a user