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: log unmigrated paid orgs and gate Advanced tier in dual-read
Tre Dubrava2da299ef7d80
diff --git a/backend/src/ee/services/license/license-service.ts b/backend/src/ee/services/license/license-service.tsindex 0ad2c39e55..f2f195d7c1 100644--- a/backend/src/ee/services/license/license-service.ts+++ b/backend/src/ee/services/license/license-service.ts@@ -167,6 +167,8 @@ export const licenseServiceFactory = ({.filter((tier) => tier !== "free");if (paidTiers.some((tier) => tier.includes("enterprise"))) {currentPlan.slug = "enterprise";+ } else if (paidTiers.some((tier) => tier.includes("advanced"))) {+ currentPlan.slug = "advanced";} else if (paidTiers.length > 0) {currentPlan.slug = "pro";}diff --git a/backend/src/services/license-client/dual-read/dual-read-service.ts b/backend/src/services/license-client/dual-read/dual-read-service.tsindex 1988827656..666bcade25 100644--- a/backend/src/services/license-client/dual-read/dual-read-service.ts+++ b/backend/src/services/license-client/dual-read/dual-read-service.ts@@ -32,8 +32,9 @@ export const dualReadServiceFactory = ({ licenseClient, envConfig }: TDualReadSereturn;}- // v2 resolves an org with no license to the free tier (every feature source=default). Comparing that- // against the org's real v1 plan is noise, so compare v2 against the v1 free baseline instead.+ // A v2 resolution with every feature at its default (a license that contributes nothing above+ // defaults) is effectively the free tier; comparing that against the org's real v1 plan is noise,+ // so compare v2 against the v1 free baseline instead.const featureValues = Object.values(entitlements.features);const isV2Unlicensed = featureValues.length > 0 && featureValues.every((f) => f.source === "default");let planForCompare = planV1;@@ -41,6 +42,12 @@ export const dualReadServiceFactory = ({ licenseClient, envConfig }: TDualReadSeplanForCompare = getFreeTierPlan();}+ // A paid v1 org that resolves to all-defaults in v2 is a cutover downgrade risk; the swap above+ // would otherwise mask it as identical telemetry to a genuinely free org.+ if (isV2Unlicensed && planV1.slug && planV1.slug !== "starter") {+ logger.warn(`license-dual-read: paid v1 org unlicensed in v2 [orgId=${orgId}] [v1Slug=${planV1.slug}]`);+ }+const discrepancies = compareEntitlements(planForCompare, entitlements, FEATURE_MAPPINGS);const diffs = discrepancies.filter((d) => d.kind !== DualReadDiffKind.Match);diff --git a/frontend/src/pages/organization/BillingPage/components/BillingCloudTab/PreviewSection.tsx b/frontend/src/pages/organization/BillingPage/components/BillingCloudTab/PreviewSection.tsxindex e16d858c81..6cc01abdd9 100644--- a/frontend/src/pages/organization/BillingPage/components/BillingCloudTab/PreviewSection.tsx+++ b/frontend/src/pages/organization/BillingPage/components/BillingCloudTab/PreviewSection.tsx@@ -111,6 +111,7 @@ export const PreviewSection = () => {<div>{subscription &&subscription?.slug !== SubscriptionPlanTypes.Enterprise &&+ subscription?.slug !== SubscriptionPlanTypes.Advanced &&subscription?.slug !== SubscriptionPlanTypes.Pro &&subscription?.slug !== SubscriptionPlanTypes.ProAnnual && (<div className="flex flex-row space-x-6">