SAIF.Premium.Api is configured from three places: a small appsettings.json
that bootstraps the host, the Environment API that supplies every
environment-specific value, and two bound options types that carry the rating
limits. The service has three Environment API keys, one of them secure, and one
runtime-resolved Oracle connection. Rating limits live in appsettings.json
and are the only business-relevant values a deployer can change without the
Environment API.
Local configuration is limited to appsettings*.json bootstrap values read through the ASP.NET Core configuration system; environment-specific values are retrieved at runtime from the Environment API through IEnvironmentClient. Database connections are not declared in configuration: this repository carries no ConnectionStrings section, and each connection is composed at run time from an Environment API setting and a pool code passed to IDBConnectionClient. That pool code is a SAIF-specific identifier forwarded to a connect-info service - it is not the Oracle schema, which is resolved server-side and is not visible from source.†
IConfiguration["AppSettings:BatchPageSize"] in BatchRecalculationService
Policies loaded per page by the batch recalculation
appsettings.json
PremiumRating:MinimumPremium
250.00
IOptionsMonitor<PremiumRatingOptions> in RatingEngine
Policy minimum premium applied by the rating engine
appsettings.json
PremiumRating:MaxAdjustmentPercent
25
IOptionsMonitor<PremiumRatingOptions> in RatingEngine
Largest adjustment, as a percentage of the base premium
appsettings.json
Logging:LogLevel:Default
Information
ASP.NET Core logging
Log filtering
appsettings.json
Logging:LogLevel:Microsoft.AspNetCore
Warning
ASP.NET Core logging
Log filtering for framework categories
appsettings.json
AllowedHosts
*
Host filtering middleware
Allowed host headers
appsettings.Development.json
Logging:LogLevel:Default
Debug
ASP.NET Core logging
Verbose logging for local development
No ConnectionStrings section exists in either file. AppSettings:ApplicationHost
names a single Environment API host for the whole service; the commented-out
enttest01 line is a local-run alternative, not a deployment track.
The connection is resolved per scope: ConfigureUnitOfWorkOptions runs when the
options are built for a request, and UnitOfWork reads them through
IOptionsSnapshot<UnitOfWorkOptions>, so a change to the Environment API value
reaches the next request without a restart. When resolution fails, the exception
is not caught by the service and propagates to the base pipeline, whose handling
is opaque.†
Aspect
Finding
Resolution timing
DI factory (per scope)
Caching
Not cached by the service
Failure behavior
Exception propagates to the CoreAPIStartup pipeline; resulting status code not determined from source
Hand-run sample requests against the premium, class-code and admin endpoints
env/.env.dev, env/.env.test
Per-environment variables for the .http file (DEV and TEST)
No environment variable is read by name in source. ASPNETCORE_ENVIRONMENT is
the only one set, in web.config and launchSettings.json, and the service
overrides its effect.
Values are pipeline-seeded from environmentsettings/settings.yml, which the
release pipeline loads into the Environment API for each track; no code path
opens the file.
Setting
DEV
TEST
PROD
Notes
oracledatabase
one database per track
one database per track
one database per track
Values differ on every track; none is reproduced here
ratetablecacheminutes
5
5
30
PROD caches rate tables longer
batchsigningkey
varies
varies
varies
Secure; the value differs per track and is never shown
environmentsettings/settings.yml also seeds a legacyfeedurl key that no code
in this repository reads; it may be stale and is recorded in Tech debt.
Note: Statements marked with † were retrieved from dependency library documentation
via the Legends CLI RAG service. They describe inherited behavior from the indicated
origin library and should be verified if the dependency version changes.