SAIF.Framework.Security.EnvironmentApi business rules¶
This page captures business rules enforced by this library.
BR-001: Configuration key must resolve or fail loudly¶
Field
Value
Statement
A configuration key not found in the developer override file, the in-memory cache, or the fetched section must fail loudly rather than silently return a default value.
Trigger
GetConfigSettingInfo exhausts all lookup sources (override file, cache, and section fetch) for a requested key.
Enforcement
Throws ApplicationException("The key '{0}' for track '{1}' and section '{2}' was not found").
Outcome
Callers cannot silently receive a missing or default config value.
BR-005: Developer-machine classification requires tag-number host and AD membership¶
Field
Value
Statement
A host is treated as a "developer machine" only if its name matches a tag-number pattern (^[TV]\d+$, case-insensitive) and it is a member of the developer_machine_users AD group.
Trigger
IsDeveloperMachine property access.
Enforcement
A regex check in IsMachineTagNumber short-circuits to false before the AD membership check via MachineSecurity.IsAuthorized.
Outcome
Only hosts named with the tag-number convention and enrolled in the AD group are treated as developer machines; all other hosts skip the AD lookup entirely.
BR-006: Machine/service account authorization via AD group membership¶
Field
Value
Statement
A machine/service account is authorized against an AD "resource" group only if it is found — directly or via nested/recursive group membership — in that AD group, with account names compared case-insensitively after trimming $ suffixes.
Trigger
MachineSecurityService.IsAuthorized call.
Enforcement
String comparison loop in MachineSecurityService.IsAuthorized against members returned by ADService.GetUsersByGroup.
Outcome
Machine accounts are authorized only when actual AD group membership (including nested groups) is confirmed.
groupName += "Test" then groupName += "Resource" in MachineSecurityService.IsAuthorized, matching the SAIF <ResourceName>Resource / <ResourceName>TestResource convention.
Outcome
Production and non-production authorization checks are targeted at distinct AD groups, preventing accidental cross-environment authorization.
MachineSecurityService.IsAuthorized (enforcing BR-006 and BR-007) fails closed (returns false) on any AD-lookup exception, logging only via Debug.WriteLine* — see security-authorization.md for the full authorization architecture.
Note: Statements marked with * were inferred from code structure, naming conventions, or
contextual evidence where direct confirmation was not available in source artifacts. Statements
marked with ** could not be confirmed; treat as unknown until verified.