Skip to content
Closed
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
135 changes: 135 additions & 0 deletions api/proto/teleport/legacy/types/events/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3799,6 +3799,138 @@ message AzureOIDCIntegrationMetadata {
string ClientID = 2 [(gogoproto.jsontag) = "client_id,omitempty"];
}

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

// User is a common user event metadata.
UserMetadata user = 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) = ""
];

PluginMetadata plugin = 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) = ""
];
}

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

// User is a common user event metadata.
UserMetadata user = 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) = ""
];

PluginMetadata plugin = 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) = ""
];
}

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

// User is a common user event metadata.
UserMetadata user = 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) = ""
];

PluginMetadata plugin = 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) = ""
];
}

// PluginMetadata contains information about plugin resources.
message PluginMetadata {
reserved 2;
reserved "plugin";
// plugin_type is the plugin type of the plugin resource.
// The value matches the types.PluginV1.Spec.Type field.
string plugin_type = 1 [(gogoproto.jsontag) = "plugin_type"];

// has_credentials indicates whether the plugin has credentials.
bool has_credentials = 3 [(gogoproto.jsontag) = "has_credentials"];

// reuses_credentials indicates whether the plugin reuses credentials.
bool reuses_credentials = 4 [(gogoproto.jsontag) = "reuses_credentials"];

// plugin_data is the plugin data of the plugin resource.
google.protobuf.Struct plugin_data = 5 [
(gogoproto.jsontag) = "plugin_data,omitempty",
(gogoproto.casttype) = "Struct"
];
}

// 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 @@ -3946,6 +4078,9 @@ message OneOf {
events.IntegrationCreate IntegrationCreate = 165;
events.IntegrationUpdate IntegrationUpdate = 166;
events.IntegrationDelete IntegrationDelete = 167;
events.PluginCreate PluginCreate = 170;
events.PluginUpdate PluginUpdate = 171;
events.PluginDelete PluginDelete = 172;
events.AutoUpdateConfigCreate AutoUpdateConfigCreate = 173;
events.AutoUpdateConfigUpdate AutoUpdateConfigUpdate = 174;
events.AutoUpdateConfigDelete AutoUpdateConfigDelete = 175;
Expand Down
12 changes: 12 additions & 0 deletions api/types/events/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -1980,3 +1980,15 @@ func (m *IntegrationUpdate) TrimToMaxSize(maxSize int) AuditEvent {
func (m *IntegrationDelete) TrimToMaxSize(maxSize int) AuditEvent {
return m
}

func (m *PluginCreate) TrimToMaxSize(maxSize int) AuditEvent {
return m
}

func (m *PluginUpdate) TrimToMaxSize(maxSize int) AuditEvent {
return m
}

func (m *PluginDelete) TrimToMaxSize(maxSize int) AuditEvent {
return m
}
Loading