Table of Contents

Namespace SEBT.Portal.Infrastructure.Configuration.Validators

Classes

AddressValidationDataSettingsValidator

Fails startup when BlockedAddressFile names a CSV that is not embedded, rather than letting blocked-address checks silently go empty.

EnrollmentCheckerSettingsValidator

Rejects income screening figures that would screen households against the wrong numbers.

This section hot-reloads from AWS AppConfig, and a reload this validator rejects fails every consumer of the section, the checker's features endpoint included, until the value is corrected. So it only rejects values that are wrong rather than unfinished. Banner copy is deliberately not checked: a blank banner is not worth taking the features endpoint down.

IdProofingRequirementsCoherenceValidator

Validates IdProofingRequirements coherence at startup and on every config reload. Enforces: write >= view for the same resource, and step-up consistency.

IdentifierHasherSettingsValidator
JwtSettingsValidator

Validates cross-field invariants on JwtSettings that data annotations cannot express. Range-only checks live on the settings type itself.

OidcSettingsValidator

When a deployment configures an OIDC tenant, requires the rest of the client to be present and usable.

A discovery endpoint is what marks the instance as an OIDC tenant — the state allowlist reads it the same way — so an absent one means OIDC is off and nothing else is required. Once it is set, a gap in the remaining values does not surface until a visitor is already mid-login: the authorize redirect succeeds, and the failure lands after they return from the IdP. Failing the boot instead keeps that from reaching a household.

OidcStepUpSettingsValidator

When any step-up value is set, requires a complete step-up client (and a redirect via step-up or primary callback URI).

OidcVerificationClaimSettingsValidator

When OIDC is enabled (Oidc:DiscoveryEndpoint is set), requires the verification level and date claim names. Without them every OIDC user would read as unverified.

OutageScheduleSettingsValidator

Rejects a malformed outage schedule at startup rather than letting the evaluator skip windows it cannot parse. A mistyped date or target would otherwise degrade silently, and a window that cannot be evaluated still makes the schedule authoritative for its surface, suppressing the manual outage flag. Failing the host is the only signal loud enough.

Every problem is reported together so an operator fixes the whole schedule in one pass instead of discovering the next bad window on the next failed boot.

PiiEncryptionProductionSecretsValidator
PiiEncryptionSettingsValidator

Ensures PiiEncryptionSettings binds coherently: key ring parses, 256-bit key lengths, and ActiveKeyId resolves.

RedisSettingsValidator

Rejects a Redis section that is incomplete, contradictory, or unsafe for the environment.

Redis is optional: without Redis:Host the portal falls back to in-memory caching and SQL Server locks. Blanking the host over a state file that configures TLS Redis is how a single-instance stack turns Redis off, so a section without a host is not checked. Once a host is set, the TLS values have to agree with each other, and certificate validation may only be skipped in Development.

ResolveRedisConfigurationOptions runs this too: it reads the section while services are still being registered, before validate-on-start can see it.

SelfServiceRulesSettingsValidator

Validates SelfServiceRulesSettings at startup. Ensures that enabled actions have at least one issuance type rule defined.

SmartySettingsValidator

When Smarty is enabled, embedded keys are required at startup.

SocureSettingsValidator

Validates SocureSettings at startup. When UseStub is false (real Socure integration), ApiKey and WebhookSecret are required. UseStub is only permitted in Development to prevent accidental bypass in deployed environments.