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 type linter
Fang-Pen Lin344d0ef210a7
diff --git a/backend/src/ee/services/pam-account/pam-account-service.ts b/backend/src/ee/services/pam-account/pam-account-service.tsindex eee621b4fc..565507d08a 100644--- a/backend/src/ee/services/pam-account/pam-account-service.ts+++ b/backend/src/ee/services/pam-account/pam-account-service.ts@@ -570,13 +570,29 @@ export const pamAccountServiceFactory = ({const user = await userDAL.findById(actor.id);if (!user) throw new NotFoundError({ message: `User with ID '${actor.id}' not found` });+ const { host, port } =+ resourceType !== PamResource.Kubernetes+ ? connectionDetails+ : (() => {+ const url = new URL(connectionDetails.url);+ let portNumber: number | undefined;+ if (url.port) {+ portNumber = Number(url.port);+ } else {+ portNumber = url.protocol === "https:" ? 443 : 80;+ }+ return {+ host: url.hostname,+ port: portNumber+ };+ })();const gatewayConnectionDetails = await gatewayV2Service.getPAMConnectionDetails({gatewayId,duration,sessionId: session.id,resourceType: resource.resourceType as PamResource,- host: connectionDetails.host,- port: connectionDetails.port,+ host,+ port,actorMetadata: {id: actor.id,type: actor.type,