test(host): configure ApiKeyPepper in CentralCompositionRootTests
ConfigurationDatabase-012 made ApiKeyHasher fail fast on a missing/weak HMAC pepper, so resolving ApiKeyValidator from the central composition root now requires ScadaLink:InboundApi:ApiKeyPepper to be configured. The composition- root test's in-memory config now supplies a test pepper, like JwtSigningKey.
This commit is contained in:
@@ -106,6 +106,11 @@ public class CentralCompositionRootTests : IDisposable
|
||||
["ScadaLink:Security:LdapUseTls"] = "false",
|
||||
["ScadaLink:Security:AllowInsecureLdap"] = "true",
|
||||
["ScadaLink:Security:LdapSearchBase"] = "dc=scadalink,dc=local",
|
||||
// ConfigurationDatabase-012: inbound-API keys are hashed
|
||||
// with a server-side HMAC pepper; ApiKeyHasher fails fast
|
||||
// if it is missing or weak, so resolving ApiKeyValidator
|
||||
// requires a configured pepper.
|
||||
["ScadaLink:InboundApi:ApiKeyPepper"] = "test-inbound-api-key-pepper-at-least-32-chars!",
|
||||
});
|
||||
});
|
||||
builder.UseSetting("ScadaLink:Node:Role", "Central");
|
||||
|
||||
Reference in New Issue
Block a user