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
feat: added kms deletion on project deletion and removed e2ee blind index upgrade banner
=6e7997b1bdc9
diff --git a/backend/src/services/kms/kms-service.ts b/backend/src/services/kms/kms-service.tsindex 08465284b6..d5a48ddeff 100644--- a/backend/src/services/kms/kms-service.ts+++ b/backend/src/services/kms/kms-service.ts@@ -102,6 +102,13 @@ export const kmsServiceFactory = ({return doc;};+ const deleteInternalKms = async (kmsId: string, orgId: string, tx?: Knex) => {+ const kms = await kmsDAL.findByIdWithAssociatedKms(kmsId, tx);+ if (kms.isExternal) return;+ if (kms.orgId !== orgId) throw new BadRequestError({ message: "KMS doesn't belong to organization" });+ return kmsDAL.deleteById(kmsId, tx);+ };+/** Simple encryption service function to do all the encryption tasks in infisical* This can be even later exposed directly as api for encryption as function@@ -794,6 +801,7 @@ export const kmsServiceFactory = ({return {startService,generateKmsKey,+ deleteInternalKms,encryptWithKmsKey,decryptWithKmsKey,encryptWithInputKey,diff --git a/backend/src/services/project/project-service.ts b/backend/src/services/project/project-service.tsindex bfb7fcbab0..d1f393e7b1 100644--- a/backend/src/services/project/project-service.ts+++ b/backend/src/services/project/project-service.ts@@ -81,6 +81,7 @@ type TProjectServiceFactoryDep = {| "loadProjectKeyBackup"| "getKmsById"| "getProjectSecretManagerKmsKeyId"+ | "deleteInternalKms">;};@@ -337,7 +338,12 @@ export const projectServiceFactory = ({const deletedProject = await projectDAL.transaction(async (tx) => {const delProject = await projectDAL.deleteById(project.id, tx);const projectGhostUser = await projectMembershipDAL.findProjectGhostUser(project.id, tx).catch(() => null);-+ if (delProject.kmsCertificateKeyId) {+ await kmsService.deleteInternalKms(delProject.kmsCertificateKeyId, delProject.orgId, tx);+ }+ if (delProject.kmsSecretManagerKeyId) {+ await kmsService.deleteInternalKms(delProject.kmsSecretManagerKeyId, delProject.orgId, tx);+ }// Delete the org membership for the ghost user if it's found.if (projectGhostUser) {await userDAL.deleteById(projectGhostUser.id, tx);diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/E2EESection/E2EESection.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/E2EESection/E2EESection.tsxdeleted file mode 100644index f0f9218348..0000000000--- a/frontend/src/views/Settings/ProjectSettingsPage/components/E2EESection/E2EESection.tsx+++ /dev/null@@ -1,38 +0,0 @@-import Link from "next/link";--import { UpgradeProjectAlert } from "@app/components/v2/UpgradeProjectAlert";-import { useWorkspace } from "@app/context";-import { useGetWorkspaceBot } from "@app/hooks/api";-import { ProjectVersion } from "@app/hooks/api/workspace/types";--export const E2EESection = () => {- const { currentWorkspace } = useWorkspace();- const { data: bot } = useGetWorkspaceBot(currentWorkspace?.id ?? "");-- if (!currentWorkspace) return null;-- return bot && currentWorkspace.version === ProjectVersion.V1 ? (- <div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">- <div className="flex w-full items-center justify-between">- <p className="text-xl font-semibold">End-to-End Encryption</p>- <UpgradeProjectAlert transparent project={currentWorkspace} />- </div>-- <p className="mt-5 max-w-2xl text-sm text-gray-400">- We are updating our encryption logic to make sure that Infisical can be the most versatile- secret management platform. <br />- <br />- Upgrading the project version is required to continue receiving the latest improvements and- patches.- </p>-- <Link href="https://infisical.com/docs/documentation/platform/project-upgrade">- <a target="_blank" className="text-sm text-primary-400">- Learn more about project upgrades- </a>- </Link>- </div>- ) : (- <div />- );-};diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/E2EESection/index.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/E2EESection/index.tsxdeleted file mode 100644index 448f868418..0000000000--- a/frontend/src/views/Settings/ProjectSettingsPage/components/E2EESection/index.tsx+++ /dev/null@@ -1 +0,0 @@-export { E2EESection } from "./E2EESection";diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectGeneralTab/ProjectGeneralTab.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectGeneralTab/ProjectGeneralTab.tsxindex c7da5fd28c..992b1b6c69 100644--- a/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectGeneralTab/ProjectGeneralTab.tsx+++ b/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectGeneralTab/ProjectGeneralTab.tsx@@ -2,7 +2,6 @@ import { AuditLogsRetentionSection } from "../AuditLogsRetentionSection";import { AutoCapitalizationSection } from "../AutoCapitalizationSection";import { BackfillSecretReferenceSecretion } from "../BackfillSecretReferenceSection";import { DeleteProjectSection } from "../DeleteProjectSection";-import { E2EESection } from "../E2EESection";import { EnvironmentSection } from "../EnvironmentSection";import { PointInTimeVersionLimitSection } from "../PointInTimeVersionLimitSection";import { ProjectNameChangeSection } from "../ProjectNameChangeSection";@@ -16,7 +15,6 @@ export const ProjectGeneralTab = () => {<EnvironmentSection /><SecretTagsSection /><AutoCapitalizationSection />- <E2EESection /><PointInTimeVersionLimitSection /><AuditLogsRetentionSection /><BackfillSecretReferenceSecretion />diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/index.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/index.tsxindex 9d97c8bb82..57b2e82c47 100644--- a/frontend/src/views/Settings/ProjectSettingsPage/components/index.tsx+++ b/frontend/src/views/Settings/ProjectSettingsPage/components/index.tsx@@ -1,7 +1,6 @@export { AutoCapitalizationSection } from "./AutoCapitalizationSection";export { BackfillSecretReferenceSecretion } from "./BackfillSecretReferenceSection";export { DeleteProjectSection } from "./DeleteProjectSection";-export { E2EESection } from "./E2EESection";export { EnvironmentSection } from "./EnvironmentSection";export { ProjectNameChangeSection } from "./ProjectNameChangeSection";export { SecretTagsSection } from "./SecretTagsSection";