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: better host validation errors
Daniel Hougaard7d8e16745183
diff --git a/backend/src/ee/services/ai-mcp-server/ai-mcp-server-service.ts b/backend/src/ee/services/ai-mcp-server/ai-mcp-server-service.tsindex 07b0f72b55..33d230123c 100644--- a/backend/src/ee/services/ai-mcp-server/ai-mcp-server-service.ts+++ b/backend/src/ee/services/ai-mcp-server/ai-mcp-server-service.ts@@ -214,7 +214,7 @@ export const aiMcpServerServiceFactory = ({let resourceMetadataUrl: string | null = null;const url = new URL(mcpUrl);- await verifyHostInputValidity(url.hostname, true);+ await verifyHostInputValidity({ host: url.hostname, isGateway: true, isDynamicSecret: false });// 1. Try to access the MCP server to get WWW-Authenticate headertry {@@ -355,7 +355,7 @@ export const aiMcpServerServiceFactory = ({}const urlObj = new URL(url);- await verifyHostInputValidity(urlObj.hostname, true);+ await verifyHostInputValidity({ host: urlObj.hostname, isGateway: true, isDynamicSecret: false });// 1. Discover OAuth metadata following RFC 9728 flowconst { protectedResource, authServer } = await discoverOAuthMetadata(url);diff --git a/backend/src/ee/services/dynamic-secret/dynamic-secret-fns.ts b/backend/src/ee/services/dynamic-secret/dynamic-secret-fns.tsindex a1234f9421..31b857fb9d 100644--- a/backend/src/ee/services/dynamic-secret/dynamic-secret-fns.ts+++ b/backend/src/ee/services/dynamic-secret/dynamic-secret-fns.ts@@ -6,9 +6,15 @@ import { BadRequestError } from "@app/lib/errors";import { isPrivateIp } from "@app/lib/ip/ipRange";import { getDbConnectionHost } from "@app/lib/knex";-const ERROR_MESSAGE = "Invalid host";--export const verifyHostInputValidity = async (host: string, isGateway = false) => {+export const verifyHostInputValidity = async ({+ host,+ isGateway,+ isDynamicSecret = true+}: {+ host: string;+ isGateway?: boolean;+ isDynamicSecret?: boolean;+}) => {const appCfg = getConfig();if (appCfg.isDevelopmentMode || appCfg.isTestMode) return [host];@@ -47,8 +53,12 @@ export const verifyHostInputValidity = async (host: string, isGateway = false) =if (net.isIPv4(host)) {inputHostIps.push(host);} else {- if (normalizedHost === "localhost" || normalizedHost === "host.docker.internal") {- throw new BadRequestError({ message: ERROR_MESSAGE });+ if (!appCfg.DYNAMIC_SECRET_ALLOW_INTERNAL_IP && !appCfg.ALLOW_INTERNAL_IP_CONNECTIONS) {+ if (normalizedHost === "localhost" || normalizedHost === "host.docker.internal") {+ throw new BadRequestError({+ message: `Local host IP addresses (${normalizedHost}) are not allowed. ${!appCfg.isCloud ? `If you are self-hosting, you can allow local host IP addresses by setting the '${isDynamicSecret ? "'DYNAMIC_SECRET_ALLOW_INTERNAL_IP'" : "'ALLOW_INTERNAL_IP_CONNECTIONS'"}' environment variable to 'true' on your instance.` : ""}`+ });+ }}try {const resolvedIps = await dns.resolve4(host);@@ -64,10 +74,16 @@ export const verifyHostInputValidity = async (host: string, isGateway = false) =if (!(appCfg.DYNAMIC_SECRET_ALLOW_INTERNAL_IP || appCfg.ALLOW_INTERNAL_IP_CONNECTIONS)) {const isInternalIp = inputHostIps.some((el) => isPrivateIp(el));- if (isInternalIp) throw new BadRequestError({ message: ERROR_MESSAGE });+ if (isInternalIp)+ throw new BadRequestError({+ message: `Private IP addresses (${normalizedHost}) are not allowed. ${!appCfg.isCloud ? `If you are self-hosting, you can allow private IP addresses by setting the '${isDynamicSecret ? "'DYNAMIC_SECRET_ALLOW_INTERNAL_IP'" : "'ALLOW_INTERNAL_IP_CONNECTIONS'"}' environment variable to 'true' on your instance.` : ""}`+ });}const isAppUsedIps = inputHostIps.some((el) => exclusiveIps.includes(el));- if (isAppUsedIps) throw new BadRequestError({ message: ERROR_MESSAGE });+ if (isAppUsedIps)+ throw new BadRequestError({+ message: `The host ${host} belongs to a service that is in-use by Infisical, such as the Infisical database or Redis instance. You cannot use hosts that are in-use by Infisical.`+ });return inputHostIps;};diff --git a/backend/src/ee/services/dynamic-secret/providers/azure-sql-database.ts b/backend/src/ee/services/dynamic-secret/providers/azure-sql-database.tsindex a722f0c923..a5c1845c07 100644--- a/backend/src/ee/services/dynamic-secret/providers/azure-sql-database.ts+++ b/backend/src/ee/services/dynamic-secret/providers/azure-sql-database.ts@@ -117,7 +117,10 @@ export const AzureSqlDatabaseProvider = ({const validateProviderInputs = async (inputs: unknown) => {const providerInputs = await DynamicSecretAzureSqlDBSchema.parseAsync(inputs);- const [hostIp] = await verifyHostInputValidity(providerInputs.host, Boolean(providerInputs.gatewayId));+ const [hostIp] = await verifyHostInputValidity({+ host: providerInputs.host,+ isGateway: Boolean(providerInputs.gatewayId)+ });validateHandlebarTemplate("Azure SQL master creation", providerInputs.masterCreationStatement, {allowedExpressions: (val) => ["username", "password", "expiration", "database"].includes(val)});diff --git a/backend/src/ee/services/dynamic-secret/providers/cassandra.ts b/backend/src/ee/services/dynamic-secret/providers/cassandra.tsindex 9c0692736f..0c3dae3276 100644--- a/backend/src/ee/services/dynamic-secret/providers/cassandra.ts+++ b/backend/src/ee/services/dynamic-secret/providers/cassandra.ts@@ -25,7 +25,7 @@ export const CassandraProvider = (): TDynamicProviderFns => {providerInputs.host.split(",").filter(Boolean)- .map((el) => verifyHostInputValidity(el).then((ip) => ip[0]))+ .map((el) => verifyHostInputValidity({ host: el }).then((ip) => ip[0])));validateHandlebarTemplate("Cassandra creation", providerInputs.creationStatement, {allowedExpressions: (val) => ["username", "password", "expiration", "keyspace"].includes(val)diff --git a/backend/src/ee/services/dynamic-secret/providers/elastic-search.ts b/backend/src/ee/services/dynamic-secret/providers/elastic-search.tsindex c9c3cd4991..571a53827d 100644--- a/backend/src/ee/services/dynamic-secret/providers/elastic-search.ts+++ b/backend/src/ee/services/dynamic-secret/providers/elastic-search.ts@@ -19,7 +19,7 @@ const generatePassword = () => {export const ElasticSearchProvider = (): TDynamicProviderFns => {const validateProviderInputs = async (inputs: unknown) => {const providerInputs = await DynamicSecretElasticSearchSchema.parseAsync(inputs);- await verifyHostInputValidity(providerInputs.host);+ await verifyHostInputValidity({ host: providerInputs.host });return { ...providerInputs };};diff --git a/backend/src/ee/services/dynamic-secret/providers/mongo-db.ts b/backend/src/ee/services/dynamic-secret/providers/mongo-db.tsindex f626ec5f24..fbff381076 100644--- a/backend/src/ee/services/dynamic-secret/providers/mongo-db.ts+++ b/backend/src/ee/services/dynamic-secret/providers/mongo-db.ts@@ -19,7 +19,7 @@ const generatePassword = (size = 48) => {export const MongoDBProvider = (): TDynamicProviderFns => {const validateProviderInputs = async (inputs: unknown) => {const providerInputs = await DynamicSecretMongoDBSchema.parseAsync(inputs);- await verifyHostInputValidity(providerInputs.host);+ await verifyHostInputValidity({ host: providerInputs.host });return { ...providerInputs };};diff --git a/backend/src/ee/services/dynamic-secret/providers/rabbit-mq.ts b/backend/src/ee/services/dynamic-secret/providers/rabbit-mq.tsindex cfa748b8d8..f6b90f89d6 100644--- a/backend/src/ee/services/dynamic-secret/providers/rabbit-mq.ts+++ b/backend/src/ee/services/dynamic-secret/providers/rabbit-mq.ts@@ -78,7 +78,7 @@ async function deleteRabbitMqUser({ axiosInstance, usernameToDelete }: TDeleteRaexport const RabbitMqProvider = (): TDynamicProviderFns => {const validateProviderInputs = async (inputs: unknown) => {const providerInputs = await DynamicSecretRabbitMqSchema.parseAsync(inputs);- await verifyHostInputValidity(providerInputs.host);+ await verifyHostInputValidity({ host: providerInputs.host });return { ...providerInputs };};diff --git a/backend/src/ee/services/dynamic-secret/providers/redis.ts b/backend/src/ee/services/dynamic-secret/providers/redis.tsindex 0f2ddce777..0b018b7d13 100644--- a/backend/src/ee/services/dynamic-secret/providers/redis.ts+++ b/backend/src/ee/services/dynamic-secret/providers/redis.ts@@ -51,7 +51,7 @@ const executeTransactions = async (connection: Redis, commands: string[]): Promiexport const RedisDatabaseProvider = (): TDynamicProviderFns => {const validateProviderInputs = async (inputs: unknown) => {const providerInputs = await DynamicSecretRedisDBSchema.parseAsync(inputs);- const [hostIp] = await verifyHostInputValidity(providerInputs.host);+ const [hostIp] = await verifyHostInputValidity({ host: providerInputs.host });validateHandlebarTemplate("Redis creation", providerInputs.creationStatement, {allowedExpressions: (val) => ["username", "password", "expiration"].includes(val)});diff --git a/backend/src/ee/services/dynamic-secret/providers/sap-ase.ts b/backend/src/ee/services/dynamic-secret/providers/sap-ase.tsindex 1dd50bb45b..e93765bb8e 100644--- a/backend/src/ee/services/dynamic-secret/providers/sap-ase.ts+++ b/backend/src/ee/services/dynamic-secret/providers/sap-ase.ts@@ -27,7 +27,7 @@ export const SapAseProvider = (): TDynamicProviderFns => {const validateProviderInputs = async (inputs: unknown) => {const providerInputs = await DynamicSecretSapAseSchema.parseAsync(inputs);- await verifyHostInputValidity(providerInputs.host);+ await verifyHostInputValidity({ host: providerInputs.host });validateHandlebarTemplate("SAP ASE creation", providerInputs.creationStatement, {allowedExpressions: (val) => ["username", "password"].includes(val)});diff --git a/backend/src/ee/services/dynamic-secret/providers/sap-hana.ts b/backend/src/ee/services/dynamic-secret/providers/sap-hana.tsindex 1142cf46d5..6551420c3f 100644--- a/backend/src/ee/services/dynamic-secret/providers/sap-hana.ts+++ b/backend/src/ee/services/dynamic-secret/providers/sap-hana.ts@@ -28,7 +28,7 @@ export const SapHanaProvider = (): TDynamicProviderFns => {const validateProviderInputs = async (inputs: unknown) => {const providerInputs = await DynamicSecretSapHanaSchema.parseAsync(inputs);- await verifyHostInputValidity(providerInputs.host);+ await verifyHostInputValidity({ host: providerInputs.host });validateHandlebarTemplate("SAP Hana creation", providerInputs.creationStatement, {allowedExpressions: (val) => ["username", "password", "expiration"].includes(val)});diff --git a/backend/src/ee/services/dynamic-secret/providers/sql-database.ts b/backend/src/ee/services/dynamic-secret/providers/sql-database.tsindex 0815bef61b..d82920444e 100644--- a/backend/src/ee/services/dynamic-secret/providers/sql-database.ts+++ b/backend/src/ee/services/dynamic-secret/providers/sql-database.ts@@ -123,7 +123,10 @@ export const SqlDatabaseProvider = ({const validateProviderInputs = async (inputs: unknown) => {const providerInputs = await DynamicSecretSqlDBSchema.parseAsync(inputs);- const [hostIp] = await verifyHostInputValidity(providerInputs.host, Boolean(providerInputs.gatewayId));+ const [hostIp] = await verifyHostInputValidity({+ host: providerInputs.host,+ isGateway: Boolean(providerInputs.gatewayId)+ });validateHandlebarTemplate("SQL creation", providerInputs.creationStatement, {allowedExpressions: (val) => ["username", "password", "expiration", "database"].includes(val)});diff --git a/backend/src/ee/services/dynamic-secret/providers/vertica.ts b/backend/src/ee/services/dynamic-secret/providers/vertica.tsindex 8fa332bd56..1e0eba5f1b 100644--- a/backend/src/ee/services/dynamic-secret/providers/vertica.ts+++ b/backend/src/ee/services/dynamic-secret/providers/vertica.ts@@ -138,7 +138,10 @@ export const VerticaProvider = ({ gatewayService }: TVerticaProviderDTO): TDynamconst validateProviderInputs = async (inputs: unknown) => {const providerInputs = await DynamicSecretVerticaSchema.parseAsync(inputs);- const [hostIp] = await verifyHostInputValidity(providerInputs.host, Boolean(providerInputs.gatewayId));+ const [hostIp] = await verifyHostInputValidity({+ host: providerInputs.host,+ isGateway: Boolean(providerInputs.gatewayId)+ });validateHandlebarTemplate("Vertica creation", providerInputs.creationStatement, {allowedExpressions: (val) => ["username", "password"].includes(val)});diff --git a/backend/src/ee/services/pam-resource/kubernetes/kubernetes-resource-factory.ts b/backend/src/ee/services/pam-resource/kubernetes/kubernetes-resource-factory.tsindex dddeb37baf..5e83b4f372 100644--- a/backend/src/ee/services/pam-resource/kubernetes/kubernetes-resource-factory.ts+++ b/backend/src/ee/services/pam-resource/kubernetes/kubernetes-resource-factory.ts@@ -30,7 +30,7 @@ export const executeWithGateway = async <T>(): Promise<T> => {const { connectionDetails, gatewayId } = config;const url = new URL(connectionDetails.url);- const [targetHost] = await verifyHostInputValidity(url.hostname, true);+ const [targetHost] = await verifyHostInputValidity({ host: url.hostname, isGateway: true, isDynamicSecret: false });let targetPort: number;if (url.port) {diff --git a/backend/src/ee/services/pam-resource/redis/redis-resource-factory.ts b/backend/src/ee/services/pam-resource/redis/redis-resource-factory.tsindex f238c62f79..efe871c0e7 100644--- a/backend/src/ee/services/pam-resource/redis/redis-resource-factory.ts+++ b/backend/src/ee/services/pam-resource/redis/redis-resource-factory.ts@@ -151,7 +151,11 @@ export const executeWithGateway = async <T>(operation: (connection: RedisResourceConnection) => Promise<T>): Promise<T> => {const { connectionDetails, gatewayId } = config;- const [targetHost] = await verifyHostInputValidity(connectionDetails.host, true);+ const [targetHost] = await verifyHostInputValidity({+ host: connectionDetails.host,+ isGateway: true,+ isDynamicSecret: false+ });const platformConnectionDetails = await gatewayV2Service.getPlatformConnectionDetailsByGatewayId({gatewayId,targetHost,diff --git a/backend/src/ee/services/pam-resource/shared/sql/sql-resource-factory.ts b/backend/src/ee/services/pam-resource/shared/sql/sql-resource-factory.tsindex 26fa7ff39d..db90b159f5 100644--- a/backend/src/ee/services/pam-resource/shared/sql/sql-resource-factory.ts+++ b/backend/src/ee/services/pam-resource/shared/sql/sql-resource-factory.ts@@ -197,7 +197,11 @@ export const executeWithGateway = async <T>(operation: (connection: SqlResourceConnection) => Promise<T>): Promise<T> => {const { connectionDetails, gatewayId } = config;- const [targetHost] = await verifyHostInputValidity(connectionDetails.host, true);+ const [targetHost] = await verifyHostInputValidity({+ host: connectionDetails.host,+ isGateway: true,+ isDynamicSecret: false+ });const platformConnectionDetails = await gatewayV2Service.getPlatformConnectionDetailsByGatewayId({gatewayId,targetHost,diff --git a/backend/src/ee/services/pam-resource/ssh/ssh-resource-factory.ts b/backend/src/ee/services/pam-resource/ssh/ssh-resource-factory.tsindex 59e8dbc827..8016fc538f 100644--- a/backend/src/ee/services/pam-resource/ssh/ssh-resource-factory.ts+++ b/backend/src/ee/services/pam-resource/ssh/ssh-resource-factory.ts@@ -28,7 +28,11 @@ export const executeWithGateway = async <T>(operation: (proxyPort: number) => Promise<T>): Promise<T> => {const { connectionDetails, gatewayId } = config;- const [targetHost] = await verifyHostInputValidity(connectionDetails.host, true);+ const [targetHost] = await verifyHostInputValidity({+ host: connectionDetails.host,+ isGateway: true,+ isDynamicSecret: false+ });const platformConnectionDetails = await gatewayV2Service.getPlatformConnectionDetailsByGatewayId({gatewayId,targetHost,diff --git a/backend/src/ee/services/relay/relay-service.ts b/backend/src/ee/services/relay/relay-service.tsindex 62d496ee89..f1b98ba530 100644--- a/backend/src/ee/services/relay/relay-service.ts+++ b/backend/src/ee/services/relay/relay-service.ts@@ -901,7 +901,10 @@ export const relayServiceFactory = ({});}- await verifyHostInputValidity(relay.host);+ await verifyHostInputValidity({+ host: relay.host,+ isDynamicSecret: false+ });if (relay.orgId === null) {const instanceCAs = await $getInstanceCAs();@@ -958,7 +961,10 @@ export const relayServiceFactory = ({let relay: TRelays;const isOrgRelay = identityId && orgId;- await verifyHostInputValidity(host);+ await verifyHostInputValidity({+ host,+ isDynamicSecret: false+ });if (isOrgRelay) {const { permission } = await permissionService.getOrgPermission({diff --git a/backend/src/ee/services/secret-rotation-v2/redis-credentials/redis-credentials-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/redis-credentials/redis-credentials-rotation-fns.tsindex 41e23a6178..ba59f417e0 100644--- a/backend/src/ee/services/secret-rotation-v2/redis-credentials/redis-credentials-rotation-fns.ts+++ b/backend/src/ee/services/secret-rotation-v2/redis-credentials/redis-credentials-rotation-fns.ts@@ -38,7 +38,7 @@ export const redisCredentialsRotationFactory: TRotationFactory<const { connection, secretsMapping, parameters } = secretRotation;const $getClient = async () => {- const [hostIp] = await verifyHostInputValidity(connection.credentials.host);+ const [hostIp] = await verifyHostInputValidity({ host: connection.credentials.host, isDynamicSecret: false });let conn: Redis | null = null;try {diff --git a/backend/src/ee/services/secret-rotation/secret-rotation-queue/secret-rotation-queue-fn.ts b/backend/src/ee/services/secret-rotation/secret-rotation-queue/secret-rotation-queue-fn.tsindex e204bbef9e..8cc7dac4ba 100644--- a/backend/src/ee/services/secret-rotation/secret-rotation-queue/secret-rotation-queue-fn.ts+++ b/backend/src/ee/services/secret-rotation/secret-rotation-queue/secret-rotation-queue-fn.ts@@ -115,7 +115,7 @@ export const secretRotationDbFn = async ({options}: TSecretRotationDbFn) => {const ssl = ca ? { rejectUnauthorized: false, ca } : undefined;- const [hostIp] = await verifyHostInputValidity(host);+ const [hostIp] = await verifyHostInputValidity({ host, isDynamicSecret: false });const db = knex({client,connection: {diff --git a/backend/src/lib/gateway-v2/gateway-v2.ts b/backend/src/lib/gateway-v2/gateway-v2.tsindex 46abe4bf12..ef6b459f83 100644--- a/backend/src/lib/gateway-v2/gateway-v2.ts+++ b/backend/src/lib/gateway-v2/gateway-v2.ts@@ -30,7 +30,7 @@ export const createRelayConnection = async ({clientPrivateKey: string;serverCertificateChain: string;}): Promise<net.Socket> => {- const [targetHost] = await verifyHostInputValidity(relayHost);+ const [targetHost] = await verifyHostInputValidity({ host: relayHost, isDynamicSecret: false });const [, portStr] = relayHost.split(":");const port = parseInt(portStr, 10) || 8443;diff --git a/backend/src/services/app-connection/github/github-connection-fns.ts b/backend/src/services/app-connection/github/github-connection-fns.tsindex fd142b7aea..f860bd9f14 100644--- a/backend/src/services/app-connection/github/github-connection-fns.ts+++ b/backend/src/services/app-connection/github/github-connection-fns.ts@@ -87,7 +87,7 @@ export const requestWithGitHubGateway = async <T>(await blockLocalAndPrivateIpAddresses(url.toString());- const [targetHost] = await verifyHostInputValidity(url.host, true);+ const [targetHost] = await verifyHostInputValidity({ host: url.host, isGateway: true, isDynamicSecret: false });const connectionDetails = gatewayConnectionDetails;diff --git a/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts b/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.tsindex c166870d43..ddfd4b0851 100644--- a/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts+++ b/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts@@ -142,7 +142,7 @@ export const requestWithHCVaultGateway = async <T>(await blockLocalAndPrivateIpAddresses(url.toString());- const [targetHost] = await verifyHostInputValidity(url.hostname, true);+ const [targetHost] = await verifyHostInputValidity({ host: url.hostname, isGateway: true, isDynamicSecret: false });const relayDetails = await gatewayService.fnGetGatewayClientTlsByGatewayId(gatewayId);const [relayHost, relayPort] = relayDetails.relayAddress.split(":");diff --git a/backend/src/services/app-connection/mongodb/mongodb-connection-fns.ts b/backend/src/services/app-connection/mongodb/mongodb-connection-fns.tsindex 69588a2406..31f0eaa03c 100644--- a/backend/src/services/app-connection/mongodb/mongodb-connection-fns.ts+++ b/backend/src/services/app-connection/mongodb/mongodb-connection-fns.ts@@ -50,7 +50,7 @@ export const createMongoClient = async (normalizedHost = protocolRegex.replace(normalizedHost, "");}- const [hostIp] = await verifyHostInputValidity(normalizedHost);+ const [hostIp] = await verifyHostInputValidity({ host: normalizedHost, isDynamicSecret: false });const isSrv = !credentials.port || isSrvFromHost;const uri = isSrv ? `mongodb+srv://${hostIp}` : `mongodb://${hostIp}:${credentials.port}`;diff --git a/backend/src/services/app-connection/redis/redis-connection-fns.ts b/backend/src/services/app-connection/redis/redis-connection-fns.tsindex 4141d2f9a2..145dc954a2 100644--- a/backend/src/services/app-connection/redis/redis-connection-fns.ts+++ b/backend/src/services/app-connection/redis/redis-connection-fns.ts@@ -17,7 +17,7 @@ export const getRedisConnectionListItem = () => {};export const validateRedisConnectionCredentials = async (config: TRedisConnectionConfig) => {- const [hostIp] = await verifyHostInputValidity(config.credentials.host);+ const [hostIp] = await verifyHostInputValidity({ host: config.credentials.host, isDynamicSecret: false });let connection: Redis | null = null;try {diff --git a/backend/src/services/app-connection/shared/sql/sql-connection-fns.ts b/backend/src/services/app-connection/shared/sql/sql-connection-fns.tsindex 14c4043dd9..be17cf9ff4 100644--- a/backend/src/services/app-connection/shared/sql/sql-connection-fns.ts+++ b/backend/src/services/app-connection/shared/sql/sql-connection-fns.ts@@ -122,7 +122,7 @@ export const getSqlConnectionClient = async (appConnection: Pick<TSqlConnection,return getOracleWalletKnexClient({ username, password, database });}- const [host] = await verifyHostInputValidity(baseHost);+ const [host] = await verifyHostInputValidity({ host: baseHost, isDynamicSecret: false });const client = knex({client: SQL_CONNECTION_CLIENT_MAP[app],@@ -149,7 +149,11 @@ export const executeWithPotentialGateway = async <T>(const { credentials, app, gatewayId } = config;if (gatewayId && gatewayService && gatewayV2Service) {- const [targetHost] = await verifyHostInputValidity(credentials.host, true);+ const [targetHost] = await verifyHostInputValidity({+ host: credentials.host,+ isGateway: true,+ isDynamicSecret: false+ });const platformConnectionDetails = await gatewayV2Service.getPlatformConnectionDetailsByGatewayId({gatewayId,targetHost,