Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Audit records

FerroSMART records every login and every token request as a FHIR R4 AuditEvent, in its own PostgreSQL store. An issued token and its record commit in one transaction; a refusal or a login commits its record alone. When a record cannot be committed, the request fails: the token endpoint answers 503 and issues no token.

What is recorded

EventForm
A token request, granted or refusedThe ITI-71 audit event of IHE Basic Audit Log Patterns 1.1.4, profile IHE.IUA.71: type 110114, subtype ITI-71, the client and the authorization server as agents, the person as agent:user when one logged in, and the HTTP request as the token-request entity, with the values of code_verifier, code, refresh_token, client_secret and client_assertion left out
A login at the identity providerDICOM User Authentication, type 110122 Login
A session ended by back-channel or front-channel logoutDICOM User Authentication, 110123 Logout
A logout at the end-session endpointDICOM User Authentication, 110123 Logout, subtype logged-out

Every other write FerroSMART makes for a person or a client commits with a record of its own, in a form of FerroSMART’s design, since no IHE or BALP pattern covers it. The subtype comes from FerroSMART’s code system urn:ferrosmart:audit-event:

WritetypeSubtypesaction
A code issued, with its basis as the basis detail: page (the person approved on the consent page), remembered (a remembered consent), organisation (the app’s organisation approval) or first-party (the approval of the organisation’s own app)110114authorization-codeC
A consent remembered110113110137, consent-rememberedC
An app disconnected at the management page, with whether a remembered consent was forgotten and how many grants were revoked110113110137, consent-withdrawnD
A code issued on the app’s organisation approval, with no consent page110113110137, consent-organisation-approvedC
A code issued on the first-party approval of the organisation’s own app, with no consent page110113110137, consent-first-party-approvedC
An organisation approval withdrawn110113110137, organisation-approval-withdrawnD
An access token revoked110113token-revokedD
A grant revoked by its refresh token110113grant-revokedD
A refresh token rotated110114refresh-rotatedE
A rotated refresh token repeated by its client within 10 seconds, answered with the same successor110114refresh-repeatedE
A rotated refresh token reused, its grant revoked110113refresh-reusedE
A code redeemed again, its tokens revoked110113code-reusedE
An upstream session ended110114110123, session-endedE
The patient picker’s own token issued110114picker-tokenC
A client registered through the admin API110113110137, client-createdC
A client changed through the admin API110113110137, client-updatedU
A client disabled, with the grants, access tokens and consents it ended110113110137, client-disabledD
A disabled client enabled110113110137, client-enabledU

None of these is an access to a person’s electronic health data. The patient picker, which does read Patient resources and EHRs, writes the access record of Regulation (EU) 2025/327 Annex II 3.2 for each search and read.

[ferrosmart.audit] source_id and site name FerroSMART as the recording system in each record (configuration).

Reading the records

GET {issuer}/audit answers a FHIR searchset Bundle of AuditEvent resources, newest first. The caller presents a bearer token FerroSMART issued for its own issuer with the scope system/AuditEvent.rs: a Backend Services client whose ceiling lists that scope, asking with resource set to the issuer.

ParameterWhat it selects
subjectThe records of one person, by their FerroSMART sub
since, untilAn RFC 3339 instant each, bounding the time
_countHow many records, from 1 to 1000; 100 by default

Each parameter may appear once, and any other is refused. Regulation (EU) 2025/327 Art 9 gives a person access to who accessed their data; the endpoint lets an operator answer that without a database client.

Forwarding to an Audit Record Repository

With [ferrosmart.audit.feed], the store is also an outbox: the ihe-atna forwarder delivers each record to the repository’s FHIR base over the ITI-20 ATX: FHIR Feed, as a create of [base]/AuditEvent, https only, with the retry and credentials the table names. A record the repository refuses stays in the store, stamped for an operator to look at.