Skip to content

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

initial

Matheus Nogueira8e5761a3867b
diff --git a/backend/src/ee/services/license/license-fns.ts b/backend/src/ee/services/license/license-fns.ts
index 75bad2c30b..b9c997a4b0 100644
--- a/backend/src/ee/services/license/license-fns.ts
+++ b/backend/src/ee/services/license/license-fns.ts
@@ -130,7 +130,8 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({
pam: null,
certManager: null,
secretsTemporaryAccess: null,
- enterprisePamAccount: null
+ enterprisePamAccount: null,
+ crossProjectSecretSharing: false
});
export const setupLicenseRequestWithStore = (
diff --git a/backend/src/ee/services/license/license-types.ts b/backend/src/ee/services/license/license-types.ts
index 0dcd972035..b2490a487c 100644
--- a/backend/src/ee/services/license/license-types.ts
+++ b/backend/src/ee/services/license/license-types.ts
@@ -121,6 +121,7 @@ export type TFeatureSet = {
certManager: null;
secretsTemporaryAccess: null;
enterprisePamAccount: null;
+ crossProjectSecretSharing: false;
};
export type TOrgPlansTableDTO = {
diff --git a/backend/src/server/routes/v1/admin-router.ts b/backend/src/server/routes/v1/admin-router.ts
index c3deb3f3c1..5c07db0fd4 100644
--- a/backend/src/server/routes/v1/admin-router.ts
+++ b/backend/src/server/routes/v1/admin-router.ts
@@ -94,6 +94,7 @@ export const registerAdminRouter = async (server: FastifyZodProvider) => {
const orgId = req.auth?.orgId ?? "";
const latestAvailableVersion = await server.services.updateCheck.getAvailableUpdateVersion();
+ const isCrossProjectSecretSharingEnabled = await canUseCrossProjectSecretSharing(orgId);
if (!isSuperAdminUser) {
// Only return fields the frontend needs before authentication
@@ -113,7 +114,7 @@ export const registerAdminRouter = async (server: FastifyZodProvider) => {
pageFrameContent: config.pageFrameContent,
isPublicSecretSharingDisabled: serverEnvs.DISABLE_PUBLIC_SECRET_SHARING,
licenseServerV2Enabled: serverEnvs.LICENSE_SERVER_V2_MODE === "on",
- isCrossProjectSecretSharingEnabled: canUseCrossProjectSecretSharing(orgId),
+ isCrossProjectSecretSharingEnabled,
latestAvailableVersion
}
};
@@ -131,7 +132,7 @@ export const registerAdminRouter = async (server: FastifyZodProvider) => {
kubernetesAutoFetchServiceAccountToken: serverEnvs.KUBERNETES_AUTO_FETCH_SERVICE_ACCOUNT_TOKEN,
paramsFolderSecretDetectionEnabled: serverEnvs.PARAMS_FOLDER_SECRET_DETECTION_ENABLED,
isOfflineUsageReportsEnabled: hasOfflineLicense,
- isCrossProjectSecretSharingEnabled: canUseCrossProjectSecretSharing(orgId),
+ isCrossProjectSecretSharingEnabled,
latestAvailableVersion
}
};
diff --git a/backend/src/services/project-folder-grant/project-folder-grant-fns.ts b/backend/src/services/project-folder-grant/project-folder-grant-fns.ts
index d1dc9c14e8..37fd0c6910 100644
--- a/backend/src/services/project-folder-grant/project-folder-grant-fns.ts
+++ b/backend/src/services/project-folder-grant/project-folder-grant-fns.ts
@@ -4,12 +4,12 @@ import { requestMemoize } from "@app/lib/request-context/request-memoizer";
import { TOrgDALFactory } from "../org/org-dal";
-export const canUseCrossProjectSecretSharing = (orgId: string) => {
+export const canUseCrossProjectSecretSharing = async (orgId: string) => {
const appCfg = getConfig();
- return appCfg.CROSS_PROJECT_SECRET_SHARING_ORG_WHITELIST.includes(orgId);
+ return appCfg.CROSS_PROJECT_SECRET_SHARING_ORG_WHITELIST.includes(orgId) ?? false;
};
export const isCrossProjectEnabled = async (actorOrgId: string, orgDAL: Pick<TOrgDALFactory, "findOrgById">) => {
const org = await requestMemoize(requestMemoKeys.orgFindOrgById(actorOrgId), () => orgDAL.findOrgById(actorOrgId));
- return canUseCrossProjectSecretSharing(actorOrgId) && (org?.allowCrossProjectSecretSharing ?? false);
+ return await canUseCrossProjectSecretSharing(actorOrgId) && (org?.allowCrossProjectSecretSharing ?? false);
};