Events
The OneWelcome Identity platform reports on a variety of events.
See also Access events and the event store in Tulip.
Public events
Public events have a strictly defined payload taxonomy and version. See Public event payload for the list of public events and their payload structure. When breaking changes are made, the payload version of an event is changed accordingly.
The metadata of a public event has the following fields:
Metadata field | Value format | Example value | Presence | Description |
---|---|---|---|---|
agent | String | d725e807-de02-4f70-a271-040e15b62eee | Optional | This is the identifier of the user or machine that this event can be linked to. |
aggregateId | String | 0b7897ac-3c8f-4067-b23b-d262fc2bffb0 | Required | This is the identifier of the aggregate that triggered this event. The concept of aggregates is used to parallelize event processing. |
category | String | public | Required | The event category is either log or public . It is always public for public events. |
eventId | UUID | 3b307680-2f7f-4186-8495-17d4cb82955b | Required | This is the unique identifier for an event. |
hostIp | String IPv4 or IPv6 |
127.0.0.1 | Optional | This is the IP address of the client from which this event originated. Normally it's the IP address of the user or machine that generated an event. |
metadataVersion | String<major>.<minor> |
1.0 | Required | This is the metadata version of this event. |
occurredTime | ISO 8601 | 2022-07-13T18:59:43.596191+02:00 | Required | OffsetDateTime. This is an immutable representation of a date-time with an offset from UTC/Greenwich in the ISO-8601 calendar system |
payloadVersion | String<major>.<minor> |
1.0 | Required | This is the payload version of this event. |
producerId | String | test-app | Required | This is the service that produced this event. |
producerInstanceId | String | test-app | Required | This is the service that produced this event. |
producerVersion | String | d921970 | Optional | This is the app version of the producer that created this event. |
tenantId | UUID | 50a7dbf5-ce45-4f57-ab9a-554c23510a01 | Required | This is the identifier of the tenant that generated this event. |
tags | Array of predefined values | [ "EXPORTABLE" ] | Optional | This is an array of strings that represent the tags for the current event. Allowed values for public events: EXPORTABLE - the event is meant to be exportable outside of the OneWelcome Identity Platform |
traceId | String | 84e85059-0416-4e4b-85f9-eba03100c7de | Optional | This is a correlation identifier that can be used to trace events originating from the same transaction or request. |
type | String | UserSigedInEvent | Required | The event type always ends with event . |
Example public event:
{
"metadata": {
"type": "UserSignedInEvent",
"category": "public",
"eventId": "3b307680-2f7f-4186-8495-17d4cb82955b",
"aggregateId": "d725e807-de02-4f70-a271-040e15b62eee",
"payloadVersion": "1.0",
"metadataVersion": "1.0",
"producerId": "testInstance",
"producerInstanceId": "testInstance-1",
"occurredTime": "2022-07-13T18:59:43.596191+02:00",
"tenantId": "50a7dbf5-ce45-4f57-ab9a-554c23510a01",
"tags": [
"EXPORTABLE"
],
"producerVersion": "d921970",
"hostIp": "127.0.0.1",
"traceId": "84e85059-0416-4e4b-85f9-eba03100c7de",
"agent": "d725e807-de02-4f70-a271-040e15b62eee"
},
"payload": {
"userId": "d725e807-de02-4f70-a271-040e15b62eee",
"identityProviderId": "test-identity-provider",
"date": "2022-07-13T18:59:43.596191+02:00",
"destination": "test-service-provider"
}
}
Log events
A log event largely follows the same format as a public event. It has metadata that depicts the event type, category, and other fields. The most important difference compared to a public event is that the payload in a log event is optional. In addition, the payload is not versioned and does not follow a strictly defined contract. It is mostly used to provide debug information.
The metadata of a log event contains the following fields:
Metadata field | Value format | Example value | Presence | Description |
---|---|---|---|---|
agent | String | d725e807-de02-4f70-a271-040e15b62eee | Optional | This is the identifier of the user or machine that this event can be linked to. |
description | String | A user signed in | Required | The description provides additional information about an event. |
category | String | log | Required | The event category is either log or public . It is always log for log events |
eventId | UUID | 3b307680-2f7f-4186-8495-17d4cb82955b | Required | This is a unique identifier for an event. |
hostIp | String IPv4 or IPv6 |
127.0.0.1 | Optional | This is the IP address of the client from which this event originated. Typically, it's the IP address of the user or machine that generated the event. |
metadataVersion | String |
1.0 | Required | This is the metadata version of this event. |
occurredTime | ISO 8601 | 2022-07-13T18:59:43.596191+02:00 | Required | OffsetDateTime. This is an immutable representation of a date-time with an offset from UTC/Greenwich in the ISO-8601 calendar system. |
producerId | String | test-app | Required | This is the service that produced this event. |
producerInstanceId | String | test-app | Required | This is the service that produced this event. |
producerVersion | String | d921970 | Optional | This is the app version of the producer that created this event. |
tenantId | UUID | 50a7dbf5-ce45-4f57-ab9a-554c23510a01 | Required | This is the identifier of the tenant that generated this event. |
tags | Array of predefined values | [ "ERROR", "EXPORTABLE" ] | Optional | This is an array of strings that represent the tags for the current event. Allowed values for log events: EXPORTABLE - The event is meant to be exportable outside of the OneWelcome Identity Platform. ERROR - The event is part of a non-happy flow. USER_FACING_FUNCTION - The event is part of a business function that is observable by the user (this excludes strictly technical events). |
traceId | String | 84e85059-0416-4e4b-85f9-eba03100c7de | Optional | This is a correlation identifier that can be used to trace events originating from the same transaction or request. |
type | String | UserSigedInEvent | Required | The event type always ends with event . |
Example log event
{
"metadata": {
"type": "UserSignedInEvent",
"description": "A user signed in"
"category": "log",
"eventId": "3b307680-2f7f-4186-8495-17d4cb82955b",
"metadataVersion": "1.0",
"producerId": "oneex-test-app-1",
"producerInstanceId": "e0d42d60-a0b1-406e-8b55-b49bde0fe532",
"occurredTime": "2022-05-02T12:34:50.747866+02:00",
"tenantId": "50a7dbf5-ce45-4f57-ab9a-554c23510a01",
"tags": [],
"producerVersion": "abcdef",
"agent": "An Agent",
"userAgent": "userAgent",
"hostIp": "127.0.0.1",
"traceId": "84e85059-0416-4e4b-85f9-eba03100c7de"
},
"payload": {}
}
Compatibility guidelines
-
JSON can contain
null
values. Future versions of the OneWelcome Identity Platform might omit event attributes if no value is available. For compatibility reasons, the OneWelcome Identity Platform advises against depending on any processing logic that relies on the presence of attributes having anull
value. -
Future releases of the OneWelcome Identity Platform might introduce new events and new event sub-attributes. Any processing of OneWelcome Identity Platform events should anticipate such changes. The OneWelcome Identity Platform considers the introduction of these additional items as being backwards compatible.