Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

License check on fnGetGatewayClientTlsByGatewayId

x0322054d8000e33119
diff --git a/backend/src/ee/services/gateway/gateway-service.ts b/backend/src/ee/services/gateway/gateway-service.ts
index 762be864df..5c8ad80bfc 100644
--- a/backend/src/ee/services/gateway/gateway-service.ts
+++ b/backend/src/ee/services/gateway/gateway-service.ts
@@ -566,6 +566,14 @@ export const gatewayServiceFactory = ({
if (!gateway) throw new NotFoundError({ message: `Gateway with ID ${gatewayId} not found.` });
const orgGatewayConfig = await orgGatewayConfigDAL.findById(gateway.orgGatewayRootCaId);
+
+ const orgLicensePlan = await licenseService.getPlan(orgGatewayConfig.orgId);
+ if (!orgLicensePlan.gateway) {
+ throw new BadRequestError({
+ message: "Please upgrade your instance to Infisical's Enterprise plan to use gateways."
+ });
+ }
+
const { decryptor: orgKmsDecryptor } = await kmsService.createCipherPairWithDataKey({
type: KmsDataKey.Organization,
orgId: orgGatewayConfig.orgId