Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 40 additions & 4 deletions api/proto/teleport/legacy/types/events/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3137,18 +3137,19 @@ enum OSType {
// DeviceMetadata groups device information for events.
message DeviceMetadata {
// ID of the device.
string device_id = 1;
string device_id = 1 [(gogoproto.jsontag) = "device_id"];
// OS of the device.
OSType os_type = 2;
OSType os_type = 2 [(gogoproto.jsontag) = "os_type,omitempty"];
// Device inventory identifier.
string asset_tag = 3;
string asset_tag = 3 [(gogoproto.jsontag) = "asset_tag,omitempty"];
// Device credential identifier.
string credential_id = 4;
string credential_id = 4 [(gogoproto.jsontag) = "credential_id,omitempty"];
}

// DeviceEvent is a device-related event.
// The event type (Metadata.Type) for device events is always "device". See the
// event code (Metadata.Code) for its meaning.
// Deprecated: Use DeviceEvent2 instead.
message DeviceEvent {
// Metadata holds common event metadata.
Metadata metadata = 1 [
Expand All @@ -3164,6 +3165,40 @@ message DeviceEvent {
UserMetadata user = 4;
}

// DeviceEvent2 is a device-related event.
// See the "lib/events.Device*Event" and "lib/events.Device*Code" for the
// various event types and codes, respectively.
// Replaces the previous [DeviceEvent] proto, presenting a more standard event
// interface with various embeds.
message DeviceEvent2 {
// Metadata holds common event metadata.
Metadata metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Reserved to avoid clashes with the non-embedded "Status status" field in
// the legacy event.
reserved 2;
// DeviceMetadata holds metadata about the user device.
DeviceMetadata device = 3 [(gogoproto.jsontag) = "device"];
// Reserved to avoid clashes with the non-embedded "UserMetadata user" field
// in the legacy event.
reserved 4;
// Status indicates the outcome of the event.
Status status = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// UserMetadata holds metadata about the user behind the event.
UserMetadata user = 6 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
}

// OneOf is a union of one of audit events submitted to the auth service
message OneOf {
// Event is one of the audit events
Expand Down Expand Up @@ -3287,6 +3322,7 @@ message OneOf {
events.SAMLIdPServiceProviderDelete SAMLIdPServiceProviderDelete = 118;
events.SAMLIdPServiceProviderDeleteAll SAMLIdPServiceProviderDeleteAll = 119;
events.OpenSearchRequest OpenSearchRequest = 120;
events.DeviceEvent2 DeviceEvent2 = 121;
}
}

Expand Down
Loading