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
fix(gateways): stop caching the reserved addresses
bernie-g911064dd4db1
diff --git a/backend/src/ee/services/dynamic-secret/dynamic-secret-fns.ts b/backend/src/ee/services/dynamic-secret/dynamic-secret-fns.tsindex 5ef3cd61cf..e620e015b6 100644--- a/backend/src/ee/services/dynamic-secret/dynamic-secret-fns.ts+++ b/backend/src/ee/services/dynamic-secret/dynamic-secret-fns.ts@@ -6,11 +6,7 @@ import { BadRequestError } from "@app/lib/errors";import { isPrivateIp } from "@app/lib/ip/ipRange";import { getDbConnectionHost } from "@app/lib/knex";-let reservedIpsCache: { ips: string[]; expiresAt: number } | null = null;-const RESERVED_IPS_TTL_MS = 5 * 60 * 1000;-const getReservedIps = async () => {- if (reservedIpsCache && reservedIpsCache.expiresAt > Date.now()) return reservedIpsCache.ips;const appCfg = getConfig();const reservedHosts = [appCfg.DB_HOST || getDbConnectionHost(appCfg.DB_CONNECTION_URI)].concat((appCfg.DB_READ_REPLICAS || []).map((el) => getDbConnectionHost(el.DB_CONNECTION_URI)),@@ -30,7 +26,6 @@ const getReservedIps = async () => {}}}- reservedIpsCache = { ips: exclusiveIps, expiresAt: Date.now() + RESERVED_IPS_TTL_MS };return exclusiveIps;};diff --git a/frontend/src/pages/organization/NetworkingPage/GatewayDetailsByIDPage/components/GatewayDeploySection/GatewayDeploySection.tsx b/frontend/src/pages/organization/NetworkingPage/GatewayDetailsByIDPage/components/GatewayDeploySection/GatewayDeploySection.tsxindex 73aad58936..3bc5017079 100644--- a/frontend/src/pages/organization/NetworkingPage/GatewayDetailsByIDPage/components/GatewayDeploySection/GatewayDeploySection.tsx+++ b/frontend/src/pages/organization/NetworkingPage/GatewayDetailsByIDPage/components/GatewayDeploySection/GatewayDeploySection.tsx@@ -215,10 +215,7 @@ export const GatewayDeploySection = ({placeholder="gateway.internal:8443"isError={hasListenAddressError}/>- <FieldDescription>- The host and port Infisical dials. The gateway binds this port on every- interface.- </FieldDescription>+ <FieldDescription>The host and port Infisical dials.</FieldDescription><FieldError isOpen={hasListenAddressError}>Enter a host and port, such as gateway.internal:8443.</FieldError>