Skip to content

Architecture / Decision records / ADR-HIS-105

ADR-HIS-105 Audit category fields in ess-runtime-decision: the account, method and workstation of a sign-in from the identity provider, the digest of an unknown sign-on name, and the item version and before and after values of an administration change

Status Accepted
Decided 2026-11-29 by session RC-1-S28-F16
Record Drafted 2026-11-29; approved 2026-11-30 by the Enterprise Architecture Board
Where the rule lives services/ess-runtime-decision: the kit's AuditRecord and AuditEmitter; mod-ess-001 support.Audit (change, authentication), auth.SignIns, auth.QuickFactor, ports.KeycloakIdentityProvider; mod-ess-002 policy.PolicyVersions

Context

The RC-1 gate (RC-1-S28) found the audit service quarantining 33 events of ess-runtime-decision as schema-invalid. Section 9.5 of D10-ESS makes some fields mandatory by category, and the audit service checks them on intake (SubmissionValidator.categoryErrors, FR-ESS-AUD-001 part 7): - ess.iam.sign-in (authentication and session) had no account, authentication method, or device or workstation; - ess.iam.account, ess.iam.role and ess.auz.policy (administration and configuration) had no item version and no before and after values.

The unit's kit sent the change metadata as details, which the intake schema leaves open and the audit service does not keep, and had no field for the item version. RC-1-S06 had given services/ess-reference's kit these fields, and RC-1-S28-F15 gave them to the event backbone's kit. Each unit has its own copy of the kit (ADR-HIS-044).

Most sign-ins are not requests to this unit. Keycloak reports them, and the unit reads its events with no person in the context. Keycloak knows the user, the client, the assurance and the network address. It does not know the workstation's name.

Decision

  1. This unit's kit carries the category fields. AuditRecord gets four new fields:
  2. resourceVersion, sent as resourceRef.version;
  3. beforeAfter (changed field names, before, after), sent as beforeAfter;
  4. account, the account an authentication and session event is about;
  5. fields, further top-level fields of the category by their intake schema name (authenticationMethod, locationDevice, approver).

details is still sent as it was. The emitter names account as actorHuman only when no person is in the context, and then names no actorService: the person signed in, and the unit only reports it. A person in the context, such as an administrator who unblocks, stays the actor, and the account is the resource. 2. A sign-in from the identity provider names the account (the token subject), and the method from its assurance: password-otp at aal2, otherwise password, which is also the method of a failure. Keycloak knows only the network address of a sign-in (ipAddress of its event). By the ruling on cema-care/his#222, given for the Security and Privacy Office, that address counts as the workstation of a sign-in at the identity provider. It is sent as locationDevice.workstation and also as locationDevice.networkAddress. A badge sign-in names badge-pin and the managed device. 3. A sign-in with a name that no account has names, as its account, a keyed one-way digest of the name typed (unknown-account:hmac-sha256: and 64 hex digits). This follows the ruling on cema-care/his#222. The name itself is never recorded: it may be a password typed into the name field, and FR-ESS-IAM-002 part 12 says credentials are never recorded. The same name, in any case, gives the same digest, so failed sign-on review (FR-ESS-AUD-001 part 5) can count repeated attempts against names that do not exist. - The digest is an HMAC-SHA-256 with the key his.identity.sign-on-name-digest-key, which comes from the secrets store at deployment (SEC-009). An unkeyed hash would let anyone who can read the audit trail recover a short name or a weak password by trying candidates. - Without a configured key, a random key is made at start. Digests are then still one-way, but compare only within one run, and a warning says so. - The prefix sets the value apart from a DE-ESS-001 account_id in actorHuman. 4. An administration change (ess.iam.account, ess.iam.role, ess.auz.policy) names the item's version after the change. It also gives the item's values before and after, with the names of the top-level fields that changed. Before is left out for a creation. An action that changed nothing (a quarantined source event, a SIP end that only suspends roles, a campaign not opened) gives the same values before and after, and names no changed field. Fields starting with an underscore are internal and are left out. - A campaign item has no reference type of its own, so its change names the campaign, at the campaign version the change belongs to, with the item's values. - A policy version's content is referenced by its hash, not copied. - An approval of a role assignment and a recertification decision name the approver, the person deciding.

Consequences

  • The four types pass the audit service's category check. AuditCategoryTest (MOD-ESS-001) and PolicyVersionTest (MOD-ESS-002) check every event they cause with kittest.AuditCategoryRules, a copy of that check.
  • The other types of the two categories in this unit are not yet changed. Their calls still use the old methods: ess.iam.block, session, factor, second-person, service-identity, ess.auz.app-grant and the ess.cfg.item of MOD-ESS-003. Authentication events that come through this unit's API need a workstation that no request carries yet. That is a contract question, recorded as a follow-up of RC-1-S28-F16.
  • When a workstation identity reaches the identity provider (for example passed by the shell), it replaces the network address as the workstation of point 2. The address stays the network address.
  • Each deployment must set his.identity.sign-on-name-digest-key in the secrets store, so that digests compare across restarts and instances. Changing the key makes new digests unlike the old ones.