diff --git a/web/packages/teleport/src/Audit/EventList/EventTypeCell.tsx b/web/packages/teleport/src/Audit/EventList/EventTypeCell.tsx index cb5c377d3f6d9..d403cb036f23d 100644 --- a/web/packages/teleport/src/Audit/EventList/EventTypeCell.tsx +++ b/web/packages/teleport/src/Audit/EventList/EventTypeCell.tsx @@ -280,6 +280,9 @@ const EventIconMap: Record = { [eventCodes.USER_TASK_UPDATE]: Icons.Info, [eventCodes.USER_TASK_DELETE]: Icons.Info, [eventCodes.SFTP_SUMMARY]: Icons.FolderPlus, + [eventCodes.PLUGIN_CREATE]: Icons.Info, + [eventCodes.PLUGIN_UPDATE]: Icons.Info, + [eventCodes.PLUGIN_DELETE]: Icons.Info, [eventCodes.UNKNOWN]: Icons.Question, }; diff --git a/web/packages/teleport/src/services/audit/makeEvent.ts b/web/packages/teleport/src/services/audit/makeEvent.ts index 121fca0660ce2..85b47786849ff 100644 --- a/web/packages/teleport/src/services/audit/makeEvent.ts +++ b/web/packages/teleport/src/services/audit/makeEvent.ts @@ -1834,6 +1834,27 @@ export const formatters: Formatters = { return `User [${user}] completed a file transfer on [${server_hostname}]`; }, }, + [eventCodes.PLUGIN_CREATE]: { + type: 'plugin.create', + desc: 'Plugin Created', + format: ({ user, name, plugin_type }) => { + return `User [${user}] created a plugin [${name}] of type [${plugin_type}]`; + }, + }, + [eventCodes.PLUGIN_UPDATE]: { + type: 'plugin.update', + desc: 'Plugin Updated', + format: ({ user, name, plugin_type }) => { + return `User [${user}] updated a plugin [${name}] of type [${plugin_type}]`; + }, + }, + [eventCodes.PLUGIN_DELETE]: { + type: 'plugin.delete', + desc: 'Plugin Deleted', + format: ({ user, name }) => { + return `User [${user}] deleted a plugin [${name}]`; + }, + }, [eventCodes.UNKNOWN]: { type: 'unknown', desc: 'Unknown Event', diff --git a/web/packages/teleport/src/services/audit/types.ts b/web/packages/teleport/src/services/audit/types.ts index 7bc36eaa7a449..fbcbf635b2bd9 100644 --- a/web/packages/teleport/src/services/audit/types.ts +++ b/web/packages/teleport/src/services/audit/types.ts @@ -300,6 +300,9 @@ export const eventCodes = { USER_TASK_CREATE: 'UT001I', USER_TASK_UPDATE: 'UT002I', USER_TASK_DELETE: 'UT003I', + PLUGIN_CREATE: 'PG001I', + PLUGIN_UPDATE: 'PG002I', + PLUGIN_DELETE: 'PG003I', } as const; /** @@ -1693,6 +1696,18 @@ export type RawEvents = { typeof eventCodes.USER_TASK_DELETE, HasName >; + [eventCodes.PLUGIN_CREATE]: RawEvent< + typeof eventCodes.PLUGIN_CREATE, + Merge + >; + [eventCodes.PLUGIN_UPDATE]: RawEvent< + typeof eventCodes.PLUGIN_UPDATE, + Merge + >; + [eventCodes.PLUGIN_DELETE]: RawEvent< + typeof eventCodes.PLUGIN_DELETE, + Merge + >; [eventCodes.SFTP_SUMMARY]: RawEvent< typeof eventCodes.SFTP_SUMMARY, {