Skip to content

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

  1. The harness runs a slice's real stack (stack.json, backward compatible):
  2. a unit may be an object with its folder (platform/ too), its properties (given in SPRING_APPLICATION_JSON), env, sidecars and jvm options;
  3. top-level containers hold platform components that are no unit, such as the OpenTelemetry collector, optionally on the session's compose network;
  4. settings refer to each other with ${unit.…}, ${sidecar.…}, ${env.…} and ${secret.…}, and every port is known before anything starts;
  5. "policy": "unit:<name>" makes a unit of the stack the decision point of all;
  6. a provision script runs before and after the units start;
  7. a faults fixture stops, kills and starts units, sidecars, containers and backing services, and writes a record to a topic;
  8. tokens.signIn signs a user on through the realm's staff flow, with the password and a second factor;
  9. --fresh starts the units on new databases, so a run starts from their seeds.
  10. An installation bootstrap creates what no governed path can create first.
  11. 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.
  12. These are the rows MOD-ESS-001 itself writes, under the reason "installation bootstrap", much as a production installer seeds its first administrator.
  13. 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.
  14. The synthetic terminology content is installed as approved versions, as a release load is (MIG-ESS). The activation job then makes it Active.
  15. Secrets, passwords and second-factor seeds are made per run and kept out of the repository and the evidence record.
  16. Every unit authenticates to the decision service.
  17. The kit's decision client sends the unit's client-credentials token, over HTTP/1.1, and asks once more on a connection error.
  18. It ignores answer fields it does not use, as a contract consumer must.
  19. Every request carries subjectAssurance and subjectSession from the subject's token. The decision service needs them: a privileged role counts only at aal2, and a revoked or expired session is refused.
  20. The audit emitter leaves out absent fields instead of sending nulls, which the intake schema refuses.
  21. The template has these changes too, so new units start with them.
  22. 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.
  23. 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.
  24. 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: actorHuman is the person, and actorService is 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.
  25. Token exchange (RFC 8693) was tried and set aside. MOD-ESS-001 gives each service client a hard-coded sub mapper, which also overwrites an exchanged token's subject, and the exchange lowers acr to aal1. The second header gives both identities without it, and leaves the decision to the person's own token.
  26. The cross-domain names are aligned to the provider's.
  27. A facility-owned record is decided with owningFacility, the attribute the decision service reads. A hidden read names the caller's facility, so another facility's record is 404 after the decision, not 403.
  28. The ESS code lists that ADM codes as a coding's system are code systems at those URLs. Their value sets are at urn:his:ess:vs:<name>, under the short identifiers the screens expand.
  29. Task-queue roles are the role catalogue's identifiers.
  30. The backbone's topic register lists every consumer the units make.
  31. Telemetry is checked on the platform's own path. The collector of platform/observability reads 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.
  32. 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.json the 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-administration and 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.