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(clickhouse): re-check web access eligibility at connect
bernie-g4ee2cb805077
diff --git a/backend/src/ee/services/pam-web-access/pam-web-access-service.ts b/backend/src/ee/services/pam-web-access/pam-web-access-service.tsindex 3f4ef4c302..0e62af9e95 100644--- a/backend/src/ee/services/pam-web-access/pam-web-access-service.ts+++ b/backend/src/ee/services/pam-web-access/pam-web-access-service.ts@@ -507,6 +507,11 @@ export const pamWebAccessServiceFactory = ({}const rawConnectionDetails = await decrypt(projectId, account.encryptedConnectionDetails);+ // Re-checked here: the account can lose its HTTP port between ticket issue and connect.+ const webAccessBlocked = webAccessUnavailableReason(account.accountType as PamAccountType, rawConnectionDetails);+ if (webAccessBlocked) {+ throw new BadRequestError({ message: webAccessBlocked });+ }const gatewayTarget = await extractGatewayTarget(account.accountType as PamAccountType, rawConnectionDetails);const targetHost = selectedHost || gatewayTarget.host;const credentials = await decrypt(projectId, account.encryptedCredentials);