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
capability check
x674d2acefdfd
diff --git a/backend/src/ee/routes/v2/gateway-router.ts b/backend/src/ee/routes/v2/gateway-router.tsindex 49f57f2ec8..fe71339d2a 100644--- a/backend/src/ee/routes/v2/gateway-router.ts+++ b/backend/src/ee/routes/v2/gateway-router.ts@@ -73,7 +73,8 @@ export const registerGatewayV2Router = async (server: FastifyZodProvider) => {.object({capabilities: z.object({- pkcs11: z.boolean().optional()+ pkcs11: z.boolean().optional(),+ connectionTest: z.boolean().optional()}).optional()})diff --git a/backend/src/ee/services/gateway-v2/gateway-v2-service.ts b/backend/src/ee/services/gateway-v2/gateway-v2-service.tsindex b3229ca68d..9d59d520b9 100644--- a/backend/src/ee/services/gateway-v2/gateway-v2-service.ts+++ b/backend/src/ee/services/gateway-v2/gateway-v2-service.ts@@ -963,7 +963,7 @@ export const gatewayV2ServiceFactory = ({capabilities}: {orgPermission: OrgServiceActor;- capabilities?: { pkcs11?: boolean };+ capabilities?: { pkcs11?: boolean; connectionTest?: boolean };}) => {const nextCapabilities = capabilities ?? {};diff --git a/backend/src/ee/services/pam-account/pam-account-service.ts b/backend/src/ee/services/pam-account/pam-account-service.tsindex 4a716bf69f..e9bd45d998 100644--- a/backend/src/ee/services/pam-account/pam-account-service.ts+++ b/backend/src/ee/services/pam-account/pam-account-service.ts@@ -140,6 +140,7 @@ export const pamAccountServiceFactory = (deps: TPamAccountServiceFactoryDep) =>membershipRoleDAL,permissionService,kmsService,+ gatewayV2DAL,gatewayV2Service,gatewayPoolService} = deps;@@ -305,6 +306,11 @@ export const pamAccountServiceFactory = (deps: TPamAccountServiceFactoryDep) =>throw new BadRequestError({ message: "A gateway must be attached to this account." });}+ // gateways that predate connection testing don't advertise the capability; skip the test+ const resolvedGateway = await gatewayV2DAL.findOne({ id: gatewayId });+ const capabilities = resolvedGateway?.capabilities as { connectionTest?: boolean } | null | undefined;+ if (!capabilities?.connectionTest) return;+const cd = connectionDetails as { host: string; port: number };const request = buildRequest(connectionDetails, credentials);