Auditing#

Changed in version 2.0.

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 [3]

  • service-started

  • service-shutdown

Service Startup/Shutdown.

Access Grant Service

  • access-grant-activated

  • access-grant-created

  • access-grant-queried

  • access-grant-read

  • access-grant-revoked

  • access-grant-verified

  • access-request-activated

  • access-request-created

  • access-request-read

  • access-request-revoked

  • access-request-verified

  • access-denial-activated

  • access-denial-created

  • access-denial-read

  • access-denial-revoked

  • access-denial-verified

  • request-authorized [1]

  • revocation-status-read [2]

Access Request/Grant/Denial lifecycle events.

New in version 2.1.5.

Authorization Service

  • acr-created

  • acr-updated

  • acr-deleted

  • provisioned-pod-access-control

  • deprovisioned-pod-access-control

ACR Lifecycle events.

Pod Storage Service

  • resource-created

  • resource-updated

  • resource-deleted

Resource Lifecycle events.

  • resource-read

Successful resource read events (GET and HEAD operations).

To enable, see INRUPT_STORAGE_AUDIT_RESOURCE_READ_ENABLED configuration for Pod Storage Service.

New in version 2.1.

Pod Provision Service

  • pod-provisioned

Pod Provisioning.

Query Service

  • query-succeeded

Query events.

Query Indexer

  • ingest-succeeded

  • ingest-failed

Query Indexer events.

Solid OIDC Broker Service

  • openid-backend-idp-login

  • openid-token-requested

  • openid-authorization-initialized

Authentication/Authorization flow.

UMA Service

  • uma-token-created

UMA Grant Flow.

WebID Service

  • webid-created

  • webid-updated

  • webid-deleted

WebID Profile events.

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.

{
   "@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>... ],
   "result": [ <JSON document containing associated results for the event, if any> ],
   "published": "<datetime>",
   "identifier":"<identifier to use for correlated events>"
}

@context

Specifies the JSON-LD contexts.

id

Universally Unique IDentifier (UUID) for the event.

type

An array of event types; e.g., [ "Activity", "Create" ]

name

Name that denotes the event; e.g., service-started, openid-backend-idp-login, resource-created, access-grant-created, etc.

See Audit Events for a list of audited events names.

summary

Short description associated with the message name.

generator

JSON document identifying the software (e.g., service) producing the event. For example, the generator for a Pod provision event:

"generator": {
   "id": "<service URL>"
   "type": ["SoftwareApplication"],
   "name": "<application name>",
   "qualifiedAssociation": "<processId>",
   "wasAssociatedWith": "<Kubernetes pod name>"
}

actor

An array of JSON documents that identify the agents associated with the event. The actor’s identity can be denoted by various combination fo fields, such as (list below is not exhaustive):

  • id field;

  • id and type fields;

  • name field.

The actor field can also be empty ([]) for events not initiated by a user (such as service start events, etc.)

For example:

  • For a Pod provision event:

    "actor": [
       { "id": "https://id.example.com/someusername" }
    ]
    
  • For an Access Request/Grant event, which include the id and the type (to distinguish between Agent’s WebID and Client ID):

    "actor" : [
       {
          "id" : "https://id.example.com/someusername",
          "type" : [
             "Agent"
          ]
       }
    ],
    
  • For IdP login events:

    "actor": [
       { "name": "someusername" }
    ]
    

object

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):

  • id field;

  • id and type fields;

  • name field.

For example, for a Pod provision event:

"object": [
   { "type": [ "Storage" ], "id": "<PodURL>" }
]

For access request/grant/denial creation events (available starting in version 2.1.5), the object may be the created access request/ grant/denial.

Starting in version 2.1, CRUD events, which consist of the resource lifecycle events (resource-updated, resource-created and resource-deleted) as well as the resource-read events, include an object (with type value StorageCreator) that identifies the Pod owner (i.e., the agent designated as the owner during Pod provision):

"object": [{
        ...
    }, {
        "id": "https://id.example.com/someusername",
        "type": ["StorageCreator"]
    }
]

instrument

An array of JSON documents that identify:

  • The clients associated with the event, if any (events such as service-started do not have associated clients).

    For example:

    "instrument" : [
       {
          "id" : "https://start.example.com/app/id"
       }
    ],
    
  • The associated OpenTelemetry instrument info for Access Grant service events. (Starting in 2.1.5)

    For example:

    "instrument" : [
       {
          "traceId" : "7decd3657a9efffc010a4b6a4b3da586",
          "spanId" : "91123fce3c668451",
          "isSampled" : true,
          "name" : "OpenTelemetry Span Context",
          "type" : [
             "SpanContext"
          ]
       }
    ],
    

result

An array of JSON documents that contains associated results. For example, an access-request-verified event includes the results of the verification, or an access-grant-revoked or an access-grant-activated event includes the updated status.

New in version 2.1.5.

published

The timestamp of the event.

identifier

Identifier to use for correlated events from a service that have occurred within the same request.

For examples, see Appendix: Audit Events Examples.

Integration with External Logging Systems#

The ESS Auditing service can log to:

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 and messageId values are taken extracted from the audit event agent 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.