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: remove project app connection from vault config modal and add verification on service layer
adilsona8fd62ff0410
diff --git a/backend/src/services/external-migration/external-migration-service.ts b/backend/src/services/external-migration/external-migration-service.tsindex a84b4dd313..03a996331d 100644--- a/backend/src/services/external-migration/external-migration-service.ts+++ b/backend/src/services/external-migration/external-migration-service.ts@@ -348,6 +348,13 @@ export const externalMigrationServiceFactory = ({connection: THCVaultConnection;namespace: string;}) => {+ if (connection.projectId != null) {+ throw new BadRequestError({+ message:+ "Vault external migration requires an organization-level HashiCorp Vault app connection. Project-scoped app connections cannot be used."+ });+ }+// Allow root namespace access when no namespace is configured on the connectionconst isRootAccess = namespace === "root" || namespace === "/";const hasNoNamespace = connection.credentials.namespace === undefined;diff --git a/frontend/src/pages/organization/SettingsPage/components/ExternalMigrationsTab/components/VaultNamespaceConfigModal.tsx b/frontend/src/pages/organization/SettingsPage/components/ExternalMigrationsTab/components/VaultNamespaceConfigModal.tsxindex 049df139d1..516266b19c 100644--- a/frontend/src/pages/organization/SettingsPage/components/ExternalMigrationsTab/components/VaultNamespaceConfigModal.tsx+++ b/frontend/src/pages/organization/SettingsPage/components/ExternalMigrationsTab/components/VaultNamespaceConfigModal.tsx@@ -55,7 +55,8 @@ export const VaultNamespaceConfigModal = ({ isOpen, onOpenChange, editConfig }:const { data: appConnections = [], isPending: isLoadingConnections } = useListAppConnections();const vaultConnections = useMemo(- () => appConnections.filter((conn) => conn.app === AppConnection.HCVault),+ () =>+ appConnections.filter((conn) => conn.app === AppConnection.HCVault && conn.projectId == null),[appConnections]);