Auditing#
ESS services support the auditing of their activities.
Note
To ensure that audit messages are delivered, the Audit service may send the message more than once.
For instance, multiple instances of the Audit service may exist when
applying configuration changes or when performing a rolling upgrade.
During this time, duplicate messages (i.e., messages with the same
unique id
value) can occur if the old Audit instance processes a
message but shuts down before acknowledging the message on Kafka,
and then, the new Audit instance processes the unacknowledged
message.
Audit Events#
The following events are audited:
Services |
Event Name |
Notes |
---|---|---|
Most Services [4] |
|
Service Startup/Shutdown. |
Access Grant Service |
|
Access Request/Grant/Denial lifecycle events. Added in version 2.2.0: [3] |
Authorization Service |
|
ACR Lifecycle events. |
Pod Storage Service |
|
Resource Lifecycle events. |
|
Successful resource read events ( To enable, see
Added in version 2.1. |
|
Pod Provision Service |
|
Pod Provisioned event. |
Query Service |
|
Query events. |
Query Indexer |
|
Query Indexer events. |
Solid OIDC Broker Service |
|
Authentication/Authorization flow. |
UMA Service |
|
UMA Grant Flow. |
WebID Service |
|
WebID Profile events. |
The following services do not produce audit events:
Notification Gateway service
WebSocket Notification service
Start service
Note
ESS uses asynchronous messaging for auditing.
Audit Event Message Internal Format#
Internally, ESS’ audit event messages are in RDF and serialized as ActivityStreams 2.0 JSON-LD documents:
Note
Although the following document shows all possible fields for an event message, the specific events determine which fields appear.
Starting in version 2.2, Pod-related event messages include:
the actor information (WebID)
the application information (Client ID).
the Pod information (Pod root url and Pod data subject)
{
"@context":[
"https://www.w3.org/ns/activitystreams",
"https://schema.inrupt.com/audit/v1.jsonld"
],
"id":"<UUID of the event>",
"type": [ "Activity", <type2>,... ],
"name":"<event name>",
"summary": "<event description>",
"generator": <JSON document identifying the software producing the event>,
"actor": [ <JSON document identifying the actor associated with the event>, ... ],
"object": [ <JSON document identifying the object associated with the event>, ... ],
"instrument": [ <JSON document identifying the client/application associated with the event>,
<JSON document with associated OpenTelemetry data>,
<JSON document with associated application-defined metadata>,
<JSON document identifying the Pod root and data subject>, ... ],
"result": [ <JSON document containing associated results for the event, if any> ],
"published": "<datetime>",
"identifier":"<identifier to use for correlated events>"
}
|
Specifies the JSON-LD contexts. |
|
Universally Unique IDentifier (UUID) for the event. |
|
An array of event types; e.g., |
|
Name that denotes the event; e.g., See Audit Events for a list of audited events names. |
|
Short description associated with the message |
|
JSON document identifying the software (e.g., service)
producing the event. For example, the "generator": {
"id": "<service URL>"
"type": ["SoftwareApplication"],
"name": "<application name>",
"qualifiedAssociation": "<processId>",
"wasAssociatedWith": "<Kubernetes pod name>"
}
|
|
An array of JSON documents that identify the agents, if any, associated with the event. The actor’s identity can be denoted by various combination of fields, such as (list below is not exhaustive):
The field can also be empty Note Starting in version 2.2, For example:
|
|
An array of JSON documents that identify the objects associated with the event; that is, the object(s) against which the action is performed. The object can be denoted by various combination of fields, such as (list below is not exhaustive):
For example:
|
|
An array of JSON documents that identify:
|
|
An array of JSON documents that contains associated results. For example:
Added in version 2.1.5. |
|
The timestamp of the event. |
|
Identifier to use for correlated events from a single
service that have occurred within the same request. To correlate
events across services for a request, use the OpenTelemetry
|
For examples, see Appendix: Audit Events Examples.
Integration with External Logging Systems#
The ESS Auditing service can log to:
sysout
(default) [7]Syslog
When logging audit messages to sysout
(the default), Auditing
service uses the shared ESS logging components (available
starting in 2.2.0), which use JSON as the default
formatting for log messages. As such, starting in 2.2.0, audit
messages logged to sysout
are contained in the auditEvent
field of the log message. The audit event message itself (i.e., the
auditEvent
value in v2.2+) is serialized as a JSON-LD documents
(as in earlier releases).
Syslog#
When integrating with Syslog, ESS audit events are converted to Syslog message format:
<priority>version timestamp hostname service processId messageId message
Where:
hostname
,service
,processId
andmessageId
values are taken extracted from the audit eventagent
field.message
is the full ESS audit event in JSON.
For more information, see Integration with Syslog and
Microsoft Sentinel#
When integrating with Microsoft Sentinel, the ESS audit events
are converted into a Sentinel-specific format and POST
’ed to the Sentinel
service.
For more information, see Integration with Sentinel.