Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

requested changes

Daniel Hougaardbfd8b648717a
diff --git a/backend/src/server/routes/v3/external-migration-router.ts b/backend/src/server/routes/v3/external-migration-router.ts
index d7aca92e2b..0681a8bc9e 100644
--- a/backend/src/server/routes/v3/external-migration-router.ts
+++ b/backend/src/server/routes/v3/external-migration-router.ts
@@ -2,7 +2,7 @@ import fastifyMultipart from "@fastify/multipart";
import { z } from "zod";
import { BadRequestError } from "@app/lib/errors";
-import { readLimit } from "@app/server/config/rateLimiter";
+import { writeLimit } from "@app/server/config/rateLimiter";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type";
import { VaultMappingType } from "@app/services/external-migration/external-migration-types";
@@ -17,7 +17,7 @@ export const registerExternalMigrationRouter = async (server: FastifyZodProvider
bodyLimit: MB25_IN_BYTES,
url: "/env-key",
config: {
- rateLimit: readLimit
+ rateLimit: writeLimit
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
handler: async (req) => {
@@ -59,7 +59,7 @@ export const registerExternalMigrationRouter = async (server: FastifyZodProvider
method: "POST",
url: "/vault",
config: {
- rateLimit: readLimit
+ rateLimit: writeLimit
},
schema: {
body: z.object({
diff --git a/frontend/src/hooks/api/migration/mutations.tsx b/frontend/src/hooks/api/migration/mutations.tsx
index 51c0f49107..86ab2377c6 100644
--- a/frontend/src/hooks/api/migration/mutations.tsx
+++ b/frontend/src/hooks/api/migration/mutations.tsx
@@ -45,16 +45,19 @@ export const useImportVault = () => {
mutationFn: async ({
vaultAccessToken,
vaultNamespace,
- vaultUrl
+ vaultUrl,
+ mappingType
}: {
vaultAccessToken: string;
vaultNamespace: string;
vaultUrl: string;
+ mappingType: string;
}) => {
await apiRequest.post("/api/v3/external-migration/vault/", {
vaultAccessToken,
vaultNamespace,
- vaultUrl
+ vaultUrl,
+ mappingType
});
}
});
diff --git a/frontend/src/pages/organization/SettingsPage/components/ImportTab/components/SelectImportFromPlatformModal.tsx b/frontend/src/pages/organization/SettingsPage/components/ImportTab/components/SelectImportFromPlatformModal.tsx
index f596a957de..6da5a44c92 100644
--- a/frontend/src/pages/organization/SettingsPage/components/ImportTab/components/SelectImportFromPlatformModal.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/ImportTab/components/SelectImportFromPlatformModal.tsx
@@ -6,7 +6,7 @@ import { AnimatePresence, motion } from "framer-motion";
import { Modal, ModalContent } from "@app/components/v2";
import { EnvKeyPlatformModal } from "./EnvKeyPlatformModal";
-import { VaultPlatformModal } from "./VaultPlatformModal copy";
+import { VaultPlatformModal } from "./VaultPlatformModal";
type Props = {
isOpen?: boolean;
diff --git a/frontend/src/pages/organization/SettingsPage/components/ImportTab/components/VaultPlatformModal copy.tsx b/frontend/src/pages/organization/SettingsPage/components/ImportTab/components/VaultPlatformModal.tsx
similarity index 97%
rename from frontend/src/pages/organization/SettingsPage/components/ImportTab/components/VaultPlatformModal copy.tsx
rename to frontend/src/pages/organization/SettingsPage/components/ImportTab/components/VaultPlatformModal.tsx
index eee9055df8..6037933aea 100644
--- a/frontend/src/pages/organization/SettingsPage/components/ImportTab/components/VaultPlatformModal copy.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/ImportTab/components/VaultPlatformModal.tsx
@@ -69,8 +69,6 @@ export const VaultPlatformModal = ({ onClose }: Props) => {
});
type TFormData = z.infer<typeof formSchema>;
- const fileUploadRef = useRef<HTMLInputElement>(null);
-
const { mutateAsync: importVault } = useImportVault();
const {
@@ -87,7 +85,8 @@ export const VaultPlatformModal = ({ onClose }: Props) => {
await importVault({
vaultAccessToken: data.vaultAccessToken,
vaultNamespace: data.vaultNamespace,
- vaultUrl: data.vaultUrl
+ vaultUrl: data.vaultUrl,
+ mappingType: data.mappingType
});
createNotification({
title: "Import started",
@@ -97,10 +96,6 @@ export const VaultPlatformModal = ({ onClose }: Props) => {
onClose();
reset();
-
- if (fileUploadRef.current) {
- fileUploadRef.current.value = "";
- }
} catch {
reset();
}