Skip to content

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

fix(backend): add Doppler provider validation to external migration operations

Igor Correa1972e8eedd4a
diff --git a/backend/src/services/external-migration/external-migration-service.ts b/backend/src/services/external-migration/external-migration-service.ts
index 956f77fe9b..557ca03314 100644
--- a/backend/src/services/external-migration/external-migration-service.ts
+++ b/backend/src/services/external-migration/external-migration-service.ts
@@ -733,7 +733,7 @@ export const externalMigrationServiceFactory = ({
const config = await vaultExternalMigrationConfigDAL.findById(configId);
- if (!config || config.orgId !== actor.orgId) {
+ if (!config || config.orgId !== actor.orgId || config.provider !== ExternalMigrationProviders.Doppler) {
throw new NotFoundError({ message: "Doppler migration config not found" });
}
@@ -824,10 +824,14 @@ export const externalMigrationServiceFactory = ({
const config = await vaultExternalMigrationConfigDAL.findById(id);
- if (!config || config.orgId !== actor.orgId) {
+ if (!config || config.orgId !== actor.orgId || config.provider !== ExternalMigrationProviders.Doppler) {
throw new NotFoundError({ message: "Doppler migration config not found" });
}
+ if (connectionId) {
+ await appConnectionService.connectAppConnectionById(AppConnection.Doppler, connectionId, actor);
+ }
+
return vaultExternalMigrationConfigDAL.updateById(id, { connectionId });
};
@@ -847,7 +851,7 @@ export const externalMigrationServiceFactory = ({
const config = await vaultExternalMigrationConfigDAL.findById(id);
- if (!config || config.orgId !== actor.orgId) {
+ if (!config || config.orgId !== actor.orgId || config.provider !== ExternalMigrationProviders.Doppler) {
throw new NotFoundError({ message: "Doppler migration config not found" });
}