Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UserTask audit events #47496

Merged
merged 2 commits into from
Oct 18, 2024
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
147 changes: 147 additions & 0 deletions api/proto/teleport/legacy/types/events/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4613,6 +4613,9 @@ message OneOf {
events.AutoUpdateAgentPlanCreate AutoUpdateAgentPlanCreate = 185;
events.AutoUpdateAgentPlanUpdate AutoUpdateAgentPlanUpdate = 186;
events.AutoUpdateAgentPlanDelete AutoUpdateAgentPlanDelete = 187;
events.UserTaskCreate UserTaskCreate = 188;
events.UserTaskUpdate UserTaskUpdate = 189;
events.UserTaskDelete UserTaskDelete = 190;
}
}

Expand Down Expand Up @@ -7406,3 +7409,147 @@ message AutoUpdateAgentPlanDelete {
(gogoproto.jsontag) = ""
];
}

// UserTaskCreate is emitted when a user task is created.
message UserTaskCreate {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// Status indicates whether the update was successful.
Status Status = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// ResourceMetadata is a common resource event metadata
ResourceMetadata Resource = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// User is a common user event metadata
UserMetadata User = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// ConnectionMetadata holds information about the connection
ConnectionMetadata Connection = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// UserTaskMetadata holds information about the user task.
UserTaskMetadata UserTask = 6 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
}

// UserTaskUpdate is emitted when a user task is updated.
message UserTaskUpdate {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// Status indicates whether the update was successful.
Status Status = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// ResourceMetadata is a common resource event metadata
ResourceMetadata Resource = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// User is a common user event metadata.
UserMetadata User = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// ConnectionMetadata holds information about the connection.
ConnectionMetadata Connection = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// UserTaskMetadata holds information about the user task.
UserTaskMetadata UserTask = 6 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// CurrentUserTaskState is the current UserTask State.
string CurrentUserTaskState = 7 [(gogoproto.jsontag) = "current_user_task_state"];

// UpdatedUserTaskState is the updated UserTask State.
string UpdatedUserTaskState = 8 [(gogoproto.jsontag) = "updated_user_task_state"];
}

// UserTaskMetadata contains key fields for the UserTask.
message UserTaskMetadata {
// TaskType is type of the task.
string TaskType = 1 [(gogoproto.jsontag) = "user_task_type"];
// IssueType is type of the issue task.
string IssueType = 2 [(gogoproto.jsontag) = "user_task_issue_type"];
// Integration is type of associated integration.
string Integration = 3 [(gogoproto.jsontag) = "user_task_integration"];
}

// UserTaskDelete is emitted when a user task is deleted.
message UserTaskDelete {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// Status indicates whether the update was successful.
Status Status = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// ResourceMetadata is a common resource event metadata
ResourceMetadata Resource = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// User is a common user event metadata
UserMetadata User = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];

// ConnectionMetadata holds information about the connection
ConnectionMetadata Connection = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
}
12 changes: 12 additions & 0 deletions api/types/events/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -2290,3 +2290,15 @@ func (m *CrownJewelUpdate) TrimToMaxSize(_ int) AuditEvent {
func (m *CrownJewelDelete) TrimToMaxSize(_ int) AuditEvent {
return m
}

func (m *UserTaskCreate) TrimToMaxSize(_ int) AuditEvent {
return m
}

func (m *UserTaskUpdate) TrimToMaxSize(_ int) AuditEvent {
return m
}

func (m *UserTaskDelete) TrimToMaxSize(_ int) AuditEvent {
return m
}
Loading
Loading