mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-18 04:58:28 +00:00
misc: added audit logs for kms backup and other minor edits
This commit is contained in:
@@ -281,7 +281,13 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: req.params.workspaceId
|
||||
});
|
||||
|
||||
// TODO: add audit log
|
||||
await server.services.auditLog.createAuditLog({
|
||||
...req.auditLogInfo,
|
||||
projectId: req.params.workspaceId,
|
||||
event: {
|
||||
type: EventType.GET_PROJECT_KMS_BACKUP
|
||||
}
|
||||
});
|
||||
|
||||
return backup;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,8 @@ export enum EventType {
|
||||
UPDATE_KMS = "update-kms",
|
||||
DELETE_KMS = "delete-kms",
|
||||
GET_KMS = "get-kms",
|
||||
UPDATE_PROJECT_KMS = "update-project-kms"
|
||||
UPDATE_PROJECT_KMS = "update-project-kms",
|
||||
GET_PROJECT_KMS_BACKUP = "get-project-kms-backup"
|
||||
}
|
||||
|
||||
interface UserActorMetadata {
|
||||
@@ -1223,6 +1224,10 @@ interface UpdateProjectKmsEvent {
|
||||
};
|
||||
}
|
||||
|
||||
interface GetProjectKmsBackupEvent {
|
||||
type: EventType.GET_PROJECT_KMS_BACKUP;
|
||||
}
|
||||
|
||||
export type Event =
|
||||
| GetSecretsEvent
|
||||
| GetSecretEvent
|
||||
@@ -1329,4 +1334,5 @@ export type Event =
|
||||
| UpdateKmsEvent
|
||||
| DeleteKmsEvent
|
||||
| GetKmsEvent
|
||||
| UpdateProjectKmsEvent;
|
||||
| UpdateProjectKmsEvent
|
||||
| GetProjectKmsBackupEvent;
|
||||
|
||||
Reference in New Issue
Block a user