Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix: incorrect audit log event usage
Piyush Gupta21c576699e26
diff --git a/backend/src/server/routes/v1/identity-universal-auth-router.ts b/backend/src/server/routes/v1/identity-universal-auth-router.tsindex 25e97f88bb..0443d35dd4 100644--- a/backend/src/server/routes/v1/identity-universal-auth-router.ts+++ b/backend/src/server/routes/v1/identity-universal-auth-router.ts@@ -567,7 +567,7 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => {...req.auditLogInfo,orgId: clientSecretData.orgId,event: {- type: EventType.REVOKE_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRET,+ type: EventType.GET_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRET_BY_ID,metadata: {identityId: clientSecretData.identityId,clientSecretId: clientSecretData.iddiff --git a/frontend/src/hooks/api/auditLogs/constants.tsx b/frontend/src/hooks/api/auditLogs/constants.tsxindex 970e0592dd..33bc2107d4 100644--- a/frontend/src/hooks/api/auditLogs/constants.tsx+++ b/frontend/src/hooks/api/auditLogs/constants.tsx@@ -43,6 +43,8 @@ export const eventToNameMap: { [K in EventType]: string } = {[EventType.REVOKE_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRET]: "Revoke universal auth client secret",[EventType.CLEAR_IDENTITY_UNIVERSAL_AUTH_LOCKOUTS]: "Clear universal auth lockouts",[EventType.GET_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRETS]: "Get universal auth client secrets",+ [EventType.GET_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRET_BY_ID]:+ "Get universal auth client secret by id",[EventType.CREATE_ENVIRONMENT]: "Create environment",[EventType.UPDATE_ENVIRONMENT]: "Update environment",[EventType.DELETE_ENVIRONMENT]: "Delete environment",diff --git a/frontend/src/hooks/api/auditLogs/enums.tsx b/frontend/src/hooks/api/auditLogs/enums.tsxindex b10fcb60a4..ea684a4bbf 100644--- a/frontend/src/hooks/api/auditLogs/enums.tsx+++ b/frontend/src/hooks/api/auditLogs/enums.tsx@@ -48,6 +48,7 @@ export enum EventType {REVOKE_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRET = "revoke-identity-universal-auth-client-secret",CLEAR_IDENTITY_UNIVERSAL_AUTH_LOCKOUTS = "clear-identity-universal-auth-lockouts",GET_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRETS = "get-identity-universal-auth-client-secret",+ GET_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRET_BY_ID = "get-identity-universal-auth-client-secret-by-id",LOGIN_IDENTITY_LDAP_AUTH = "login-identity-ldap-auth",ADD_IDENTITY_LDAP_AUTH = "add-identity-ldap-auth",diff --git a/frontend/src/hooks/api/auditLogs/types.tsx b/frontend/src/hooks/api/auditLogs/types.tsxindex 1bb321fa27..fc15b5064a 100644--- a/frontend/src/hooks/api/auditLogs/types.tsx+++ b/frontend/src/hooks/api/auditLogs/types.tsx@@ -318,6 +318,14 @@ interface GetIdentityUniversalAuthClientSecretsEvent {};}+interface GetIdentityUniversalAuthClientSecretByIdEvent {+ type: EventType.GET_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRET_BY_ID;+ metadata: {+ identityId: string;+ clientSecretId: string;+ };+}+interface RevokeIdentityUniversalAuthClientSecretEvent {type: EventType.REVOKE_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRET;metadata: {@@ -906,6 +914,7 @@ export type Event =| GetIdentityUniversalAuthEvent| CreateIdentityUniversalAuthClientSecretEvent| GetIdentityUniversalAuthClientSecretsEvent+ | GetIdentityUniversalAuthClientSecretByIdEvent| RevokeIdentityUniversalAuthClientSecretEvent| ClearIdentityUniversalAuthLockoutsEvent| CreateEnvironmentEvent