Read the Heimdall app secret from Heimdall__AppSecretFile; env value deprecated
The file wins, is read once when the options are built, and a set-but-missing, unreadable or empty file stops startup in every environment without naming the secret. Heimdall__AppSecret still works and logs a deprecation warning. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b80b27da0f
commit
95d2e8d262
5 changed files with 201 additions and 2 deletions
|
|
@ -22,6 +22,9 @@ public sealed class StartupConfigurationValidator(
|
|||
{
|
||||
var failures = new List<string>();
|
||||
|
||||
// Building the options resolves Heimdall:AppSecretFile, and a bad file stops startup in every environment.
|
||||
_ = heimdallOptions.Value;
|
||||
|
||||
// Checked in every environment: a bad value here would otherwise pass startup and throw on every cast.
|
||||
var conceptVotes = conceptVoteOptions.Value;
|
||||
if (!NetworkPrefix.IsValidLength(conceptVotes.IPv4PrefixLength, NetworkPrefix.IPv4Bits))
|
||||
|
|
|
|||
Loading…
Reference in a new issue