Skip to content

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

revert: dont use key schema to detect duplicate syncs

Matheus Nogueirada16925d7722
diff --git a/backend/src/services/secret-sync/secret-sync-maps.ts b/backend/src/services/secret-sync/secret-sync-maps.ts
index 4fc85bf0b5..fee1690e67 100644
--- a/backend/src/services/secret-sync/secret-sync-maps.ts
+++ b/backend/src/services/secret-sync/secret-sync-maps.ts
@@ -217,15 +217,8 @@ const defaultDuplicateCheck: DestinationDuplicateCheckFn = async () => true;
const awsDuplicateCheck: DestinationDuplicateCheckFn = async ({ existingSync, newSync, decryptConnection }) => {
if (!newSync.connectionId) return true;
- const existingKeySchema = (existingSync.syncOptions?.keySchema as string) ?? "";
- const newKeySchema = (newSync.syncOptions?.keySchema as string) ?? "";
-
- // Mismatched keySchemas can still conflict (e.g. sync A with keySchema "INFISICAL_{{secretKey}}" and secret HOST
- // vs sync B without keySchema and secret INFISICAL_HOST will write to the same destination key).
- const hasKeySchemaConflict = !existingKeySchema || !newKeySchema || existingKeySchema === newKeySchema;
-
if (existingSync.connectionId === newSync.connectionId) {
- return hasKeySchemaConflict;
+ return true;
}
if (!existingSync.connectionId) return false;
@@ -245,7 +238,7 @@ const awsDuplicateCheck: DestinationDuplicateCheckFn = async ({ existingSync, ne
if (!existingAccountId || !newAccountId) return false;
- return existingAccountId === newAccountId && hasKeySchemaConflict;
+ return existingAccountId === newAccountId;
};
export const DESTINATION_DUPLICATE_CHECK_MAP: Record<SecretSync, DestinationDuplicateCheckFn> = {