Architecture / Decision records / ADR-HIS-076
ADR-HIS-076 How the built units are joined end to end: the integration stack, its installation bootstrap and the calls between units¶
| Status | Accepted |
| Decided | 2026-11-26 by session RC-1-S26 |
| Record | Drafted 2026-11-26; approved 2026-11-30 by the Enterprise Architecture Board |
| Where the rule lives | e2e/harness/README.md ("Units with settings, platform units, sidecars and containers", "Provisioning"); e2e/scenarios/RC-1/ (stack.json, provision/); the service kit of each unit (policy/, client/Downstream, audit/AuditEmitter); platform/dev-environment/config/keycloak/his-realm.json |
Context¶
The integrate session of slice RC-1 replaced the contract stubs with the built units. The units had each been built and tested against stubs and a stand-in decision point, so the first run through the real units broke where they meet: - No unit's kit sent a token to the D10 policy decision service, which answers only registered service identities (FR-ESS-AUZ-001 part 13). Every decision failed closed. - Nobody could create the first administrator or service identity, because registering one needs an identity administrator and a different security officer, both signed on with a second factor. - One unit calling another as itself was decided as a service, for actions only people may take. - The terminology had registrations and no content, under owners that are not accounts.
The harness of ADR-HIS-047 could start units from services/ with the environment's settings only. It could not give a unit settings of its own, start a platform unit, a sidecar or the telemetry collector, provision users, or inject failures.
Decision¶
- The harness runs a slice's real stack (
stack.json, backward compatible): - a unit may be an object with its folder (
platform/too), itsproperties(given inSPRING_APPLICATION_JSON),env,sidecarsandjvmoptions; - top-level
containershold platform components that are no unit, such as the OpenTelemetry collector, optionally on the session's compose network; - settings refer to each other with
${unit.…},${sidecar.…},${env.…}and${secret.…}, and every port is known before anything starts; "policy": "unit:<name>"makes a unit of the stack the decision point of all;- a
provisionscript runs before and after the units start; - a
faultsfixture stops, kills and starts units, sidecars, containers and backing services, and writes a record to a topic; tokens.signInsigns a user on through the realm's staff flow, with the password and a second factor;--freshstarts the units on new databases, so a run starts from their seeds.- An installation bootstrap creates what no governed path can create first.
- The first administrators are installed directly into MOD-ESS-001: an identity administrator, a security officer, an auditor, an audit administrator and an integration operations analyst. So are the service identities of the platform's own units.
- These are the rows MOD-ESS-001 itself writes, under the reason "installation bootstrap", much as a production installer seeds its first administrator.
- Everything after that goes through the governed path. The clerks and the steward join through the identity-source feed (WF-ESS-001), and the identity administrator activates them after enrolment.
- The synthetic terminology content is installed as approved versions, as a release load is (MIG-ESS). The activation job then makes it Active.
- Secrets, passwords and second-factor seeds are made per run and kept out of the repository and the evidence record.
- Every unit authenticates to the decision service.
- The kit's decision client sends the unit's client-credentials token, over HTTP/1.1, and asks once more on a connection error.
- It ignores answer fields it does not use, as a contract consumer must.
- Every request carries
subjectAssuranceandsubjectSessionfrom the subject's token. The decision service needs them: a privileged role counts only ataal2, and a revoked or expired session is refused. - The audit emitter leaves out absent fields instead of sending nulls, which the intake schema refuses.
- The template has these changes too, so new units start with them.
- A unit calling another for a person passes the person's own token on (
Downstream.onBehalfOfPerson). The other unit then decides and audits for the person, with the person's roles, facility scope and assurance. - A lookup of the unit's own still goes as the unit (
headersAsService), under a rule scoped to that service: for example, listing back the review items another unit made. - Beside the person's token, the calling unit sends its own service token in
X-Acting-Service-Token. The receiving unit's kit validates it like the bearer (signature, issuer, expiry) and requires it to be a service identity's. A token that fails is refused with 401. Its audit then names both:actorHumanis the person, andactorServiceis the service that acted for them, as the audit intake schema defines the pair (FR-ESS-IAM-003 AC-04). The header is ignored when the bearer is itself a service's. - Token exchange (RFC 8693) was tried and set aside. MOD-ESS-001 gives each service client a hard-coded
submapper, which also overwrites an exchanged token's subject, and the exchange lowersacrtoaal1. The second header gives both identities without it, and leaves the decision to the person's own token. - The cross-domain names are aligned to the provider's.
- A facility-owned record is decided with
owningFacility, the attribute the decision service reads. Ahiddenread names the caller's facility, so another facility's record is 404 after the decision, not 403. - The ESS code lists that ADM codes as a coding's
systemare code systems at those URLs. Their value sets are aturn:his:ess:vs:<name>, under the short identifiers the screens expand. - Task-queue roles are the role catalogue's identifiers.
- The backbone's topic register lists every consumer the units make.
- Telemetry is checked on the platform's own path. The collector of
platform/observabilityreads the units' logs. A transaction is found by its correlation identifier in Tempo's traces, across the units it crossed, and in Loki's records where it logged. - The non-functional checks run in the stack and record, they do not gate. The slice's peak workload of D01-ADM 10.1, times two, the failure injections and the recoveries are measured. Each result is recorded against its target as met, a shortfall, or not measurable here. What must never happen, such as a lost acknowledged transaction or a grant during an outage, is asserted.
Consequences¶
- One command runs a slice through the built units, the screens included, and writes its evidence record. Later integrate sessions add their units to
stack.jsonthe same way. - The bootstrap is test-environment data. Production needs its own installer for the first administrators and the platform's service identities, under the security officer. It is a follow-up for the deployment topology.
- The acting-service header is in the kits of
adm-identity,adm-patient-administrationand the template. A unit that does not have it yet ignores the header, so its audit of a relayed call names the person alone. Each unit takes it from the template, or from the next kit version, before it serves calls passed on for a person. - The shell has a development-only session hook (
__HIS_DEV_SESSION__), and the screen test adds the user's token where the gateway would. Both stand in for sign-on (UI-ESS-001) and the SDK's service client, which the shell is not wired to yet. - The kit changes are in nine copies of the kit. A shared kit, or the template's next version, would keep them in one place.