feat(audit-logs): Audit org updates, project create / update / delete

This commit is contained in:
x032205
2025-05-17 03:02:33 -04:00
parent df053bbae9
commit 2cbad206b5
7 changed files with 164 additions and 32 deletions
@@ -315,7 +315,6 @@ export enum EventType {
CREATE_PROJECT_TEMPLATE = "create-project-template",
UPDATE_PROJECT_TEMPLATE = "update-project-template",
DELETE_PROJECT_TEMPLATE = "delete-project-template",
APPLY_PROJECT_TEMPLATE = "apply-project-template",
GET_APP_CONNECTIONS = "get-app-connections",
GET_AVAILABLE_APP_CONNECTIONS_DETAILS = "get-available-app-connections-details",
GET_APP_CONNECTION = "get-app-connection",
@@ -375,7 +374,13 @@ export enum EventType {
MICROSOFT_TEAMS_WORKFLOW_INTEGRATION_LIST = "microsoft-teams-workflow-integration-list",
PROJECT_ASSUME_PRIVILEGE_SESSION_START = "project-assume-privileges-session-start",
PROJECT_ASSUME_PRIVILEGE_SESSION_END = "project-assume-privileges-session-end"
PROJECT_ASSUME_PRIVILEGE_SESSION_END = "project-assume-privileges-session-end",
UPDATE_ORG = "update-org",
CREATE_PROJECT = "create-project",
UPDATE_PROJECT = "update-project",
DELETE_PROJECT = "delete-project"
}
export const filterableSecretEvents: EventType[] = [
@@ -2451,14 +2456,6 @@ interface DeleteProjectTemplateEvent {
};
}
interface ApplyProjectTemplateEvent {
type: EventType.APPLY_PROJECT_TEMPLATE;
metadata: {
template: string;
projectId: string;
};
}
interface GetAppConnectionsEvent {
type: EventType.GET_APP_CONNECTIONS;
metadata: {
@@ -2913,6 +2910,26 @@ interface MicrosoftTeamsWorkflowIntegrationUpdateEvent {
};
}
interface OrgUpdateEvent {
type: EventType.UPDATE_ORG;
metadata: Record<string, string | boolean | object | number>; // The update parameters
}
interface ProjectCreateEvent {
type: EventType.CREATE_PROJECT;
metadata: Record<string, string | boolean | object | number>; // The creation parameters
}
interface ProjectUpdateEvent {
type: EventType.UPDATE_PROJECT;
metadata: Record<string, string | boolean | object | number>; // The update parameters
}
interface ProjectDeleteEvent {
type: EventType.DELETE_PROJECT;
metadata: Record<string, string>;
}
export type Event =
| GetSecretsEvent
| GetSecretEvent
@@ -3117,7 +3134,6 @@ export type Event =
| CreateProjectTemplateEvent
| UpdateProjectTemplateEvent
| DeleteProjectTemplateEvent
| ApplyProjectTemplateEvent
| GetAppConnectionsEvent
| GetAvailableAppConnectionsDetailsEvent
| GetAppConnectionEvent
@@ -3179,4 +3195,8 @@ export type Event =
| MicrosoftTeamsWorkflowIntegrationGetTeamsEvent
| MicrosoftTeamsWorkflowIntegrationGetEvent
| MicrosoftTeamsWorkflowIntegrationListEvent
| MicrosoftTeamsWorkflowIntegrationUpdateEvent;
| MicrosoftTeamsWorkflowIntegrationUpdateEvent
| OrgUpdateEvent
| ProjectCreateEvent
| ProjectUpdateEvent
| ProjectDeleteEvent;
@@ -26,8 +26,8 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({
customRateLimits: false,
customAlerts: false,
secretAccessInsights: false,
auditLogs: false,
auditLogsRetentionDays: 0,
auditLogs: true,
auditLogsRetentionDays: 2,
auditLogStreams: false,
auditLogStreamLimit: 3,
samlSSO: false,