Skip to content

Architecture / Decision records / ADR-HIS-120

ADR-HIS-120 Break-the-Glass in the policy decision unit: the session decided by the rules within the patient scope, its settings in the policy content, and its alert and tasks sent from a durable record

Status Accepted
Decided 2026-12-02 by session RC-4-S02
Record Drafted 2026-12-02; awaiting approval by the Enterprise Architecture Board
Where the rule lives services/ess-runtime-decision/mod-ess-002: package emergency, decision/DecisionService, resources/policy/his_authz.rego and enterprise-access.v1.json (emergencyAccess, the btg-* rules, patientScope), migration V2__emergency_access.sql; the unit's README

Context

FR-ESS-AUZ-002 (Break-the-Glass, MOD-ESS-002) lets a permitted clinician who was denied access to a patient's record get it at once, with a reason. The session must be time-limited, reason-captured, fully audited and always reviewed, and must never widen access beyond the patient in context. RC-4-S01 fixed the contract (contracts/ess emergency-access.v1 1.1 and the events on his.ess.emergencyaccesssession.v1, ADR-HIS-118). The specification leaves open how the session takes part in the decision, where its settings (CFG-ESS-006 to CFG-ESS-008) live, how the alert and the review task survive an unavailable coordination service (PR-AUZ-002-3), and how an Inappropriate outcome reaches security monitoring. Version 1 of contracts/ise security-monitoring.v1 offers no operation to open an incident.

Decision

  1. The session lives in MOD-ESS-002, beside the decision service. The policy decision point decides under a session in the same evaluation as every other decision, so no second path to a Permit exists. The decision service looks up the subject's Active session for the request's patient (a Suspended session, or one whose window has elapsed, does not count) and puts it in the input of the rules as emergencySession.
  2. The rules permit under a session within the patient scope only. The relationship conditions of the clinical permit rules (care-team assignment, patient unit, shift, referral) are marked patientScope: true in the policy content. Under a session, the request is permitted only if both hold:
  3. without the session it would be Deny with emergency override available. A non-overridable deny, a session or segregation-of-duties check, and a resource type outside emergencyAccess.resourceTypes therefore still deny;
  4. a permit rule of the subject's role for the action and purpose applies once its patientScope conditions are set aside. The role's actions are never extended (part 13).

The session sets aside the patient scope and nothing else: the obligations of the role's rules it rests on, and their second factor (stepUp, and stepUpIf for a remote origin or an unmanaged device, CFG-ESS-001), still apply. Such a Permit also carries the obligations elevated-audit and session-marker (with the session identifier and its end time). Its cache lifetime is 0, it is stored with emergency_session_id, and it is audited as ess.auz.btg-activity in the decision's transaction (part 6.5, AC-02). When ordinary policy permits the subject's access to the patient, the decision service ends the session with the cause ordinary-access (WF-ESS-002). 3. CFG-ESS-006 to CFG-ESS-008 are the emergencyAccess block of the authorization policy content. It holds the roles, the resource types, the reason codes and which need a justification, the minimum justification length, the default window and its overrides by role and care setting, the review timeframe (at most 48 hours), the reviewers, the alert recipients, the review queue and the escalation target. The settings are therefore versioned, approved and activated with the policy (CFG-ESS-006 is "Policy" governed), and a session records the policy version it was started under. Invocation itself is the decision ess.auz.btg.invoke (rule btg-invoke), so a refusal is a stored and audited Deny (AC-07). Reading, listing, reviewing and the patterns are ess.auz.btg.read, .list, .review and .patterns for the reviewer roles (privileged, so at aal2). 4. The session, its audit record and its event commit in one transaction; the alert and tasks are sent from a durable record. The kit's outbox is the durable buffer of the audit record (PR-AUZ-002-5). A failure to write any of them answers 503, and no session exists. In the same transaction, each call that follows the change is written to outbound_request, with its idempotency key: the alert per recipient, the review task, its completion, rerouting and escalation, and the follow-up task. The calls are sent after the commit on a thread of their own, so an invocation never waits on another service, and the job sends them again every emergency-interval until they go through (PR-AUZ-002-3, AC-06). A call on the review task waits until the task exists. Each failure is counted and logged as an error, and the backlog is a gauge. 5. The ETag is the session's version. Links the system sets (the review task, the follow-up task) do not change the version, so a client's If-Match is not invalidated by the background send. 6. An Inappropriate outcome is referred, not opened as an incident by this unit. Security monitoring version 1 has no operation to open an incident. The referral is therefore made in three ways, and securityIncidentId stays absent: - the event EmergencyAccessReviewed with reviewOutcome: inappropriate; - the audit record ess.auz.btg.review-outcome with referral: d02-security-monitoring, which the audit service forwards to D02 (IF-ISE-006); - an alert "referred" to every alert recipient.

When D02 offers an operation to open an incident, it is one more kind of outbound call. 7. What the service determines, never the caller: - careSetting is the subject's organizational unit in MOD-ESS-001; - the recent authentication of part 6.2 is the token's auth_time (its issue time where the identity provider sets none), within 5 minutes; - startedWhileChecksUnavailable is set when the invocation decision could not be obtained. The role is then checked against MOD-ESS-001 alone, and the session opens the record for reading only (DEC-ESS-018). 8. Jobs. Expiry at the end of the window (BR-ESS-011), escalation of a review not completed by its due time (AC-05: once; the review task is reassigned at critical priority to escalateTo, and ReviewOverdue is published) and sending run every emergency-interval (15 seconds). Each is safe on several instances (row locks and idempotency keys).

Consequences

  • A domain unit enforcing a decision needs nothing new: it receives Permit with the session-marker obligation and shows the indicator. The shell (UI-ESS-004) calls suspend, resume and end.
  • The notification type ess.emergency-access-alert, the task types ess.emergency-access-review and ess.emergency-access-follow-up, and the escalation policy ess.emergency-access-review-escalation must be registered in ess-coordination. This unit's service identity must be allowed to create, complete and reassign those tasks there.
  • A role that has no ordinary permit rule for an action has nothing to break the glass to. In the starter content, this is the case for the pharmacist and the allied health professional on the clinical record.
  • Extending a session that is still Active (Q4 on issue #15) keeps version 1's behaviour: a repeat invocation answers the session in force.