DBConnectionAPI is a small ASP.NET Core REST API with a thin layering: two controllers delegate to a single singleton service, ConnectionManager, which composes database connection strings from templates and secure settings held in the SAIF Environment API, validates Oracle and SQL Server strings with a throw-away NHibernate connectivity probe, and caches the validated strings in process memory. The service has no entities, repositories, DTO classes or minimal-API endpoints. Host model and middleware order are documented on the hosting pipeline page.
Both controllers derive from ControllerBase and carry [ApiController]. Neither derives from a local or SAIF base class, so no inherited behavior is added beyond the framework defaults. [ApiController] enables automatic 400 responses for invalid model state; whether the opaque base suppresses that behavior is not visible in source.**
UseStartup<Startup>() in DBConnectionAPI/DBConnectionAPI/Program.cs
Base-class registrations
base.ConfigureServices(services) — CoreAPIStartup (SAIF.NetCore.ServiceExtensions 10.2026.26267.1), not visible in source
Additional registration files
None
The registration evidence is ConfigureServices(IServiceCollection), AddSingleton<IConnectionManager, ConnectionManager>(), AddNhibernateServices<Startup>() and AddSwaggerGen(options), all in Startup.cs. No IServiceCollection extension class, builder.Services, AddHttpClient, AddDbContext, ConfigureOptions<T>, AddHostedService<T> or AddPingable* registration exists elsewhere in the project. Program.cs reaches Startup through UseStartup<Startup>(), which confirms it is the root the running service uses.
The Startup constructor calls EnableSecureEnvironmentClient<Startup>(). ConfigureServices calls base.ConfigureServices(services) first, so opaque package registrations precede the local ones. EnableNewtonsoftJsonSerializer and DisableAuthServices are not set.
Service type
Implementation
Lifetime
Registered in
Resolved by
Purpose
IConnectionManager
ConnectionManager
Singleton (holds a process-wide connection cache guarded by a lock)
DBConnectionAPI/DBConnectionAPI/Startup.cs
ConnectionsController, AdminController
Connection-string composition, validation and caching
The service binds no options through the options pattern. No Configure<T>, AddOptions<T>, IConfigureOptions<T> or IConfiguration usage exists in source. Settings reach ConnectionManager through IEnvironmentClient calls, documented on the configuration page.
Options type
Binding
Configuration source
Consumer
UnitOfWorkOptions (SAIF.NetCore.NHibernate)
Inline object initializer per probe, not registered
Typed ConnectionManagerException : HttpStatusCodeException handled by package middleware DynamicErrorHandler†
Thrown in DBConnectionAPI/DBConnectionAPI/Services/ConnectionManager.cs; handler registered inside the opaque base
Three Connections endpoints
Missing secure setting yields 404; Oracle TNS alias errors yield 400; every other probe failure yields 500. The exception message is returned; the exact envelope is written by the package†
Local try/catch in AdminController.GetConnectionInfo
Logs each failure through ISaifLogService, retries or fails fast, then rethrows a mapped ConnectionManagerException
No UseExceptionHandler, AddProblemDetails, IExceptionHandler, exception filter or global filter exists in source. When an exception other than HttpStatusCodeException escapes (for example a credential value without a pipe separator), the resulting response is produced by opaque package middleware and its status is not visible in source.** Messages on 400 and 500 responses expose the cache key parts, the secure-setting key name, the Environment API track name and, for some failures, the raw provider message, so exception detail crosses the service boundary.
The connection cache is a process-lifetime dictionary inside a singleton and is never evicted, so credential rotation takes effect only after the process restarts.
Responses carry credential material by design: connection strings from the Connections endpoints, and raw credentials plus plaintext password from the Admin endpoints.
The API resolves no connection for its own use; it composes strings for callers and probes only Oracle and SQL Server. PostgreSQL strings are not probed.
Authentication, authorization middleware, exception handling and endpoint mapping run inside the opaque base.Configure call, so their order is not visible in source.
Connection templates and secure credentials in group dbconnectionapi†
Security API
Downstream API (through SecurityApiAuthorize)
Resource authorization for DBConnAPIRetrieveResource†
Oracle and SQL Server databases named by the caller
Database
Read-only connectivity probes
Note: Statements marked with † are derived from dependency library
documentation via the Legends CLI. Statements marked with * were inferred
from code structure or contextual evidence. Statements marked with ** could
not be confirmed; treat as unknown until verified.