Skip to content

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

feat: added env for dynamic secret to allow internal ip

=141a8210915d
diff --git a/backend/src/ee/services/dynamic-secret/dynamic-secret-fns.ts b/backend/src/ee/services/dynamic-secret/dynamic-secret-fns.ts
index d4b634b5df..4bd384bcf6 100644
--- a/backend/src/ee/services/dynamic-secret/dynamic-secret-fns.ts
+++ b/backend/src/ee/services/dynamic-secret/dynamic-secret-fns.ts
@@ -42,7 +42,7 @@ export const verifyHostInputValidity = async (host: string, isGateway = false) =
inputHostIps.push(...resolvedIps);
}
- if (!isGateway) {
+ if (!isGateway && !appCfg.DYNAMIC_SECRET_ALLOW_INTERNAL_IP) {
const isInternalIp = inputHostIps.some((el) => isPrivateIp(el));
if (isInternalIp) throw new BadRequestError({ message: "Invalid db host" });
}
diff --git a/backend/src/lib/config/env.ts b/backend/src/lib/config/env.ts
index 0906e5269c..10ab16b979 100644
--- a/backend/src/lib/config/env.ts
+++ b/backend/src/lib/config/env.ts
@@ -193,6 +193,7 @@ const envSchema = z
GATEWAY_RELAY_REALM: zpStr(z.string().optional()),
GATEWAY_RELAY_AUTH_SECRET: zpStr(z.string().optional()),
+ DYNAMIC_SECRET_ALLOW_INTERNAL_IP: zodStrBool.default("false"),
/* ----------------------------------------------------------------------------- */
/* App Connections ----------------------------------------------------------------------------- */